unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Buchs, Kevin J." <buchs.kevin@mayo.edu>, help-gnu-emacs@gnu.org
Subject: RE: updating buffer window while accepting minibuffer input
Date: Wed, 16 Jul 2014 14:50:18 -0700 (PDT)	[thread overview]
Message-ID: <256addbf-85f2-456a-b680-d77e06ad8116@default> (raw)
In-Reply-To: <9025b1$hrbs0b@ironport9.mayo.edu>

> I'm wanting to traverse a list of
> buffer positions according to minibuffer keystrokes and have the
> referenced buffer position update (and eventually highlight) much like
> isearch-*. I'm stuck on the buffer position not actually updating
> whilest I am in the midst of (read-minibuffer-input). I have spent about
> two hours delving into how isearch works and came out without a clue as
> to how it actually gets minibuffer reading activated. 

The Isearch code is a bit complicated.  If you follow its model then you
will likely need to do many of the state-maintenance etc. things it does,
which are not necessarily directly related to searching.

Of particular note: Isearch does not really use the minibuffer (except
for odd jobs like when you use `M-e' to edit the search string).

Instead, it handles events in the usual way that Emacs does.  (In Emacs,
every key you hit corresponds to a command, which is then invoked.)

In Isearch, certain input events correspond to keys that are bound to
particular Isearch actions.  Other keys, such as `a', `B', `9', and `$'
have, as their corresponding action, to add the corresponding printable
character (`a', `B', `9', `$' etc.) to the search string.  Search then
begins again automatically (resumes), using the newly updated search string.
See `isearch-printing-char' for the treatment of printable chars.

In sum, the minibuffer is not involved at all, for reading your input.
In particular, you do *not* want to use `read-input-from-minibuffer',
if you want Isearch-like behavior.

(FWIW, I'm no expert on Isearch.  HTH.  Juri Linkov is one of the best
placed to answer questions about its code.)



  reply	other threads:[~2014-07-16 21:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.161.1405526455.3403.help-gnu-emacs@gnu.org>
2014-07-16 21:12 ` updating buffer window while accepting minibuffer input Buchs, Kevin J.
2014-07-16 21:50   ` Drew Adams [this message]
2014-07-17  0:52   ` Michael Heerdegen
2014-07-17  1:43     ` Drew Adams
2014-07-17  2:43       ` Michael Heerdegen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=256addbf-85f2-456a-b680-d77e06ad8116@default \
    --to=drew.adams@oracle.com \
    --cc=buchs.kevin@mayo.edu \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).