all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

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.