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

allow searching different fields interactively #62

Open
plantarum opened this issue Sep 16, 2015 · 6 comments
Open

allow searching different fields interactively #62

plantarum opened this issue Sep 16, 2015 · 6 comments

Comments

@plantarum
Copy link
Contributor

As I understand it, helm-bibtex uses a fixed set of fields for every search, possibly extended by the value of helm-bibtex-additional-search-fields.

However, sometimes I want to search only a subset of fields: keywords but not titles, abstract only etc. Is it possible to provide multiple search options to the user? This is provided in bibtex-mode via C-c C-a, which prompts the user for which field the wish to search. This may be the only feature of bibtex-mode that is not replaced by a superior alternative in helm-bibtex.

Thanks,

Tyler

@tmalsburg
Copy link
Owner

Hi Tyler, I agree that this would be useful but it would require major changes in the code and would lead to considerably increased memory consumption because all fields would need to be stored in memory. Currently, only the fields in helm-bibtex-additional-search-fields plus some standard fields are stored. In order to implement this feature efficiently, I think we would need a proper index similar to that generated by the mail indexer mu. That's unfortunately far beyond what I can do in my spare time.

It would be slightly easier to restrict the search to a subset of the fields in helm-bibtex-additional-search-fields but this is still considerable work because it would require a parser for search expressions like year:1999 and we would not anymore be able to use helm's search engine.

@plantarum
Copy link
Contributor Author

Is helm-bibtex-candidates regenerated for each search? If so, maybe we could provide a way to set different fields each time it is called. If it is not regenerated each search, it sounds like it will be very complicated to change, as you say.

Thanks,

Tyler

@tmalsburg
Copy link
Owner

Is helm-bibtex-candidates regenerated for each search?

Unfortunately it's not because that would be too slow for most bibliographies. The bibliography is parsed once and then cached in helm-bibtex-cached-candidates. The goal is to produce results almost instantly even with huge bibliographies like this one. I'll think about a solution for option 2 (search a subset of the restricted fields), but please don't expect a solution in the near future. If you want to work on it, I'm happy to give you directions.

@plantarum
Copy link
Contributor Author

Ok, I see that now. I'm not familiar with helm sources, but I understand the constraints now.

I can continue to use bibtex-search-entries when I need to restrict my searches to a single field. Maybe I'll think of a way to jump from helm-bibtex to bibtex-search-entries and back. If I do, I'll try and code something up.

FYI, I have a few bibtex helper functions packaged up in bibtex-utils (on melpa and github). Nothing as complex as helm-bibtex though.

https://github.com/plantarum/bibtex-utils

@tmalsburg
Copy link
Owner

Thanks for the link to your package. It looks very useful.

@scottmartincampbell
Copy link

For what it's worth, Ebib does have search filters for particular fields, though it's not as convenient as helm-bibtex for quick searches.

Awhile ago I did look using an indexer, particularly one that could also search the text in PDFs or other files associated with the bibtex entry (I switched from Zotero a while ago and this is something I miss). I envisioned something like helm-recoll underneath helm-bibtex. It's not a big priority and I didn't have enough time to pursue it. But at least the idea is out there if anyone decides to try something. Helm-bibtex is already very useful. Thanks again Titus.

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

No branches or pull requests

3 participants