all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* calling interactive functions programmatically
@ 2003-04-25 13:27 Phillip Lord
  2003-04-25 15:38 ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: Phillip Lord @ 2003-04-25 13:27 UTC (permalink / raw)





Is there a way to call an interactive function, but to specify some of
the arguments programmatically?

For instance, take "find-dired". It is defined like so....

(defun find-dired (dir args)  
        (interactive (list (read-file-name "Run find in directory: " nil "" t)
                     (read-string "Run find (with args): " find-args
				  '(find-args-history . 1))))



Now I want to wrap this call inside another, where I already know the
directory in question, but do not know the arguments. 

So I guess I can do...


(defun my-find-dired(args)
    (interactive (read-string "Run find (with args): " find-args
				  '(find-args-history . 1)))
    (find-dired (get-the-directory-name-from-somewhere-else)
        args))

But ideally I would like to not do the "read-string" form, as this
duplicates everything in find-dired. 

Is there a way to do this? 

Cheers

Phil

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

end of thread, other threads:[~2003-04-25 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-25 13:27 calling interactive functions programmatically Phillip Lord
2003-04-25 15:38 ` Kevin Rodgers

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.