From: Leo Stein <leo.stein@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] BibTeX-mode: add eprint field as potential source for entry's URL
Date: Sun, 1 Dec 2024 13:05:33 -0600 [thread overview]
Message-ID: <CAE56pjGU2oNxN-wWku69oX6G=p6DE-wuS-=ks6gRPA4rOF3T+g@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 272 bytes --]
This is a fairly trivial patch: the eprint field (like doi and url fields)
is another field with (AFAIK) a universal format that maps to a URL. This
makes the contents of the eprint field automatically linked to the arXiv
eprint associated to the bibtex entry.
Best,
Leo
[-- Attachment #1.2: Type: text/html, Size: 328 bytes --]
[-- Attachment #2: 0001-BibTeX-mode-add-eprint-field-as-potential-source-for.patch --]
[-- Type: application/octet-stream, Size: 815 bytes --]
From 56ae41b168b75b7fc036a68e08802de3b2cb4cb2 Mon Sep 17 00:00:00 2001
From: "Leo C. Stein" <leo.stein@gmail.com>
Date: Sun, 1 Dec 2024 12:49:46 -0600
Subject: [PATCH] BibTeX-mode: add eprint field as potential source for entry's
URL
---
lisp/textmodes/bibtex.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 99a97c9bb8d..c77953489a7 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -1443,6 +1443,9 @@ Used by `bibtex-complete-crossref-cleanup' and `bibtex-copy-summary-as-kill'."
(defcustom bibtex-generate-url-list
'((("url" . ".*:.*"))
+ (("eprint" . ".*")
+ "https://arxiv.org/abs/%s"
+ ("eprint" ".*" 0))
(("doi" . "10\\.[0-9]+/.+")
"https://doi.org/%s"
("doi" ".*" 0)))
--
2.47.0
next reply other threads:[~2024-12-01 19:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 19:05 Leo Stein [this message]
2024-12-01 19:49 ` [PATCH] BibTeX-mode: add eprint field as potential source for entry's URL Eli Zaretskii
2024-12-02 13:08 ` Roland Winkler
2024-12-02 13:34 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE56pjGU2oNxN-wWku69oX6G=p6DE-wuS-=ks6gRPA4rOF3T+g@mail.gmail.com' \
--to=leo.stein@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).