all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* read-from-minibuffer and friends.
@ 2003-12-13  1:30 Luc Teirlinck
  2003-12-13 23:15 ` Richard Stallman
  0 siblings, 1 reply; 4+ messages in thread
From: Luc Teirlinck @ 2003-12-13  1:30 UTC (permalink / raw)


I am currently reading minibuf.texi.  There is a small inconsistency
between the description of the functions `read-no-blanks-input',
`read-minibuffer' and `eval-minibuffer' in the Elisp manual and their
actual behavior.  For all three functions it is claimed that the
optional argument INITIAL behaves exactly like in read-from-minibuffer.
This is incorrect.  Hence the claim that these functions are equivalent
to the Elisp code displayed in `(elisp)Text from Minibuffer' and
`(elisp)Object from Minibuffer' is not 100% accurate either.  As the
ielm run below shows, INITIAL _has_ to be a string or nil for the
three mentioned functions, but is, in addition, allowed to be a cons
of a string and an integer for `read-from-minibuffer' (and
`read-string').

The "Usage note" in `(elisp)Text from Minibuffer', nearly "deprecates"
INITIAL, so that probably there is no need to conform the three
functions to read-from-minibuffer's behavior.  I will point out the
subtlety in the Elisp manual, but first I want to make sure that it
_really_ is the documentation that needs to be changed and not the
code itself.

Ielm run illustrating this:

===File ~/minibuf-ielm======================================
*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (read-from-minibuffer "Prompt: " '("123456789" . 3))
"123456789"
ELISP> (read-string "Prompt: " '("123456789" . 3))
"123456789"
ELISP> (read-no-blanks-input "Prompt: " '("123456789" . 3))
*** Eval error ***  Wrong type argument: stringp, ("123456789" . 3)
ELISP> (read-minibuffer "Prompt: " '("123456789" . 3))
*** Eval error ***  Wrong type argument: stringp, ("123456789" . 3)
ELISP> (eval-minibuffer "Prompt: " '("123456789" . 3))
*** Eval error ***  Wrong type argument: stringp, ("123456789" . 3)
ELISP> (read-no-blanks-input "Prompt: " "123456789")
"123456789"
ELISP> (read-minibuffer "Prompt: " "123456789")
123456789
ELISP> (eval-minibuffer "Prompt: " "123456789")
123456789
ELISP> 
============================================================

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

end of thread, other threads:[~2003-12-15  0:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-13  1:30 read-from-minibuffer and friends Luc Teirlinck
2003-12-13 23:15 ` Richard Stallman
2003-12-14  5:22   ` Luc Teirlinck
2003-12-15  0:23   ` Luc Teirlinck

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.