emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Adrian Bradd <a.bradd@columbia.edu>
Cc: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Convert heading with no content to item fails
Date: Sat, 17 Mar 2018 14:57:59 +0100	[thread overview]
Message-ID: <874lleerdk.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <m2woyj48kb.fsf@columbia.edu> (Adrian Bradd's message of "Sat, 10 Mar 2018 22:04:04 -0500")

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

      reply	other threads:[~2018-03-17 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-11  3:04 [BUG] Convert heading with no content to item fails Adrian Bradd
2018-03-17 13:57 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874lleerdk.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=a.bradd@columbia.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).