开发者

Emacs C-h c doesn't seem to work for chords 3 combinations long?

I'm trying to use C-h c in emacs to figure out what a key combination is bound to. The combination is C-u C-c C-q, which realigns tags in org-mode. However, Emacs just tries to look up C-u C-c and then fails. What am I doing wrong? I realize I could easily look at the 开发者_运维技巧orgmode source or something to figure this out, but for future reference what would I do to figure out what function something like this is bound to?

Edit: OK, so it's actually C-u followed by C-c C-q, and according to emacs this is what that combination is bound to:

(org-set-tags-command &optional arg just-align)

Call the set-tags command for the current entry.

So what exactly does it mean to give this command the argument 4?

Oh, just to give an explanation: I'm trying to start learning emacs-lisp and customization and one of the things I wanted to do was to have this command added to the before-save-hook so that when I save an org file, the tags get automatically aligned.

Final edit: I figured out why this command behaves as it does; given the prefix argument it changes its behavior. How can I set the prefix argument when calling the function in elisp?


It's not a general problem with combinations that are three keys long: For example, C-h c ESC ESC ESC (keyboard-escape-quit) or C-h c C-x r t (string-rectangle) both work fine.

When I try C-h c C-u C-c C-q in org-mode, the command interrupts after C-u and shows:

C-u runs the command universal-argument

in the minibuffer, which is correct. So, in fact, "C-u C-c C-q" is not a command, it's the command "C-c C-q" (org-table-wrap-region) started with an additional argument (4 -- see C-h k C-u for an explanation).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜