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

Add additional-search-fields to bibtex-completion-format-entry? #362

Closed
bdarcus opened this issue Feb 24, 2021 · 5 comments
Closed

Add additional-search-fields to bibtex-completion-format-entry? #362

bdarcus opened this issue Feb 24, 2021 · 5 comments

Comments

@bdarcus
Copy link

bdarcus commented Feb 24, 2021

If the bibtex-completion-additional-search-fields variable is set (say to include tags), should not bibtex-completion-format-entry add the field(s) to its output?

bibtex-completion-candidates does include the additional fields, so I was expecting that to carry through with the formatted output.

Bottom line, for #361 or #355, how do we include the additional field(s) in the string that gets completed against?

@tmalsburg
Copy link
Owner

should not bibtex-completion-format-entry add the field(s) to its output?

Some users like to be able to search for the content of some fields without having them clutter the list of entries. For instance, you may want to include abstracts in the search but you likely don't want abstracts in list of entries. If you'd like to change the visual presentation, you can do this using the configuration variable bibtex-completion-display-formats.

@tmalsburg
Copy link
Owner

Bottom line, for #361 or #355, how do we include the additional field(s) in the string that gets completed against?

I'm not sure I understand this question: bibtex-completion-candidates gives you a list of entries that also include the additional search fields. So you have to somehow include them in the search. Not sure how to do this with completing-read / embark et al., sorry.

@bdarcus
Copy link
Author

bdarcus commented Feb 24, 2021

OIC, so for example, in helm-bibtex, you are using bibtex-completion-candidates to search against?

@tmalsburg
Copy link
Owner

See the output of this code: (car (bibtex-completion-candidates)). It's a cons cell where the first element is a string used for matching (but this string is never displayed) and the second element is the entry (alist) which is later used to prepare the entry for presentation in the list.

@bdarcus
Copy link
Author

bdarcus commented Feb 24, 2021

Thank you!

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