From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Jochen_K=FCpper?= Newsgroups: gmane.emacs.devel Subject: bibtex-generate-url-list Date: Fri, 01 Apr 2005 14:51:10 +0200 Organization: Fritz-Haber-Institut der MPG Message-ID: <9eoecywthd.fsf_-_@gowron.rz-berlin.mpg.de> References: <16970.37875.452394.32109@tfkp12.physik.uni-erlangen.de> <9e64z980ev.fsf@gowron.rz-berlin.mpg.de> <16971.242.974710.569348@tfkp12.physik.uni-erlangen.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1112360087 25263 80.91.229.2 (1 Apr 2005 12:54:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 1 Apr 2005 12:54:47 +0000 (UTC) Cc: emacs-devel-mXXj517/zsQ@public.gmane.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Fri Apr 01 14:54:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DHLfR-0001RG-H1 for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2005 14:54:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHLwL-0003TM-75 for ged-emacs-devel@m.gmane.org; Fri, 01 Apr 2005 08:11:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DHLtb-0001sg-N8 for emacs-devel-mXXj517/zsQ@public.gmane.org; Fri, 01 Apr 2005 08:09:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DHLtY-0001q6-HJ for emacs-devel-mXXj517/zsQ@public.gmane.org; Fri, 01 Apr 2005 08:09:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DHLtE-0001Vx-HX for emacs-devel-mXXj517/zsQ@public.gmane.org; Fri, 01 Apr 2005 08:08:44 -0500 Original-Received: from [141.14.130.154] (helo=duras.rz-berlin.mpg.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DHLcG-0001Wn-DG for emacs-devel-mXXj517/zsQ@public.gmane.org; Fri, 01 Apr 2005 07:51:12 -0500 Original-Received: from localhost (unknown [127.0.0.1]) by duras.rz-berlin.mpg.de (Postfix) with ESMTP id 0992DED260; Fri, 1 Apr 2005 14:51:08 +0200 (CEST) Original-Received: from duras.rz-berlin.mpg.de ([127.0.0.1]) by localhost (duras [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 04075-01; Fri, 1 Apr 2005 14:51:05 +0200 (CEST) Original-Received: from gowron.rz-berlin.mpg.de.fhi-berlin.mpg.de (gowron.RZ-Berlin.MPG.DE [141.14.130.77]) by duras.rz-berlin.mpg.de (Postfix) with ESMTP id DCE91ED268; Fri, 1 Apr 2005 14:51:04 +0200 (CEST) Original-To: Roland Winkler In-Reply-To: (Jochen =?iso-8859-1?Q?K=FCpper's?= message of "Wed, 30 Mar 2005 23:43:54 +0200") Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUcGRSqioSCPi7Cwbxu Vk5MQjycXkxMKiQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFG2qEAAAB5klEQVR42nXUwY7aMBAA UK8E4tqpI/fMKIWzFdBewcwm10WA9tpksz6zFci/37GdxF7a+mLwi2fGQ4yo/jPE9AkaIcRM/gU7 EcfTA/zgtWsuEfRmWPVjlsOryMYpAYgvYz9B8RXmhxHEw/gcQD+sz/cDbMLXhbu7a6j6Nob6FuDW U21+uje8nuUA/rnXxR4ArCWi5jhWJSJUmoWop7HckPt+Bz6PsrYmexgg5HY3CDvKuq/lAM9hB4VQ HfZEMt8xj2BLSrD1cDlThNJMoXSEWnroDJr3HM5nDtUbRIPuluDqLlx8YdYuh0o87S6+DWANUrn+ Pf0eO7vh1Awf98XKXi/jAatnCwU/Bebl5pZqjRNs2xa4IcoqdEuN5QSbFn3pYLkqqbtyLLfSEbQi XEn4jsvpZRiAO7UCUCYBhE7zhAgSclAyToiSO5xgA+8RONYqD6X3YYdWnakJU1WVPsaI0LXU5VBF kMr6aJTBPk4KfP5SJoAYEXpE5/4FVnVrpHQ/tny/pAduZl/bBDsGLbkqD7ZN0PgbCfwucPL49gzd pZmPw22SoPoc+iZkAL+J6nRrdQEHf+4Qqm4TFJJ8idxYrumY/QEAFHQI65xhcZqgOEHhTAhk6WUu jgPohnc4wgD21+zN+c79AZmNym6Cgz4IAAAAAElFTkSuQmCC X-Archive: encrypt X-Attribution: Jochen OpenPGP: id=CC1B0B4D; url=http://jochen-kuepper.de/computer/keys.asc X-Request-PGP: http://jochen-kuepper.de/computer/keys.asc X-URL: http://jochen-kuepper.de Original-Lines: 41 X-Virus-Scanned: by amavisd-new (PP&B) at duras X-BeenThere: emacs-devel-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.devel:35474 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35474 Ok, so lets assume I have the following setting ,---- | bibtex-generate-url-list '((("=3Dkey=3D" . ".*") | ("=3Dkey=3D" ".*" jk/bibtex-pdf-name)) | (("doi" . "10\\..*/.*") | "http://dx.doi.org/" | ("doi" ".*" 0)) | (("url" . ".*:.*"))) `---- and ,---- | (defvar jk/bibtex-pdf-location (concat jk/home-dir "/PDF") "Location of P= DF archive") | (defun jk/bibtex-pdf-name (key) | "Determine filename in PDF databse from bibtex key. |=20 | 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= "))) `---- This will, obviously, always try to open a file in my local archive and never use the doi or url fields. What I actually want is that the file from the archive is used *if* available, the doi/url otherwise. I can supply a function to check for the availability in the archive, but is there any way to have bibtex-url go back and use the next entry if the file is not available? If not, I guess I can write a function around bibtex-url that checks for the availability of the local file and opens it if its there, but use bibtex-url without the local source otherwise... Doesn't sound like the cleanest approach, though. Greetings, Jochen --=20 Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Libert=E9, =C9galit=E9, Fraternit=E9 GnuPG key: CC1B0B4D (Part 3 you find in my messages before fall 2003.)