* Question about todo subheadings and logbook @ 2015-09-04 6:29 Keith M Swartz 2015-09-04 18:52 ` Nicolas Goaziou 0 siblings, 1 reply; 9+ messages in thread From: Keith M Swartz @ 2015-09-04 6:29 UTC (permalink / raw) To: Emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1094 bytes --] Hi all, I'm currently using org-mode 8.3.1, and I'm curious about a particular behavior. If I start to type an item, and then use the C-c C-t shortcut to mark it as a TODO item, it automatically creates a drawer and adds a LOGBOOK entry to it. Custom settings are as follows: (setq org-log-into-drawer 'LOGBOOK org-log-state-notes-into-drawer 'LOGBOOK) I often want to add a subheading (sub-task) to this todo item, so I'll hit Alt-Enter to do this. When I do, it creates the subheading /between/ the original todo and the drawer. Is that correct? My preference - and what I would have assumed to be the correct behavior - would be to have the subheadings appear /after/ the logbook drawer, as each subtask can also have a todo state and its own logbook. I figure there's probably a quick change I can make to org-insert-todo-subheading or some other function, but wanted to see if: a) this is how it's supposed to work, and b) if there was an easier way to achieve what I want, maybe just some keyboard shortcut I'm missing. Thanks, Keith -- Keith M Swartz oneroadkms@gmail.com [-- Attachment #2: Type: text/html, Size: 1449 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-04 6:29 Question about todo subheadings and logbook Keith M Swartz @ 2015-09-04 18:52 ` Nicolas Goaziou 2015-09-04 19:22 ` Keith M Swartz 0 siblings, 1 reply; 9+ messages in thread From: Nicolas Goaziou @ 2015-09-04 18:52 UTC (permalink / raw) To: Keith M Swartz; +Cc: Emacs-orgmode Hello, Keith M Swartz <oneroadkms@gmail.com> writes: > I often want to add a subheading (sub-task) to this todo item, so I'll hit > Alt-Enter to do this. When I do, it creates the subheading /between/ the > original todo and the drawer. Is that correct? It is. > My preference - and what I would have assumed to be the correct behavior - > would be to have the subheadings appear /after/ the logbook drawer, as each > subtask can also have a todo state and its own logbook. The logbook drawer can be anywhere in the entry. So creating headline after the drawer is fuzzy. Also, it is to smart. What if I want to create a new headline that would use this logbook? Sometimes, the simpler is the better. Regards, -- Nicolas Goaziou ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-04 18:52 ` Nicolas Goaziou @ 2015-09-04 19:22 ` Keith M Swartz 2015-09-04 19:38 ` Nicolas Goaziou 0 siblings, 1 reply; 9+ messages in thread From: Keith M Swartz @ 2015-09-04 19:22 UTC (permalink / raw) To: Keith M Swartz, Emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 3361 bytes --] Thank you, Nicolas. I think this behavior is wrong, then, or else I have some configuration setting that's messing things up. Problem is, if you create sub-level todos, and change their state, the updates all get muddled, and you can't tell which one's state changed. It also creates multiple logbooks if you go back and change the state of the main heading at some point. (I also can't help but wonder if this is partly due to changes in org-mode 8.3 regarding property drawer syntax.) Here is an example to reproduce some questionable results: 0. Create a set of TODO labels, like so: #+SEQ_TODO: TODO(!) PEND(!) DONE(!) 1. Create an item, make it a todo. (Creates a logbook.) 2. Create a subheading. (Alt-Enter, shift-right) Make it a todo. (This adds a line to the logbook saying the state changed to TODO, even though the previous line says the state already is TODO. You can't tell which state changed.) 3. Cycle the state on your sub-todo to PEND. (Changes the state in the logbook.) 4, Go back to the main heading and cycle the state to PEND. (This creates ANOTHER logbook right underneath the heading showing the state change. The original record for when it was marked TODO is in the other logbook, but there are two such entries, and it's not obvious which one is which. You could probably infer logically that the older entry is for the main heading, but if states keep going back and forth, you'll lose track quickly.) This can't be a desired behavior for anyone -- you either want multiple logbooks for each item and subitem, OR you want a single logbook the whole time. And if someone wants the latter, I don't see how it can be at all useful if you can't tell whether the main item's state was changed or one of the sub-items. I could debate whether this is a bug, but my emacs is nothing if not versatile, so bug or not, I'm fairly confident there's a way to get the behavior I DO want. To that end, I was hoping somebody could offer a suggestion. However, the more I dive into this, I think the easiest fix is to define org-metareturn-hook to call org-cycle (to collapse the drawer) and org-end-of-line (so it's positioned after where the drawer would be) BEFORE invoking org-metareturn to add the subheading. Actually, I'd probably want something more specific than org-cycle, since I don't want it to expand the drawer or some other tree node. Any thoughts on this approach as a solution to my issue? Thanks, Keith On Fri, Sep 4, 2015 at 11:52 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Hello, > > Keith M Swartz <oneroadkms@gmail.com> writes: > > > I often want to add a subheading (sub-task) to this todo item, so I'll > hit > > Alt-Enter to do this. When I do, it creates the subheading /between/ the > > original todo and the drawer. Is that correct? > > It is. > > > My preference - and what I would have assumed to be the correct behavior > - > > would be to have the subheadings appear /after/ the logbook drawer, as > each > > subtask can also have a todo state and its own logbook. > > The logbook drawer can be anywhere in the entry. So creating headline > after the drawer is fuzzy. Also, it is to smart. What if I want to > create a new headline that would use this logbook? > > Sometimes, the simpler is the better. > > > Regards, > > -- > Nicolas Goaziou > -- Keith M Swartz oneroadkms@gmail.com [-- Attachment #2: Type: text/html, Size: 4335 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-04 19:22 ` Keith M Swartz @ 2015-09-04 19:38 ` Nicolas Goaziou 2015-09-04 20:26 ` Keith M Swartz 0 siblings, 1 reply; 9+ messages in thread From: Nicolas Goaziou @ 2015-09-04 19:38 UTC (permalink / raw) To: Keith M Swartz; +Cc: Emacs-orgmode Keith M Swartz <oneroadkms@gmail.com> writes: > Here is an example to reproduce some questionable results: > > 0. Create a set of TODO labels, like so: > #+SEQ_TODO: TODO(!) PEND(!) DONE(!) > > 1. Create an item, make it a todo. (Creates a logbook.) OK. > 2. Create a subheading. (Alt-Enter, shift-right) From where? > Make it a todo. (This adds a line to the logbook saying the state > changed to TODO, even though the previous line says the state already > is TODO. You can't tell which state changed.) > > 3. Cycle the state on your sub-todo to PEND. (Changes the state in the > logbook.) > > 4, Go back to the main heading and cycle the state to PEND. (This creates > ANOTHER logbook right underneath the heading showing the state change. The > original record for when it was marked TODO is in the other logbook, but > there are two such entries, and it's not obvious which one is which. You > could probably infer logically that the older entry is for the main > heading, but if states keep going back and forth, you'll lose track > quickly.) I cannot reproduce this. It creates the following document: #+SEQ_TODO: TODO(!) PEND(!) DONE(!) * PEND test :LOGBOOK: - State "PEND" from "TODO" [2015-09-04 ven. 21:37] - State "TODO" from [2015-09-04 ven. 21:33] :END: ** PEND test2 :LOGBOOK: - State "PEND" from "TODO" [2015-09-04 ven. 21:35] - State "TODO" from [2015-09-04 ven. 21:34] :END: Regards, ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-04 19:38 ` Nicolas Goaziou @ 2015-09-04 20:26 ` Keith M Swartz 2015-09-04 22:35 ` Nicolas Goaziou 0 siblings, 1 reply; 9+ messages in thread From: Keith M Swartz @ 2015-09-04 20:26 UTC (permalink / raw) To: Keith M Swartz, Emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 3175 bytes --] I was creating the sub-heading from the exact same spot where I stopped typing and hit C-c C-t. Didn't move the cursor, just went straight from one step to the next. After step Here is what that set of steps created for me: * PEND First item :LOGBOOK: - State "PEND" from "TODO" [2015-09-04 Fri 13:23] :END: *** PEND Second item :LOGBOOK: - State "PEND" from "TODO" [2015-09-04 Fri 13:23] - State "TODO" from [2015-09-04 Fri 13:23] - State "TODO" from [2015-09-04 Fri 13:22] :END: Step-by-step -- after step 1 [note: the logbook is collapsed initially, but I expanded it here to show the contents. Expanding the logbook before creating a sub-item may alter the results; I haven't tried that.] * TODO First item :LOGBOOK: - State "TODO" from [2015-09-04 Fri 13:25] :END: after step 2: * TODO First item *** TODO Second item :LOGBOOK: - State "TODO" from [2015-09-04 Fri 13:26] - State "TODO" from [2015-09-04 Fri 13:25] :END: Looks like our experiences already differ. (BTW, are you on the same org version?) after step 3: * TODO First item *** PEND Second item :LOGBOOK: - State "PEND" from "TODO" [2015-09-04 Fri 13:26] - State "TODO" from [2015-09-04 Fri 13:26] - State "TODO" from [2015-09-04 Fri 13:25] :END: And after step 4, it's as you saw above. Keith On Fri, Sep 4, 2015 at 12:38 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Keith M Swartz <oneroadkms@gmail.com> writes: > > > Here is an example to reproduce some questionable results: > > > > 0. Create a set of TODO labels, like so: > > #+SEQ_TODO: TODO(!) PEND(!) DONE(!) > > > > 1. Create an item, make it a todo. (Creates a logbook.) > > OK. > > > 2. Create a subheading. (Alt-Enter, shift-right) > > From where? > > > Make it a todo. (This adds a line to the logbook saying the state > > changed to TODO, even though the previous line says the state already > > is TODO. You can't tell which state changed.) > > > > 3. Cycle the state on your sub-todo to PEND. (Changes the state in the > > logbook.) > > > > 4, Go back to the main heading and cycle the state to PEND. (This creates > > ANOTHER logbook right underneath the heading showing the state change. > The > > original record for when it was marked TODO is in the other logbook, but > > there are two such entries, and it's not obvious which one is which. You > > could probably infer logically that the older entry is for the main > > heading, but if states keep going back and forth, you'll lose track > > quickly.) > > I cannot reproduce this. It creates the following document: > > #+SEQ_TODO: TODO(!) PEND(!) DONE(!) > > * PEND test > :LOGBOOK: > - State "PEND" from "TODO" [2015-09-04 ven. 21:37] > - State "TODO" from [2015-09-04 ven. 21:33] > :END: > > ** PEND test2 > :LOGBOOK: > - State "PEND" from "TODO" [2015-09-04 ven. 21:35] > - State "TODO" from [2015-09-04 ven. 21:34] > :END: > > > Regards, > -- Keith M Swartz oneroadkms@gmail.com [-- Attachment #2: Type: text/html, Size: 4586 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-04 20:26 ` Keith M Swartz @ 2015-09-04 22:35 ` Nicolas Goaziou 2015-09-04 22:51 ` Keith M Swartz 0 siblings, 1 reply; 9+ messages in thread From: Nicolas Goaziou @ 2015-09-04 22:35 UTC (permalink / raw) To: Keith M Swartz; +Cc: Emacs-orgmode Keith M Swartz <oneroadkms@gmail.com> writes: > Step-by-step -- after step 1 [note: the logbook is collapsed initially, but > I expanded it here to show the contents. Expanding the logbook before > creating a sub-item may alter the results; I haven't tried that.] > > * TODO First item > :LOGBOOK: > - State "TODO" from [2015-09-04 Fri 13:25] > :END: > > after step 2: > > * TODO First item > *** TODO Second item > :LOGBOOK: > - State "TODO" from [2015-09-04 Fri 13:26] > - State "TODO" from [2015-09-04 Fri 13:25] > :END: So you insert sub-heading between the first one and its logbook. Well, this is to be expected. I don't see why Org should prevent you to do that. You may use, e.g., C-RET to insert new heading past contents of the first one. Regards, ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-04 22:35 ` Nicolas Goaziou @ 2015-09-04 22:51 ` Keith M Swartz 2015-09-05 8:39 ` Nicolas Goaziou 0 siblings, 1 reply; 9+ messages in thread From: Keith M Swartz @ 2015-09-04 22:51 UTC (permalink / raw) To: Keith M Swartz, Emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2159 bytes --] I think there's some misunderstanding here regarding my initial question. I do NOT want the subheading to go between the first one and the logbook. When I hit Ctrl-Enter at the end of the line, that's where it goes. I didn't choose to do that, and I would like it not to. To get what I want now, I have to collapse the drawer and go to the end of the line (past the "..." denoting the drawer) before adding a subheading. That's unnecessary work that I shouldn't have to do. I want the behavior to be such that after I type in the todo text, hit C-c C-t (to label it as a todo), and hit ctrl-enter -- right there, without moving the cursor again -- it should create a subheading BELOW the drawer. When you created your test case, where did you position the cursor before creating a subheading? Did you move the cursor between C-c C-t and Ctrl-Enter? If so, I think that shouldn't be necessary, but right or wrong, I'm trying to modify the behavior so I don't have to do that. If you didn't move the cursor, then can you suggest why my org-mode is behaving that way? I tried with a vanilla install (no custom settings at all) and got the same thing. Keith On Fri, Sep 4, 2015 at 3:35 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Keith M Swartz <oneroadkms@gmail.com> writes: > > > Step-by-step -- after step 1 [note: the logbook is collapsed initially, > but > > I expanded it here to show the contents. Expanding the logbook before > > creating a sub-item may alter the results; I haven't tried that.] > > > > * TODO First item > > :LOGBOOK: > > - State "TODO" from [2015-09-04 Fri 13:25] > > :END: > > > > after step 2: > > > > * TODO First item > > *** TODO Second item > > :LOGBOOK: > > - State "TODO" from [2015-09-04 Fri 13:26] > > - State "TODO" from [2015-09-04 Fri 13:25] > > :END: > > So you insert sub-heading between the first one and its logbook. Well, > this is to be expected. I don't see why Org should prevent you to do > that. > > You may use, e.g., C-RET to insert new heading past contents of the > first one. > > Regards, > -- Keith M Swartz oneroadkms@gmail.com [-- Attachment #2: Type: text/html, Size: 2999 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-04 22:51 ` Keith M Swartz @ 2015-09-05 8:39 ` Nicolas Goaziou 2015-09-05 18:26 ` Keith M Swartz 0 siblings, 1 reply; 9+ messages in thread From: Nicolas Goaziou @ 2015-09-05 8:39 UTC (permalink / raw) To: Keith M Swartz; +Cc: Emacs-orgmode Keith M Swartz <oneroadkms@gmail.com> writes: > I think there's some misunderstanding here regarding my initial question. > > I do NOT want the subheading to go between the first one and the logbook. > When I hit Ctrl-Enter at the end of the line, that's where it goes. Aren't you confusing M-RET and C-RET? At end of line, M-RET inserts the second headline right before the first one, i.e., between the first headline and its logbook drawer. OTOH, C-RET inserts the new headline past the whole subtree starting at the first headline, i.e., after the logbook. Regards, ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question about todo subheadings and logbook 2015-09-05 8:39 ` Nicolas Goaziou @ 2015-09-05 18:26 ` Keith M Swartz 0 siblings, 0 replies; 9+ messages in thread From: Keith M Swartz @ 2015-09-05 18:26 UTC (permalink / raw) To: Keith M Swartz, Emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1108 bytes --] A ha! YES -- that's my confusion! I wrote C-RET, but I was actually typing M-RET. I'm not sure when I developed that habit (probably the awkwardness of going C-RET but M-right to indent confused me at some point), but now it all makes sense. Kinda feel silly now, especially since I made it worse with the typo. So thank you for the patience and for setting me straight! Keith On Sat, Sep 5, 2015 at 1:39 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Keith M Swartz <oneroadkms@gmail.com> writes: > > > I think there's some misunderstanding here regarding my initial question. > > > > I do NOT want the subheading to go between the first one and the logbook. > > When I hit Ctrl-Enter at the end of the line, that's where it goes. > > Aren't you confusing M-RET and C-RET? > > At end of line, M-RET inserts the second headline right before the first > one, i.e., between the first headline and its logbook drawer. OTOH, > C-RET inserts the new headline past the whole subtree starting at the > first headline, i.e., after the logbook. > > > Regards, > -- Keith M Swartz oneroadkms@gmail.com [-- Attachment #2: Type: text/html, Size: 1734 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-09-05 18:27 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-09-04 6:29 Question about todo subheadings and logbook Keith M Swartz 2015-09-04 18:52 ` Nicolas Goaziou 2015-09-04 19:22 ` Keith M Swartz 2015-09-04 19:38 ` Nicolas Goaziou 2015-09-04 20:26 ` Keith M Swartz 2015-09-04 22:35 ` Nicolas Goaziou 2015-09-04 22:51 ` Keith M Swartz 2015-09-05 8:39 ` Nicolas Goaziou 2015-09-05 18:26 ` Keith M Swartz
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git 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).