Roland Winkler <[EMAIL PROTECTED]> 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. " (progn (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 faster? > 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. Greetings, Jochen -- Fritz-Haber-Institut der MPG -- Abteilung Molekülphysik Faradayweg 4-6 (C1.03) D-14195 Berlin phone: +49-30-84135686 fax: +49-30-84135892 _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel