emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] simple way to call `C-c a v' or a way to bind it to a key?


From: Nicolas Richard
Subject: Re: [O] simple way to call `C-c a v' or a way to bind it to a key?
Date: Mon, 17 Feb 2014 10:43:48 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Marc Ihm <address@hidden> writes:
> (global-set-key (kbd "<f12>") (lambda () (interactive) (execute-kbd-macro 
> (kbd "C-c a v"))))

(global-set-key (kbd "<f12>") (kbd "C-c a v"))

might be a little easier to read and type. Explanation is :
global-set-key can take any "command" as argument, and the definition of
what a "command" is includes keyboard macros. That is vaguely explained
at (info "(elisp) What Is a Function") -- 2nd paragraph after the term
"command".

> P.s.: In my opinion, the name "execute-kbd-macro" of this builtin function is 
> somewhat misleading;
> "replay-keys" describes this usage closer ...

I think I wouldn't look for replay-keys if I did not know about the
function. My own problem is that I usually look for "call-kbd-macro",
which doesn't exist, instead of "execute-...". I guess everyone can't be
pleased !

-- 
Nico.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]