help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: RE: RE: Setting keybinding for org-support-shift-select t


From: Christopher Dimech
Subject: Re: RE: RE: Setting keybinding for org-support-shift-select t
Date: Sun, 4 Oct 2020 20:10:34 +0200

Instead of using

(global-set-key [f2] #'execute-extended-command)

can I call my function directly,

(global-set-key "[f2] fnm" #'myfunction)

Cheers
C*


> Sent: Sunday, October 04, 2020 at 6:52 PM
> From: "Drew Adams" <drew.adams@oracle.com>
> To: "Christopher Dimech" <dimech@gmx.com>
> Cc: help-gnu-emacs@gnu.org, moasenwood@zoho.eu
> Subject: RE: RE: Setting keybinding for org-support-shift-select t
>
> > I have usually used key bindings to do some operations I like. But then,
> > the keybindings became too cryptic for me to remember and thought of
> > using my user defined function names for the more complicated operations.
> >
> > As you are saying, I can either have <f1> defined as a Prefix-Key
> > or use it to call my user defined functions.  Hover I cannot use <f1>
> > to do both - calling functions and using keybindings.
> >
> > So then I might have, for example, <f1> to use with keybindings and
> > <f2> to use with my user defined functions.
> >
> > Correct me if I am wrong, but I think I understood you.
>
> Yes, I believe you understood.
>
> A key can _either_ be bound to a keymap (and to
> a prefix command, which is, in effect, just that
> keymap) _or_ be bound to a command (which is not
> a prefix command, i.e., not just a keymap).
>
> Removing the parenthetical qualifications: A key
> can either be bound to a keymap or to a command,
> not to both.
>
> Either Emacs sees only a prefix key and waits for
> the rest of a key sequence or Emacs sees a completed
> sequence and invokes its command.
>
>



reply via email to

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