[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Suggestion for note capture
From: |
Andrea Giugliano |
Subject: |
[O] Suggestion for note capture |
Date: |
Sat, 11 May 2019 16:37:59 +0000 |
Hi Nathan,
I think I have a starting point for you:
----------------------
(defun ag/org-add-note-to-last-entry ()
"Add a note to the main agenda file under the latest visited
heading (untested in case the org buffer is not available)"
(interactive)
(let ((buffer (car (org-buffer-list 'files 't))))
(with-current-buffer buffer
(org-add-note)
(message "%S" (concat "Adding note in heading: " (fifth
(org-heading-components)))))))
-----------------------
This function adds a note to the last heading you were editing before
switching file. It is limited to the first file in your
"org-buffer-list" (so does not work if you have multiple org files from
which you generate your agenda).
I imagine you could extend this by choosing the file that has a clock
open (i.e., you need to change the "buffer" binding accordingly), move
to the clocked heading (i.e., add some logic before "org-add-note") and
pointing to the subheading (i.e., again adding some logic before
"org-add-note").
Hope this gives you a lead.
Best,
Andrea
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] Suggestion for note capture,
Andrea Giugliano <=