unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Christopher M. Miles" <numbchild@gmail.com>
To: Emacs Help mailing list <help-gnu-emacs@gnu.org>
Subject: isearch replace on org-mode buffer overlays caused error
Date: Mon, 16 Dec 2024 15:42:43 +0800	[thread overview]
Message-ID: <675fd9fc.050a0220.88bd8.a658@mx.google.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1950 bytes --]


I do [M-%] which bind to package "pcre2el" command
`pcre-query-replace-regexp` which replace regexp Org-mode tag ":audio:"
with text ":file_audio:" in an Org-mode buffer. The tag is beautified
with package "org-tag-beautify" https://repo.or.cz/org-tag-beautify.git.

I got error when doing [M-%] which is a keybinding remapped to package
"pcre2el" command `pcre-query-replace-regexp`.

#+begin_example
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  isearch-open-necessary-overlays(#<overlay in no buffer>)
  mapc(isearch-open-necessary-overlays (#<overlay in no buffer> #<overlay in no buffer> #<overlay in no buffer>))
  #f(compiled-function () #<bytecode -0x46770234ddc9000>)()
  isearch-clean-overlays@magit-mode(#f(compiled-function () #<bytecode -0x46770234ddc9000>))
  apply(isearch-clean-overlays@magit-mode #f(compiled-function () #<bytecode -0x46770234ddc9000>) nil)
  isearch-clean-overlays()
  replace-dehighlight()
  #f(compiled-function () #<bytecode -0x8b10da6d0f0e86e>)()
  perform-replace(":audio:" ":file_audio:" t t nil nil nil nil nil nil nil)
  query-replace-regexp(":audio:" ":file_audio:" nil nil nil nil nil)
  funcall-interactively(query-replace-regexp ":audio:" ":file_audio:" nil nil nil nil nil)
  call-interactively(query-replace-regexp)
  pcre-query-replace-regexp()
  funcall-interactively(pcre-query-replace-regexp)
  call-interactively(pcre-query-replace-regexp nil nil)
  command-execute(pcre-query-replace-regexp)
#+end_example

I saw #<overlay in no buffer> in the backtrace. Don't know why.

Should the `isearch-open-necessary-overlays` exclude filter those
#<overlay in no buffer>?

-- 

[ stardiviner ]
I try to make every word tell the meaning that I want to express without misunderstanding.

Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

             reply	other threads:[~2024-12-16  7:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-16  7:42 Christopher M. Miles [this message]
2024-12-16 10:23 ` isearch replace on org-mode buffer overlays caused error Michael Heerdegen via Users list for the GNU Emacs text editor

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=675fd9fc.050a0220.88bd8.a658@mx.google.com \
    --to=numbchild@gmail.com \
    --cc=help-gnu-emacs@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.
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).