bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55756: 26.3; Document customization of `delete-selection-mode' behav


From: Drew Adams
Subject: bug#55756: 26.3; Document customization of `delete-selection-mode' behavior in Emacs manual
Date: Wed, 1 Jun 2022 19:35:57 +0000

Apparently (see bug #55692), starting with Emacs 29, some text is
getting added to (emacs) `Using Region' to describe the use of new
option `delete-selection-temporary-region', and that text touts the
option as the/a way to "tune the behavior" of `delete-selection-mode'.

Whether or not such text is added, the essential design of
`deletion-selection-mode' should be documented: how to customize its
behavior for individual commands.  That's missing.

The existing doc describes the behavior only partially - it describes
only the default, replace-text behavior for, e.g.,
`self-insert-command'.  Other commands have very different default
behavior.  More importantly, any command can have any of the predefined
behaviors the mode provides, or even an arbitrary behavior.

You don't get any `delete-selection-mode' behavior at all for a command
unless it has property `delete-selection'.  That's how essential this
design is to understanding and customizing the mode.

The mode does _not_ just replace selected text - even by default for
some commands.

Just put the kind of action you want on a command symbol as property
`delete-selection'.  There are basic, predefined actions, and you can
define any other action you like.

The doc says nothing about this, yet it's general, elegant, and
easy-to-customize.  `delete-selection-mode' doesn't have as its aim just
to replicate behavior that you might be used to outside Emacs.  The doc
should make clear what it offers.

See also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55692#32.

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.19044
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''






reply via email to

[Prev in Thread] Current Thread [Next in Thread]