all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Josh <josh@foxtail.org>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: 15233@debbugs.gnu.org
Subject: bug#15233: pp-eval-expression: Signature parity with `eval-expression'
Date: Wed, 4 Sep 2013 08:47:36 -0700	[thread overview]
Message-ID: <CANdFEAH563m8_K0jY-UvESyK=SpuqsShJp-=kPOUwcGeThKBJQ@mail.gmail.com> (raw)
In-Reply-To: <8738pmabnp.fsf@gmail.com>

I prefer to use the `kbd' notation, e.g.

  (global-set-key (kbd "M-:") 'pp-eval-expression)

because it's clear, regular, and doesn't require me to remember
that keys are internally represented as vectors, how to quote
modifiers, etc.  If I'm not sure of the canonical representation of
something (e.g. "M-H-x or H-M-x?") I can easily check visually
with C-h c, or something like this to kill the correct form for me
(this quick version performs key translations, which isn't optimal):

  (defun describe-key-name (key)
    (interactive "kGenerate and kill `kbd' form for key: ")
    (kill-new
     (message "(kbd \"%s\")"
                      (help-key-description key nil))))

Josh

On Mon, Sep 2, 2013 at 7:20 PM, Jambunathan K <kjambunathan@gmail.com> wrote:
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>>>     (global-set-key "\272" (quote pp-eval-expression)) ; M-:
>>
>> Please don't:
>
> Don't blame me, I didn't do it, Emacs did it.
>
> I have a simple recipe for producing keybindings.
>
>   M-x global-set-key
>   M-x list-command-history
>   Copy and Paste
>
> The above recipe works flawlessly.  It is the most easiest way to
> produce keybindings that I have known.
>
>
>





      reply	other threads:[~2013-09-04 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-01 12:06 bug#15233: pp-eval-expression: Signature parity with `eval-expression' Jambunathan K
2002-01-01  0:51 ` Jambunathan K
2013-09-01 15:23 ` Drew Adams
2013-09-01 16:07   ` Jambunathan K
2013-09-01 16:09   ` Jambunathan K
2013-09-03  1:44     ` Stefan Monnier
2013-09-03  2:20       ` Jambunathan K
2013-09-04 15:47         ` Josh [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='CANdFEAH563m8_K0jY-UvESyK=SpuqsShJp-=kPOUwcGeThKBJQ@mail.gmail.com' \
    --to=josh@foxtail.org \
    --cc=15233@debbugs.gnu.org \
    --cc=kjambunathan@gmail.com \
    /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.