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

wenbinye@gmail.com skrev:
> You didn't provide the real code,

Of course not. My question is how to write it.

> 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.

How can it be a misstake? I haven't written any (real) function-call
statements.

> Another question is how do you restore the argument when called
> interactively first time?

Exactly, that's the essence of my question.

> (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)

This is only a special case. In my pseudo code I put no restrictions on
the command g (it can take any number of parameters).


August

  reply	other threads:[~2006-08-17 13:19 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
2006-08-17 13:19           ` augukarl [this message]
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=1155820770.967587.29970@i42g2000cwa.googlegroups.com \
    --to=augukarl@yahoo.se \
    /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.