all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Is there a canonical key for S-tab?
@ 2012-03-04  9:37 Leo
  2012-03-04 10:05 ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Leo @ 2012-03-04  9:37 UTC (permalink / raw)
  To: emacs-devel

In em-cmpl.el, there is

  (if (featurep 'xemacs)
      (define-key eshell-mode-map [iso-left-tab] 'pcomplete-reverse)
    (define-key eshell-mode-map [(shift iso-lefttab)] 'pcomplete-reverse)
    (define-key eshell-mode-map [(shift control ?i)] 'pcomplete-reverse))

and none of the bindings works on OSX.

Leo




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

* Re: Is there a canonical key for S-tab?
  2012-03-04  9:37 Is there a canonical key for S-tab? Leo
@ 2012-03-04 10:05 ` Andreas Schwab
  2012-03-04 10:19   ` Antoine Levitt
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2012-03-04 10:05 UTC (permalink / raw)
  To: Leo; +Cc: emacs-devel

backtab

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: Is there a canonical key for S-tab?
  2012-03-04 10:05 ` Andreas Schwab
@ 2012-03-04 10:19   ` Antoine Levitt
  2012-03-04 10:31     ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Antoine Levitt @ 2012-03-04 10:19 UTC (permalink / raw)
  To: emacs-devel

04/03/12 11:05, Andreas Schwab
> backtab
>
> Andreas.

Any reason not to use (kbd) for this kind of things? Isn't the string
representation less likely to change between platforms?




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

* Re: Is there a canonical key for S-tab?
  2012-03-04 10:19   ` Antoine Levitt
@ 2012-03-04 10:31     ` Andreas Schwab
  2012-03-04 10:52       ` Antoine Levitt
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2012-03-04 10:31 UTC (permalink / raw)
  To: emacs-devel

Antoine Levitt <antoine.levitt@gmail.com> writes:

> Any reason not to use (kbd) for this kind of things?

How does that help in any way?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: Is there a canonical key for S-tab?
  2012-03-04 10:31     ` Andreas Schwab
@ 2012-03-04 10:52       ` Antoine Levitt
  2012-03-14  6:19         ` Chong Yidong
  0 siblings, 1 reply; 9+ messages in thread
From: Antoine Levitt @ 2012-03-04 10:52 UTC (permalink / raw)
  To: emacs-devel

04/03/12 11:31, Andreas Schwab
> Antoine Levitt <antoine.levitt@gmail.com> writes:
>
>> Any reason not to use (kbd) for this kind of things?
>
> How does that help in any way?
>
> Andreas.

Alright, I thought (kbd "S-TAB") would do the right thing, but
apparently not. I'm thoroughly confused by emacs keybinding system.




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

* Re: Is there a canonical key for S-tab?
  2012-03-04 10:52       ` Antoine Levitt
@ 2012-03-14  6:19         ` Chong Yidong
  2012-03-14  9:25           ` Andreas Schwab
  0 siblings, 1 reply; 9+ messages in thread
From: Chong Yidong @ 2012-03-14  6:19 UTC (permalink / raw)
  To: emacs-devel

Antoine Levitt <antoine.levitt@gmail.com> writes:

> Alright, I thought (kbd "S-TAB") would do the right thing, but
> apparently not. I'm thoroughly confused by emacs keybinding system.

I think this is a bug in kbd.  It doesn't seem to handle TAB with
modifiers right.  Please file a bug.



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

* Re: Is there a canonical key for S-tab?
  2012-03-14  6:19         ` Chong Yidong
@ 2012-03-14  9:25           ` Andreas Schwab
  2012-03-14 13:07             ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2012-03-14  9:25 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

Chong Yidong <cyd@gnu.org> writes:

> I think this is a bug in kbd.  It doesn't seem to handle TAB with
> modifiers right.

Looks correct for me:

ELISP> (kbd "S-TAB")
[33554441]

ELISP> (key-description (kbd "S-TAB"))
"S-TAB"
ELISP> (eq (aref (kbd "S-TAB") 0) ?\S-\t)
t

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: Is there a canonical key for S-tab?
  2012-03-14  9:25           ` Andreas Schwab
@ 2012-03-14 13:07             ` Stefan Monnier
  2012-03-15  8:10               ` Ivan Andrus
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2012-03-14 13:07 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Chong Yidong, emacs-devel

>> I think this is a bug in kbd.  It doesn't seem to handle TAB with
>> modifiers right.

> Looks correct for me:

ELISP> (kbd "S-TAB")
> [33554441]
ELISP> (key-description (kbd "S-TAB"))
> "S-TAB"
ELISP> (eq (aref (kbd "S-TAB") 0) ?\S-\t)
> t

I think the problem is that it's nowhere defined what "correct"
should be.  The above shows that `kbd' is at least returning consistent
results, but the way we handle events (especially events that can
sometimes be represented by chars) is not always consistent.
E.g. I don't think the C code together with the various remapping
keymaps will ever generate a ?\S-\t char, instead they'll generate
either an `S-tab' symbol, or a `backtab' symbol.


        Stefan


PS: This reminds me of a related issue: we currently remap the `tab'
symbol to ?\C-i, the `return' symbol to ?\C-m, largely for historical
reasons.  It would actually be better to do it the other way around
(i.e. remap ttys's ?\C-i and ?\C-m to `tab' and `return').  One of the
advantages is that a GUI-only user could then more easily bind `tab',
`return', C-m, and C-i independently.



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

* Re: Is there a canonical key for S-tab?
  2012-03-14 13:07             ` Stefan Monnier
@ 2012-03-15  8:10               ` Ivan Andrus
  0 siblings, 0 replies; 9+ messages in thread
From: Ivan Andrus @ 2012-03-15  8:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs Dev

On Mar 14, 2012, at 2:07 PM, Stefan Monnier wrote:

> PS: This reminds me of a related issue: we currently remap the `tab'
> symbol to ?\C-i, the `return' symbol to ?\C-m, largely for historical
> reasons.  It would actually be better to do it the other way around
> (i.e. remap ttys's ?\C-i and ?\C-m to `tab' and `return').  One of the
> advantages is that a GUI-only user could then more easily bind `tab',
> `return', C-m, and C-i independently.

As someone who does that (maps tab and C-i differently) this would be great!  That is, unless it means that all my carefully crafted work arounds now cause problems.

-Ivan


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

end of thread, other threads:[~2012-03-15  8:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-04  9:37 Is there a canonical key for S-tab? Leo
2012-03-04 10:05 ` Andreas Schwab
2012-03-04 10:19   ` Antoine Levitt
2012-03-04 10:31     ` Andreas Schwab
2012-03-04 10:52       ` Antoine Levitt
2012-03-14  6:19         ` Chong Yidong
2012-03-14  9:25           ` Andreas Schwab
2012-03-14 13:07             ` Stefan Monnier
2012-03-15  8:10               ` Ivan Andrus

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.