all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Prefix for command to save it as a Lisp expression
@ 2022-02-19 23:45 Spencer Baugh
  2022-02-20  2:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Spencer Baugh @ 2022-02-19 23:45 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

Is there any prefix I can type before entering a command which will add
that command as a Lisp expression to my kill ring?

For example, [prefix] C-n would add "(next-line)" to my kill-ring.

The specific use case I have in mind is [prefix] M-x global-set-key,
where after I finish running the global-set-key I'd have a Lisp
expression I can put into my init.el.

Currently, I can do this after the fact by looking at
list-command-history and kill things out of that.  But it would be cool
if I could type some prefix and just automatically have the command be
added to my kill ring.

Alternatively, maybe there's a way to yank things directly from
command-history?  Then I could just do that after the fact, rather than
using a prefix ahead of time, which might be even nicer.

Thanks!



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-20  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-19 23:45 Prefix for command to save it as a Lisp expression Spencer Baugh
2022-02-20  2:56 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-02-20  3:18 ` [External] : " Drew Adams
2022-02-20  4:00 ` Eduardo Ochs

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.