emacs-wiki-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[emacs-wiki-discuss] Re: bibtex url under Windows


From: Jody Klymak
Subject: [emacs-wiki-discuss] Re: bibtex url under Windows
Date: Sun, 06 Feb 2005 15:38:13 -0800
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (darwin)

Hi Angus,

Angus Lees <address@hidden> writes:

> At Sat, 05 Feb 2005 00:00:11 -0500, Wei-Hao Lin wrote:
>> For example, "bibtex:c:/foo/bar.bib:reference:key" will be wrongly
>> parsed as "file"="c", "label"="/foo/bar.bib:reference:key", while the
>> correct result should be "file"="c:/foo/bar.bib",
>> "label"="reference:key".  I can replace the regular expression with the
>> following one,
>
> How about anchoring at the end of the string:
>
> -  (when (string-match "^bibtex:\\([^:]+\\):\\(.+\\)" url)
> +  (when (string-match "^bibtex:\\(.+\\):\\([^:]+:[^:]+\\)$" url)
>
> Or is the label not always "reference:key"?  (I have never really used
> bibtex properly)

I don't think this is the case - my references do not have colons.  

On the other hand, I see no reason that the separator between the
filename and the reference needs to be a colon.   Semi-colon should be
fine, shouldn't it?  

- (concat "bibtex:" (buffer-file-name) ":" (bibtex-key-in-head))
+ (concat "bibtex:" (buffer-file-name) ";" (bibtex-key-in-head))

and

-  (when (string-match "^bibtex:\\([^:]+\\):\\(.+\\)" url)
+  (when (string-match "^bibtex:\\([^:]+\\);\\(.+\\)" url)

worked for me. Hopefully no one uses semicolons in their file-system
or their bibtex key names.  

Cheers,  Jody

-- 
Jody Klymak      http://opg1.ucsd.edu/~jklymak/
mailto:address@hidden   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]