unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Input from buffer instead of minibuffer
@ 2012-09-30 20:46 Michael Haensel
  2012-10-01  1:10 ` Barry Margolin
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael Haensel @ 2012-09-30 20:46 UTC (permalink / raw)
  To: help-gnu-emacs

Hello everyone -

I'm writing a quiz program in Emacs Lisp. The program creates a new frame and buffer for the quiz questions. The quiz then runs something like this:

(insert "Please identify: [quiz item]")
(setq response
       (read-from-minibuffer "Please identify: [quiz item]"))
... do stuff based on response

This displays the question in the buffer and the minibuffer. The response is read in from the minibuffer. This isn't deal-breakingly bad, but a better design would read the response from the buffer and skip the minibuffer entirely.

Is there an easy way to read a response from the buffer instead of the minibuffer? If it matters, a "response" is a string of 1-8 alphabetic characters terminated by a newline/return key.


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

end of thread, other threads:[~2012-10-04 13:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-30 20:46 Input from buffer instead of minibuffer Michael Haensel
2012-10-01  1:10 ` Barry Margolin
2012-10-03 15:45   ` Stephen Berman
2012-10-04 13:21 ` Stefan Monnier
2012-10-04 13:56 ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).