help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

isearch replace on org-mode buffer overlays caused error


From: Christopher M. Miles
Subject: isearch replace on org-mode buffer overlays caused error
Date: Mon, 16 Dec 2024 15:42:43 +0800
User-agent: mu4e 1.12.7; emacs 31.0.50

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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]