emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug: org-toggle-item removes tags from next heading [9.3.7 (release_9.3.


From: No Wayman
Subject: Bug: org-toggle-item removes tags from next heading [9.3.7 (release_9.3.7-696-g82b496 @ mixed installation! /home/n/.emacs.d/straight/build/org/ and /home/n/.emacs.d/straight/build/org/eln-x86_64-pc-linux-gnu-c50afd7f9e91fd04/)]
Date: Fri, 31 Jul 2020 18:17:40 -0400
User-agent: mu4e 1.5.5; emacs 28.0.50


If `org-toggle-item' is called between the text of an entry and the next heading,
it removes the tags from the next heading.

ECM:

With the following Org markup in a buffer and point denoted by "|":

#+begin_example
,* First

Some text
|

,** Second :tag:
#+end_example

invoking `org-toggle-item' removes the second heading's tags, resulting in:

#+begin_example
,* First

Some text
|

,** Second
#+end_example

`org-toggle-item's documentation claims:

Convert headings or normal lines to items, items to normal lines. If there is no active region, only the current line is considered.

Though this doesn't seem to be the case here. There is no active region, so I would expect it to do nothing in this case.

I stepped through `org-toggle-item' and I believe it's because of the following logic:

 >;; Determine boundaries of changes.
 >(if (org-region-active-p)
(setq beg (funcall skip-blanks (region-beginning))
     >end (copy-marker (region-end)))
   >(setq beg (funcall skip-blanks (point-at-bol))
   >end (copy-marker (point-at-eol))))

Blank lines are being skipped regardless of whether region is active or not.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]