help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One-off history for read-string


From: Marcin Borkowski
Subject: Re: One-off history for read-string
Date: Fri, 25 Sep 2015 09:16:43 +0200

On 2015-09-25, at 02:34, Emanuel Berg <embe8573@student.uu.se> wrote:

> Marcin Borkowski <mbork@mbork.pl> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]