* isearch replace on org-mode buffer overlays caused error
@ 2024-12-16 7:42 Christopher M. Miles
2024-12-16 10:23 ` Michael Heerdegen via Users list for the GNU Emacs text editor
0 siblings, 1 reply; 2+ messages in thread
From: Christopher M. Miles @ 2024-12-16 7:42 UTC (permalink / raw)
To: Emacs Help mailing list
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: isearch replace on org-mode buffer overlays caused error
2024-12-16 7:42 isearch replace on org-mode buffer overlays caused error Christopher M. Miles
@ 2024-12-16 10:23 ` Michael Heerdegen via Users list for the GNU Emacs text editor
0 siblings, 0 replies; 2+ messages in thread
From: Michael Heerdegen via Users list for the GNU Emacs text editor @ 2024-12-16 10:23 UTC (permalink / raw)
To: help-gnu-emacs
"Christopher M. Miles" <numbchild@gmail.com> writes:
> Should the `isearch-open-necessary-overlays` exclude filter those
> #<overlay in no buffer>?
That doesn't normally happen. Isearch will only consider live overlays
living in the current buffer.
> #+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)
But why is this magit-mode function called in your case?
`isearch-clean-overlays@magit-mode' tries to unfold sections in a
magit-mode buffer. I don't think it should be called in an org-mode
buffer at all. Something's wrong here.
Michael.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-16 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-16 7:42 isearch replace on org-mode buffer overlays caused error Christopher M. Miles
2024-12-16 10:23 ` Michael Heerdegen via Users list for the GNU Emacs text editor
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).