GNU bug report logs -
#56475
28.1.50; bibtex-parse-entry disregards @string substitutions
Previous Next
Reported by: Ihor Radchenko <yantar92 <at> gmail.com>
Date: Sun, 10 Jul 2022 07:15:02 UTC
Severity: normal
Found in version 28.1.50
Done: Roland Winkler <winkler <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 56475 <at> debbugs.gnu.org (full text, mbox):
Roland Winkler <winkler <at> gnu.org> writes:
> On Tue, Jul 12 2022, Ihor Radchenko wrote:
>> I am wondering why bibtex-string-files is not documented inside the
>> docstring of bibtex-expand-strings. Same for bibtex-expand-strings not
>> being documented in bibtex-parse-entry.
>
> I believe the situation is the other way round: bibtex-files and
> bibtex-string-files are basic user variables for bibtex-mode and have
> been around for 30+ years (much longer than I support bibtex.el).
> bibtex-expand-strings is a small add-on in this context.
I think that the main issue on my side is that I interact with bibtex.el
from API perspective without editing many actual .bib files. So, I was
mostly looking into parser API instead of user customizations.
If you start exploring bibtex.el from bibtex-parse-entry and its
docstring, it is not very easy to figure out that bibtex-string-files
and bibtex-expand-strings need to be set. They are not mentioned in the
docstring other than by common word "extract content" with "extract"
meaning being not very clear.
>> I tried the following simple test:
>>
>> M-: (let ((bibtex-string-files `(,(buffer-file-name)))
>> (bibtex-expand-strings t)) (bibtex-parse-entry))
>>
>> The journal field is still not handled: ("journal" . "jgr")
>
> Try
>
> M-: (let ((bibtex-string-files `(,(buffer-file-name)))
> (bibtex-expand-strings t)) (bibtex-parse-entry t))
Thanks! It works now.
>> Also, note that bibtex-string-files cannot help with situations when
>> the BibTeX buffer does not have an associated file.
>
> When does this happen? To the best of my knowledge, this has never been
> an issue for users of bibtex.el.
It is more of a hypothetical scenario that might occur in future if Org
tries to support bibliographies provided inside .org files. Such
bibliographies will need to be converted to .bib files transiently and
might not need to be saved on disk.
In any case, it is not a concern you need to worry about now. AFAIU,
bibtex.el depends on .bib buffers having non-nil buffer-file-name in
multiple places.
Best,
Ihor
This bug report was last modified 2 years and 147 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.