|
From: | Drew Adams |
Subject: | RE: Displaying the state of isearch toggles [was Re: ASCII-folded search] |
Date: | Sun, 28 Jun 2015 10:02:02 -0700 (PDT) |
> > Here's a suggestion on how verbose toggles could be done, > > following Kaushal's previous mention of multi-line echo areas. > > It shows the state of all toggles on a line above the prompt. This > > is given the usual `minibuffer-prompt' face and it stays fixed while > > the user is typing/searching, so it's not a distraction. > > An alternative idea is not to show _any_ toggles, and provide a > separate key to display it if the user so wants. 1. I'm glad that we are thinking this over. This, together with practical experience (e.g., using the new char folding feature), is exactly what will help us find a good UI for this. Now is a good time for some blue-sky ideas, and with more experience we will get better ideas and code suggestions. 2. IMO, this is not only about "showing toggles". It is about both (1) indicating the current search state attributes and (2) providing toggles for them. Examples of such attributes: . whether search is regexp or literal (or other, in future?) . which foldings are in effect (each is a separate attribute) . whether search has wrapped or overwrapped . whether search is multi-buffer (and maybe which buffer is next) 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). 3. Another suggestion for this is to have the mode-line lighter do both of the following: a. Indicate a few of the aspects of the state directly. I gave the example of `Isearch' vs `ISEARCH' for case sensitivity. Wrapping and overwrapping can be indicated using an overline and an overline and underline, respectively. (See attachments.) Regexp search might be shown as `Rsearch' (and `RSEARCH') or as `Isearch*' (and `ISEARCH*'). The point is to keep it fairly simple and clear, and not to try to make the lighter do too much - not to use char codes for each state attribute, for example. b. Rather than showing each of the current attributes of the search state explicitly and directly, and enabling them as toggle/cycle buttons, just present them in the lighter menu (together with their key bindings, of course). Currently, the lighter menu for Isearch is just this, which is not very useful (which BTW is capitalized inconsistently): * Turn Off minor mode * Help For minor mode It would be better to put it to good use, including showing all attributes of the current search state and provided toggles for them. I think this would show users at all times the most important aspects of the search state, and it would give them quick access to more info about the state as well as a way to change attributes individually. All of this is easy to implement, I believe. If there is interest I can throw together a patch. But it's better at this stage to discuss more, I think. More and better ideas are surely still to come.
throw-isearch-case-insensitive.png
Description: PNG image
throw-isearch-wrapped.png
Description: PNG image
throw-isearch-overwrapped.png
Description: PNG image
throw-isearch-case-sensitive.png
Description: PNG image
[Prev in Thread] | Current Thread | [Next in Thread] |