From: Barry OReilly <gundaetiapo@gmail.com>
Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: How to get in progress Key Sequence from Elisp
Date: Mon, 3 Dec 2012 09:37:08 -0500 [thread overview]
Message-ID: <CAFM41H0QmOh3Ehn+pwc2TR-KL4shRaLU4iXBEEec6dat5L5rPw@mail.gmail.com> (raw)
In-Reply-To: <0A9AD948985444A1BB410F4B8A960BA3@us.oracle.com>
[-- Attachment #1: Type: text/plain, Size: 805 bytes --]
That's exactly what I needed, thanks!
On Sun, Dec 2, 2012 at 4:15 PM, Drew Adams <drew.adams@oracle.com> wrote:
> > When I'm in the middle of inputting a Key Sequence, how may
> > I get a data structure with the Key Sequence entered thus
> > far from Elisp?
> > ...
> > I can do this if I can get the Key Sequence as the user has
> > been entered at that time.
>
> If I understand what you are asking, see `this-command-keys'. E.g.:
>
> (defun foo ()
> "..."
> (let* ((this-key (this-command-keys))
> (prefix (substring
> this-key
> 0 (1- (length this-key)))))
> ;; (message "PREFIX: %S, DESCRIPTION: %S"
> ;; prefix (key-description prefix))
> prefix))
>
> This is what I use in the code for Icicles key completion.
>
>
[-- Attachment #2: Type: text/html, Size: 1217 bytes --]
prev parent reply other threads:[~2012-12-03 14:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-02 20:09 How to get in progress Key Sequence from Elisp Barry OReilly
2012-12-02 21:15 ` Drew Adams
2012-12-03 14:37 ` Barry OReilly [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=CAFM41H0QmOh3Ehn+pwc2TR-KL4shRaLU4iXBEEec6dat5L5rPw@mail.gmail.com \
--to=gundaetiapo@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.