all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: cons <consspam@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: <tab> differs from TAB, tab-key differs from C-i. What?!
Date: Fri, 22 Aug 2008 04:15:12 -0700 (PDT)	[thread overview]
Message-ID: <3b3ed80e-2c6e-4ae7-8d5d-c7c6a8cb03cb@z72g2000hsb.googlegroups.com> (raw)
In-Reply-To: 666cb518-1425-4c67-8ecb-cc9d4a6e548c@k7g2000hsd.googlegroups.com

On 22 Aug, 12:26, cons <conss...@gmail.com> wrote:
> Hello! I'm very confused about one thing:
>
> Go to *scratch*-buffer and press 'C-h b' (describe-bindings). Under
> 'Major Mode Bindings' TAB is bound to lisp-indent-line. This mean that
> when I press the tab-key or C-i (the same thing), lisp-indent-line is
> executed. Fine.
>
> BUT, now try this. Evaluate these 2 expressions in *scratch*:
>
> (defun foo ()
>   (interactive)
>   (message "Executed foo."))
> (global-set-key (kbd "<tab>") 'foo)
>
> Once again, press 'C-h b'. Our new binding of <tab> to foo is found
> under 'Global Bindings'. So, we have the old local binding (major
> mode) of TAB to lisp-indent-line that shadows a global binding of
> <tab> to foo. Now pressing the tab-key or C-i should mean the same
> thing (produce ascii code 9), which in turn should execute lisp-indent-
> line (since local bindings takes precedence over global bindings),
> right?
>
> Wrong. Pressing the tab-key executes foo, and pressing C-i executes
> lisp-indent-line. So, TAB seems to mean pressing C-i, which apparently
> differs from <tab> which seems to mean pressing the tab-key. Now, this
> is becoming a mess.
>
> 1) Shouldn't pressing the tab-key and C-i mean the same thing?
> 2) Shouldn't all emacs' representations of a tab (<tab>, TAB, ?\t,
> "\t", ascii code 9, <C-i>, ?\C-i, ?\^i etc etc) mean the same thing?
>
> Best regards,
>
> /Stefan

Ok, I finally found the solution in Emacs Manual node 57.4.8 "Named
ASCII Control Characters". I'll be damned...

/Stefan


      reply	other threads:[~2008-08-22 11:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-22 10:26 <tab> differs from TAB, tab-key differs from C-i. What?! cons
2008-08-22 11:15 ` cons [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b3ed80e-2c6e-4ae7-8d5d-c7c6a8cb03cb@z72g2000hsb.googlegroups.com \
    --to=consspam@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.