From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Bradd Subject: [BUG] Convert heading with no content to item fails Date: Sat, 10 Mar 2018 22:04:04 -0500 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eurHT-0005cV-MS for emacs-orgmode@gnu.org; Sat, 10 Mar 2018 22:04:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eurHO-0002VL-29 for emacs-orgmode@gnu.org; Sat, 10 Mar 2018 22:04:14 -0500 Received: from mail-qk0-f180.google.com ([209.85.220.180]:43520) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eurHN-0002VF-UU for emacs-orgmode@gnu.org; Sat, 10 Mar 2018 22:04:10 -0500 Received: by mail-qk0-f180.google.com with SMTP id j4so7968703qke.10 for ; Sat, 10 Mar 2018 19:04:09 -0800 (PST) Received: from localhost (cpe-158-222-157-199.nyc.res.rr.com. [158.222.157.199]) by smtp.gmail.com with ESMTPSA id 206sm2804252qkd.20.2018.03.10.19.04.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 19:04:07 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode list --=-=-= Content-Type: text/plain; format=flowed 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 --=-=-= Content-Type: multipart/related; boundary="==-=-=" --==-=-= Content-Type: text/html

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

--==-=-=-- --=-=-=--