From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: Displaying the state of isearch toggles [was Re: ASCII-folded search] Date: Mon, 29 Jun 2015 15:26:53 -0700 (PDT) Message-ID: References: > <831tgv7vbr.fsf@gnu.org>> <87h9pq18ae.fsf@mail.linkov.net> 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 1435616844 23856 80.91.229.3 (29 Jun 2015 22:27:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2015 22:27:24 +0000 (UTC) Cc: bruce.connor.am@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, kaushal.modi@gmail.com, Eli Zaretskii , stephen@xemacs.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 30 00:27:11 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Z9hW8-0000BZ-QZ for ged-emacs-devel@m.gmane.org; Tue, 30 Jun 2015 00:27:08 +0200 Original-Received: from localhost ([::1]:44257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9hW8-0007Vt-3N for ged-emacs-devel@m.gmane.org; Mon, 29 Jun 2015 18:27:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9hW3-0007Vn-T1 for emacs-devel@gnu.org; Mon, 29 Jun 2015 18:27:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9hW2-0007Wd-OJ for emacs-devel@gnu.org; Mon, 29 Jun 2015 18:27:03 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:18873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9hVy-0007WL-RA; Mon, 29 Jun 2015 18:26:58 -0400 Original-Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t5TMQtat015057 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Jun 2015 22:26:55 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t5TMQsT5026764 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 29 Jun 2015 22:26:54 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t5TMQsZe023977; Mon, 29 Jun 2015 22:26:54 GMT In-Reply-To: <87h9pq18ae.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:187656 Archived-At: > > We want to be able to show such things either (a) on demand or > > (b) directly-&-always. And we want to give users a way to > > toggle each attribute individually (toggle if binary, cycle if > > multi-valued). >=20 > Do we want to go down this path? IMO, no. I made that point when I said that that is the kind of UI that other apps use, and which can allow you to unambiguously search, for example, for `foo' only within a code segment (e.g. inline code) and not within the accompanying text - or vice versa. We should (and we do) provide the same power from the keyboard, with interactive search. (I have nothing against *also* offering a dialog-box interface, but that should not be the main approach or the goal.) What I meant in the text cited is that we can indicate the exact current search state and let users modify it interactively: 1. On demand info (e.g., pop up a help window when you hit a key - either one window with all the info or separate help echoes for different keys). Currently, for example, you can hit `M-c` to see the echo message telling you the (new) state wrt case sensitivity. So `M-c M-c` is a no-op that tells you the current state. That's a rudimentary way to see the case-sensitivity state, but it works, and is quick. With multiple state qualities (and we already have a few), it can be more useful to provide a state-info key that shows you more info on demand. 2. Persistent feedback showing the current state. This is possible for at least some of the more important state qualities. I gave some examples using the mode-line lighter. We can easily show case, regexp, wrapping, and overwrapping now - you can see an example in Isearch+. 3. Toggling of individual state attributes. One suggestion is to use the lighter (minor mode) menu for this. For those who want to use the keyboard and not bother with a menu, we can provide toggle keys - put them all on the same prefix key, for instance. (And of course the menu would show the keys bound to the same actions.) Another suggestion wrt individual toggles was to have a one-char button for each in the mode line. This would not be my choice, I think, but it is another possibility. In sum, I'd suggest that we stick close to the traditional Emacs design: provide keyboard toggle keys, pop up info windows, etc. And I'd suggest using the lighter to (a) indicate some state and (b) provide a menu that gives you more info and lets you change state.