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

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

Re: calling interactive functions programmatically


From: Kevin Rodgers
Subject: Re: calling interactive functions programmatically
Date: Fri, 25 Apr 2003 09:38:59 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

Phillip Lord wrote:

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?


Does this work:

;; M-x gross-hack
(let ((unread-command-events
      (listify-key-sequence
        (concat (get-the-directory-name-from-somewhere-else)
                "\r"))))
 (call-interactively 'find-dired))


--
<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

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