user interface face; point of view; delete selection

On Aug 20, 5:45 am, p...@informatimago.com (Pascal J. Bourguignon) wrote:
> Gabriel TEIXEIRA writes:
> > Hello all,
> > I've been working with three simultaneous emacs windows, each one
> > containing a diferent project, and I noticed that two of those three
> > are presenting a weird behaviour. When I select a text in those
> > windows (like by pushing Shift and then the arrow keys), and then I
> > push the key Delete, I expect that the selected/highlighted text be
> > erased, but instead, it erases a single character to the left of the
> > cursor (like would happen without the selection) and the selection
> > disappears (although the same operation works with Backspace or
> > Shift+Delete normally).
> This is the normal emacs behavior.  You've been distorted by the later
> "graphical user interfaces".

hi Pascal, that's a point of view. From the other side, it can be considered that YOU've been distorted by 1980's computing interfaces.

Xah ∑ http://xahlee.org/ ☄

hi Gabriel TEIXEIRA, all you need is to turn on the delete-selection-mode

• New Features in Emacs 23


Also, now you can hold down the Shift key then press arrows key to select text. To turn this off, put:

(setq shift-select-mode nil) ; “t” for true, “nil” for false

However, by default, pressing delete key will not delete selected text. If you want this, put:

(delete-selection-mode 1) ; make typing override text selection

i don't know if that is on in emacs 24, but maybe give it a try.

note that cua-mode also turns on the typing overwrite behavior, but is is not done by having delete-selection-mode, it implemented it's own.

also, if your selection is made by mouse, then it will automatically have delete selection behavior, even if delete-selection-mode is not on.

it short, the situation is a bit messy.

also, this problem happens to me too, that sometimes for some reason the delete selection behavior is gone. Quite annoying. When this happens, i call delete-selection-mode again to turn it back.

Xah ∑ http://xahlee.org/ ☄

No comments:

Post a Comment