Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occur-mode-goto-occurence crashes with wrong type error #26

Open
cacology opened this issue Sep 12, 2023 · 2 comments
Open

occur-mode-goto-occurence crashes with wrong type error #26

cacology opened this issue Sep 12, 2023 · 2 comments

Comments

@cacology
Copy link

Calling occur and clicking any line to call occur-mode-goto-occurence crashes with error (wrong-type-error markerp .... I expect it to instead go to that line in the other buffer in which it is searching.

I've been able to correct the code locally, but I don't fully understand the package so I hesitate to make a pull request. My change, however, is:

➜  ~ diff volatile-highlights.el volatile-highlights.new.el
9c9,11
< ;; Revision: $Id$
---
> ;; Package-Version: 20230301.1402
> ;; Package-Commit: fcf6e2778454ce514c189a7d1fe70e03ad81c325
> ;; Revision: $Id: 1a65157904ec58ed515858a20cbebcde528a51db $
684,685c686,687
<       (let ((marker (and *occur-str*
<                          (get-text-property 0 'occur-target *occur-str*)))
---
>       (let ((marker (car (car (and *occur-str*
>                          (get-text-property 0 'occur-target *occur-str*)))))

Respectfully submitted if this helps someone else.

@bcc32
Copy link

bcc32 commented Apr 11, 2024

In fact, occur now does its own highlighting when visiting an occurrence. Perhaps volatile-highlights should just do nothing if the Emacs version is new enough? (The functionality was introduced into occur in emacsmirror/emacs@abe7c22, so starting in Emacs 28)

bcc32 added a commit to bcc32/spacemacs that referenced this issue Apr 11, 2024
This extension causes an error when navigating to occur matches
starting in Emacs 29, and already in Emacs 28, it became unnecessary
since occur does its own highlighting of matches when you visit them.

See k-talo/volatile-highlights.el#26.
@cacology
Copy link
Author

Seems reasonable to me @bcc32 ; though, the above patch seems to be holding steady for me with Emacs 29.3 whatever the default behavior is.

smile13241324 pushed a commit to syl20bnr/spacemacs that referenced this issue May 11, 2024
This extension causes an error when navigating to occur matches
starting in Emacs 29, and already in Emacs 28, it became unnecessary
since occur does its own highlighting of matches when you visit them.

See k-talo/volatile-highlights.el#26.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants