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

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

Re: `read-file-name' with history?


From: egarrulo
Subject: Re: `read-file-name' with history?
Date: Fri, 10 Dec 2010 08:49:47 +0000

Hello Drew,

2010/12/10 Drew Adams <drew.adams@oracle.com>:
>> unlike `read-string', `read-file-name' lacks an history parameter.  Is
>> there a way to achieve such behavior?
>
> Correct, there is no history parameter.  But it does use a history list:
> `file-name-history'.
>
> To achieve a file-name reading behavior with an arbitrary history list, you
> would need to write your own file-name reading function and bind it to the
> variable `read-file-name-function'.  Then let-bind that var around a call to
> `read-file-name.
>
>> Since `read-string' is a built-in function in C source code, I can't
>> examine it (well, I could examine the C sources, but I think it would
>> be a little difficult).
>
> What is the question here?  What is the relation to your question about
> `read-file-name''s history parameter?

My problem is that writing such a function is beyond my current
capabilities.  I usually manage to achieve such goals by modifying
some existing Lisp code.  In this case, however, no Lisp code is
available.  That's why I was asking for pointers.



reply via email to

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