[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about using `org-add-note' programmatically
From: |
Tor Kringeland |
Subject: |
Question about using `org-add-note' programmatically |
Date: |
Tue, 30 Nov 2021 01:57:06 +0100 |
I'm trying to write a function that adds a note to the current
`org-mode' heading. Naively I write it as
(defun my/add-note ()
(interactive)
(org-add-note)
(insert "some text")
(org-ctrl-c-ctrl-c))
but this does not work. Calling the function (on a recent build of
Emacs 29) inserts the string "some text" into the current buffer and
then opens up the note from `org-add-note'. (IIRC this used to work
earlier this year (in September) but I don't know why (nor is it
relevant).) Currently my solution has been to define the function as a
keyboard macro (using `fset'), which works perfectly, but I do hanker
for a cleaner solution.
Maybe what I want isn't the intended behavior of these `org' functions,
but does someone know how I can achieve what I want in a cleaner way,
than using keyboard macros?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Question about using `org-add-note' programmatically,
Tor Kringeland <=