Org-mode mailing list
 help / color / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: emacs-orgmode@gnu.org
Cc: No Wayman <iarchivedmywholelife@gmail.com>
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
Message-ID: <873657cosb.fsf@gmail.com> (raw)


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 index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 22:17 No Wayman [this message]
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

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://orgmode.org

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

  git send-email \
    --in-reply-to=873657cosb.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --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

Org-mode mailing list

Archives are clonable:
	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git