emacs-devel
[Top][All Lists]
Advanced

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

Re: delete-selection-mode as default


From: Juri Linkov
Subject: Re: delete-selection-mode as default
Date: Sun, 09 Sep 2018 02:11:18 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> FWIW, while I personally don't use delete-selection-mode, I wouldn't
> object to enabling it by default (I'd probably disable it in my .emacs,
> but I'd first try to keep it enabled to see if I can change my habits).
>
> But before that I'd appreciate if we could improve its implementation so
> it doesn't rely on pre-command-hook.

Incidentally, yesterday I discovered a case when Wdired breaks
delete-selection-mode.  Selecting a file name in Wdired and starting
to type its new name to completely replace an old name with a new one
signals the error "No file on this line", then removes
delete-selection-pre-hook from pre-command-hook while leaving
delete-selection-mode still active, so delete-selection-mode becomes
completely broken - it doesn't replace the selection anymore.

I had to disable and then enable delete-selection-mode again
to get delete-selection-pre-hook back to pre-command-hook.

The error that removes delete-selection-pre-hook from pre-command-hook
logged in *Messages* is:

  Error in pre-command-hook (delete-selection-pre-hook): (error "No file on 
this line")

so relying on pre-command-hook is indeed the d-s-m's weak point.



reply via email to

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