help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

calling interactive functions programmatically


From: Phillip Lord
Subject: calling interactive functions programmatically
Date: 25 Apr 2003 14:27:30 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.93



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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]