cpitclaudel / biblio.el

Browse and import bibliographic references from CrossRef, DBLP, HAL, arXiv, Dissemin, and doi.org from Emacs
GNU General Public License v3.0
180 stars 14 forks source link

Number of hits from DBLP #13

Open rothblum opened 7 years ago

rothblum commented 7 years ago

Hi, First of all thanks for the fantastic package!

I noticed that the number of hits that I get from dblp is always upper bounded by 30. Investigating this a bit I see that this is due to the dblp's interface which defaults to 30 hits. However, they have a parameter (called h) that allows for more hits. See here:

http://dblp.uni-trier.de/faq/13501473

I'd like to suggest that you add a variable that can be customized for this. Many thanks! Ron

cpitclaudel commented 7 years ago

This sounds like a good idea! And thanks for digging up the correct parameter. I wonder whether proper pagination wouldn't even be better, though. That is, the package should probably have a "more" link at the end of all results.

I don't have time for that more general feature, though; in fact, I don't really have time to implement a parameter that works for all backends, because I'd have to look at the docs of each backend. I do, however, have time to suggest the following trick:

(defun ~/biblio-dblp--url (query)
  "Create a DBLP url to look up QUERY (with 42 results)."
  (format "http://dblp.uni-trier.de/search/publ/api?h=%d&q=%s&&format=xml"
          42 (url-encode-url query)))

(advice-add 'biblio-dblp--url :override #'~/biblio-dblp--url)

Adding this to your .emacs should do it :) Does this help?

rothblum commented 7 years ago

Thanks for the quick answer Clement!

I had already done exactly the solution you suggested :) Obviously there are more elegant ways of doing this so if you ever have some time it could be a nice addition (I would have offered to help but my lisp is not good enough). Btw, you could also initially only support this feature on some of the backends.

Also, let me comment that I think it's much better to list all hits rather than scrolling through separate pages. Specifically, I use biblio as follows:

  1. I usually do a dblp-lookup with one of the author names.
  2. Then within the buffer that contains all of that author's publications I usually just search for some word in the title that I remember or the name of another coauthor.

If you implemented the solution with multiple pages I think it would be hard to search through.

Thanks again! Ron

On Thu, Feb 16, 2017 at 4:27 PM, Clément Pit--Claudel < notifications@github.com> wrote:

This sounds like a good idea! And thanks for digging up the correct parameter. I wonder whether proper pagination wouldn't even be better, though. That is, the package should probably have a "more" link at the end of all results.

I don't have time for that more general feature, though; in fact, I don't really have time to implement a parameter that works for all backends, because I'd have to look at the docs of each backend. I do, however, have time to suggest the following trick:

(defun ~/biblio-dblp--url (query) "Create a DBLP url to look up QUERY (with 42 results)." (format "http://dblp.uni-trier.de/search/publ/api?h=%d&q=%s&&format=xml" 42 (url-encode-url query)))

(advice-add 'biblio-dblp--url :override #'~/biblio-dblp--url)

Adding this to your .emacs should do it :) Does this help?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cpitclaudel/biblio.el/issues/13#issuecomment-280466149, or mute the thread https://github.com/notifications/unsubscribe-auth/ALAeDVecw9D-iddyGRrgf8RA2TQWGvvJks5rdL80gaJpZM4MDZ6M .