From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: default value with interactive Date: Mon, 20 Nov 2017 02:10:38 +0100 Message-ID: <86fu99zre9.fsf@zoho.com> References: <86a7zi13ze.fsf@zoho.com> <87d14e6is1.fsf@web.de> <86o9nxzxp4.fsf@zoho.com> <871sktx19j.fsf@web.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511140292 21823 195.159.176.226 (20 Nov 2017 01:11:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 20 Nov 2017 01:11:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 20 02:11:25 2017 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eGacM-0004tn-6t for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Nov 2017 02:11:22 +0100 Original-Received: from localhost ([::1]:54928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGacQ-00019h-5D for geh-help-gnu-emacs@m.gmane.org; Sun, 19 Nov 2017 20:11:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eGabt-00014V-6B for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 20:10:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eGabq-0002Lj-1O for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 20:10:53 -0500 Original-Received: from [195.159.176.226] (port=53206 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eGabp-0002LL-Pj for help-gnu-emacs@gnu.org; Sun, 19 Nov 2017 20:10:49 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1eGabe-0002ZH-IG for help-gnu-emacs@gnu.org; Mon, 20 Nov 2017 02:10:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 32 Original-X-Complaints-To: usenet@blaine.gmane.org Mail-Copies-To: never Cancel-Lock: sha1:/JBf7RXn8S3h2VF+vH6yWNuCJaE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:114996 Archived-At: 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