From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: updating buffer window while accepting minibuffer input Date: Wed, 16 Jul 2014 14:50:18 -0700 (PDT) Message-ID: <256addbf-85f2-456a-b680-d77e06ad8116@default> References: <9025b1$hrbs0b@ironport9.mayo.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1405547463 30711 80.91.229.3 (16 Jul 2014 21:51:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jul 2014 21:51:03 +0000 (UTC) To: "Buchs, Kevin J." , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 16 23:50:56 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X7X6F-0000XX-UJ for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Jul 2014 23:50:56 +0200 Original-Received: from localhost ([::1]:41463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7X6F-0001lK-IK for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Jul 2014 17:50:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7X5r-0001lF-Cp for help-gnu-emacs@gnu.org; Wed, 16 Jul 2014 17:50:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7X5i-0005M8-CU for help-gnu-emacs@gnu.org; Wed, 16 Jul 2014 17:50:31 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:37652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7X5i-0005Lw-66 for help-gnu-emacs@gnu.org; Wed, 16 Jul 2014 17:50:22 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s6GLoKIH032745 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Jul 2014 21:50:20 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6GLoJek006868 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 16 Jul 2014 21:50:19 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s6GLoIdF028961; Wed, 16 Jul 2014 21:50:18 GMT In-Reply-To: <9025b1$hrbs0b@ironport9.mayo.edu> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98696 Archived-At: > 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.=20 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.)