emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 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/)]
@ 2020-07-31 22:17 No Wayman
  2020-07-31 22:50 ` No Wayman
  0 siblings, 1 reply; 5+ messages in thread
From: No Wayman @ 2020-07-31 22:17 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: No Wayman

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


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

,* First

Some text

,** Second :tag:

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

,* First

Some text

,** Second

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

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

end of thread, other threads:[~2020-08-03  3:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31 22:17 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/)] No Wayman
2020-07-31 22:50 ` No Wayman
2020-08-02  4:40   ` Kyle Meyer
2020-08-02 17:13     ` No Wayman
2020-08-03  3:04       ` Kyle Meyer

Code repositories for project(s) associated with this public inbox


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