[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] bibtex url under Windows
From: |
Wei-Hao Lin |
Subject: |
[emacs-wiki-discuss] bibtex url under Windows |
Date: |
Sat, 05 Feb 2005 00:00:11 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (windows-nt) |
Hi,
The bibtex url under Windows cannot be correctly parsed by
planner-bibtex-browse-url in planner-bibtex.el,
,----
| (defun planner-bibtex-browse-url (url)
| "If this is a Bibtex URL, jump to it."
| (when (string-match "^bibtex:\\([^:]+\\):\\(.+\\)" url)
| (let ((file (match-string 1 url))
| (label (match-string 2 url)))
`----
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,
"^bibtex:\\([a-z]+:[^:]+\\):\\(.+\\)"
where "[a-z]+" catches a Windows drive, but the better solution should
have the regular expression set according to operation systems, but
I'm not sure how to do that.
Wei-Hao
- [emacs-wiki-discuss] bibtex url under Windows,
Wei-Hao Lin <=