[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: bibtex-generate-url-list enhancement]
From: |
Roland Winkler |
Subject: |
Re: address@hidden: bibtex-generate-url-list enhancement] |
Date: |
Wed, 30 Mar 2005 21:41:38 +0200 |
On Wed Mar 30 2005 Jochen Küpper wrote:
> Another question: I have a function, defined as below, which gets me a
> PDF from my private archive based on the entry's key (Not a "key = {}"
> item, but the actual "@Article{key," value.). Is there a way to hook
> that into the bibtex-generate-url machinery?
As the docstring for bibtex-generate-url-list says
Each scheme is of the form ((FIELD . REGEXP) STEP...).
FIELD is a field name as returned by `bibtex-parse-entry'.
The alist returned by bibtex-parse-entry includes the key (see
there). So bibtex-url can use it and it seems to me that your
command jk/bibtex-view-pdf is not needed at all. Try the scheme
(untested)
(("=key=" . ".*")
,jk/bibtex-pdf-location
("=key=" ".*" 0))
The only thing currently you cannot do is use the key as a button.
(You must use the command bibtex-url bound to C-c C-l.) This is
because bibtex-url and bibtex-font-lock-url use rather different
algorithms.
Would it be useful to have a function bibtex-font-lock-url-key?
I guess I wouldn't want to use it because it would be difficult to
specify which keys should be buttonized. But this might be a matter
of taste. (However, I was told that emacs is in feature freeze. So
in any case I'd prefer to wait with a new function
bibtex-font-lock-url-key till the new version of emacs has been
released.)
Roland