emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-toggle-headline inserts "TODO" regardless of local definitions [9.5 (9.5-g0a86ad @ /home/rasmus/.emacs.d/elpa/org-9.5/)]
@ 2021-10-17 14:06 autofrettage
  2021-10-17 14:23 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: autofrettage @ 2021-10-17 14:06 UTC (permalink / raw)
  To: emacs-orgmode

Dear all,

Here comes a minor gripe.
If I start with:
-------------------------
#+TODO: foo bar | baz

+ [X] Apple
+ [ ] Banana
------------------------
...and then apply org-toggle-headline (C-c *) on the two items,
one after the other, I end up with these headlines:

* DONE Apple
** TODO Banana

...instead of these:

* baz Apple
** foo Banana

Yours
Rasmus


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

* Re: [BUG] org-toggle-headline inserts "TODO" regardless of local definitions [9.5 (9.5-g0a86ad @ /home/rasmus/.emacs.d/elpa/org-9.5/)]
  2021-10-17 14:06 [BUG] org-toggle-headline inserts "TODO" regardless of local definitions [9.5 (9.5-g0a86ad @ /home/rasmus/.emacs.d/elpa/org-9.5/)] autofrettage
@ 2021-10-17 14:23 ` Ihor Radchenko
  2021-10-17 17:53   ` Tim Cross
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2021-10-17 14:23 UTC (permalink / raw)
  To: autofrettage; +Cc: emacs-orgmode

autofrettage <autofrettage@protonmail.ch> writes:

> * DONE Apple
> ** TODO Banana
>
> ...instead of these:
>
> * baz Apple
> ** foo Banana

Confirmed.

Currently, checkbox to todo keyword mapping is hard-coded in
org-list-to-subtree.

We may use something like
[ ] -> (car org-not-done-keywords);
[-] -> (car org-not-done-keywords);
[X] -> (car org-done-keywords);

Though it may still be not ideal when there are multiple keywords to
choose from.

Best,
Ihor


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

* Re: [BUG] org-toggle-headline inserts "TODO" regardless of local definitions [9.5 (9.5-g0a86ad @ /home/rasmus/.emacs.d/elpa/org-9.5/)]
  2021-10-17 14:23 ` Ihor Radchenko
@ 2021-10-17 17:53   ` Tim Cross
  0 siblings, 0 replies; 3+ messages in thread
From: Tim Cross @ 2021-10-17 17:53 UTC (permalink / raw)
  To: emacs-orgmode


Ihor Radchenko <yantar92@gmail.com> writes:

> autofrettage <autofrettage@protonmail.ch> writes:
>
>> * DONE Apple
>> ** TODO Banana
>>
>> ...instead of these:
>>
>> * baz Apple
>> ** foo Banana
>
> Confirmed.
>
> Currently, checkbox to todo keyword mapping is hard-coded in
> org-list-to-subtree.
>
> We may use something like
> [ ] -> (car org-not-done-keywords);
> [-] -> (car org-not-done-keywords);
> [X] -> (car org-done-keywords);
>

I would agree hard coded todo keywords is an issue given we allow
people to define the set of todo keywords. I think your suggestion to
use the car of 'org-not-done-keywords and 'org-done-keywords is an
improvement (even if not perfect).

I do wonder if the doc string for org-toggle-heading needs updating. It
makes no reference to making a list item a todo heading if it looks like
a todo item. I was actually surprised that org-toggle-heading adds
keywords at all. While headings and todo items are certainly related, my
expectation would be that a function called org-toggle-heding would do
just that - add stars if none exist and remove them if they do. I would
not necessarily expect a list item to be converted to a todo heading,
only a heading. 


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

end of thread, other threads:[~2021-10-17 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17 14:06 [BUG] org-toggle-headline inserts "TODO" regardless of local definitions [9.5 (9.5-g0a86ad @ /home/rasmus/.emacs.d/elpa/org-9.5/)] autofrettage
2021-10-17 14:23 ` Ihor Radchenko
2021-10-17 17:53   ` Tim Cross

Code repositories for project(s) associated with this 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).