From unknown Fri Aug 15 20:04:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64730: 30.0.50; Mark activation doesn't work after insert Resent-From: Bruno Boal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jul 2023 14:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64730 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 64730@debbugs.gnu.org Cc: public@protesilaos.com X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168977563815949 (code B ref -1); Wed, 19 Jul 2023 14:08:01 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jul 2023 14:07:18 +0000 Received: from localhost ([127.0.0.1]:56884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM7pl-00049A-2I for submit@debbugs.gnu.org; Wed, 19 Jul 2023 10:07:18 -0400 Received: from lists.gnu.org ([2001:470:142::17]:36960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM5Bd-0002Tz-GJ for submit@debbugs.gnu.org; Wed, 19 Jul 2023 07:17:44 -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 ) id 1qM5BY-0002yY-65 for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 07:17:36 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qM5BU-0004Uc-PY for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 07:17:35 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4R5YFH52d8z9sCy; Wed, 19 Jul 2023 13:17:23 +0200 (CEST) From: Bruno Boal Date: Wed, 19 Jul 2023 12:17:21 +0100 Message-ID: <87zg3sm9q6.fsf@bboal.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=80.241.56.172; envelope-from=egomet@bboal.com; helo=mout-p-202.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Mailman-Approved-At: Wed, 19 Jul 2023 10:07:15 -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: -0.0 (/) Dear maintainers, I'm trying to evaluate the following snippet in emacs -Q, however as soon as I try to insert a character, the region is not highlighted anymore. `activate- mark' doesn't make it work either. Whereas interactively with `exchange-point-and-mark' the region gets proper highlight. (progn (insert "") (push-mark (line-beginning-position) :no-message :activate)) (progn (insert "a") (push-mark (line-beginning-position) :no-message :activate)) All the best, Bruno Boal In GNU Emacs 30.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2023-06-18 built on bb-hp-tiny Repository revision: 1b0348d95934a66d9991a7331ab55e1b9a6c1367 Repository branch: makepkg Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Manjaro Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --with-native-compilation=yes --with-xinput2 --with-x-toolkit=lucid --with-xft --with-xaw3d --without-cairo --with-sound=no --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XFT XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LC_COLLATE: C value of $LC_MESSAGES: en_US.UTF-8 value of $LC_MONETARY: pt_PT.UTF-8 value of $LC_NUMERIC: pt_PT.UTF-8 value of $LC_TIME: pt_PT.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix From unknown Fri Aug 15 20:04:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64730: 30.0.50; Mark activation doesn't work after insert Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Jul 2023 15:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64730 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Bruno Boal Cc: public@protesilaos.com, 64730@debbugs.gnu.org Received: via spool by 64730-submit@debbugs.gnu.org id=B64730.168977913222023 (code B ref 64730); Wed, 19 Jul 2023 15:06:01 +0000 Received: (at 64730) by debbugs.gnu.org; 19 Jul 2023 15:05:32 +0000 Received: from localhost ([127.0.0.1]:56950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM8k7-0005j8-RO for submit@debbugs.gnu.org; Wed, 19 Jul 2023 11:05:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33042) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM8k4-0005in-0g; Wed, 19 Jul 2023 11:05:30 -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 ) id 1qM8jx-0003QO-58; Wed, 19 Jul 2023 11:05:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=QCp0qPWrZP2XjVQ/bJKevCxmU7g19KLg4hAB9cJj868=; b=QAGV4z6SLlttgIxG2084 2RZmfq3V4awokTxpxoIlu+tDm4rZr4SN4WuArwKDwrvhzaqm6WCk3Bp0QG/LsLFYI4ODY4xQYLbRy dIC+Ht8e5FDTzDRg8fDTfuN09LaCrK0+QcdVSXZXxF+ncPfrZuJZBgpx4/14mMQ1OhIa4KW6SEzV9 zky3qeAOYB147PR4KznB4Yt583S04iT5siWbLE34bp8x+Exnwa+GGfEaZluKoGDBp/UpnrdKrYZ1h tYaxi6By+kU/oo5BzXeBjY0+iKIXVjTr+Vp9JiyFEgkHtYUZN6BEFl2or1AO7/KI++uESX6gsbgr7 Wl1FCiDWPJ4q9Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM8jl-0005kQ-By; Wed, 19 Jul 2023 11:05:20 -0400 Date: Wed, 19 Jul 2023 18:05:40 +0300 Message-Id: <83sf9k3prv.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87zg3sm9q6.fsf@bboal.com> (message from Bruno Boal on Wed, 19 Jul 2023 12:17:21 +0100) References: <87zg3sm9q6.fsf@bboal.com> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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: -3.3 (---) tags 64730 notabug thanks > Cc: public@protesilaos.com > From: Bruno Boal > Date: Wed, 19 Jul 2023 12:17:21 +0100 > > I'm trying to evaluate the following snippet in emacs -Q, however as > soon as I try to insert a character, the region is not highlighted > anymore. `activate- mark' doesn't make it work either. Whereas > interactively with `exchange-point-and-mark' the region gets proper highlight. > > (progn > (insert "") > (push-mark (line-beginning-position) :no-message :activate)) > > (progn > (insert "a") > (push-mark (line-beginning-position) :no-message :activate)) This is the intended behavior. The ELisp manual says in the node "The Mark": -- Variable: deactivate-mark If an editor command sets this variable non-‘nil’, then the editor command loop deactivates the mark after the command returns (if Transient Mark mode is enabled). All the primitives that change the buffer set ‘deactivate-mark’, to deactivate the mark when the command is finished. Setting this variable makes it buffer-local. To write Lisp code that modifies the buffer without causing deactivation of the mark at the end of the command, bind ‘deactivate-mark’ to ‘nil’ around the code that does the modification. For example: (let (deactivate-mark) (insert " ")) From unknown Fri Aug 15 20:04:39 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Bruno Boal Subject: bug#64730: closed (Re: bug#64730: 30.0.50; Mark activation doesn't work after insert) Message-ID: References: <83ttty3mvu.fsf@gnu.org> <87zg3sm9q6.fsf@bboal.com> X-Gnu-PR-Message: they-closed 64730 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: notabug Reply-To: 64730@debbugs.gnu.org Date: Thu, 20 Jul 2023 10:20:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1689848402-4295-1" This is a multi-part message in MIME format... ------------=_1689848402-4295-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #64730: 30.0.50; Mark activation doesn't work after insert which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 64730@debbugs.gnu.org. --=20 64730: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D64730 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1689848402-4295-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 64730-done) by debbugs.gnu.org; 20 Jul 2023 10:19:57 +0000 Received: from localhost ([127.0.0.1]:57727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMQlJ-00016p-1u for submit@debbugs.gnu.org; Thu, 20 Jul 2023 06:19:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMQlG-00016Z-RH for 64730-done@debbugs.gnu.org; Thu, 20 Jul 2023 06:19:55 -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 ) id 1qMQlA-0004je-AY; Thu, 20 Jul 2023 06:19:48 -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=e3xXjDyM4scO0XlYoYl9kfcM/a8jXoo/y7ZnpUORmlE=; b=BHiifg1rm2hs 2yk8xEzvvUuD8tl2xd4+X1M1QlPYr4+JBapXaUqb0Yoe1F9mCq4pH7obSH5F9B9j5ZK3iyYtZyMEW 3RSuVY9FsNWpFf+hvL5AzCMBTFqZrv2vOdoWo6uXbRENl36wsQxPq8ht+o6IPvHU44s4r4pkmCiyT 2rjUyiv/HFB3ZdzFKid87GU2+XKBu1UwDKjDUt+gJOcomQO4oG0T7yMYqqoJu2f9KTrc9ZM0gNyKh MelCdI7N1tY5uwb6b/DMgdwKSfAz3+Fhre+BBuUKRGpFQo8r3i82l0ZE2dy/fy6UDTDNVQM5TliKR 5vrjecwLT8w21/sSq7IhFQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMQl9-0001SR-PM; Thu, 20 Jul 2023 06:19:48 -0400 Date: Thu, 20 Jul 2023 13:20:21 +0300 Message-Id: <83ttty3mvu.fsf@gnu.org> From: Eli Zaretskii To: Bruno Boal In-Reply-To: <87r0p33s1r.fsf@bboal.com> (message from Bruno Boal on Thu, 20 Jul 2023 09:28:48 +0100) Subject: Re: bug#64730: 30.0.50; Mark activation doesn't work after insert References: <87zg3sm9q6.fsf@bboal.com> <83sf9k3prv.fsf@gnu.org> <87r0p33s1r.fsf@bboal.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64730-done Cc: public@protesilaos.com, 64730-done@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: -3.3 (---) > From: Bruno Boal > Cc: 64730@debbugs.gnu.org, public@protesilaos.com > Date: Thu, 20 Jul 2023 09:28:48 +0100 > > > Thank you for such a quick and helpful reply. Thanks, I'm therefore closing this bug. ------------=_1689848402-4295-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Jul 2023 14:07:18 +0000 Received: from localhost ([127.0.0.1]:56884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM7pl-00049A-2I for submit@debbugs.gnu.org; Wed, 19 Jul 2023 10:07:18 -0400 Received: from lists.gnu.org ([2001:470:142::17]:36960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qM5Bd-0002Tz-GJ for submit@debbugs.gnu.org; Wed, 19 Jul 2023 07:17:44 -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 ) id 1qM5BY-0002yY-65 for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 07:17:36 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1qM5BU-0004Uc-PY for bug-gnu-emacs@gnu.org; Wed, 19 Jul 2023 07:17:35 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4R5YFH52d8z9sCy; Wed, 19 Jul 2023 13:17:23 +0200 (CEST) From: Bruno Boal To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Mark activation doesn't work after insert Date: Wed, 19 Jul 2023 12:17:21 +0100 Message-ID: <87zg3sm9q6.fsf@bboal.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=80.241.56.172; envelope-from=egomet@bboal.com; helo=mout-p-202.mailbox.org X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 19 Jul 2023 10:07:15 -0400 Cc: public@protesilaos.com 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: -0.0 (/) Dear maintainers, I'm trying to evaluate the following snippet in emacs -Q, however as soon as I try to insert a character, the region is not highlighted anymore. `activate- mark' doesn't make it work either. Whereas interactively with `exchange-point-and-mark' the region gets proper highlight. (progn (insert "") (push-mark (line-beginning-position) :no-message :activate)) (progn (insert "a") (push-mark (line-beginning-position) :no-message :activate)) All the best, Bruno Boal In GNU Emacs 30.0.50 (build 4, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2023-06-18 built on bb-hp-tiny Repository revision: 1b0348d95934a66d9991a7331ab55e1b9a6c1367 Repository branch: makepkg Windowing system distributor 'The X.Org Foundation', version 11.0.12101008 System Description: Manjaro Linux Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --with-native-compilation=yes --with-xinput2 --with-x-toolkit=lucid --with-xft --with-xaw3d --without-cairo --with-sound=no --with-tree-sitter --without-gpm --without-compress-install '--program-transform-name=s/\([ec]tags\)/\1.emacs/' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection' LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now' Configured features: ACL DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XAW3D XDBE XFT XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LC_COLLATE: C value of $LC_MESSAGES: en_US.UTF-8 value of $LC_MONETARY: pt_PT.UTF-8 value of $LC_NUMERIC: pt_PT.UTF-8 value of $LC_TIME: pt_PT.UTF-8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix ------------=_1689848402-4295-1-- From unknown Fri Aug 15 20:04:39 2025 X-Loop: help-debbugs@gnu.org Subject: bug#64730: 30.0.50; Mark activation doesn't work after insert Resent-From: Bruno Boal Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jul 2023 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64730 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug To: Eli Zaretskii Cc: public@protesilaos.com, 64730@debbugs.gnu.org Received: via spool by 64730-submit@debbugs.gnu.org id=B64730.16898493536652 (code B ref 64730); Thu, 20 Jul 2023 10:36:02 +0000 Received: (at 64730) by debbugs.gnu.org; 20 Jul 2023 10:35:53 +0000 Received: from localhost ([127.0.0.1]:57765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMR0i-0001jD-OQ for submit@debbugs.gnu.org; Thu, 20 Jul 2023 06:35:53 -0400 Received: from mout-p-101.mailbox.org ([80.241.56.151]:57168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMP1u-0006T1-54 for 64730@debbugs.gnu.org; Thu, 20 Jul 2023 04:28:59 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4R65SL3ZyPz9smc; Thu, 20 Jul 2023 10:28:50 +0200 (CEST) From: Bruno Boal In-Reply-To: <83sf9k3prv.fsf@gnu.org> References: <87zg3sm9q6.fsf@bboal.com> <83sf9k3prv.fsf@gnu.org> Date: Thu, 20 Jul 2023 09:28:48 +0100 Message-ID: <87r0p33s1r.fsf@bboal.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4R65SL3ZyPz9smc X-Spam-Score: -0.7 (/) X-Mailman-Approved-At: Thu, 20 Jul 2023 06:35:51 -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: -1.7 (-) Thank you for such a quick and helpful reply. Best regards, BB Eli Zaretskii writes: > tags 64730 notabug > thanks > >> Cc: public@protesilaos.com >> From: Bruno Boal >> Date: Wed, 19 Jul 2023 12:17:21 +0100 >>=20 >> I'm trying to evaluate the following snippet in emacs -Q, however as >> soon as I try to insert a character, the region is not highlighted >> anymore. `activate- mark' doesn't make it work either. Whereas >> interactively with `exchange-point-and-mark' the region gets proper high= light. >>=20 >> (progn >> (insert "") >> (push-mark (line-beginning-position) :no-message :activate)) >>=20 >> (progn >> (insert "a") >> (push-mark (line-beginning-position) :no-message :activate)) > > This is the intended behavior. The ELisp manual says in the node "The > Mark": > > -- Variable: deactivate-mark > If an editor command sets this variable non-=E2=80=98nil=E2=80=99, t= hen the editor > command loop deactivates the mark after the command returns (if > Transient Mark mode is enabled). All the primitives that change > the buffer set =E2=80=98deactivate-mark=E2=80=99, to deactivate the = mark when the > command is finished. Setting this variable makes it buffer-local. > > To write Lisp code that modifies the buffer without causing > deactivation of the mark at the end of the command, bind > =E2=80=98deactivate-mark=E2=80=99 to =E2=80=98nil=E2=80=99 around th= e code that does the > modification. For example: > > (let (deactivate-mark) > (insert " "))