help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: [External] : Q1 - the keys' bindings to work more widely


From: Tatsu Takamaro
Subject: Re: [External] : Q1 - the keys' bindings to work more widely
Date: Thu, 19 Dec 2024 01:14:06 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

Thank you! This works perfect.

>>

   I must note that you’re in for a lot of swimming against the current
   if you want to reclaim C-c from its established Emacs role as a
   prefix.
   A lot of modes bind some of their functionality to sequences
   starting with C-c, and you will either have to rebind them in order to
   start using them, or they will wrest C-c back from you.

As far as I read in the Emacs conventions, the C-c is reserved for users, so other modes should not use it. But if some plugin tend to use C-c for somewhat, I'll have to deal with it, yes. This is the price I'm ready to pay to stay with regular and globaly accepted hotkeys. Btw, the Current is a global tendency and even an old convention to use C-c for copy and so on. So it is Emacs who is swimming against it (for historical reasons). Maybe it will drift to use the Ctrl+Z/X/C/V/O/Q gradually. The CUA mode is the first step in this direction. Time will show.

вт, 17.12.2024 9:28, Yuri Khan пишет:
On Tue, 17 Dec 2024 at 12:42, Tatsu Takamaro<tatsu.takamaro@gmail.com>  wrote:

This one works:

     *:keymap '(keymap (?a . kill-ring-save)))*

But I'm not sure why.
You’re not actually supposed to type out keymaps in their internal
representation. Drew probably does that because he learned Emacs
before the introduction of key binding helper functions.

     (defvar ttkeys-mode-map
       (define-keymap
          "C-c" #'kill-ring-save
          "C-a" #'mark-whole-buffer))

     (define-minor-mode ttkeys-mode "Regular key bindings"
       :init-value t
       :lighter " TT"
       :global t
       :keymap ttkeys-mode-map)

(I must note that you’re in for a lot of swimming against the current
if you want to reclaim C-c from its established Emacs role as a
prefix. A lot of modes bind some of their functionality to sequences
starting with C-c, and you will either have to rebind them in order to
start using them, or they will wrest C-c back from you.)


reply via email to

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