GNU bug report logs - #60646
28.2; delete-selection-mode

Previous Next

Package: emacs;

Reported by: "Redekopp, Eric" <err291 <at> mail.usask.ca>

Date: Sun, 8 Jan 2023 07:06:01 UTC

Severity: wishlist

Found in version 28.2

Done: Stefan Kangas <stefankangas <at> gmail.com>

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 60646 in the body.
You can then email your comments to 60646 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#60646; Package emacs. (Sun, 08 Jan 2023 07:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Redekopp, Eric" <err291 <at> mail.usask.ca>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 08 Jan 2023 07:06:01 GMT) Full text and rfc822 format available.

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

From: "Redekopp, Eric" <err291 <at> mail.usask.ca>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>
Subject: 28.2; delete-selection-mode
Date: Sun, 8 Jan 2023 01:31:30 +0000
[Message part 1 (text/plain, inline)]
I would like to express my strong support for enabling delete-selection-mode by default. This is standard for almost all other text applications and feels unintuitive not to have it.

Thanks for your consideration and keep up the good work.
Eric Redekopp, University Of Saskatchewan

In GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
 of 2022-09-12 built on frederik
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description: Manjaro Linux

Configured using:
 'configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --localstatedir=/var --with-cairo --with-harfbuzz --with-libsystemd
 --with-modules --with-x-toolkit=gtk3 '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 -g -ffile-prefix-map=/build/emacs/src=/usr/src/debug
 -flto=auto' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
 -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE
XIM XPM GTK3 ZLIB

Important settings:
  value of $LC_MONETARY: en_CA.UTF-8
  value of $LC_NUMERIC: en_CA.UTF-8
  value of $LC_TIME: en_CA.UTF-8
  value of $LANG: en_CA.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  electric-pair-mode: t
  display-fill-column-indicator-mode: t
  global-flycheck-mode: t
  flycheck-mode: t
  global-company-mode: t
  company-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  counsel-projectile-mode: t
  projectile-mode: t
  which-key-mode: t
  ivy-rich-mode: t
  ivy-mode: t
  doom-modeline-mode: t
  global-display-line-numbers-mode: t
  display-line-numbers-mode: t
  delete-selection-mode: t
  override-global-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/eric/.emacs.d/elpa/transient-0.3.7/transient hides /usr/share/emacs/28.2/lisp/transient

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mailabbrev gmm-utils
mailheader sendmail mail-utils ffap tide tide-lv typescript-mode cc-mode
cc-fonts cc-guess cc-menus cc-cmds face-remap server elec-pair
display-fill-column-indicator flycheck find-func company-oddmuse
company-keywords company-etags company-gtags company-dabbrev-code
company-dabbrev company-files company-cmake company-xcode company-clang
company-semantic company-eclim company-template company-bbdb
highlight-indentation flymake-proc flymake warnings company-capf company
help-fns radix-tree elpy elpy-rpc pyvenv eshell esh-cmd esh-ext esh-opt
esh-proc esh-io esh-arg esh-module esh-groups esh-util elpy-shell
elpy-profile elpy-django elpy-refactor python tramp-sh tramp
tramp-loaddefs trampver tramp-integration tramp-compat shell pcomplete
parse-time iso8601 time-date ls-lisp format-spec ido files-x etags
fileloop generator cus-edit pp cus-start cus-load cc-styles cc-align
cc-engine cc-vars cc-defs julia-mode julia-mode-latexsubs lsp-ivy
lsp-mode yasnippet-snippets yasnippet tree-widget wid-edit spinner pcase
network-stream puny nsm rmc markdown-mode noutline outline lv inline
imenu filenotify ewoc epg rfc6068 epg-config lsp-protocol ht
counsel-projectile projectile lisp-mnt mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr grep ibuf-ext ibuffer
ibuffer-loaddefs thingatpt which-key counsel xdg advice xref project
dired dired-loaddefs compile comint ansi-color swiper ivy-rich ivy
derived ring ivy-faces ivy-overlay colir color doom-modeline
doom-modeline-segments doom-modeline-env doom-modeline-core
all-the-icons all-the-icons-faces data-material data-weathericons
data-octicons data-fileicons data-faicons data-alltheicons shrink-path
rx f f-shortdoc shortdoc text-property-search s dash compat compat-macs
command-log-mode cl-extra help-mode edmacro kmacro linum
display-line-numbers delsel doom-henna-theme doom-themes
doom-themes-base use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
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 cl-generic
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 simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 574892 88899)
 (symbols 48 40023 1)
 (strings 32 172871 5875)
 (string-bytes 1 4756015)
 (vectors 16 62304)
 (vector-slots 8 766577 33432)
 (floats 8 948 248)
 (intervals 56 412 105)
 (buffers 992 11))
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60646; Package emacs. (Sun, 08 Jan 2023 16:36:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: "Redekopp, Eric" <err291 <at> mail.usask.ca>, "60646 <at> debbugs.gnu.org"
 <60646 <at> debbugs.gnu.org>
Subject: RE: 28.2; delete-selection-mode
Date: Sun, 8 Jan 2023 16:34:56 +0000
> I would like to express my strong support
> for enabling delete-selection-mode by default.
> This is standard for almost all other text
> applications and feels unintuitive not to have it.

+1.  I've advocated the same for decades.

This should have happened when we turned on
`transient-mark-mode' by default.  And both
of those default-behavior changes should
really have happened long before that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60646; Package emacs. (Sat, 14 Jan 2023 01:16:02 GMT) Full text and rfc822 format available.

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

From: Po Lu <luangruo <at> yahoo.com>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: "Redekopp, Eric" <err291 <at> mail.usask.ca>,
 "60646 <at> debbugs.gnu.org" <60646 <at> debbugs.gnu.org>
Subject: Re: bug#60646: 28.2; delete-selection-mode
Date: Sat, 14 Jan 2023 09:15:13 +0800
Drew Adams <drew.adams <at> oracle.com> writes:

>> I would like to express my strong support
>> for enabling delete-selection-mode by default.
>> This is standard for almost all other text
>> applications and feels unintuitive not to have it.
>
> +1.  I've advocated the same for decades.
>
> This should have happened when we turned on
> `transient-mark-mode' by default.  And both
> of those default-behavior changes should
> really have happened long before that.

I disagree, but we've had this argument before, so please just leave
things as they are.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60646; Package emacs. (Sat, 14 Jan 2023 11:53:02 GMT) Full text and rfc822 format available.

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

From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
To: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
 editors" <bug-gnu-emacs <at> gnu.org>
Cc: Po Lu <luangruo <at> yahoo.com>, "Redekopp, Eric" <err291 <at> mail.usask.ca>,
 "60646 <at> debbugs.gnu.org" <60646 <at> debbugs.gnu.org>,
 Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#60646: 28.2; delete-selection-mode
Date: Sat, 14 Jan 2023 12:51:57 +0100
Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <bug-gnu-emacs <at> gnu.org> writes:

> Drew Adams <drew.adams <at> oracle.com> writes:
>
>>> I would like to express my strong support
>>> for enabling delete-selection-mode by default.
>>> This is standard for almost all other text
>>> applications and feels unintuitive not to have it.
>>
>> +1.  I've advocated the same for decades.
>>
>> This should have happened when we turned on
>> `transient-mark-mode' by default.  And both
>> of those default-behavior changes should
>> really have happened long before that.
>
> I disagree, but we've had this argument before, so please just leave
> things as they are.
>
> Thanks.

Did we ever go through the length of making the sort of poll we had for
show-paren-mode?  I.e.

* deciding to poll users on emacs-devel,
  <E1mN4xu-0004y3-63 <at> fencepost.gnu.org>

* announcing on info-gnu-emacs,
  <62f50784-593d-b302-b8b6-6d614ec37737 <at> yandex.ru>

* collecting feedback on gnu-emacs-help,
  <9bc33df8-5c1b-cd82-f72e-6fc939990f37 <at> yandex.ru>

* debriefing on emacs-devel.
  <2aed65dd-bcec-8e0e-e48b-7664a041f98b <at> yandex.ru>

Asking because

a) delete-selection-mode sounds (IMO) like one of these options that
meet the sweet (sour?) spot between triggering strong opinions ("Thou
Shalt Not Change Longſtanding Defaults", "But All Other Editors Do It",
"It Is Surprising And Destructive", "It Is Natural And Convenient"),
while being trivial to change in one's config either way,

b) For all the hassle it might have been, the poll and discussion around
it led to improvements to show-paren-mode, i.e. further fine-tuning of
the defaults.


I struggle to imagine how (b) could apply to delete-selection-mode, but
then again my imagination is very limited.  OTOH (a) might provide
enough justification for a poll, especially when coupled with the
recurring traffic that delete-selection-mode generates.

(Thinking of e.g. these emacs-devel megathreads:
 * <CAM-tV-8HZKJ9WKHXR0h8FC_Qv8YhjdAPYikcviD2HAUo6Msg4g <at> mail.gmail.com>
   (2018)
 * <20100318185435.GB1522 <at> muc.de>
   (2010)

 Oh hey, well, (b) might not be off the table after all:

 > The _only_ problem I personally have with delete-selection-mode is
 > that it also replaces the region created by the likes of "C-x C-x",
 > something that "most software out there" does not and cannot do.  If
 > we were to change delete-selection-mode to replace only highlighted
 > text created by mouse selections or by shift-selections, I think we
 > could then enable it by default without much resistance, because
 > typing a character or DEL after explicitly selecting text is many
 > orders of magnitude less probable to be a mistake than when we make
 > the region active by other means.
 — <83o9d5q1bi.fsf <at> gnu.org>

 Enlightening; I personally C-x C-x C-g without a second thought when
 all I want is to "jump to mark" (or I use C-u C-SPC).  I use C-x C-x
 mostly for its region-activating effect (typically after C-y), rather
 than for its point-mark-swap effect, and I expect delete-selection-mode
 to clobber stuff I highlight with region-activating commands (C-M-SPC,
 C-x h, C-M-h, M-h, C-SPC + [move around]).

 But I understand how adding an option to control that would make sense)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60646; Package emacs. (Sat, 14 Jan 2023 11:53:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60646; Package emacs. (Sat, 14 Jan 2023 12:35:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: luangruo <at> yahoo.com, err291 <at> mail.usask.ca, 60646 <at> debbugs.gnu.org,
 drew.adams <at> oracle.com
Subject: Re: bug#60646: 28.2; delete-selection-mode
Date: Sat, 14 Jan 2023 14:34:19 +0200
> Cc: luangruo <at> yahoo.com, err291 <at> mail.usask.ca, drew.adams <at> oracle.com
> From: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
> Date: Sat, 14 Jan 2023 12:51:57 +0100
> 
> >> +1.  I've advocated the same for decades.
> >>
> >> This should have happened when we turned on
> >> `transient-mark-mode' by default.  And both
> >> of those default-behavior changes should
> >> really have happened long before that.
> >
> > I disagree, but we've had this argument before, so please just leave
> > things as they are.
> >
> > Thanks.
> 
> Did we ever go through the length of making the sort of poll we had for
> show-paren-mode?

I think this was discussed in the past, yes.

delete-selection-mode is problematic in that it introduces behavior
that is extremely surprising and annoying to those who are used to the
old-style GUI selections and the Emacs region.  Thus, enabling it by
default is out of the question; we've enabled transient-mark-mode as a
partial nod to those who like the delete-selection-mode style of
replacing text, but other than that, people who want that will have to
enable it manually for the observable future, because we cannot
possibly surprise our veteran users with such behavior.

>  Oh hey, well, (b) might not be off the table after all:
> 
>  > The _only_ problem I personally have with delete-selection-mode is
>  > that it also replaces the region created by the likes of "C-x C-x",
>  > something that "most software out there" does not and cannot do.  If
>  > we were to change delete-selection-mode to replace only highlighted
>  > text created by mouse selections or by shift-selections, I think we
>  > could then enable it by default without much resistance, because
>  > typing a character or DEL after explicitly selecting text is many
>  > orders of magnitude less probable to be a mistake than when we make
>  > the region active by other means.
>  — <83o9d5q1bi.fsf <at> gnu.org>

Note that the DEL part of the above already happens by default.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#60646; Package emacs. (Sun, 15 Jan 2023 09:27:02 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Cc: luangruo <at> yahoo.com, err291 <at> mail.usask.ca, 60646 <at> debbugs.gnu.org,
 drew.adams <at> oracle.com
Subject: Re: bug#60646: 28.2; delete-selection-mode
Date: Sun, 15 Jan 2023 14:55:39 +0530
[சனி ஜனவரி 14, 2023] Kévin Le Gouguec wrote:

>  > The _only_ problem I personally have with delete-selection-mode is
>  > that it also replaces the region created by the likes of "C-x C-x",
>  > something that "most software out there" does not and cannot do.  If
>  > we were to change delete-selection-mode to replace only highlighted
>  > text created by mouse selections or by shift-selections, I think we
>  > could then enable it by default without much resistance, because
>  > typing a character or DEL after explicitly selecting text is many
>  > orders of magnitude less probable to be a mistake than when we make
>  > the region active by other means.
>  — <83o9d5q1bi.fsf <at> gnu.org>
>
>  Enlightening; I personally C-x C-x C-g without a second thought when
>  all I want is to "jump to mark" (or I use C-u C-SPC).  I use C-x C-x
>  mostly for its region-activating effect (typically after C-y), rather
>  than for its point-mark-swap effect, and I expect delete-selection-mode
>  to clobber stuff I highlight with region-activating commands (C-M-SPC,
>  C-x h, C-M-h, M-h, C-SPC + [move around]).
>
>  But I understand how adding an option to control that would make sense)

I had the same problem with delete-selection-mode: mark and region is
different from how "selection" works in other editors so deleting the
active region in all cases was more disruptive than I anticipated.
I hope delete-selection-temporary-region solves this problem for
everyone like it did for me when I proposed the patch. 




Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 04 Sep 2023 09:20:02 GMT) Full text and rfc822 format available.

Reply sent to Stefan Kangas <stefankangas <at> gmail.com>:
You have taken responsibility. (Tue, 05 Sep 2023 21:34:02 GMT) Full text and rfc822 format available.

Notification sent to "Redekopp, Eric" <err291 <at> mail.usask.ca>:
bug acknowledged by developer. (Tue, 05 Sep 2023 21:34:02 GMT) Full text and rfc822 format available.

Message #30 received at 60646-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, err291 <at> mail.usask.ca, 60646-done <at> debbugs.gnu.org,
 drew.adams <at> oracle.com,
 Kévin Le Gouguec <kevin.legouguec <at> gmail.com>
Subject: Re: bug#60646: 28.2; delete-selection-mode
Date: Tue, 5 Sep 2023 14:33:01 -0700
Eli Zaretskii <eliz <at> gnu.org> writes:

> delete-selection-mode is problematic in that it introduces behavior
> that is extremely surprising and annoying to those who are used to the
> old-style GUI selections and the Emacs region.

That's probably true.  I'd personally not use the word "extremely" given
that it'd be relatively easy for veterans to turn it off (easier than,
say, for beginners to turn it on).

> Thus, enabling it by default is out of the question;

I don't agree, not completely, but this *is* long-standing behavior, and
a change would be controversial.  This has been discussed many times,
and it's been hard to find a new consensus.

I'm therefore closing this bug report.  Thanks for reporting it, and I'm
sorry if the conclusion is disappointing.  We will have a chance to
revisit this the next time someone brings it up.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 04 Oct 2023 11:24:22 GMT) Full text and rfc822 format available.

This bug report was last modified 177 days ago.

Previous Next


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