[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] feature request: agenda time stamp manipulation
From: |
Tory S. Anderson |
Subject: |
Re: [O] feature request: agenda time stamp manipulation |
Date: |
Sun, 09 Mar 2014 22:46:06 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
I've written the following code/function which seems to fulfill my needs in the
agenda to be able to manipulate plain time stamps in the same way we can
manipulate deadlines and schedules, so that entries added with "i" can then be
customized to a particular hour, or be otherwise altered. Hopefully it will be
of use to others.
(defun org-agenda-time-stamp (arg &optional time)
"Schedule the item at point.
ARG is passed through to `org-time-stamp'."
(interactive "P")
(org-agenda-check-type t 'agenda 'timeline 'todo 'tags 'search)
(org-agenda-check-no-diary)
(let* ((marker (or (org-get-at-bol 'org-marker)
(org-agenda-error)))
(buffer (marker-buffer marker))
(pos (marker-position marker))
(org-insert-labeled-timestamps-at-point nil)
ts)
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(setq ts (org-time-stamp arg)))
(org-agenda-show-new-time marker ts " Ts"))
(message "%s" ts)))
(org-defkey org-agenda-mode-map "\C-c\." 'org-agenda-time-stamp)
- Re: [O] feature request: agenda time stamp manipulation,
Tory S. Anderson <=