Org mode edit timestamp with custom format - emacs

I paste default timestamp and I can edit year, month, day, time with Shift-up and Shift-down
I want to use custom format
(setq-default org-display-custom-times t)
(setq org-time-stamp-custom-formats
'("<%d %b %Y %a" . "<%d %b %Y %a %H:%M>"))
But I can't edit year, month, time. Only day
What should I do to be able to edit year, month, time with Shift-up/down? I can't event select it

The Org Manual is explaining the disadvantages of using custom timestamps here:
https://orgmode.org/manual/Custom-time-format.html#Custom-time-format
The S-UP/DOWN keys can no longer be used to adjust each component of a timestamp. If the cursor is at the beginning of the stamp, S-UP/DOWN will change the stamp by one day, just like S-LEFT/RIGHT. At the end of the stamp, the time will be changed by one minute.
Does that not answer your question?

You can C-c C-x C-t to disable custom formats, edit your dates with S-UP/DOWN (or manually), and then do C-c C-x C-t to re-enable the custom format.

Related

Org mode time sheet

I'd like to get a custom "timesheet" report.
Curently, I do have the following:
(add-to-list 'org-agenda-custom-commands
'("r" "Weekly Timesheet"
((agenda ""))
((org-agenda-overriding-header "Weekly timesheet")
(org-agenda-span 'week)
(org-agenda-start-on-weekday 1)
(org-agenda-start-with-clockreport-mode t)
(org-agenda-time-grid nil))) t)
It works as expected, except that I'm not interested in seeing the agenda views for the 7 days: I just want the clockreport, nothing more.
How can I achieve that?
Check out the clocktable block. I use this to see a weekly recap of where I spent my time. You can setup a simple one like the following:
#+BEGIN: clocktable :scope agenda-with-archives :block lastweek
#+END:
Put your cursor on the BEGIN or END and hit the trusty C-cC-c to evaluate the clock table in-place. It will list the file, headline and time spent on the tasks.
In my example above, the scope defines where to look for the clocked items. In this case, I chose the agenda files and associated archives. For the block of time, I used lastweek to get the last 7 days.
There are many more options for configuring just what you need. Read more at
http://orgmode.org/manual/The-clock-table.html
I am not sure if this helps, but you may want to check out Tom Marble's timesheet.el. You should be able to install it from MELPA. Although it does not integrate with org agenda, this seems like the most thorough way to generate timesheet reports.
http://emacslife.com/emacs-chats/chat-tom-marble.html
https://github.com/tmarble/timesheet.el
The sample org file: https://raw.githubusercontent.com/tmarble/timesheet.el/master/share/yoyodyne.org

What's a good workflow for keeping track of which TODO items I've worked on in the last week in org-mode?

Right now I'm just using inactive timestamps for some TODO items and updating them when I'm working on that item. I figured out how to get them to show up in the Timeline view.
Is there a better workflow to achieve this? Especially e.g. having a quicker way to update the timestamp on an item.
As already mentionned, you definitely have to use clocking commands for this (C-c C-x C-i/j/o). See the manual.
Then, when jumping on whichever day or week (or ...) of the agenda view, you can ask for seeing those "hidden" past entries by pressing 'v l' (view > log). Press 'v' in the agenda, and have a look at all possible commands ('v [' as well for viewing the inactive timestamps).

org-mode change diary timestamp from agenda list

I have configured org-agenda to use an org-mode diary file. Sometimes I would like to adjust the timestamp for a diary entry from the agenda.
i (org-agenda-diary-entry) inserts diary entries with a bare timestamp rather than a SCHEDULED property. This means using C-c C-s in the agenda will add an additional timestamp rather than adjust the existing one.
Is there a correct way to adjust diary timestamps from the agenda?
Failing that, what's the best way to hook into org-agenda-diary-entry so I can turn that bare timestamp into a SCHEDULED property?
Just found it. > (org-agenda-date-prompt)

Weekly repeating tasks emacs org-mode

I want to track habits using org-mode. For example, I want to do exercise 3 times every week. Is there a way to schedule 3 times a task every week irrespective of the date in org-mode?
You should be able to more or less do that using org habit tracking (See: Org-Habits).
To load org-habits you would need to add it to org-modules
(add-to-list 'org-modules "org-habit")
Then:
Use C-c C-s to set SCHEDULED.
Use C-c C-t to set your exercise TODO.
Use C-c C-x p to have the STYLE Property habit (add in any other properties as desired as well).
Now the lines like this should have be appended after the title:
:PROPERTIES:
:STYLE: habit
:END:
A single habit should suffice, it will not be exactly 3 times per week, but over time it will average out to such. If you use a scheduled repeater that is .+2d/3d you will be prompted to perform the habit no more often than every second day, and no less often than every 3. (This averages out to 2.9 times per week if you continue it long enough. Over 6 weeks (42 days) you would complete it at least 14 times, at most 21, or 17.5 on average. 18 times in 6 weeks would be 3x per week).
Your final habit should look something like this initially, as you complete it DONE logging will be added in and the last-repeat will be kept track of as a property:
** TODO Exercise
SCHEDULED: <2012-01-06 Fri .+2d/3d>
:PROPERTIES:
:STYLE: habit
:END:
Note: If you get the error Symbol's value as variable is void: org-modules when trying to load the org-habit module, you might want to try the following instead:
(require 'org)
(require 'org-install)
(add-to-list 'org-modules "org-habit")
You can use a timestamp with repeater interval as described in the
manual.
A timestamp may contain a _repeater interval_, indicating that it
applies not only on the given date, but again and again after a
certain interval of N days (d), weeks (w), months (m), or years
(y). The following will show up in the agenda every Wednesday:
* Pick up Sam at school <2007-05-16 Wed 12:30 +1w>
I can't see any way to do this with one entry. The way I do similar things is to create a special TODO sequence for is, say (sequence ('HABIT' '|' 'CHECK')) with setq org-todo-keywords
Then simply write three entries, each on a week repeat
* HABIT Monday workout
DEADLINE: <2012-01-09 Mon +1w>
* HABIT Wednessday workout
DEADLINE: <2012-01-11 Wed +1w>
* HABIT Friday workout
DEADLINE: <2012-01-06 Fri +1w>
It's not that clean, but it works.

Is there a folding mode for GNU Emacs calendar/diary entries?

I'd like to have a folding-mode (like org-mode or outline or hs-minor-mode) mode for diary entries.
For example, I'd like a quick overview of the diary entries - date, time, etc. but hide the following (indented) detail lines. Then, I'd like to be able to click on a line in the diary to expand/collapse it (hide/show details). I tried M-x hs-minor-mode in a diary file but it does not seem to recognize the diary file format ("Diary Mode doesn't support Hideshow Minor Mode")
In M-x calendar, when I view the entries for the day, I'd like that view also collapsible.
I know org-mode has agenda management but I've not tried it; I'm used to M-x calendar, M-x diary, and icalendar to import .ics files in email into my diary.
Consider filing an enhancement request, using M-x report-emacs-bug. (Yes, that command is also for enhancement requests.)