emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[feature] capture: defcustom for item/checkitem to skip LOGBOOK [9.4.4 (


From: No Wayman
Subject: [feature] capture: defcustom for item/checkitem to skip LOGBOOK [9.4.4 (release_9.4.4-159-g9140a7 @ /home/n/.emacs.d/straight/build/org/)]
Date: Wed, 30 Dec 2020 21:23:51 -0500
User-agent: mu4e 1.5.7; emacs 28.0.50


Consider the following file named "/tmp/capture-item-logbook.org":

---- start capture-item-logbook.org ---
* TODO TASK
SCHEDULED: <2020-12-30 Wed 21:30 ++1d>
:PROPERTIES:
:STYLE:    habit
:END:
:LOGBOOK:
- State "DONE"       from "TODO"       [2020-12-29 Tue 21:30]
:END:

:+begin_src emacs-lisp :lexical t
(let ((org-capture-templates
      '(("x" "TASK ITEM" item
(file+headline "/tmp/capture-item-logbook.org" "TASK")))))
 (org-capture nil "x"))
#+end_src
---- end capture-item-logbook.org ---

Executing the src block places the capture item in the LOGBOOK drawer if the entry type is 'item or 'checkitem. Technically this is the correct behavior according to `org-capture-templates' docstring:

item  a plain list item, will be placed in the
   first plain list at the target location.
   Its default template is:
     "- %?"

The documentation on LOGBOOK drawers also mentions:

"You can also arrange for state change notes and clock times to be stored in a ‘LOGBOOK’ drawer. If you want to store a quick note there, in a similar way to state changes, use..." Is it worth having an option for org-capture's item/checkitem templates to skip targeting drawers? capture is flexible enough where user's can implement their own point-placing function, but I wonder
if skipping drawers is the common case.

Thoughts?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]