Specify org-mode clocktable starting time as an hour offset - emacs

Since I often work until after midnight, I'd prefer to have the day start at 6am when tallying my total working hours. However, I cannot figure out how to specify that time range for my clocktable.
I've tried several options, such as
+BEGIN: clocktable :maxlevel 2 :scope file :link t :timestamp t :tstart "<-4h>"
and
#+BEGIN: clocktable :maxlevel 2 :scope file :link t :timestamp t :tstart "<today 06:00>" :tend now
I also tried to modify org-extend-today-until as mentioned in Change the hour when org-mode is starting new day but with no avail.

Related

Sort todos in agenda todo list view in reversed order

When I call org-agenda and further strike t invoke org-todo-list,
All the todos are sorted by ascending order on the last modification time of files where they reside.
So the latest task in the latest modified file will be place to the bottom of the buffer.
Is it possible to sort them in reverse order? that is:
org-capture then call org-todo-list, and all tasks are sorted by reversed order of the modification time of file they locate.
org-agenda-sorting-strategy-selected is nil, but
org-agenda-sorting-strategy is
((agenda habit-down time-up priority-down category-keep)
(todo priority-down category-keep)
(tags priority-down category-keep)
(search category-keep))
The display of todo-list now is:
filename
2021-01 TODO:...
2021-02 TODO:...
2021-03 TODO:...
Today TODO:...
and the desired look I want:
Today TODO:...
2021-03 TODO:...
2021-02 TODO:...
2021-01 TODO:...
I tried to changed filename or categories but such efforts do not alter the sorting.

org-agenda-span to display the 3 days of yesterday, today and tomorrow

I am reading The Org Manual: Weekly/daily agenda
and customized the variable org-agenda-span as 3
The agenda then displayed the three days of today and the next two days.
I think it better to display the 3 days as "yesterday, today and tomorrow`.
Is it possible to achieve it?
I achieved the same by setting the variable org-agenda-start-day to -1 in one of my custom agenda commands.
Hope this helps.

Emacs Org Mode: How To Stop Total in Column View Showing Number of Days?

I'm using Emacs 23.4.1 and Org-Mode 8.0.6
In my org file I have the estimated number of hours that a task will take using the Effort property of the associated heading. For example:
* My Tasks
** TODO Read a book...
** TODO Watch a film...
** TODO Learn org-mode
:PROPERTIES:
:Effort: 2:00
:END:
Then I can switch to column view and view the total time estimated for all of "my tasks". I do this by adding the following line to my org file:
#+COLUMNS: %55ITEM(Details) %5Effort(Time){:}
When the total number of hours is greater than 24, then the total is displayed in terms of days and hours, e.g. 3d 14. How can I format the display so that it tells me the total number of hours (and minutes), rather than breaking it into days?
(In short, I want the total effort of "My Tasks" to display 86:00, rather than 3d 14.)
See the var org-time-clocksum-format:
;; format string used when creating CLOCKSUM lines and when generating a
;; time duration (avoid showing days)
(setq org-time-clocksum-format
'(:hours "%d" :require-hours t :minutes ":%02d" :require-minutes t))
The accepted answer did not work for me. I was going to display CLOCKSUM in hours. This worked:
(setq org-duration-format 'h:mm)

In emacs org-agenda clock report, the headline display as ... if it is a long hyperlinks?

In org-agenda, we can use clock report (org-agenda-clockreport-mode) for time spent. Now I encounter such issue:
1) A task header line with long hyperlink format, for example:
* TODO [[outlook:00000000D94CA2AC786588429B27FF9F5ADE02C207003CACBF968BF6D844ACDE08872A34BAA7000000236CFA0000641BF72F869D49499551670BAC68BD2600001BC8C6620000][Just a test email from outlook]]
2) Set the parameter-plist as this, note that I need the ':link t' parameter.
(setq org-agenda-clockreport-parameter-plist
(quote (:link t :maxlevel 5 :fileskip0 t :compact t :narrow 80)))
3) Generate the clock report in org-agenda (day/weekly), but the Headline only display '...' because it is too long.
How can it remove the [outlook:....] part in the org-agenda-clock-report mode?
The easiest solution would be to change your capture template or method of adding tasks to avoid links in headlines. Links in headlines can cause odd behaviour in the Agenda as well as in exports potentially.
If you change the example to:
* TODO Just a test email from Outlook
[[outlook:00000000D94CA2AC786588429B27FF9F5ADE02C207003CACBF968BF6D844ACDE08872A34BAA7000000236CFA0000641BF72F869D49499551670BAC68BD2600001BC8C6620000][Just a test email from outlook]]

Org-mode: how to convert date format?

I'm using Emacs org-mode's agenda feature.
When I put a timestamp on an item in my gtd.org file, with C-c . , it will show up in my agenda for the week. The date is in this format: <2011-12-25 Sun>
If I use M-x holidays to get a list of holidays, the dates are in this format:
Sunday, December 25, 2011: Christmas
How can I add holidays to my gtd.org file, in a format that shows up in the agenda?
I've looked through the Emacs manual and the org-mode manual, for either a way to change the date formats in 'holidays', or a way to convert a date into org-mode's format.
You can add them to the calendar by adding the following SEXP to your org file:
%%(org-calendar-holidays)
See: Calendar/Diary Integration
The specifc entry in your org file could be as follows (This works just like this):
* Holidays
:PROPERTIES:
:CATEGORY: Holiday
:END:
%%(org-calendar-holidays)
If you want a different category or different name for the headline, you can do so. But as a generic entry it will provide the information you want. (It matches what my org-file has)