From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Leo Stein Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] BibTeX-mode: add eprint field as potential source for entry's URL Date: Mon, 2 Dec 2024 11:39:17 -0600 Message-ID: References: <86o71v420t.fsf@gnu.org> <87v7w2kzaz.fsf@gnu.org> <865xo2439s.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000005c232506284d082e" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2104"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Roland Winkler , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 02 20:21:40 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tIBzH-0000N2-TH for ged-emacs-devel@m.gmane-mx.org; Mon, 02 Dec 2024 20:21:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIBye-0004Tx-Tk; Mon, 02 Dec 2024 14:21:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIAOf-0006rZ-BQ for emacs-devel@gnu.org; Mon, 02 Dec 2024 12:39:45 -0500 Original-Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIAOc-00042b-I4; Mon, 02 Dec 2024 12:39:45 -0500 Original-Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-aa560a65fd6so779601066b.0; Mon, 02 Dec 2024 09:39:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733161178; x=1733765978; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=zfDANr9xKoQ2779jTyKr3s22Q7V2AgNdl3Sk2MfwYp8=; b=QWEs+EfWFhX8Os8fFTqMfgOAiALOW4ScpzJso0FUkn7HAhMd4aB+qlLUFrBuiasKMc ULzTitVqN27Tvjm0qkKVyy5DMzwISQouSWfbvcmW1DvT6efNRHb2VXTv4QMKk0OCTBfR B4rcuiIJD+G6TGXGD0JoPqv3eAGEm+/74NRYIlP/1+CSBM2oaT4EMRTWtSwksspuZg3b PKW3WJnxE7+DwsxBkhYPg8FeT0XbaI4H8LBo7sQhytj9PgXQWdu1qez4OL45jhaaM10+ DfjiG//eo7lkVOe9NCCFq3Pa04WgiQiltXDUrftfV0FberaHEXTAPjMQeMr38dl3kNDa 1k/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733161178; x=1733765978; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zfDANr9xKoQ2779jTyKr3s22Q7V2AgNdl3Sk2MfwYp8=; b=dAq3x+RDHxW5N7Ae0VdHg7Ddxc3BzNovQvYKypOerFP1mGyk01CRndQg7Z5BbHOHwz o7jS7LH4P3gHNEufp1n8YEhBZJSvyQd936tMAC3xVoSYcLIfmfpVqBkVLKFnpL394Yl3 /QiUSH/HNa9PHEPvm94/OHx0JNI5gqG9o+ZFBLhp4A4jVtVY7jL0+N+od81ows22iU3z CF+u4fYia9uMHBgfCxI43Vzzao8EZpwX7Cx/lj0hLwTY+2HXuWGAuQavkjLHYnY7pra/ ivdJ60sgvmvwytXsCHqENOAhEN8Z+bIsQTBC5te1qK9szwLCTE+8dhdAmHcFpLrA8Tpr Y0Jw== X-Forwarded-Encrypted: i=1; AJvYcCWpwzbexL9jDE/UuCp9dvC1ZAIAivheUP/uVAdcUUEN1V3ywtS2HOrqcmnb1UfiUNIx6ZVoPUX6/3BRZg==@gnu.org X-Gm-Message-State: AOJu0Yz/cXQ840Td2lOQikwoJxcfKq/tf+4V+NusheJ0RPHi9c4sWGfZ hNaiCeNgW9OKLkH3RcAdDm/ML5GCP1y8gOwf1EKmHBIbwY53Qfdf/NjK/+RKCFwk8pHUimQErAD yJKx9UhD+lg2EMKe4kFae1GAhzaoAgrAs X-Gm-Gg: ASbGncuy73yYpAiePOFAt0Tri8ljtbz/P/p8pgUN0PQgsjEf5F6WpafqNjXgfW4+ONr l2+aosJBW5izFhsz98Hrlwo/Gp9jucFDCw+0fLva/GGQVVHc= X-Google-Smtp-Source: AGHT+IFJwE2t0lRCk+8ICASSFIy7+Hvv+rTReBMVU8bJPnxwYzdjX3umJ/QjN3pG2xj//fhK8dMrb/3ZrlqB5colGfQ= X-Received: by 2002:a17:906:9ca:b0:a9a:170d:67b2 with SMTP id a640c23a62f3a-aa5946dcdebmr2047682166b.29.1733161178110; Mon, 02 Dec 2024 09:39:38 -0800 (PST) In-Reply-To: <865xo2439s.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=leo.stein@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 02 Dec 2024 14:20:59 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:325951 Archived-At: --0000000000005c232506284d082e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear all, First of all, Roland, thanks again for your continued maintenance of this useful mode, and Eli, thanks for your maintenance of all of emacs! On Mon, Dec 2, 2024 at 7:34=E2=80=AFAM Eli Zaretskii wrote: > > From: Roland Winkler > > Cc: Leo Stein , emacs-devel@gnu.org > > Date: Mon, 02 Dec 2024 07:08:20 -0600 > > > > On Sun, Dec 01 2024, Eli Zaretskii wrote: > > >> 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))) > > > > > > Roland, any comments? > > > > The above patch is very arXiv-specific. Yes, this is arXiv-specific. I know that there are other eprint servers out there (e.g. biorXiv, chemrXiv). Before submitting the patch, I grepped through the latest TeX Live tree to find which bst's used the eprint field. As far as I could tell, bib styles assume that the eprint field points to the arXiv, not to a different preprint server. So, as far as I can tell, in actual practice, an eprint field always means the arXiv. > All this goes beyond > > old-fashioned BibTeX. But the documentation for biblatex (current: > > version 3.20 from CTAN) says in Sec. 3.14.7 "Electronic Publishing > > Information" how the field "eprint" should be used in combination with = a > > field "eprinttype" to identify an electronically published document. > This is independent of bibtex vs. biber+biblatex. > > Arxiv's usage is not compatible with this. Instead of "eprinttype" > > arXiv uses a field "archivePrefix", and the field "primaryClass" used b= y > > arXiv should probably be replaced by the optional field "eprintclass" > > mentioned in the biblatex documentation. > I am not focusing on .bib files generated by the arXiv itself. I usually get my .bib entries from INSPIRE, or ADS, or sometimes the AMS's mathscinet, or zbMath, or Google Scholar. I know that I do not have the broadest possible cross-section of biblio databases under my belt ... but as the arXiv and thus the idea of online preprint servers was created by physicists, I think this is a pretty representative view of .bib usage in the wild. Physicists, mathematicians, and computer scientists use LaTeX and thus bibtex more so than other specialties. Within these ecosystems, my understanding is that the eprint field refers to the arXiv. > > > > To the best of my knowledge, neither the arXiv approach nor the differe= nt > > approach suggested by the biblatex documentation have found a widesprea= d > > use in real life. > This is not true =E2=80=94 the eprint field, archivePrefix, and primaryClas= s are used by the arXiv, INSPIRE, and ADS. I could check the others if you'd like= . > > > > The user variable bibtex-generate-url-list can be configured to work > > either way, as suggested by the OP or as suggested by the biblatex > > documentation. Here it seems to me the best solution is to keep the > > default of bibtex-generate-url-list as it is now and let users configur= e > > this variable as desired / needed. > Of course I've customized the variable for myself. But it took me years before I realized "Hey, wait a minute, why can't I click on the arXiv number?", and then dug through the mode docs to discover that it's possible to customize this. I'm just proposing a tiny change which will reduce a little friction for many people [most of whom I think wouldn't investigate that they can customize this]. I don't know that including this universal default would ever be "wrong". I hope you'll keep an open mind to consider the patch. Best Leo > > I agree. Since this is a user option, too-specific changes in it > should be the matter of the user, not of changing the default. > --0000000000005c232506284d082e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear all,

First of all= , Roland, thanks again for your continued maintenance of this useful mode, = and Eli, thanks for your maintenance of all of emacs!

<= /div>
On Mo= n, Dec 2, 2024 at 7:34=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:
> From: Roland Winkler <winkler@gnu.org>
> Cc: Leo Stein <leo.stein@gmail.com>,=C2=A0 emacs-devel@gnu.org
> Date: Mon, 02 Dec 2024 07:08:20 -0600
>
> On Sun, Dec 01 2024, Eli Zaretskii wrote:
> >> 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-clean= up' and `bibtex-copy-summary-as-kill'."
> >>=C2=A0
> >>=C2=A0 (defcustom bibtex-generate-url-list
> >>=C2=A0 =C2=A0 '((("url" . ".*:.*")) > >> +=C2=A0 =C2=A0 (("eprint" . ".*")
> >> +=C2=A0 =C2=A0 =C2=A0"https://arxiv.org/abs/%s"<= br> > >> +=C2=A0 =C2=A0 =C2=A0("eprint" ".*" 0)) > >>=C2=A0 =C2=A0 =C2=A0 (("doi" . "10\\.[0-9]+/.+&= quot;)
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0"https://doi.org/%s"
> >>=C2=A0 =C2=A0 =C2=A0 =C2=A0("doi" ".*" 0))= )
> >
> > Roland, any comments?
>
> The above patch is very arXiv-specific.=C2=A0


Yes, this is arXiv-specific. I know that there= are other eprint servers out there (e.g. biorXiv, chemrXiv).
Before submitting the patch, I grepped through the latest TeX L= ive tree to find which bst's used the eprint field. As far as I could t= ell, bib styles assume that the eprint field points to the arXiv, not to a = different preprint server. So, as far as I can tell, in actual practice, an= =C2=A0eprint field always means the arXiv.
=C2= =A0
All this goes be= yond
> old-fashioned BibTeX.=C2=A0 But the documentation for biblatex (curren= t:
> version 3.20 from CTAN) says in Sec. 3.14.7 "Electronic Publishin= g
> Information" how the field "eprint" should be used in c= ombination with a
> field "eprinttype" to identify an electronically published d= ocument.

This is independent of bibtex = vs. biber+biblatex.
=C2=A0
> Arxiv's usage is not compatible with this.=C2=A0 Instead of "= eprinttype"
> arXiv uses a field "archivePrefix", and the field "prim= aryClass" used by
> arXiv should probably be replaced by the optional field "eprintcl= ass"
> mentioned in the biblatex documentation.

I am not focusing on .bib files generated by the arXiv itself. I usu= ally get my .bib entries from INSPIRE, or ADS, or sometimes the AMS's m= athscinet, or zbMath, or Google Scholar. I know that I do not have the broa= dest possible cross-section of biblio databases under my belt ... but as th= e arXiv and thus the idea of online preprint servers was created by physici= sts, I think this is a pretty representative view of .bib usage in the wild= . Physicists, mathematicians, and computer scientists use LaTeX and thus bi= btex more so than other specialties. Within these ecosystems, my understand= ing is that the eprint field refers to the arXiv.
=C2=A0
>
> To the best of my knowledge, neither the arXiv approach nor the differ= ent
> approach suggested by the biblatex documentation have found a widespre= ad
> use in real life.

This is not true= =E2=80=94 the eprint field,=C2=A0archivePrefix, and=C2=A0primaryClass are = used by the arXiv, INSPIRE, and ADS. I could check the others if you'd = like.
=C2=A0
>
> The user variable bibtex-generate-url-list can be configured to work > either way, as suggested by the OP or as suggested by the biblatex
> documentation.=C2=A0 Here it seems to me the best solution is to keep = the
> default of bibtex-generate-url-list as it is now and let users configu= re
> this variable as desired / needed.

Of course I've customized the variable for myself. But it took me year= s before I realized "Hey, wait a minute, why can't I click on the = arXiv number?", and then dug through the mode docs to discover that it= 's possible to customize this.

I'm just pr= oposing a tiny change which will reduce a little friction for many people [= most of whom I think wouldn't investigate that they can customize this]= . I don't know that including this universal default would ever be &quo= t;wrong".

I hope you'll keep an open mind= to consider the patch.

Best
Leo
=C2=A0

I agree.=C2=A0 Since this is a user option, too-specific changes in it
should be the matter of the user, not of changing the default.
--0000000000005c232506284d082e--