emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Adam Beckmeyer" <adam_git@thebeckmeyers.xyz>
To: "emacs-orgmode" <emacs-orgmode@gnu.org>
Subject:  	[BUG] org-set-tags-command hangs indefinitely in some indirect buffers
Date: Mon, 14 Aug 2023 14:19:11 -0400 (EDT)	[thread overview]
Message-ID: <E1qVc9n-0006Ti-92@rmmprod06.runbox> (raw)

Hi everyone,

In some of my files, org-set-tags-command hangs indefinitely when invoked in an indirect buffer. Attached is an example file where you can see the behavior:

1. Open this file in org-mode.
2. Invoke org-tree-to-indirect-buffer in the "Hello World" heading
3. Invoke org-set-tags-command in the new indirect buffer.

I noticed this problem on git master but bisected and found the bug was introduced by: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=2f7b35ac89470f17937f5c20524c38db103aaa4c

Here's a backtrace when C-g in the middle of the hanging `org-set-tags-command`:

Debugger entered--Lisp error: (quit)
org-element-headline-parser(990890 t)
#f(compiled-function (limit &optional granularity mode structure) "Parse the element starting at point.\n\nReturn value is a list like (TYPE PROPS) where TYPE is the type\nof the element and PROPS a plist of properties associated to the\nelement.\n\nPossible types are defined in `org-element-all-elements'.\n\nLIMIT bounds the search.\n\nOptional argument GRANULARITY determines the depth of the\nrecursion. Allowed values are `headline', `greater-element',\n`element', `object' or nil. When it is broader than `object' (or\nnil), secondary values will not be parsed, since they only\ncontain objects.\n\nOptional argument MODE, when non-nil, can be either\n`first-section', `item', `node-property', `planning',\n`property-drawer', `section', `table-row', or `top-comment'.\n\n\nIf STRUCTURE isn't provided but MODE is set to `item', it will be\ncomputed.\n\nThis function assumes point is always at the beginning of the\nelement it has to parse." #<bytecode -0xffa82cf259ad9a8>)(990890 element nil nil)
org-element--parse-to(990890)
org-element-at-point(990890)
org-element-cache-map(#f(compiled-function (el) #<bytecode -0x5d1d54592fb960>))
org-get-buffer-tags()
org-set-tags-command(nil)
funcall-interactively(org-set-tags-command nil)
command-execute(org-set-tags-command)


Emacs : GNU Emacs 29.1 (build 2, x86_64-unknown-linux-gnu, X toolkit, cairo version 1.16.0)
of 2023-08-02
Package: Org mode version 9.7-pre (release_9.6.6-412-g2f7b35 @ /home/adam/.emacs.d/straight/repos/org/lisp/)

Best
----

Adam Beckmeyer


             reply	other threads:[~2023-08-14 18:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 18:19 Adam Beckmeyer [this message]
2023-08-15 10:00 ` [BUG] org-set-tags-command hangs indefinitely in some indirect buffers Ihor Radchenko
2023-08-15 11:59   ` Adam Beckmeyer
  -- strict thread matches above, loose matches on Subject: below --
2023-08-14 18:24 Adam Beckmeyer

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=E1qVc9n-0006Ti-92@rmmprod06.runbox \
    --to=adam_git@thebeckmeyers.xyz \
    --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).