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

Wrong matches in helm-bibtex under some cases #2597

Closed
1 task done
hitswint opened this issue Apr 19, 2023 · 1 comment
Closed
1 task done

Wrong matches in helm-bibtex under some cases #2597

hitswint opened this issue Apr 19, 2023 · 1 comment
Labels

Comments

@hitswint
Copy link

hitswint commented Apr 19, 2023

What happened?

Hi there,
The candicates in helm-bibtex are in the format of (DISPLAY . REAL). when helm-bibtex is called in dired-mode, the matches shows the REAL part in candidates, not the DISPLAY part. Refer to tmalsburg/helm-bibtex#425 for details.

How to reproduce?

After some digging, i believe the problem lies with Helm, not the helm-bibtex. In helm-bibtex, there are two format functions applied on the original candidates: helm-bibtex-candidates-formatter and helm-fuzzy-highlight-matches. The two functions are applied sequentially on the original candidates. With the first one applied, it returns as expected. But the return value of latter function depends on the things at point because of the "helm-guess-filename-at-point" in it.

In most cases, helm-guess-filename-at-point returns nil, and when it is called in dired-mode, the return value is not nil.This behavior changes the return value of "helm-fuzzy-highlight-matches" to (REAL . REAL).

I have done three tests on this:

  1. Remove helm-guess-filename-at-point from helm-fuzzy-highlight-matches
  2. Redefine it to always return nil,
  3. Change the 'nohighlight attribute to t for helm-source-bibtex, which disables helm-fuzzy-highlight-matches

All the tests above corrected the bug, which make me believe the problem is on Helm's side.

Helm Version

Melpa or NonGnuElpa

Emacs Version

Emacs-28/29

OS

GNU/Linux

Relevant backtrace (if possible)

No response

Minimal configuration

  • I agree using a minimal configuration
@hitswint hitswint added the bug label Apr 19, 2023
@thierryvolpiatto
Copy link
Member

This should be fixed by be98c8e, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants