From: Adrian Bradd <a.bradd@columbia.edu>
To: emacs-orgmode list <emacs-orgmode@gnu.org>
Subject: [BUG] Convert heading with no content to item fails
Date: Sat, 10 Mar 2018 22:04:04 -0500 [thread overview]
Message-ID: <m2woyj48kb.fsf@columbia.edu> (raw)
[-- 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 --]
next reply other threads:[~2018-03-11 3:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 3:04 Adrian Bradd [this message]
2018-03-17 13:57 ` [BUG] Convert heading with no content to item fails Nicolas Goaziou
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=m2woyj48kb.fsf@columbia.edu \
--to=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).