all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
@ 2022-07-19  2:46 Ihor Radchenko
  2022-07-23  7:56 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2022-07-19  2:46 UTC (permalink / raw)
  To: 56636

Hi,

Consider the following BibTeX entry:

@misc{placeholder,
  author =	 {Mamoru Miura <mamo0110@gmail.com>},
  created =	 {[2022-07-19 Tue 09:44]},
  howpublished = {ML:Org mode},
  link =
                  {notmuch:id:9F4AA657-D34B-4B85-A80D-1DD4B3017DB2@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






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-07-19  2:46 bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning Ihor Radchenko
@ 2022-07-23  7:56 ` Lars Ingebrigtsen
  2022-07-23  8:05   ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-23  7:56 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: 56636, Roland Winkler

Ihor Radchenko <yantar92@gmail.com> writes:

> @misc{placeholder,
>   author =	 {Mamoru Miura <mamo0110@gmail.com>},
>   created =	 {[2022-07-19 Tue 09:44]},
>   howpublished = {ML:Org mode},
>   link =
>                   {notmuch:id:9F4AA657-D34B-4B85-A80D-1DD4B3017DB2@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-07-23  7:56 ` Lars Ingebrigtsen
@ 2022-07-23  8:05   ` Ihor Radchenko
  2022-07-24  2:37     ` Roland Winkler
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2022-07-23  8:05 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 56636, Roland Winkler

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-07-23  8:05   ` Ihor Radchenko
@ 2022-07-24  2:37     ` Roland Winkler
  2022-07-24  9:24       ` Lars Ingebrigtsen
  2022-09-25  6:27       ` Ihor Radchenko
  0 siblings, 2 replies; 9+ messages in thread
From: Roland Winkler @ 2022-07-24  2:37 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Lars Ingebrigtsen, 56636

On Sat, Jul 23 2022, Ihor Radchenko wrote:
> Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-07-24  2:37     ` Roland Winkler
@ 2022-07-24  9:24       ` Lars Ingebrigtsen
  2022-09-25  6:27       ` Ihor Radchenko
  1 sibling, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-24  9:24 UTC (permalink / raw)
  To: Roland Winkler; +Cc: Ihor Radchenko, 56636

Roland Winkler <winkler@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.






^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-07-24  2:37     ` Roland Winkler
  2022-07-24  9:24       ` Lars Ingebrigtsen
@ 2022-09-25  6:27       ` Ihor Radchenko
  2022-11-25  7:43         ` Ihor Radchenko
  1 sibling, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2022-09-25  6:27 UTC (permalink / raw)
  To: Roland Winkler; +Cc: Lars Ingebrigtsen, 56636

Roland Winkler <winkler@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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-09-25  6:27       ` Ihor Radchenko
@ 2022-11-25  7:43         ` Ihor Radchenko
  2022-11-26 12:57           ` Roland Winkler
  0 siblings, 1 reply; 9+ messages in thread
From: Ihor Radchenko @ 2022-11-25  7:43 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Lars Ingebrigtsen, Roland Winkler, 56636

Ihor Radchenko <yantar92@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>





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-11-25  7:43         ` Ihor Radchenko
@ 2022-11-26 12:57           ` Roland Winkler
  2022-11-27  0:08             ` Ihor Radchenko
  0 siblings, 1 reply; 9+ messages in thread
From: Roland Winkler @ 2022-11-26 12:57 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Lars Ingebrigtsen, Ihor Radchenko, 56636

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





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning
  2022-11-26 12:57           ` Roland Winkler
@ 2022-11-27  0:08             ` Ihor Radchenko
  0 siblings, 0 replies; 9+ messages in thread
From: Ihor Radchenko @ 2022-11-27  0:08 UTC (permalink / raw)
  To: Roland Winkler; +Cc: Lars Ingebrigtsen, Ihor Radchenko, 56636

Roland Winkler <winkler@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!





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-11-27  0:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  2:46 bug#56636: 28.1.90; bibtex-beginning-of-entry does not always move point the the actual beginning Ihor Radchenko
2022-07-23  7:56 ` Lars Ingebrigtsen
2022-07-23  8:05   ` Ihor Radchenko
2022-07-24  2:37     ` Roland Winkler
2022-07-24  9:24       ` Lars Ingebrigtsen
2022-09-25  6:27       ` Ihor Radchenko
2022-11-25  7:43         ` Ihor Radchenko
2022-11-26 12:57           ` Roland Winkler
2022-11-27  0:08             ` Ihor Radchenko

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.