From Org Agenda view, I can do several things like reschedule, reprioritize, tag, etc.
How do I edit the headline itself from the org agenda view? Or it can not be done?
I wanted the same and I came to the following solution using the org-edit-headline
function in org-mode.
What I did: I took the function that let's you edit the properties from the agenda view:
(defun org-agenda-set-property ()
"Set a property for the current headline."
(interactive)
(org-agenda-check-no-diary)
(org-agenda-maybe-loop
#'org-agenda-set-property nil nil nil
(let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
(org-agenda-error)))
(buffer (marker-buffer hdmarker))
(pos (marker-position hdmarker))
(inhibit-read-only t)
) ;; newhead
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(org-fold-show-context 'agenda)
(call-interactively 'org-set-property))))))
and replaced the last interactive call with org-edit-headline
. That worked already. In a second step I removed the org-agenda-maybe-loop
, because I will be editing headlines one by one:
(defun org-agenda-edit-headline ()
"Edit the headline for the current headline."
(interactive)
(org-agenda-check-no-diary)
(let* ((hdmarker (or (org-get-at-bol 'org-hd-marker)
(org-agenda-error)))
(buffer (marker-buffer hdmarker))
(pos (marker-position hdmarker))
(inhibit-read-only t)
) ;; newhead
(org-with-remote-undo buffer
(with-current-buffer buffer
(widen)
(goto-char pos)
(org-fold-show-context 'agenda)
(call-interactively 'org-edit-headline)))))
Please note, that I basically don't understand the function, but I'm happy that I was able to make it work.
I have it bound to C-c C-x h
in org-agenda-mode-map
.
.org
file is a<Tab>
org-agenda-goto
or<Return>
org-agenda-switch-to
away, the former in the other window, the latter replaces the agenda view. You could do edits withB
org-agenda-bulk-action
andf
but that sounds too far fetched orgmode.org/manual/Agenda-commands.htmlTAB
orRET
. But there is a specific section on Remote Editing here So I thought out-of-the-box it would provide an option to edit the heading itself