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: Re: [jochen-+It19tn3Rl9sbm7dSapR3bNAH6kLmebB@public.gmane.org: bibtex-generate-url-list enhancement] Date: Wed, 30 Mar 2005 23:43:54 +0200 Organization: Fritz-Haber-Institut der MPG Message-ID: 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: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1112219750 8852 80.91.229.6 (30 Mar 2005 21:55:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 30 Mar 2005 21:55:50 +0000 (UTC) Cc: rms-mXXj517/zsQ@public.gmane.org, emacs-devel-mXXj517/zsQ@public.gmane.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org-mXXj517/zsQ@public.gmane.org Wed Mar 30 23:55:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1DGlA5-00082S-00 for ; Wed, 30 Mar 2005 23:55:42 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGlQe-0008ID-Ct for ged-emacs-devel@m.gmane.org; Wed, 30 Mar 2005 17:12:48 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DGlMe-00070D-3P for emacs-devel-mXXj517/zsQ@public.gmane.org; Wed, 30 Mar 2005 17:08:40 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DGlMV-0006w2-Fv for emacs-devel-mXXj517/zsQ@public.gmane.org; Wed, 30 Mar 2005 17:08:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DGlMU-0006qE-Ny for emacs-devel-mXXj517/zsQ@public.gmane.org; Wed, 30 Mar 2005 17:08:30 -0500 Original-Received: from [151.189.21.48] (helo=mail-in-08.arcor-online.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1DGkyi-0002Oi-HS; Wed, 30 Mar 2005 16:43:56 -0500 Original-Received: from doze.jochen-kuepper.de.fhi-berlin.mpg.de (dsl-082-082-215-136.arcor-ip.net [82.82.215.136]) by mail-in-08.arcor-online.net (Postfix) with ESMTP id 568BC48062; Wed, 30 Mar 2005 23:43:54 +0200 (CEST) Original-To: Roland Winkler In-Reply-To: <16971.242.974710.569348-iRV971lXqr8zLOUDZFttzH20dTPRyWU8FLXUG6abMr4@public.gmane.org> (Roland Winkler's message of "Wed, 30 Mar 2005 21:41:38 +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: 58 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:35383 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35383 Roland Winkler 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) > > (("=3Dkey=3D" . ".*") > ,jk/bibtex-pdf-location > ("=3Dkey=3D" ".*" 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 ...)).=20 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: (("=3Dkey=3D" . ".*") ("=3Dkey=3D" ".*" 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 --=20 Fritz-Haber-Institut der MPG -- Abteilung Molek=FClphysik Faradayweg 4-6 (C1.03) D-14195 Berlin phone: +49-30-84135686 fax: +49-30-84135892