all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Óscar Fuentes" <ofv@wanadoo.es>
To: help-gnu-emacs@gnu.org
Subject: Re: Lisp error when using M-x
Date: Mon, 11 Jan 2021 00:33:40 +0100	[thread overview]
Message-ID: <87im84wenf.fsf@telefonica.net> (raw)
In-Reply-To: trinity-e0339e16-1af1-4aa3-8e5f-d72da413d080-1610319548575@3c-app-mailcom-bs11

wael-zwaiter@gmx.com writes:

> I want to use C-i for ivy related commands.
>
>   (global-set-key (kbd "C-i C-s") 'swiper)
>   (global-set-key (kbd "C-i C-r") 'ivy-resume)
>   (global-set-key (kbd "C-i C-i") 'ivy-resume)
>   (global-set-key (kbd "C-i M-x") 'counsel-M-x)
>   (global-set-key (kbd "C-i C-f") 'counsel-find-file)

For that you need to convert C-i to a prefix key. This seems to work:

(defvar cikm (make-keymap))
(global-set-key (kbd "C-i") cikm)
(global-set-key (kbd "C-i C-s") (lambda () (interactive) (message "hi!")))

Please note that Emacs has some guidelines about choosing keybindings:
some are reserved for users, some for external packages and some others
for Emacs itself.

See the "Key Bindings" node in the Emacs manual.




  reply	other threads:[~2021-01-10 23:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-10 20:38 Lisp error when using M-x wael-zwaiter
2021-01-10 20:42 ` wael-zwaiter
2021-01-10 20:54   ` Óscar Fuentes
2021-01-10 21:03     ` Stefan Monnier
2021-01-10 21:10       ` wael-zwaiter
2021-01-10 21:17       ` wael-zwaiter
2021-01-10 22:55         ` Óscar Fuentes
2021-01-10 22:59           ` wael-zwaiter
2021-01-10 23:33             ` Óscar Fuentes [this message]
2021-01-11  0:00               ` wael-zwaiter
2021-01-11  4:25             ` Robert Thorpe

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=87im84wenf.fsf@telefonica.net \
    --to=ofv@wanadoo.es \
    --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.