As of November 2019, this package does not work any more because of changes in the ADS API. If you want to help porting the package to the new API, please see the issue #12
—
bibslurp
provides an easy way to find BibTeX entries from the NASA
ADS server and to copy them into your local database. All from within
emacs!
We have tried to make bibslurp as simple and as unobtrusive as possible, with advanced features available when you need them. We hope you like the interface!
- add an entry to a bibtex buffer:
M-x bibslurp-query-ads RET ^Quataert 2008 RET
Type the corresponding number and hit
RET
:1 RET q C-y
Alternatively, you can navigate to the abstract you want with the
n
andp
keys, or search in the buffer withs
orr
, and then pressRET q C-y
Creating a BibTeX file is one of the more tedious aspects of writing
a paper. The NASA ADS system (http://adswww.harvard.edu/) helps a
lot by making bibliography data available and easy to find, but
there’s still the matter of copying and pasting it into your local
database. Since I find that process annoying, I wrote BibSlurp
, a
set of emacs functions to speed it along.
BibSlurp enables you to query nasa ads without leaving emacs. As an
example, typing M-x bibslurp-query-ads RET white rees RET
brings up
the following buffer: (the search string is sent directly to ADS, so
things like ^white rees
or ^white 1978
will also work as
expected.)
Let’s say I want to add the second paper to my .bib
database. All I have to
do is hit 2 RET
(or simply RET
if point is on that entry). After waiting
for the appropriate files to download, BibSlurp
responds with the message
saved bibtex entry to kill ring
.
From here, hitting q
takes me back to my .bib
file, where I can
yank the entry with C-y
: (note that bibslurp automatically
generates a label for the entry)
If I’m not sure which paper I want, I can pull up the abstract by hitting 2
a
(or simply a
if point is already on the wanted abstract). From there,
q
takes me back to the search results.
You can turn to the ADS advanced search interface, akin to
http://adsabs.harvard.edu/abstract_service.html, either by pressing C-c C-c
after having issued bibslurp-query-ads
, or directly with M-x
bibslurp-query-ads-advanced-search RET
. This pulls up a buffer
like this:
Here you can fill the wanted search fields (authors, publication
date, objects, title, abstract) and specify combination logics, and
then send the query either with C-c C-c
or by pressing the button
Send Query
. Use TAB
to move through fields, and q
outside an
input field to quit the search interface.
In the ADS search result buffer you can also visit some useful pages related to each entry:
- on-line data at other data centers, with
d
- on-line version of the selected article, with
e
- on-line articles in PDF or Postscript, with
f
- lists of objects for the selected abstract in the NED database, with
N
- lists of objects for the selected abstract in the SIMBAD database, with
S
- on-line pre-print version of the article in the arXiv database, with
x
For each of these commands, BibSlurp
will use by default the abstract point
is currenly on, but you can specify a different abstract by prefixing the
command with a number. For example, 7 x
will fire up your browser to the
arXiv version of the seventh abstract in the list.
Use package.el. You’ll need to add MELPA to your archives:
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
Alternatively, you can just save this file and do the standard
(add-to-list 'load-path "/path/to/bibslurp.el")
(require 'bibslurp)
Note that bibslurp
requires the s and dash libraries. If you
install bibslurp manually, you need to make sure you also have
these in place.
You might consider giving it a keybinding, e.g.
(global-set-key (kbd "C-x M-b") 'bibslurp-query-ads)
Copyright (C) 2013-2015 authors
written by Mike McCourt and Mosè Giordano
license: GPLv3
- Look into using an xml parser instead of regular expressions