emacs-devel
[Top][All Lists]
Advanced

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

rectangle-mark-mode and delete-selection-mode


From: sbaugh
Subject: rectangle-mark-mode and delete-selection-mode
Date: Sun, 15 Oct 2023 19:47:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

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.




reply via email to

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