GNU logs - #77607, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77607: 31.0.50; replace-region-contents moves point
Resent-From: "Paul D. Nelson" <ultrono@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 07 Apr 2025 12:10:02 +0000
Resent-Message-ID: <handler.77607.B.174402779330086 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 77607
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 77607 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.174402779330086
          (code B ref -1); Mon, 07 Apr 2025 12:10:02 +0000
Received: (at submit) by debbugs.gnu.org; 7 Apr 2025 12:09:53 +0000
Received: from localhost ([127.0.0.1]:53198 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u1lIW-0007p6-E9
	for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 08:09:52 -0400
Received: from lists.gnu.org ([2001:470:142::17]:53372)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ultrono@HIDDEN>) id 1u1lIR-0007ne-SR
 for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 08:09:48 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ultrono@HIDDEN>) id 1u1lHy-0003pF-VG
 for bug-gnu-emacs@HIDDEN; Mon, 07 Apr 2025 08:09:21 -0400
Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <ultrono@HIDDEN>) id 1u1lHw-0006Vo-If
 for bug-gnu-emacs@HIDDEN; Mon, 07 Apr 2025 08:09:18 -0400
Received: by mail-ej1-x62d.google.com with SMTP id
 a640c23a62f3a-ac3b12e8518so797526266b.0
 for <bug-gnu-emacs@HIDDEN>; Mon, 07 Apr 2025 05:09:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1744027754; x=1744632554; darn=gnu.org;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=2Ho3aypT5ZSS09tb3rzMB7xsj37vzFhgi5yd7euW2y8=;
 b=DJf/frDSsEDwTvjKvD2fZNjt0/2DhCBi9d+RPMjaZk5hTzo2XtXFeO2AIraVLlkFy/
 +w+S6X6WXBy2vobBDvmvQVQKZYOetCSLJH95nJtIVOtXfqIDEXFfgxqoC7E7I45Waw9/
 4bqu9+UEIZbHm+zxLw2EJ+Ox72fYbV8/EEaKd05P+UrxVUfAJUXKH+Ei21wmXhzwaR3n
 3cJtnEvL58mOdcEWRd2aBjIwk/AX6lve6joBpDmRzrFm7e9sS4fJXzto9hHBkACA1Vlj
 VxprohcEf3oWAg/axIXbzkgvYk5zoHomu4ZeCTp+Pgj6P7gDj4DK0RMIx7j07NikL3ic
 gvhA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1744027754; x=1744632554;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=2Ho3aypT5ZSS09tb3rzMB7xsj37vzFhgi5yd7euW2y8=;
 b=b417oXCdtQn+WwV6JGaPdee1OrevRvRjMpXa+aNOpQL32+gfQFN64A+pQnVZ5VAet3
 0xGFUcYDh1jpk2+O574G6tAl1kC7BVmRFo5o1DE4cDtz6fO4tqQYsgYGalsN6a8OiEXv
 e7qAjI/Ihm5LAwgzNLGwcV01NsNPq04PX9M96PK0ynRnJILHd789YWBW91XgRNMNFNwo
 fGfCECECdBC7BWc+yuJKu4ydy3fC8lJM4lipZUe8OdVpGmuQ95oFB7ltZhQrFwLZhZnk
 MPzQ4GBlXIUYHxqb+vay/eYYPlleUh4B56gekHaQ8fOASXsGrw089GMayKj9s7QzUSbJ
 xcVA==
X-Gm-Message-State: AOJu0Yy9OsF1m+7b5zEF4+kMakHj+VBQ4J/hh8aQYYYRlV2nXyOUpVGD
 Sls29IPdDu6tzBhM/pIWkQGuIXYfW+R5NhxG/1lOA+z4eOn/QbMcih/Xws4l
X-Gm-Gg: ASbGncuh6e0huBqnx8X4BkEgOXkaIhTzTASeZu0amiU8ryEMJs0iyLohSKPQfM+QkDG
 AsctCVg7o5/pVYaNzDrrxGYqTzPaRb86A86hqzAy0vwBgJ4mA90JYQbKH7bj/+Je/YINND6jYNE
 MWmvBG1PWNhSwv7nBYAfItSVIpPeWt6RzpFml+z1g5OtIeePqvuMteY3TaYhZP6/Nlhe+vKJFmf
 NgjuKy5R2qkhls3tK3r5zY7fKKUQq4/a7KdwXkSNJ0N6i1hGTnRHh57GB5m1RuPJymZwNUDjRrV
 V0lV4tSZ4Dyqs6GNFXjaiZ0yev0MYtCoSsPseU9m9WZgrvHLb/441mg2D0m7GSht9mb5rHTywNM
 l
X-Google-Smtp-Source: AGHT+IGYiqWL9II9b2FLv46KPT101QQmVVBTyPCD3CACsmRk+eabIZxeCZFbxVVzq6tSNX+fIcWrrg==
X-Received: by 2002:a17:907:7b99:b0:ac2:723a:670f with SMTP id
 a640c23a62f3a-ac7d18e25f3mr1192187966b.24.1744027753888; 
 Mon, 07 Apr 2025 05:09:13 -0700 (PDT)
Received: from localhost (users-1190.st.net.au.dk. [130.225.0.251])
 by smtp.gmail.com with UTF8SMTPSA id
 a640c23a62f3a-ac7bfe5bd17sm749346766b.10.2025.04.07.05.09.13
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 07 Apr 2025 05:09:13 -0700 (PDT)
From: "Paul D. Nelson" <ultrono@HIDDEN>
Date: Mon, 07 Apr 2025 14:09:12 +0200
Message-ID: <uxsg7ta58scgwn.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::62d;
 envelope-from=ultrono@HIDDEN; helo=mail-ej1-x62d.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

The info docs for replace-region-contents say that it attempts to
preserve point.  With the latest update, it fails to preserve point in
cases where it did before.  I fixed my use case with save-excursion, and
the docs are vague enough that this issue might not qualify as a bug,
but I figured I'd report it just in case it was unintentional, or in
case others come across it.

For example:

(with-temp-buffer
  (insert "abc")
  (replace-region-contents (- (point) 3) (- (point) 2) (lambda () "A"))
  (char-to-string (char-before)))

now returns "A", but I believe that it previously returned "c".


In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.1.0, NS
 appkit-2575.20 Version 15.1.1 (Build 24B91)) of 2025-04-06 built on
 d51735
Repository revision: 8ae7224b8fae59229b186853b300822bd70a8ec4
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2575
System Description:  macOS 15.1.1

Configured using:
 'configure --with-ns --with-native-compilation --with-tree-sitter
 --with-gif --with-png --with-jpeg --with-rsvg --with-tiff
 --with-imagemagick --with-x-toolkit=gtk3 --with-xwidgets'

Configured features:
ACL DBUS GLIB GNUTLS IMAGEMAGICK LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM XWIDGETS ZLIB

Important settings:
  value of $LC_CTYPE: UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  savehist-mode: t
  recentf-mode: t
  repeat-mode: t
  display-time-mode: t
  save-place-mode: t
  global-auto-revert-mode: t
  minibuffer-depth-indicate-mode: t
  electric-pair-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-history-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug lisp-mnt message mailcap yank-media puny
rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config
gnus-util text-property-search mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils thingatpt llm vc-git diff-mode
track-changes files-x vc-dispatcher foldout noutline outline imenu
dired-aux hl-line dired dired-loaddefs time-date pcase savehist recentf
tree-widget repeat time saveplace autorevert filenotify mb-depth
elec-pair comp comp-cstr warnings subr-x comp-run comp-common rx edmacro
kmacro byte-opt cl-macs gv cl-extra help-mode use-package-bind-key
bind-key easy-mmode use-package-ensure cl-seq use-package-core bytecomp
byte-compile cus-edit pp cus-start cus-load icons wid-edit cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal dbusbind
kqueue cocoa ns lcms2 multi-tty make-network-process tty-child-frames
native-compile emacs)

Memory information:
((conses 16 201000 24284) (symbols 48 23072 1) (strings 32 56478 4127)
 (string-bytes 1 1440313) (vectors 16 25713)
 (vector-slots 8 1044292 203938) (floats 8 70 20)
 (intervals 56 1876 41) (buffers 992 17))




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: "Paul D. Nelson" <ultrono@HIDDEN>
Subject: bug#77607: Acknowledgement (31.0.50; replace-region-contents
 moves point)
Message-ID: <handler.77607.B.174402779330086.ack <at> debbugs.gnu.org>
References: <uxsg7ta58scgwn.fsf@HIDDEN>
X-Gnu-PR-Message: ack 77607
X-Gnu-PR-Package: emacs
Reply-To: 77607 <at> debbugs.gnu.org
Date: Mon, 07 Apr 2025 12:10:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 77607 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
77607: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77607
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#77607: 31.0.50; replace-region-contents moves point
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 07 Apr 2025 13:47:02 +0000
Resent-Message-ID: <handler.77607.B77607.17440336045272 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77607
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: "Paul D. Nelson" <ultrono@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Cc: 77607 <at> debbugs.gnu.org
Received: via spool by 77607-submit <at> debbugs.gnu.org id=B77607.17440336045272
          (code B ref 77607); Mon, 07 Apr 2025 13:47:02 +0000
Received: (at 77607) by debbugs.gnu.org; 7 Apr 2025 13:46:44 +0000
Received: from localhost ([127.0.0.1]:53508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u1moG-0001Mw-CY
	for submit <at> debbugs.gnu.org; Mon, 07 Apr 2025 09:46:44 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:46008)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u1moD-0001MS-Oc
 for 77607 <at> debbugs.gnu.org; Mon, 07 Apr 2025 09:46:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1u1mo6-0000xD-VX; Mon, 07 Apr 2025 09:46:35 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=eBEJyPGq91eXLDisKMWkcT0aVidgd21Q8CsWmlVwu2A=; b=oKFRWvjjFtfq
 iJ/yEpVPNZDjnCk767owheKvS2UjNLFHfjDvv9T8pbDybGyjMpKBPw0QqbjxhfaHQwHIPpFleP2Rr
 ZmIsRpAZ4aKwbIjHrvrZH0ds0QYQI/uC9WJHcmuAVvCvVd1HVbJybkfzK2TGBiUOUL993jXM7248C
 PBf65EXzAZj801yyHTXX29yc9lHhcLxOIjiWtKn5T9VJCgTzKjAdI2TyOHlcWWL7NXtGCsbO3+yNP
 AguPqulmEGnNve0mQSmxy8jClwe3iVXUQ2QRapcPw+RqEoc9xJVOKj9Rhrm8KPzAKr/aHyDLfzDzN
 qrKYm+I4dh/Fk8NLZeKAZg==;
Date: Mon, 07 Apr 2025 16:45:56 +0300
Message-Id: <86plhot78r.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <uxsg7ta58scgwn.fsf@HIDDEN> (ultrono@HIDDEN)
References: <uxsg7ta58scgwn.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: "Paul D. Nelson" <ultrono@HIDDEN>
> Date: Mon, 07 Apr 2025 14:09:12 +0200
> 
> The info docs for replace-region-contents say that it attempts to
> preserve point.  With the latest update, it fails to preserve point in
> cases where it did before.  I fixed my use case with save-excursion, and
> the docs are vague enough that this issue might not qualify as a bug,
> but I figured I'd report it just in case it was unintentional, or in
> case others come across it.
> 
> For example:
> 
> (with-temp-buffer
>   (insert "abc")
>   (replace-region-contents (- (point) 3) (- (point) 2) (lambda () "A"))
>   (char-to-string (char-before)))
> 
> now returns "A", but I believe that it previously returned "c".

Stefan, any comments?





Last modified: Mon, 7 Apr 2025 14:00:03 UTC

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