[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Input from buffer instead of minibuffer
From: |
Michael Haensel |
Subject: |
Input from buffer instead of minibuffer |
Date: |
Sun, 30 Sep 2012 13:46:03 -0700 (PDT) |
User-agent: |
G2/1.0 |
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.
- Input from buffer instead of minibuffer,
Michael Haensel <=