cute-jumper/gscholar-bibtex

add a default value to the source

heikkil opened this issue · 2 comments

Please make it possible to set one of the sources as default, so that its name is shown at the prompt and you only need to press enter to use it.

Thank you for the good suggestion! I pushed a new commit f499e29 and I think basically what you've mentioned should be implemented in this commit, although I'm still not sure whether this kind of behavior of the default source is "correct".

Simply speaking, you just set the value of `gscholar-bibtex-default-source' to the name of your preferred source. Here I copy the content of the Default source section in the README.org:

If you have a preferred source, you can set it as default so you don't have to
type the name to select the source every time you call `gscholar-bibtex'. Say
if you want to set "Google Scholar" as default:
: (setq gscholar-bibtex-default-source "Google Scholar")

Note that in order to make it work, you have to make sure the source name is
correct and you don't disable the source that you set as default, otherwise
the default source setting has no effect. Besides, if you only have one source
enabled, then the enabled source automatically becomes the default, regardless
of the value of `gscholar-bibtex-default-source'.

Any comments are welcome!

Excellent! Just what I had in mind. In my opinion, anything that saves key presses is the correct bahaviour. Thanks!