From: Emanuel Berg <moasen@zoho.com>
To: help-gnu-emacs@gnu.org
Subject: Re: default value with interactive
Date: Mon, 20 Nov 2017 02:10:38 +0100 [thread overview]
Message-ID: <86fu99zre9.fsf@zoho.com> (raw)
In-Reply-To: 871sktx19j.fsf@web.de
Michael Heerdegen wrote:
>> OK, so that is OK?
>
> Sure - most of the time you are not aware of
> the value of point as a number, so the first
> version is much clearer.
Yeah, in this case, I meant in principle.
What I have is two functions, one that
searches, and one that "searches again" with
the previous search string as input.
When the function that searches is invoked, it
asks for a search string, but if it isn't
provided, the default (i.e., previous) string
is used even tho the better way to do that is
to invoke the function that searches
again directly.
I can extract into a function the code that
fetches the previous search *but* how do I use
that in the interactive form as well as outside
it without computing twice? As was instructed
here - (info "(elisp) Programming Tips") - only
even in the provided example, it really didn't
happen that way at all.
--
underground experts united
http://user.it.uu.se/~embe8573
next prev parent reply other threads:[~2017-11-20 1:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-19 19:08 default value with interactive Emanuel Berg
2017-11-19 21:49 ` Michael Heerdegen
2017-11-19 22:54 ` Emanuel Berg
2017-11-20 0:05 ` Michael Heerdegen
2017-11-20 1:10 ` Emanuel Berg [this message]
2017-11-20 2:18 ` Michael Heerdegen
2017-11-20 3:10 ` Emanuel Berg
2017-11-21 0:31 ` Robert Thorpe
2017-11-21 2:00 ` Emanuel Berg
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=86fu99zre9.fsf@zoho.com \
--to=moasen@zoho.com \
--cc=help-gnu-emacs@gnu.org \
/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.