all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* use of read
@ 2008-01-07 20:30 Thierry Volpiatto
  2008-01-07 21:23 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Thierry Volpiatto @ 2008-01-07 20:30 UTC (permalink / raw)
  To: help-gnu-emacs

Hello, i use the function (read) to fill a list interactively.
the prompt is "Lisp expression:" , is it possible to have another prompt?
Thank you in advance.
-- 
A + Thierry
Pub key: http://pgp.mit.edu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: use of read
  2008-01-07 20:30 use of read Thierry Volpiatto
@ 2008-01-07 21:23 ` Bastien
  2008-01-07 22:03   ` Thierry Volpiatto
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2008-01-07 21:23 UTC (permalink / raw)
  To: help-gnu-emacs

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Hello, i use the function (read) to fill a list interactively.
> the prompt is "Lisp expression:" , is it possible to have another prompt?
> Thank you in advance.

This string is hardcoded in the C source code for this function.  So I
think it's not possible to modify it.

-- 
Bastien

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: use of read
       [not found] <mailman.5851.1199737426.18990.help-gnu-emacs@gnu.org>
@ 2008-01-07 21:48 ` thorne
  2008-01-07 22:58   ` Thierry Volpiatto
  0 siblings, 1 reply; 7+ messages in thread
From: thorne @ 2008-01-07 21:48 UTC (permalink / raw)
  To: help-gnu-emacs

Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:

> Hello, i use the function (read) to fill a list interactively.
> the prompt is "Lisp expression:" , is it possible to have another prompt?
> Thank you in advance.

I think C-h f read-TAB will get you a list of functions that start with
`read-'.  My guess is the one you want is `read-string' or
`read-number'.

        (read-string "Enter a string: ")

-- 
Theron Ttlåx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: use of read
  2008-01-07 21:23 ` Bastien
@ 2008-01-07 22:03   ` Thierry Volpiatto
  2008-01-07 22:07     ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 7+ messages in thread
From: Thierry Volpiatto @ 2008-01-07 22:03 UTC (permalink / raw)
  To: Bastien; +Cc: help-gnu-emacs


Bastien <bzg@altern.org> writes:

> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>
>> Hello, i use the function (read) to fill a list interactively.
>> the prompt is "Lisp expression:" , is it possible to have another prompt?
>> Thank you in advance.
>
> This string is hardcoded in the C source code for this function.  So I
> think it's not possible to modify it.

Thanks,
no over function to get a variable interactively ?(not with interactive)
-- 
A + Thierry
Pub key: http://pgp.mit.edu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: use of read
  2008-01-07 22:03   ` Thierry Volpiatto
@ 2008-01-07 22:07     ` Lennart Borgman (gmail)
  2008-01-07 22:48       ` Thierry Volpiatto
  0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-07 22:07 UTC (permalink / raw)
  To: Thierry Volpiatto; +Cc: help-gnu-emacs

Thierry Volpiatto wrote:
> Bastien <bzg@altern.org> writes:
> 
>> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>>
>>> Hello, i use the function (read) to fill a list interactively.
>>> the prompt is "Lisp expression:" , is it possible to have another prompt?
>>> Thank you in advance.
>> This string is hardcoded in the C source code for this function.  So I
>> think it's not possible to modify it.
> 
> Thanks,
> no over function to get a variable interactively ?(not with interactive)

Maybe this can help?

(defun read2 (lisp)
   (interactive "xGive me some lisp: ")
   lisp)

(call-interactively 'read2)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: use of read
  2008-01-07 22:07     ` Lennart Borgman (gmail)
@ 2008-01-07 22:48       ` Thierry Volpiatto
  0 siblings, 0 replies; 7+ messages in thread
From: Thierry Volpiatto @ 2008-01-07 22:48 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: help-gnu-emacs

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

> Thierry Volpiatto wrote:
>> Bastien <bzg@altern.org> writes:
>>
>>> Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
>>>
>>>> Hello, i use the function (read) to fill a list interactively.
>>>> the prompt is "Lisp expression:" , is it possible to have another prompt?
>>>> Thank you in advance.
>>> This string is hardcoded in the C source code for this function.  So I
>>> think it's not possible to modify it.
>>
>> Thanks,
>> no over function to get a variable interactively ?(not with interactive)
>
> Maybe this can help?
>
> (defun read2 (lisp)
>   (interactive "xGive me some lisp: ")
>   lisp)
>
> (call-interactively 'read2)
>
Yes, that work fine with that, like that i can fill my list:

(setq liste nil)
(dotimes (i 3)
  (push (format "%s" (call-interactively '(lambda (var) (interactive "xGive me some lisp: ") var))) liste))

Thank you very much for your help :)

-- 
A + Thierry
Pub key: http://pgp.mit.edu

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: use of read
  2008-01-07 21:48 ` thorne
@ 2008-01-07 22:58   ` Thierry Volpiatto
  0 siblings, 0 replies; 7+ messages in thread
From: Thierry Volpiatto @ 2008-01-07 22:58 UTC (permalink / raw)
  To: thorne; +Cc: help-gnu-emacs

Yes thats work also fine, thank you all for your help.
-- 
A + Thierry
Pub key: http://pgp.mit.edu

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-07 22:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-07 20:30 use of read Thierry Volpiatto
2008-01-07 21:23 ` Bastien
2008-01-07 22:03   ` Thierry Volpiatto
2008-01-07 22:07     ` Lennart Borgman (gmail)
2008-01-07 22:48       ` Thierry Volpiatto
     [not found] <mailman.5851.1199737426.18990.help-gnu-emacs@gnu.org>
2008-01-07 21:48 ` thorne
2008-01-07 22:58   ` Thierry Volpiatto

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.