pdf-tools
pdf-tools copied to clipboard
Arco-Linux: No word highlight after first search
How to reproduce
-
Search for a specific word using "I-search:{word}" (by pressing /)
-
Press "n" to search for next instance of {word}
-
Page appears but no word is highlighted
-
Sometimes a word might appear 2-3 times in the same page, without highighting given word there is no way to see where it's mentioned, nor if the pdf-tools is searching/loading for the next instance in another page or if it's mentioned again in the same page.
My system:
- Arch Linux with Doom Emacs(GNU Emacs 28.2)
Hi @ThanosApollo ,
I cannot reproduce this. I do not use Doom Emacs, so I don't know if it is a problem with their configuration. Can you try to reproduce the problem in vanilla Emacs with just pdf-tools installed?
Using pdf-tools in a new emacs install in a vm(Arco-Linux, Emacs 28.2), first isearch-forward will be highlighted, afterwards using isearch-repeat-forward results are not highlighted
I can verify this issue. Highlights only work during typing of the search term but not when calling isearch-repeat-forward afterwards.
It makes isearch functionality pretty much useless.
Emacs 28.2. Arch Linux.
@vedang Typo in the title - Arco -> Arch
As a temporary workaround pdf-occur feature properly highlights the searched term.
Investigating it, seems like it is caused by the check
(or isearch-mode occur-hack-p)
in the binding for pdf-info-asynchronous in pdf-isearch-hl-matches.
Changing that line to
(or isearch-mode occur-hack-p
(memq last-command '(isearch-repeat-forward isearch-repeat-backward)))
fixes the issue for me.
Thanks @aikrahguzar. It works for me too.