all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jochen Küpper" <jochen-+It19tn3Rl9sbm7dSapR3bNAH6kLmebB@public.gmane.org>
Cc: rms-mXXj517/zsQ@public.gmane.org,
	emacs-devel-mXXj517/zsQ@public.gmane.org
Subject: Re: [jochen-+It19tn3Rl9sbm7dSapR3bNAH6kLmebB@public.gmane.org: bibtex-generate-url-list enhancement]
Date: Wed, 30 Mar 2005 23:43:54 +0200	[thread overview]
Message-ID: <m3zmwkollx.fsf@doze.jochen-kuepper.de> (raw)
In-Reply-To: <16971.242.974710.569348-iRV971lXqr8zLOUDZFttzH20dTPRyWU8FLXUG6abMr4@public.gmane.org> (Roland Winkler's message of "Wed, 30 Mar 2005 21:41:38 +0200")

Roland Winkler <roland.winkler-PRwTpj6vllKd8VzsmqXLk2HfThorsUsI@public.gmane.org> 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

  parent reply	other threads:[~2005-03-30 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1DDqF9-0000nR-Kv@fencepost.gnu.org>
2005-03-30 13:24 ` [jochen@fhi-berlin.mpg.de: bibtex-generate-url-list enhancement] Roland Winkler
     [not found] ` <16970.37875.452394.32109@tfkp12.physik.uni-erlangen.de>
     [not found]   ` <16970.37875.452394.32109-iRV971lXqr8zLOUDZFttzH20dTPRyWU8FLXUG6abMr4@public.gmane.org>
2005-03-30 18:16     ` [jochen-+It19tn3Rl9sbm7dSapR3bNAH6kLmebB@public.gmane.org: " Jochen Küpper
2005-03-30 19:41       ` [jochen@fhi-berlin.mpg.de: " Roland Winkler
     [not found]         ` <16971.242.974710.569348-iRV971lXqr8zLOUDZFttzH20dTPRyWU8FLXUG6abMr4@public.gmane.org>
2005-03-30 21:43           ` Jochen Küpper [this message]
     [not found]             ` <m3zmwkollx.fsf-X+QEHg5KIgm/8B4OpmtwqPxnRIzENc/G@public.gmane.org>
2005-04-01 12:51               ` bibtex-generate-url-list Jochen Küpper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zmwkollx.fsf@doze.jochen-kuepper.de \
    --to=jochen-+it19tn3rl9sbm7dsapr3bnah6klmebb@public.gmane.org \
    --cc=emacs-devel-mXXj517/zsQ@public.gmane.org \
    --cc=rms-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.