unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Rule of thumb for the choice of key notation?
@ 2015-07-25 12:38 Alexander Shukaev
  2015-07-25 13:30 ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shukaev @ 2015-07-25 12:38 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm still confused about which key notation to prefer when doing
personal configurations as well as when remapping defaults.  In
particular, should I prefer <return> to RET or vice versa (the same
about <tab> vs. TAB, etc.)?   Similarly, should I prefer <backtab> or
S-TAB for personal configurations?

Let me give you an example where I found problems:

(global-set-key (kbd "RET") #'newline-and-indent)     ; Not `<return>'!
(global-set-key (kbd "TAB") #'indent-for-tab-command) ; Not `<tab>'!

(global-set-key (kbd "<escape>") #'keyboard-quit) ; Not `ESC'!

that is only this way those commands would be bound as expected; the
opposite variants will not work at all.  Why?

It looks like there is no consistency...  Personally, I would prefer
to use angle brackets notation everywhere as it looks more friendly to
read but it seems like it just does not work sometimes.

Another problem is that C-m is RET, C-i is TAB and so on.  Does this
key dualism apply to angle bracket notation in the similar way?  Is
there no way to separate those in both GUI and terminal Emacs (without
dirty hacks of chained remapping)?

Finally, there exists <S-tab> to <backtab> mapping by default but there is no

(define-key function-key-map (kbd "<S-C-tab>") (kbd "<C-backtab>"))

Why?

Thanks,
Alexander



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Rule of thumb for the choice of key notation?
  2015-07-25 12:38 Rule of thumb for the choice of key notation? Alexander Shukaev
@ 2015-07-25 13:30 ` Jorge A. Alfaro-Murillo
  2015-07-25 13:33   ` Alexander Shukaev
  0 siblings, 1 reply; 4+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-07-25 13:30 UTC (permalink / raw)
  To: help-gnu-emacs

Alexander Shukaev writes:

> Another problem is that C-m is RET, C-i is TAB and so on.  Does 
> this key dualism apply to angle bracket notation in the similar 
> way?  Is there no way to separate those in both GUI and terminal 
> Emacs (without dirty hacks of chained remapping)? 
> 
> Finally, there exists <S-tab> to <backtab> mapping by default 
> but there is no 
> 
> (define-key function-key-map (kbd "<S-C-tab>") (kbd 
> "<C-backtab>")) 
> 
> Why?

I think because of the previous paragraph, TAB is the same as C-i, 
so C-TAB is the same as TAB.

-- 
Jorge.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Rule of thumb for the choice of key notation?
  2015-07-25 13:30 ` Jorge A. Alfaro-Murillo
@ 2015-07-25 13:33   ` Alexander Shukaev
  2015-07-25 14:08     ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Shukaev @ 2015-07-25 13:33 UTC (permalink / raw)
  To: Jorge A. Alfaro-Murillo; +Cc: help-gnu-emacs

>> Finally, there exists <S-tab> to <backtab> mapping by default but there is
>> no
>> (define-key function-key-map (kbd "<S-C-tab>") (kbd "<C-backtab>"))
>> Why?
>
>
> I think because of the previous paragraph, TAB is the same as C-i, so C-TAB
> is the same as TAB.
>

Doesn't look like that here.  In other words,

(define-key function-key-map (kbd "<S-C-tab>") (kbd "<C-backtab>"))

works for me as expected (no conflicts).



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Rule of thumb for the choice of key notation?
  2015-07-25 13:33   ` Alexander Shukaev
@ 2015-07-25 14:08     ` Jorge A. Alfaro-Murillo
  0 siblings, 0 replies; 4+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-07-25 14:08 UTC (permalink / raw)
  To: help-gnu-emacs

Alexander Shukaev writes:

>>> Finally, there exists <S-tab> to <backtab> mapping by default 
>>> but there is no (define-key function-key-map (kbd "<S-C-tab>") 
>>> (kbd "<C-backtab>")) Why? 
>>  
>> I think because of the previous paragraph, TAB is the same as 
>> C-i, so C-TAB is the same as TAB. 
>> 
> 
> Doesn't look like that here.  In other words, 
> 
> (define-key function-key-map (kbd "<S-C-tab>") (kbd 
> "<C-backtab>")) 
> 
> works for me as expected (no conflicts).

You are right, at least in the GUI. In the terminal it doesn't 
seem to work.

-- 
Jorge.




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-25 14:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-25 12:38 Rule of thumb for the choice of key notation? Alexander Shukaev
2015-07-25 13:30 ` Jorge A. Alfaro-Murillo
2015-07-25 13:33   ` Alexander Shukaev
2015-07-25 14:08     ` Jorge A. Alfaro-Murillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).