emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Convert heading with no content to item fails
@ 2018-03-11  3:04 Adrian Bradd
  2018-03-17 13:57 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bradd @ 2018-03-11  3:04 UTC (permalink / raw)
  To: emacs-orgmode list

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


Hello,

On master (commit: 51b339105), attempting to convert a blank 
headline to an item with `org-ctrl-c-minus' removes the space 
after the * and org no longer recognizes it as a heading. 

I believe this issue originated in commit 69c5b6c99. Some code was 
added to strip metadata during the conversion in `org-toggle-item' 
with `org-heading-delete-metadata'. '(org-set-tags-to nil)' is 
used to strip tags which in the case of the blank heading results 
in `(delete-region (match-beginning 1) (match-end 1))' being 
called.

`delete-region' in this case removes the space immediately after 
the star/s in the blank headline which puts the line in a state 
that org doesn't consider a headline.

Replacing the removed space following the * or preventing its 
removal would remedy the issue, but I wasn't sure where to 
implement this. Didn't want to make the change in 
`org-set-tags-to' for fear of downstream effects.

Cheers,

-- 
Adrian

Bioelectronic Systems Lab,
Columbia University

[-- Attachment #2.1: Type: text/html, Size: 1118 bytes --]

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

* Re: [BUG] Convert heading with no content to item fails
  2018-03-11  3:04 [BUG] Convert heading with no content to item fails Adrian Bradd
@ 2018-03-17 13:57 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2018-03-17 13:57 UTC (permalink / raw)
  To: Adrian Bradd; +Cc: emacs-orgmode list

Hello,

Adrian Bradd <a.bradd@columbia.edu> writes:

> On master (commit: 51b339105), attempting to convert a blank headline to an item with `org-ctrl-c-minus' removes the space after the * and org no longer recognizes it as a heading.
>
> I believe this issue originated in commit 69c5b6c99. Some code was added to strip metadata during the conversion in `org-toggle-item' with `org-heading-delete-metadata'. '(org-set-tags-to nil)' is used to strip tags which in the case of
> the blank heading results in `(delete-region (match-beginning 1) (match-end 1))' being called.
>
> `delete-region' in this case removes the space immediately after the star/s in the blank headline which puts the line in a state that org doesn't consider a headline.
>
> Replacing the removed space following the * or preventing its removal
> would remedy the issue, but I wasn't sure where to implement this.
> Didn't want to make the change in `org-set-tags-to' for fear of
> downstream effects.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2018-03-17 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-11  3:04 [BUG] Convert heading with no content to item fails Adrian Bradd
2018-03-17 13:57 ` Nicolas Goaziou

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).