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

Arco-Linux: No word highlight after first search #162

Open
ghost opened this issue Oct 14, 2022 · 6 comments
Open

Arco-Linux: No word highlight after first search #162

ghost opened this issue Oct 14, 2022 · 6 comments
Labels
needs investigation Something isn't working, need to understand what the actual problem is pdf-isearch Bugs / Feature Requests related to Searching in PDFs

Comments

@ghost
Copy link

ghost commented Oct 14, 2022

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)
@vedang
Copy link
Owner

vedang commented Oct 16, 2022

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?

@vedang vedang added the waiting Further information is requested, or a change is pending upstream / in dependencies label Oct 16, 2022
@ghost ghost closed this as completed Oct 24, 2022
@ghost
Copy link
Author

ghost commented Oct 24, 2022

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

@ghost ghost reopened this Oct 24, 2022
@vedang vedang changed the title No word highlight after first search Arco-Linux: No word highlight after first search Oct 27, 2022
@vedang vedang added needs investigation Something isn't working, need to understand what the actual problem is pdf-isearch Bugs / Feature Requests related to Searching in PDFs and removed waiting Further information is requested, or a change is pending upstream / in dependencies labels Oct 27, 2022
@igordejanovic
Copy link

igordejanovic commented Jun 26, 2023

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

@igordejanovic
Copy link

As a temporary workaround pdf-occur feature properly highlights the searched term.

@aikrahguzar
Copy link

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.

@igordejanovic
Copy link

Thanks @aikrahguzar. It works for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Something isn't working, need to understand what the actual problem is pdf-isearch Bugs / Feature Requests related to Searching in PDFs
Projects
None yet
Development

No branches or pull requests

3 participants