all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Suppress user-prompting when calling commands in programs
@ 2014-06-13 13:51 Thorsten Jolitz
  2014-06-13 14:03 ` Eli Zaretskii
  2014-06-13 14:20 ` Nicolas Richard
  0 siblings, 2 replies; 19+ messages in thread
From: Thorsten Jolitz @ 2014-06-13 13:51 UTC (permalink / raw)
  To: help-gnu-emacs


Hi List, 

I often encounter user commands that do exactly what I want, and would
like to reuse them in a program, but they are not really written for
programmatical use, i.e. they prompt the user for information to be
stored in (local) variables, but don't expose these variables as
function arguments:

#+begin_src emacs-lisp
(defun foo (&optional arg)
  (interactive "P")
  (let ((bar (org-icompleting-read ...)))))
#+end_src

I guess thats because writing the interactive spec and binding keys
becomes so much simpler that way. 

Assuming `foo' can't be changed - is there another way to bind `bar'
before calling `foo' in a program rather than advising `foo' (with the
aim to suppress any user-prompting at all during the execution of
`foo')?

I seem to remember that a solution for this exists, but I can't find
it anymore. Thanks for any hint. 

-- 
cheers,
Thorsten




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

end of thread, other threads:[~2014-06-15  1:58 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-13 13:51 Suppress user-prompting when calling commands in programs Thorsten Jolitz
2014-06-13 14:03 ` Eli Zaretskii
2014-06-13 14:25   ` Stefan Monnier
2014-06-13 15:09     ` Thorsten Jolitz
2014-06-13 15:29     ` Drew Adams
2014-06-13 15:49       ` Thorsten Jolitz
2014-06-13 14:20 ` Nicolas Richard
2014-06-13 15:18   ` Thorsten Jolitz
2014-06-13 16:04     ` Drew Adams
2014-06-13 18:14       ` Thorsten Jolitz
2014-06-14  3:33       ` Eric Abrahamsen
2014-06-14  3:36         ` Drew Adams
2014-06-14  3:47           ` Eric Abrahamsen
     [not found]   ` <mailman.3579.1402672740.1147.help-gnu-emacs@gnu.org>
2014-06-13 18:55     ` Stefan Monnier
2014-06-14  8:07       ` Thorsten Jolitz
2014-06-14  8:22         ` Thorsten Jolitz
2014-06-15  1:58           ` Stefan Monnier
2014-06-14 15:52         ` Drew Adams
2014-06-14 16:27           ` Thorsten Jolitz

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.