From unknown Fri Sep 05 16:40:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#28527 <28527@debbugs.gnu.org> To: bug#28527 <28527@debbugs.gnu.org> Subject: Status: unexpected behaviour of char-after if argument is marker that don't point to the current buffer Reply-To: bug#28527 <28527@debbugs.gnu.org> Date: Fri, 05 Sep 2025 23:40:37 +0000 retitle 28527 unexpected behaviour of char-after if argument is marker that= don't point to the current buffer reassign 28527 emacs submitter 28527 Fritz Stelzer severity 28527 normal tag 28527 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 20 11:25:41 2017 Received: (at submit) by debbugs.gnu.org; 20 Sep 2017 15:25:42 +0000 Received: from localhost ([127.0.0.1]:50344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dugsf-0004SZ-Id for submit@debbugs.gnu.org; Wed, 20 Sep 2017 11:25:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dughw-00049p-Uh for submit@debbugs.gnu.org; Wed, 20 Sep 2017 11:14:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duggd-0005kg-19 for submit@debbugs.gnu.org; Wed, 20 Sep 2017 11:14:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:51498) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1duggb-0002zo-O1 for submit@debbugs.gnu.org; Wed, 20 Sep 2017 11:13:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duf3w-0004rJ-Kz for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2017 09:29:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duf3v-0005Wj-R5 for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2017 09:29:12 -0400 Received: from mail-yw0-x22f.google.com ([2607:f8b0:4002:c05::22f]:51485) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1duf3v-0005Uo-FT for bug-gnu-emacs@gnu.org; Wed, 20 Sep 2017 09:29:11 -0400 Received: by mail-yw0-x22f.google.com with SMTP id p10so1878458ywh.8 for ; Wed, 20 Sep 2017 06:29:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=HWb99yjxrtN67d7Mql9VToPXR/QO2OUB2UH7puqSd7g=; b=IEv7v/9Ul7iV1h+i60WBWDFc4IP+Ynkh07d7mIZkOQdS9jy64bz93jGYoBW8lpl7dc juJAvbl3D+q50MbsJiflPcRTQlK8/eA+Se3am3Hd6n5SbYpRPe2e2OWH/0sXI8LZ5rKS eeUSDcewIk8WLl091LRVk/51DzBREDFtFrcLtW48G0nHZ2li411ixBAiILDeSr6Ga/yn 91vSi4ZW6EXWttnvzp1yBD9ItcNA1qtGOpOztIIqTT/bOF1rAAru0y16xhI5SQuEiirr alY/cgIZOM9Bn/4NYQfvPwZ4z4BcU2J0fsMj0M352uMrcuwLO4EEEOSFsvNXg8atxEeK jbmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=HWb99yjxrtN67d7Mql9VToPXR/QO2OUB2UH7puqSd7g=; b=HjxSQAlT3nhUqeZDH8R7fyBTP5m4hlcMvMO4tv/f4KN+zJdeU5YL7yTrdY/Tg2th/+ DfBtim030ON0ZD00wqy/qAAF5E7EFwSMVOF2Ci3Z/BoPXGJ0uf4ewwSTH6/oKrFZcVJv BoDmLI0eZOMV+JYtLIXcMMuhWwb3eNCV8DugRGGZXH2rrOZKJDk+0JjO3/IMm0CqAsIu fno8qhlQfAqRo+EFwa8DDSERmeT3XlPVtzg/mS+4IsU5XVGjq3KIA9huy5tRlyUwIu6Z 8/CkxW37yutrKPfDe4Ob+Z9CBH1PlBIdiVwu7KWGHl/PfDmQJ2/B2JSRRBQWp8aPQ0w1 UDsA== X-Gm-Message-State: AHPjjUjq5X1kT9xEg3AEsYNJTji1Iuc70wc1Dx/5yAfJ/WDOiCERfQmN xK89tMWBkISEv+PEU7jJB+u8xkVTXc20uVvpGT0D9Q== X-Google-Smtp-Source: AOwi7QBCLcHN8z0XByvO7h6Nt9wbqOR6A59bds/PKL8L3U8O/02ngKieddvMYsy7l20BPWotAswX+UugSOq3zyg6ExI= X-Received: by 10.129.165.202 with SMTP id c193mr3952020ywh.171.1505914148049; Wed, 20 Sep 2017 06:29:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.233.8 with HTTP; Wed, 20 Sep 2017 06:29:07 -0700 (PDT) From: Fritz Stelzer Date: Wed, 20 Sep 2017 15:29:07 +0200 Message-ID: Subject: unexpected behaviour of char-after if argument is marker that don't point to the current buffer To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="94eb2c129be2db571105599ef5ca" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 20 Sep 2017 11:25:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --94eb2c129be2db571105599ef5ca Content-Type: text/plain; charset="UTF-8" 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. --94eb2c129be2db571105599ef5ca Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
When the argument for char-after is a marker, th= e function gets bytepos from the buffer the marker is pointing to by callin= g marker_byte_position. But then pos_byte is compared to BEGV_BYTE and ZV_B= YTE that use the current buffer. At the end of the function, pos_byte is pa= ssed to FETCH_CHAR, which also operates on the current buffer.
--94eb2c129be2db571105599ef5ca-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 20 11:51:52 2017 Received: (at 28527) by debbugs.gnu.org; 20 Sep 2017 15:51:53 +0000 Received: from localhost ([127.0.0.1]:50375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duhI0-00056E-LL for submit@debbugs.gnu.org; Wed, 20 Sep 2017 11:51:52 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duhHy-000563-VN for 28527@debbugs.gnu.org; Wed, 20 Sep 2017 11:51:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1duhHm-0007ZA-Tb for 28527@debbugs.gnu.org; Wed, 20 Sep 2017 11:51:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1duhHl-0007Wt-R8; Wed, 20 Sep 2017 11:51:38 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3723 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1duhHk-0004K4-Sw; Wed, 20 Sep 2017 11:51:37 -0400 Date: Wed, 20 Sep 2017 18:51:27 +0300 Message-Id: <83efr1fjwg.fsf@gnu.org> From: Eli Zaretskii To: Fritz Stelzer In-reply-to: (message from Fritz Stelzer on Wed, 20 Sep 2017 15:29:07 +0200) Subject: Re: bug#28527: unexpected behaviour of char-after if argument is marker that don't point to the current buffer References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 28527 Cc: 28527@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) > 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 > Original-Sender: "Debbugs-submit" > Resent-CC: bug-gnu-emacs@gnu.org > Resent-Sender: help-debbugs@gnu.org > From: Fritz Stelzer > 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. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 10 22:00:23 2019 Received: (at 28527) by debbugs.gnu.org; 11 Nov 2019 03:00:23 +0000 Received: from localhost ([127.0.0.1]:52966 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTzwF-0001Xp-CC for submit@debbugs.gnu.org; Sun, 10 Nov 2019 22:00:23 -0500 Received: from host.gofardesign.uk ([208.79.239.190]:34693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTzwE-0001Xa-BH; Sun, 10 Nov 2019 22:00:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=s9l+eTbs2OvrS9dCfCGgIog0hoKNvzGg0TftM44QzGQ=; b=H+84yfMLEfpueSpk/Jpdqqvbyo 2alyHs5FnmdopBvaDEhHMOdYECMp17z1jxE2EDlnBjEoZGPprJB4JjriAFlRAuqclzWXXqVSsrGUh IRYZJSsFUIGbGWIlkbhhYniakSpdDIhTg4RcuQ1dfO3jrm4wKBz79VoylZxc2+YUfTW4=; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:49248 helo=localhost) by host.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1iTzw8-0002hY-4s; Sun, 10 Nov 2019 21:00:16 -0600 From: Stefan Kangas To: Eli Zaretskii Subject: Re: bug#28527: unexpected behaviour of char-after if argument is marker that don't point to the current buffer In-Reply-To: <83efr1fjwg.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 20 Sep 2017 18:51:27 +0300") References: <83efr1fjwg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Date: Mon, 11 Nov 2019 04:00:14 +0100 Message-ID: <87k187qfr5.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: host.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: host.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 28527 Cc: Fritz Stelzer , 28527@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 28527 + notabug close 28527 thanks Eli Zaretskii 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 From unknown Fri Sep 05 16:40:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 09 Dec 2019 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator