emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [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/)]
@ 2020-12-31  2:23 No Wayman
  0 siblings, 0 replies; 2+ messages in thread
From: No Wayman @ 2020-12-31  2:23 UTC (permalink / raw)
  To: emacs-orgmode

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

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

:+begin_src emacs-lisp :lexical t
(let ((org-capture-templates
       '(("x" "TASK ITEM" item
          (file+headline "/tmp/capture-item-logbook.org" 
  (org-capture nil "x"))
---- 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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [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/)]
@ 2020-12-31  6:31 Sam Whitlock
  0 siblings, 0 replies; 2+ messages in thread
From: Sam Whitlock @ 2020-12-31  6:31 UTC (permalink / raw)
  To: iarchivedmywholelife, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

I just saw this discussion on /r/emacs and came here to share my thoughts.

I have worked around this behavior for a while and think having an option
to skip logging into the drawer would be useful.
My own workflow that this behavior (bug?) currently affects is as follows
(similar to the reddit thread):
- use org-habit to track a weekly TODO list heading
- use a capture template to log checkitem type entries into this heading

Due to this quirk, the capture template logs into the drawer instead
(matching the checkitem regex).

I would consider this to be a bug, as I'm not sure if anyone would use a
capture template to deliberately log into the LOGBOOK drawer.
Additionally, if the LOGBOOK is empty, it does log to the correct place
(i.e. the contents of the heading).
Because the location varies based on the LOGBOOK being empty or not, I
think it would be good to either have it always log into the LOGBOOK or not
when capturing (specifically, the behavior of `org-capture-place-item`).

[-- Attachment #2: Type: text/html, Size: 2279 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-31  6:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-31  6:31 [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/)] Sam Whitlock
  -- strict thread matches above, loose matches on Subject: below --
2020-12-31  2:23 No Wayman

Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).