GNU bug report logs - #52852
13.0.15; TeX-insert-quote fails near the beginning of buffer

Previous Next

Package: auctex;

Reported by: Andrea Greselin <greselin.andrea <at> gmail.com>

Date: Tue, 28 Dec 2021 15:24:02 UTC

Severity: normal

Found in version 13.0.15

Done: Ikumi Keita <ikumi <at> ikumi.que.jp>

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 52852 in the body.
You can then email your comments to 52852 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-auctex <at> gnu.org:
bug#52852; Package auctex. (Tue, 28 Dec 2021 15:24:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrea Greselin <greselin.andrea <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Tue, 28 Dec 2021 15:24:02 GMT) Full text and rfc822 format available.

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

From: Andrea Greselin <greselin.andrea <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: 13.0.15; TeX-insert-quote fails near the beginning of buffer
Date: Tue, 28 Dec 2021 16:22:52 +0100
[Message part 1 (text/plain, inline)]
Hello,

when ‘TeX-quote-after-quote’ is nil, ‘TeX-insert-quote’ fails when
called from a position closer to the beginning of buffer than the
length of an opening quotation mark. That’s due to a ‘forward-char’
trying to go back to see if the thing preceding the point is an
opening quote.

To reproduce the bug, open a buffer in ‘LaTeX-mode’, type a character
and invoke ‘TeX-insert-quote’. It just prints the message “Beginning
of buffer” without inserting anything.

I think it’s reasonable to insert an opening quote whenever there
isn’t room for one behind the point. I’ve attached a patch that
implements this behaviour.

All the best,
Andrea
[Message part 2 (text/html, inline)]
[quotes_patch.txt (text/plain, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#52852; Package auctex. (Wed, 29 Dec 2021 14:58:02 GMT) Full text and rfc822 format available.

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

From: Andrea Greselin <greselin.andrea <at> gmail.com>
To: 52852 <at> debbugs.gnu.org
Subject: Re: bug#52852: 13.0.15;
 TeX-insert-quote fails near the beginning of buffer
Date: Wed, 29 Dec 2021 15:57:14 +0100
[Message part 1 (text/plain, inline)]
> I think it’s reasonable to insert an opening quote whenever there
> isn’t room for one behind the point. I’ve attached a patch that
> implements this behaviour.

If I had taken into account narrowed buffers it wouldn’t have seemed
so reasonable.

With this new patch, ‘TeX-insert-quote’ only tries to ‘forward-char’
in reverse when there’s enough room to do so. Unlike with the previous
patch, it can insert a closing quote even if there’s no room for an
opening one before point.
[Message part 2 (text/html, inline)]
[auctex_patch_v2.txt (text/plain, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#52852; Package auctex. (Sat, 08 Jan 2022 10:16:02 GMT) Full text and rfc822 format available.

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

From: Ikumi Keita <ikumi <at> ikumi.que.jp>
To: Andrea Greselin <greselin.andrea <at> gmail.com>
Cc: 52852 <at> debbugs.gnu.org
Subject: Re: bug#52852: 13.0.15;
 TeX-insert-quote fails near the beginning of buffer
Date: Sat, 08 Jan 2022 19:15:53 +0900
Hi Andrea,

>>>>> Andrea Greselin <greselin.andrea <at> gmail.com> writes:
>> I think it’s reasonable to insert an opening quote whenever there
>> isn’t room for one behind the point. I’ve attached a patch that
>> implements this behaviour.

> If I had taken into account narrowed buffers it wouldn’t have seemed
> so reasonable.

> With this new patch, ‘TeX-insert-quote’ only tries to ‘forward-char’
> in reverse when there’s enough room to do so. Unlike with the previous
> patch, it can insert a closing quote even if there’s no room for an
> opening one before point.

Thank you for reporting and providing a patch. It's small and simple
enough for not requiring a copyright assignment, so I've installed your
patch in the git repository.

Regards,
Ikumi Keita




bug closed, send any further explanations to 52852 <at> debbugs.gnu.org and Andrea Greselin <greselin.andrea <at> gmail.com> Request was from Ikumi Keita <ikumi <at> ikumi.que.jp> to control <at> debbugs.gnu.org. (Sat, 08 Jan 2022 10:19:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 05 Feb 2022 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 135 days ago.

Previous Next


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