From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: One-off history for read-string Date: Fri, 25 Sep 2015 09:16:43 +0200 Message-ID: <87oagrt1d0.fsf@mbork.pl> References: <87y4fwt3vq.fsf@mbork.pl> <87twqjpc9h.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1443165462 3588 80.91.229.3 (25 Sep 2015 07:17:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Sep 2015 07:17:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 25 09:17:35 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZfNG6-0003WP-Lp for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 09:17:31 +0200 Original-Received: from localhost ([::1]:43947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfNG4-0001KF-OT for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Sep 2015 03:17:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfNFm-0001Gu-S2 for help-gnu-emacs@gnu.org; Fri, 25 Sep 2015 03:17:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfNFi-000431-Fu for help-gnu-emacs@gnu.org; Fri, 25 Sep 2015 03:17:10 -0400 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:55523) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfNFi-00042k-6y for help-gnu-emacs@gnu.org; Fri, 25 Sep 2015 03:17:06 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 487E66F2008 for ; Fri, 25 Sep 2015 09:16:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OO7b8c2+kPLT for ; Fri, 25 Sep 2015 09:16:51 +0200 (CEST) Original-Received: from localhost (103-115.echostar.pl [213.156.103.115]) by mail.mojserwer.eu (Postfix) with ESMTPSA id A4A356F2003 for ; Fri, 25 Sep 2015 09:16:51 +0200 (CEST) In-reply-to: <87twqjpc9h.fsf@debian.uxu> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:5e00:2:52::8 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:107326 Archived-At: On 2015-09-25, at 02:34, Emanuel Berg wrote: > Marcin Borkowski writes: > >> (I'm working on a client for certain web service, >> and the history is kept on the server, so it really >> doesn't make sense to keep all those in my >> Emacs session.) > > Perhaps not (?), but why think of this at all? > What problem is it, that you experience, or what > behavior do you seek? Well, maybe I wasn't clear enough. The history is on the server. I download it from there, and I want the user to be able to /access/ it using e.g. M-n and M-p while entering/editing something. However, I don't care about /writing/ it to some variable in Emacs, since the new entry will be uploaded to the server anyway, and taken from there the next time, together with the rest of the history. (This is actually an oversimplification due to some caching, but never mind.) >> Is it fine to use a temporary, let-bound variable >> name as the HISTORY parameter, or is there a better >> way for a "history" I only need to read from, not to >> write to? > > If you consider the prototype > > (read-string PROMPT &optional INITIAL-INPUT HISTORY > DEFAULT-VALUE INHERIT-INPUT-METHOD) > > you see that the HISTORY argument is optional - you > don't need to have anything there, and if you want to > pass something to subsequent optional arguments, pass > nil as HISTORY. I /do/ understand all this, of course. But it is /not/ the behavior I want. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University