unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* rectangle-mark-mode and delete-selection-mode
@ 2023-10-15 23:47 sbaugh
  0 siblings, 0 replies; only message in thread
From: sbaugh @ 2023-10-15 23:47 UTC (permalink / raw)
  To: emacs-devel


rectangle-mark-mode is great.  delete-selection-mode is (at least) OK,
and more familiar to users who have used other editors before.  I think
the integration between the two of them could be improved, though.

Specifically, I think when you hit a self-inserting key while
rectangle-mark-mode and delete-selection-mode are both active, it should
immediately run string-rectangle, with that key as initial input to the
read-string.

Visually, this matches what you'd expect from delete-selection-mode: the
region is deleted immediately, as part of string-rectangle's preview.
And because it's rectangle-mark-mode, the subsequent insertion happens
on every line of the rectangle.

Does it seem plausible to change this to happen by default when these
two modes are combined?

There are a number of related discussions on the web:
https://emacs.stackexchange.com/questions/39414/immediately-invoke-string-rectangle-upon-rectangle-mark-mode-selection
https://www.reddit.com/r/emacs/comments/8s617r/avoid_having_to_invoke_stringrectangle_to_insert/

That would be a good start, but I also wonder if maybe we can do even
better than string-rectangle, when it comes to integrating these two
modes.  In particular, string-rectangle just uses read-string plus a
preview, but it would be nice if instead the editing happened directly
in the buffer.  I'm not sure about the user interface for that though;
how does the user indicate that they're done with their
rectangle-editing?  cua-rectangle-mark-mode is some prior art here.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-15 23:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-15 23:47 rectangle-mark-mode and delete-selection-mode sbaugh

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).