Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning

From: Roland Winkler <[email-masked]>
Date: Sat, 23 Jul 2022 21:37:05 -0500

On Sat, Jul 23 2022, Ihor Radchenko wrote:
> Lars Ingebrigtsen <[email-masked]> writes:
>
>>> Observed: Point moves to the @ ~/.emacs.d line.
>>> Expected: Point moves to @misc
>>
>> I guess the problem is with the @ in the title entry?
>
> Yes, bibtex-beginning-of-entry is doing
> (re-search-backward "^[ \t]*@" nil 'move) which does not match the right
> thing in this particular case.

This old part of the code should use bibtex-entry-maybe-empty-head.

Looking at the code, it frequently performs a strange dance
where a call of bibtex-beginnig-of-entry is followed by
(looking-at bibtex-entry-maybe-empty-head).
That doesn't make sense, it works around the above bug instead of
doing it right in the first place.  I'll look for a better solution
for this.