[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interactive-form invoked with specified arg
From: |
Emanuel Berg |
Subject: |
Re: Interactive-form invoked with specified arg |
Date: |
Tue, 04 Jun 2013 19:17:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
gentsquash <gentsquash@gmail.com> writes:
> (y-or-n-p "Are you there?")
> or
> (query-replace "wierd" "weird") .
>
> Is there a way to programmatically invoke FORM with the
> character already specified? E.g
>
> (invoke-as-if-I-typed (query-replace "wierd" "weird") "!")
>
> behaves as if I invoked (query-replace "wierd" "weird"), then,
> when prompted, typed "!".
Well, why would you want to emulate typing? If you told us the
overall goal perhaps we could find a better solution. Because
intuitively, emulate typing seems a bit strange, as typing *in the
first place* most often is an interface to invoking functions and
passing arguments.
You might check out `C-h f call-interactively'.
--
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573