GNU bug report logs -
#64730
30.0.50; Mark activation doesn't work after insert
Previous Next
Reported by: Bruno Boal <egomet <at> bboal.com>
Date: Wed, 19 Jul 2023 14:08:01 UTC
Severity: normal
Tags: notabug
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
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 64730 in the body.
You can then email your comments to 64730 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64730
; Package
emacs
.
(Wed, 19 Jul 2023 14:08:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Boal <egomet <at> bboal.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 19 Jul 2023 14:08:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64730
; Package
emacs
.
(Wed, 19 Jul 2023 15:06:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 64730 <at> debbugs.gnu.org (full text, mbox):
tags 64730 notabug
thanks
> Cc: public <at> protesilaos.com
> From: Bruno Boal <egomet <at> bboal.com>
> 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 " "))
Added tag(s) notabug.
Request was from
Eli Zaretskii <eliz <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Wed, 19 Jul 2023 15:06:02 GMT)
Full text and
rfc822 format available.
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Thu, 20 Jul 2023 10:20:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Bruno Boal <egomet <at> bboal.com>
:
bug acknowledged by developer.
(Thu, 20 Jul 2023 10:20:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 64730-done <at> debbugs.gnu.org (full text, mbox):
> From: Bruno Boal <egomet <at> bboal.com>
> Cc: 64730 <at> debbugs.gnu.org, public <at> 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.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#64730
; Package
emacs
.
(Thu, 20 Jul 2023 10:36:02 GMT)
Full text and
rfc822 format available.
Message #18 received at 64730 <at> debbugs.gnu.org (full text, mbox):
Thank you for such a quick and helpful reply.
Best regards,
BB
Eli Zaretskii <eliz <at> gnu.org> writes:
> tags 64730 notabug
> thanks
>
>> Cc: public <at> protesilaos.com
>> From: Bruno Boal <egomet <at> bboal.com>
>> 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 " "))
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 17 Aug 2023 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 363 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.