GNU bug report logs - #28527
unexpected behaviour of char-after if argument is marker that don't point to the current buffer

Previous Next

Package: emacs;

Reported by: Fritz Stelzer <brotzeitmacher <at> gmail.com>

Date: Wed, 20 Sep 2017 15:26:02 UTC

Severity: normal

Tags: notabug

Done: Stefan Kangas <stefan <at> marxist.se>

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 28527 in the body.
You can then email your comments to 28527 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#28527; Package emacs. (Wed, 20 Sep 2017 15:26:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fritz Stelzer <brotzeitmacher <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 20 Sep 2017 15:26:02 GMT) Full text and rfc822 format available.

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

From: Fritz Stelzer <brotzeitmacher <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: unexpected behaviour of char-after if argument is marker that don't
 point to the current buffer
Date: Wed, 20 Sep 2017 15:29:07 +0200
[Message part 1 (text/plain, inline)]
When the argument for char-after is a marker, the function gets bytepos
from the buffer the marker is pointing to by calling marker_byte_position.
But then pos_byte is compared to BEGV_BYTE and ZV_BYTE that use the current
buffer. At the end of the function, pos_byte is passed to FETCH_CHAR, which
also operates on the current buffer.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28527; Package emacs. (Wed, 20 Sep 2017 15:52:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Fritz Stelzer <brotzeitmacher <at> gmail.com>
Cc: 28527 <at> debbugs.gnu.org
Subject: Re: bug#28527: unexpected behaviour of char-after if argument is
 marker that don't point to the current buffer
Date: Wed, 20 Sep 2017 18:51:27 +0300
> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
> 	HTML_MESSAGE,RP_MATCHES_RCVD,T_DKIM_INVALID autolearn=disabled version=3.3.2
> Resent-From: Fritz Stelzer <brotzeitmacher <at> gmail.com>
> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
> Resent-CC: bug-gnu-emacs <at> gnu.org
> Resent-Sender: help-debbugs <at> gnu.org
> From: Fritz Stelzer <brotzeitmacher <at> gmail.com>
> Date: Wed, 20 Sep 2017 15:29:07 +0200
> 
> When the argument for char-after is a marker, the function gets bytepos from the buffer the marker is pointing
> to by calling marker_byte_position. But then pos_byte is compared to BEGV_BYTE and ZV_BYTE that use the
> current buffer. At the end of the function, pos_byte is passed to FETCH_CHAR, which also operates on the
> current buffer.

This is according to the documentation, which explicitly says the
position is looked up in the current buffer.  So this sounds like an
intentional and documented behavior.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#28527; Package emacs. (Mon, 11 Nov 2019 03:01:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Fritz Stelzer <brotzeitmacher <at> gmail.com>, 28527 <at> debbugs.gnu.org
Subject: Re: bug#28527: unexpected behaviour of char-after if argument is
 marker that don't point to the current buffer
Date: Mon, 11 Nov 2019 04:00:14 +0100
tags 28527 + notabug
close 28527
thanks

Eli Zaretskii <eliz <at> gnu.org> writes:

>> When the argument for char-after is a marker, the function gets bytepos from the buffer the marker is pointing
>> to by calling marker_byte_position. But then pos_byte is compared to BEGV_BYTE and ZV_BYTE that use the
>> current buffer. At the end of the function, pos_byte is passed to FETCH_CHAR, which also operates on the
>> current buffer.
>
> This is according to the documentation, which explicitly says the
> position is looked up in the current buffer.  So this sounds like an
> intentional and documented behavior.

With the above explanation and no other comments within 2 years, I'm
closing this as notabug.

Best regards,
Stefan Kangas




Added tag(s) notabug. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 11 Nov 2019 03:01:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 28527 <at> debbugs.gnu.org and Fritz Stelzer <brotzeitmacher <at> gmail.com> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 11 Nov 2019 03:01: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. (Mon, 09 Dec 2019 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 140 days ago.

Previous Next


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