From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Emacs-Devel devel <emacs-devel@gnu.org>
Subject: Re: Why is this-command-keys missing?
Date: Sun, 2 Jan 2011 03:38:51 +0100 [thread overview]
Message-ID: <AANLkTinpSQz2nEVZnYiQxKXEgdz9Jxg-AFCPEwwjafTv@mail.gmail.com> (raw)
In-Reply-To: <jwvei8w83y8.fsf-monnier+emacs@gnu.org>
On Sun, Jan 2, 2011 at 2:57 AM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> (define-key map "\t" 'compilation-next-error)
>> However if you hit TAB then this-command-keys will contain (something
>> similar to) TAB and not "\t".
>
> For me it does return "\t".
>
>> (key-binding (this-command-keys) t)
>> to get back the binding that is really active, i.e. compilation-next-error.
>
> It does sound like you're trying to do something that's
> fundamentally unreliable. Can you explain in more detail why you want
> to know "the binding that is really active"?
I am trying to use orgstruct-mode for a compilation output buffer.
orgstruct-mode binds keys like this:
;; Special treatment needed for TAB and RET
(org-defkey orgstruct-mode-map [(tab)]
(orgstruct-make-binding 'org-cycle 102 [(tab)] "\C-i"))
(org-defkey orgstruct-mode-map "\C-i"
(orgstruct-make-binding 'org-cycle 103 "\C-i" [(tab)]))
This is to make it possible to use TAB for cycling the outlines when
on outline headings.
However I would like to get back the normal TAB handling in the
compilaiton output buffer when not on an outline heading.
However it is a little bit more complicated than that. I bind the key
C-i in an emulation mode map. This now gets called when TAB is hit. I
am trying to find out what was really hit.
next prev parent reply other threads:[~2011-01-02 2:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-01 18:59 Why is this-command-keys missing? Lennart Borgman
2011-01-02 1:57 ` Stefan Monnier
2011-01-02 2:38 ` Lennart Borgman [this message]
2011-01-02 4:19 ` Stefan Monnier
2011-01-02 4:29 ` Lennart Borgman
2011-01-02 14:42 ` Stefan Monnier
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=AANLkTinpSQz2nEVZnYiQxKXEgdz9Jxg-AFCPEwwjafTv@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.