Subject: Re: bug#56475: 28.1.50; bibtex-parse-entry disregards @string substitutions

From: Ihor Radchenko <[email-masked]>
Date: Tue, 12 Jul 2022 14:04:55 +0800

Roland Winkler <[email-masked]> writes:

>> Thanks for the pointer!
>> I tried my reproducer by running
>> M-: (let ((bibtex-expand-strings t)) (bibtex-parse-entry))
>> instead of
>> M-: (bibtex-parse-entry)
>>
>> Unfortunately, the journal field is still not substituted.
>
> The variable bibtex-string-files tells bibtex.el where it can find the
> string definitions (which are then stored in the variable
> bibtex-strings).  This complements bibtex-files that tells bibtex.el
> where it can find the BibTeX entries.  A command like
> bibtex-search-entry searches the entries in the files in bibtex-files.

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.

As for using bibtex-string-files in my specific scenario, I cannot make
it work as well.

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")

Also, note that bibtex-string-files cannot help with situations when the
BibTeX buffer does not have an associated file.

Best,
Ihor