[Top][All Lists]

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

Re: Changes for emacs 28

From: Dmitry Gutov
Subject: Re: Changes for emacs 28
Date: Sat, 12 Sep 2020 15:59:36 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 12.09.2020 05:01, Ergus wrote:

Actually the implementation is barely trivial; something like this
should work (including tool-bar and menu-bar) because the redo icon is
already there; so we only add the bindings for it until it will be added
by default:

I agree it is simple, but a concrete patch would be another step toward the goal.

(defvar undo-redo-mode-map
   (let ((map (make-sparse-keymap)))
     (define-key map [remap undo] 'undo-only)
     (define-key map (kbd "C-?") 'undo-redo)
     (define-key map (kbd "M-_") 'undo-redo)

(define-minor-mode undo-redo-mode
   "Replace undo with undo-only and enables undo-redo."
   :global t
   :keymap undo-redo-mode-map
   :group 'undo

As it seems like the redo will stay by default as well as the bindings,
then the mode is probably not needed and the user could just bind:

Indeed, so IMO the mode should affect the toolbar and the menu as well.

(define-key global-map [remap undo] 'undo-only)

if he don't like to use the default undo.

That's a decent point, but this setup is missing the new bindings for undo-redo. It also won't help with the low discoverability that undo-only and undo-redo have.

And since the main moment when we would expect someone to want this is just when they are becoming familiar with Emacs, making it as easy as possible should be the goal.

If we remove the redo from the menu and toolbar and or the default
bindings; then some other small changes will be needed and will make
sense to have this mode. But so far nobody complained about the redo
icon and personally I don't really care too much.

If we're talking about existing, experienced users such as you and I, we might as well leave _everything_ as is, and customize whatever bits in the init scripts. But we're probably talking about new user experience.

reply via email to

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