all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Running an extended command with default input?
@ 2016-03-07 15:09 egarrulo
  2016-03-07 18:38 ` John Mastro
  0 siblings, 1 reply; 2+ messages in thread
From: egarrulo @ 2016-03-07 15:09 UTC (permalink / raw)
  To: help-gnu-emacs

How can you run an extended command with a default input?  For example: 
`eval-expression` with `(+ 1 1)` as default input (in other words: what 
you would accomplish by typing `M-: (+ 1 1)` without RET).  This code 
works, but it seems to add an implicit RET:

(execute-kbd-macro (vconcat (kbd (substitute-command-keys 
"\\[eval-expression] "))
                             "(+ 1 1)"))

Thanks.


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

end of thread, other threads:[~2016-03-07 18:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-07 15:09 Running an extended command with default input? egarrulo
2016-03-07 18:38 ` John Mastro

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.