all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: wenbinye@gmail.com
Subject: Re: `call-interactively' only the first time
Date: 17 Aug 2006 05:02:06 -0700	[thread overview]
Message-ID: <1155816126.051555.197190@b28g2000cwb.googlegroups.com> (raw)
In-Reply-To: <1155805523.835502.309550@i42g2000cwa.googlegroups.com>

You didn't provide the real code, I assume you may make mistake when
use
the function in parameter, which is named g in you pseudo code. You
should
use funcall function.
Another question is how do you restore the argument when called
interactively first time?

(defun foo (arg)
  (interactive "sGive me a string: ")
  (message "foo: %S" arg))

(defun bar (func)
    (message "first call: ")
    (call-interactively func)
    (message "call again: ")
    (funcall func "efg"))

;; use like this:
(bar 'foo)

augukarl@yahoo.se wrote:
> wenbinye@gmail.com skrev:
> > Can you give the definition of the function?
>
> Here is the pseudo code for the function I want to define:
>
> (defun f (g)  ;; g is an interactive function.
>   ;; Call g interactively.
>   ;; Call g non-interactively with the parameters (specified by
>   ;; the user) in the command above.
>   )
> 
> Is this clear enough?
> 
> 
> Thanks,
> 
> August

  reply	other threads:[~2006-08-17 12:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15 13:48 `call-interactively' only the first time augukarl
2006-08-16  2:13 ` wenbinye
2006-08-16  9:58   ` augukarl
2006-08-16 15:20     ` wenbinye
2006-08-17  9:05       ` augukarl
2006-08-17 12:02         ` wenbinye [this message]
2006-08-17 13:19           ` augukarl
2006-08-17 13:35             ` wenbinye

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1155816126.051555.197190@b28g2000cwb.googlegroups.com \
    --to=wenbinye@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.