GNU bug report logs - #56636
28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> gmail.com>

Date: Tue, 19 Jul 2022 02:46:01 UTC

Severity: normal

Found in version 28.1.90

Done: Roland Winkler <winkler <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 56636 in the body.
You can then email your comments to 56636 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Tue, 19 Jul 2022 02:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ihor Radchenko <yantar92 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 19 Jul 2022 02:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.1.90; bibtex-beginning-of-entry does not always move point the
 the actual beginning
Date: Tue, 19 Jul 2022 10:46:21 +0800
Hi,

Consider the following BibTeX entry:

@misc{placeholder,
  author =	 {Mamoru Miura <mamo0110 <at> gmail.com>},
  created =	 {[2022-07-19 Tue 09:44]},
  howpublished = {ML:Org mode},
  link =
                  {notmuch:id:9F4AA657-D34B-4B85-A80D-1DD4B3017DB2 <at> gmail.com},
  note =	 {Online; accessed 19 July 2022},
  title =	 {Re: Bug: Appointments duration and effort sums in
                  agenda column view [9.3.7 (release_9.3.7-700-ga1e5be
                  @ ~/.emacs.d/straight/build/org/)]},
  typealt =	 {email},
  year =	 2022,
}

Put the point at the "year" field and run
M-: (bibtex-beginning-of-entry)

Observed: Point moves to the @ ~/.emacs.d line.
Expected: Point moves to @misc

The problem is not only with the direct call to
bibtex-beginning-of-entry, but also shows up in functions that make use
of this function. For example, (bibtex-generate-autokey) or
(bibtex-autokey-get-title) will treat "title" field as empty in the
above scenario.

Best,
Ihor

In GNU Emacs 28.1.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0)
 of 2022-07-17 built on localhost
Repository revision: f5218385c064aa959650bfe49ca32795270851eb
Repository branch: emacs-28
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Gentoo Linux





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Sat, 23 Jul 2022 07:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: 56636 <at> debbugs.gnu.org, Roland Winkler <winkler <at> gnu.org>
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Sat, 23 Jul 2022 09:56:06 +0200
Ihor Radchenko <yantar92 <at> gmail.com> writes:

> @misc{placeholder,
>   author =	 {Mamoru Miura <mamo0110 <at> gmail.com>},
>   created =	 {[2022-07-19 Tue 09:44]},
>   howpublished = {ML:Org mode},
>   link =
>                   {notmuch:id:9F4AA657-D34B-4B85-A80D-1DD4B3017DB2 <at> gmail.com},
>   note =	 {Online; accessed 19 July 2022},
>   title =	 {Re: Bug: Appointments duration and effort sums in
>                   agenda column view [9.3.7 (release_9.3.7-700-ga1e5be
>                   @ ~/.emacs.d/straight/build/org/)]},
>   typealt =	 {email},
>   year =	 2022,
> }
>
> Put the point at the "year" field and run
> M-: (bibtex-beginning-of-entry)
>
> Observed: Point moves to the @ ~/.emacs.d line.
> Expected: Point moves to @misc

I guess the problem is with the @ in the title entry?

I've added Roland to the CCs; perhaps he has some comments.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Sat, 23 Jul 2022 08:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 56636 <at> debbugs.gnu.org, Roland Winkler <winkler <at> gnu.org>
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Sat, 23 Jul 2022 16:05:33 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> 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.

Best,
Ihor




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Sun, 24 Jul 2022 02:38:02 GMT) Full text and rfc822 format available.

Message #14 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Roland Winkler <winkler <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 56636 <at> debbugs.gnu.org
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Sat, 23 Jul 2022 21:37:05 -0500
On Sat, Jul 23 2022, Ihor Radchenko wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> 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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Sun, 24 Jul 2022 09:25:02 GMT) Full text and rfc822 format available.

Message #17 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Roland Winkler <winkler <at> gnu.org>
Cc: Ihor Radchenko <yantar92 <at> gmail.com>, 56636 <at> debbugs.gnu.org
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Sun, 24 Jul 2022 11:24:05 +0200
Roland Winkler <winkler <at> gnu.org> writes:

> 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.

Thanks.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Sun, 25 Sep 2022 06:28:01 GMT) Full text and rfc822 format available.

Message #20 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> gmail.com>
To: Roland Winkler <winkler <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 56636 <at> debbugs.gnu.org
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Sun, 25 Sep 2022 14:27:51 +0800
Roland Winkler <winkler <at> gnu.org> writes:

> 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.

May I know if there is any progress on this?

-- 
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Fri, 25 Nov 2022 07:43:02 GMT) Full text and rfc822 format available.

Message #23 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Ihor Radchenko <yantar92 <at> gmail.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Roland Winkler <winkler <at> gnu.org>,
 56636 <at> debbugs.gnu.org
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Fri, 25 Nov 2022 07:43:07 +0000
Ihor Radchenko <yantar92 <at> gmail.com> writes:

> May I know if there is any progress on this?

Pinging once more. Maybe this can be fixed before Emacs 29?

Though it is probably not very high priority.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Sat, 26 Nov 2022 12:59:02 GMT) Full text and rfc822 format available.

Message #26 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Roland Winkler <winkler <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Ihor Radchenko <yantar92 <at> gmail.com>,
 56636 <at> debbugs.gnu.org
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Sat, 26 Nov 2022 13:57:52 +0100
>> May I know if there is any progress on this?
>
> Pinging once more. Maybe this can be fixed before Emacs 29?
>
> Though it is probably not very high priority.

I do have a ptach that I'll install shortly (my internet access is
limited right now).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#56636; Package emacs. (Sun, 27 Nov 2022 00:09:01 GMT) Full text and rfc822 format available.

Message #29 received at 56636 <at> debbugs.gnu.org (full text, mbox):

From: Ihor Radchenko <yantar92 <at> posteo.net>
To: Roland Winkler <winkler <at> gnu.org>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Ihor Radchenko <yantar92 <at> gmail.com>,
 56636 <at> debbugs.gnu.org
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Sun, 27 Nov 2022 00:08:46 +0000
Roland Winkler <winkler <at> gnu.org> writes:

>> Though it is probably not very high priority.
>
> I do have a ptach that I'll install shortly (my internet access is
> limited right now).

Thanks a lot!




Reply sent to Roland Winkler <winkler <at> gnu.org>:
You have taken responsibility. (Fri, 30 Dec 2022 05:49:02 GMT) Full text and rfc822 format available.

Notification sent to Ihor Radchenko <yantar92 <at> gmail.com>:
bug acknowledged by developer. (Fri, 30 Dec 2022 05:49:02 GMT) Full text and rfc822 format available.

Message #34 received at 56636-done <at> debbugs.gnu.org (full text, mbox):

From: Roland Winkler <winkler <at> gnu.org>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Ihor Radchenko <yantar92 <at> gmail.com>,
 56636-done <at> debbugs.gnu.org
Subject: Re: bug#56636: 28.1.90; bibtex-beginning-of-entry does not always
 move point the the actual beginning
Date: Thu, 29 Dec 2022 23:48:07 -0600
On Sun, Nov 27 2022, Ihor Radchenko wrote:
> Roland Winkler <winkler <at> gnu.org> writes:
>
>>> Though it is probably not very high priority.
>>
>> I do have a ptach that I'll install shortly (my internet access is
>> limited right now).
>
> Thanks a lot!

commit 644c71d6788d268cb065bd9317efb8a16a8236e6




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 27 Jan 2023 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.