From: Roland Winkler <winkler@gnu.org>
To: Joost Kremers <joostkremers@fastmail.fm>
Cc: emacs-devel@gnu.org
Subject: Re: BibTeX issues
Date: Fri, 30 Aug 2019 14:18:00 -0500 [thread overview]
Message-ID: <87blw6jwd3.fsf@gnu.org> (raw)
In-Reply-To: <87o908tnq8.fsf@fastmail.fm> (Joost Kremers's message of "Thu, 29 Aug 2019 09:49:51 +0200")
On Thu, Aug 29 2019, Joost Kremers wrote:
> On Wed, Aug 28 2019, Roland Winkler wrote:
>> How about allowing the possibility that the first arg FIELD of
>> bibtex-autokey-get-field can also be a list of fields so that the
>> elements can be treated as alternatives? Assuming that a bib(la)tex
>> entry has either a year or a date field, then bibtex-autokey-get-year
>> could use one or the other.
>
> Yes, that would be great. Biblatex requires that either date or year
> be present, so it's a safe assumption that one of them will be.
I am currently playing with this.
> In order to display the title in a user-friendly manner, Ebib strips
> all TeX commands from a title, leaving only the obligatory argument.
A simple scheme of that kind can probably be added to
bibtex-autokey-transcriptions, though false-positives could be annoying.
> BTW, `bibtex-generate-autokey` does in fact treat the year field as
> inheritable. It's `bibtex-clean-entry` that protests when the year
> field is missing.
`bibtex-clean-entry' is for testing whether an entry has the proper
format or not and for protesting if it believes there is a mistake.
But `bibtex-generate-autokey' is for, well, auto-generating a key,
assuming that the record is what the user wants / needs. So I think
this behavior is intentional.
I noticed that the year/date alternative becomes a bit clumsy when it is
downgraded from "mandatory" to "crossref" in bibtex-biblatex-entry-alist
because bibtex-make-optional-field will give them both an ALT and OPT prefix
ALTOPTyear = {},
ALTOPTdate = {},
(which is of course in line with the usual behavior of bibtex-mode).
Also, this may break some code of bibtex-mode that assumes historically
that fields have either the ALT or OPT prefix. Possibly, one can add a
user option not to insert any such prefix, which, I believe, is not
needed by `bibtex-clean-entry' either. I need to check this more
carefully.
prev parent reply other threads:[~2019-08-30 19:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-27 8:40 BibTeX issues Joost Kremers
2019-08-28 17:45 ` Roland Winkler
2019-08-28 18:45 ` Eli Zaretskii
2019-08-29 3:26 ` strip accents and sorting [was: BibTeX issues] Roland Winkler
2019-08-29 6:15 ` martin rudalics
2019-08-30 16:27 ` Roland Winkler
2019-08-30 17:51 ` Eli Zaretskii
2019-08-30 18:38 ` Eli Zaretskii
2019-08-30 19:09 ` Roland Winkler
2019-08-30 19:19 ` Eli Zaretskii
2019-08-30 19:49 ` Roland Winkler
2019-08-31 6:45 ` Eli Zaretskii
2019-08-29 7:10 ` Eli Zaretskii
2019-08-30 16:29 ` Roland Winkler
2019-08-29 7:49 ` BibTeX issues Joost Kremers
2019-08-30 19:18 ` Roland Winkler [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87blw6jwd3.fsf@gnu.org \
--to=winkler@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=joostkremers@fastmail.fm \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.