From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Roland Winkler Newsgroups: gmane.emacs.devel Subject: Re: [jochen@fhi-berlin.mpg.de: bibtex-generate-url-list enhancement] Date: Wed, 30 Mar 2005 21:41:38 +0200 Message-ID: <16971.242.974710.569348@tfkp12.physik.uni-erlangen.de> References: <16970.37875.452394.32109@tfkp12.physik.uni-erlangen.de> <9e64z980ev.fsf@gowron.rz-berlin.mpg.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 1112212560 17879 80.91.229.2 (30 Mar 2005 19:56:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2005 19:56:00 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 30 21:55:57 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DGjGM-0005o9-Am for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2005 21:54:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGjWu-00072e-O9 for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2005 15:11:08 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGjW0-0006qw-7D for emacs-devel@gnu.org; Wed, 30 Mar 2005 15:10:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGjVt-0006mz-6r for emacs-devel@gnu.org; Wed, 30 Mar 2005 15:10:06 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGjVo-0006iv-2O for emacs-devel@gnu.org; Wed, 30 Mar 2005 15:10:00 -0500 Original-Received: from [131.188.3.181] (helo=max71.rrze.uni-erlangen.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DGj57-0001yv-Qe; Wed, 30 Mar 2005 14:42:26 -0500 Original-Received: from localhost ([131.188.3.181] [131.188.3.181]) by max71.rrze.uni-erlangen.de with ESMTP; Wed, 30 Mar 2005 21:41:50 +0200 Original-Received: from max71.rrze.uni-erlangen.de ([131.188.3.181]) by localhost (max71 [131.188.2.91]) (amavisd-new, port 10025) with ESMTP id 22790-05-186; Wed, 30 Mar 2005 21:41:50 +0200 (MEST) Original-Received: from tfkp12.physik.uni-erlangen.de (tfkp12.physik.uni-erlangen.de [131.188.164.212]) by max71.rrze.uni-erlangen.de with ESMTP; Wed, 30 Mar 2005 21:41:50 +0200 Original-To: =?iso-8859-1?Q?Jochen_K=FCpper?= In-Reply-To: <9e64z980ev.fsf@gowron.rz-berlin.mpg.de> X-Mailer: VM 7.19 under Emacs 21.3.50.2 X-Virus-Scanned: by amavisd-new-20030616 (RRZE) on max71.rrze.uni-erlangen.de X-Spam-PYZOR: Reported 0 times. X-Spam-DCC: rrze-dcc:boeck1 1202; Body=1 Fuz1=1 Fuz2=1 X-Spam-RBL: X-Spam-Eval: ham X-Spam-RRZE-Info: Diese Mail wurde einer automatischen Spam-Analyse unterzogen, siehe: http://www.rrze.uni-erlangen.de/dienste/e-mail/spam-analyse/ X-BeenThere: emacs-devel@gnu.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@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:35378 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35378 On Wed Mar 30 2005 Jochen K=FCpper 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 =3D = {}" > item, but the actual "@Article{key," value.). Is there a way to hook > that into the bibtex-generate-url machinery=3F 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) (("=3Dkey=3D" . ".*") ,jk/bibtex-pdf-location ("=3Dkey=3D" ".*" 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=3F 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