[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: bibtex-generate-url-list enhancement]

From: Jochen Küpper
Subject: Re: address@hidden: bibtex-generate-url-list enhancement]
Date: Wed, 30 Mar 2005 23:43:54 +0200

Roland Winkler <address@hidden> writes:

> 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))

Hmm, that I got not working (most probably due to my limited lisp
knowledge; tried a regexp replace ala "\0_\1_\2.pdf" and also using
(format ...)). 

That is, I actually need to perform a few transformations on the key
to get the filename. However, it still works quite nicely when using
the following bibtex-generate-url-list entry:

     (("=key=" . ".*")
      ("=key=" ".*" jk/bibtex-pdf-name))

and a simple transformation function

(defun jk/bibtex-pdf-name (key)
  "Determine filename in PDF databse from bibtex key.

This function determines the filename corresponding to the current entry.
    (subst-char-in-string (string-to-char ":") (string-to-char "_") key t)
    (concat jk/bibtex-pdf-location "/" (substring key 0 1) "/" key  ".pdf")))

I am sure someone could do that using a smart regexp replace, but this
I understand;) I do assume that a regexp/replace solution might be

> 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.

No problem for me. (But I do know some people who will only use this
with clickable keys...)

Thanks for your help.

Fritz-Haber-Institut der MPG -- Abteilung Molekülphysik
Faradayweg 4-6 (C1.03)
D-14195 Berlin

phone: +49-30-84135686
fax:   +49-30-84135892

reply via email to

[Prev in Thread] Current Thread [Next in Thread]