unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Augusto Stoffel <arstoffel@gmail.com>
To: Juri Linkov <juri@linkov.net>
Cc: Philip Kaludercic <philipk@posteo.net>,
	Gregory Heytings <gregory@heytings.org>, Ergus <spacibba@aol.com>,
	Manuel Uberti <manuel.uberti@inventati.org>,
	emacs-devel@gnu.org
Subject: Re: Simple isearch concerns
Date: Mon, 03 May 2021 07:30:04 +0200	[thread overview]
Message-ID: <87h7jk75b7.fsf@gmail.com> (raw)
In-Reply-To: <87y2cwhiti.fsf@mail.linkov.net> (Juri Linkov's message of "Mon,  03 May 2021 01:18:09 +0300")

On Mon,  3 May 2021 at 01:18, Juri Linkov <juri@linkov.net> wrote:

>> 1. Since you probably want to remove the ugly `with-isearch-suspended'
>>    eventually, the local mode will not only be on by default, it will be
>>    the only alternative.  Should then `isearch-buffer-local' be
>>    double-dashed, so it too can be removed?
>
> It could be removed in later releases, indeed.  But OTOH, until
> it's removed, naming a user option with double-dashes is not allowed.
>
>> 2. In edit mode, when I delete a character, the search doesn't backtrack
>>    to the barrier.  It's the same undesirable behavior described in
>>    https://debbugs.gnu.org/cgi/bugreport.cgi?bug=46469.  In isearch-mb,
>>    the post-command-hook contains
>>
>>        (goto-char isearch-barrier)
>>        (setq isearch-adjusted t isearch-success t)
>>
>>    for to fix that.
>
> Thanks, this should be added to the patch.
>
>> 3. The after change hook should call `isearch-update' instead of
>>    `isearch-search-and-update' after `previous-history-element' and few
>>    other commands.  In isearch-mb I use a symbol property to keep track
>>    of this.
>
> Thanks, it seems many solutions could be taken from isearch-mb to
> isearch.el.

Actually, since I thought this thing through already, I would be happy
to provide a patch implementing the minibuffer-controlled isearch.

May I suggest that you merge just the `isearch-buffer-local' change at
this point, and then wait for my patch doing the minibuffer part?

>
>> 4. Every time one types a character in the minibuffer, there is a
>>    visible flicker in the cursor.  In isearch-mb I've let-bound
>>    `inhibit-redisplay' to t in a couple of places and it solved this
>>    problem.  I wonder if there's a better solution.
>
> Maybe a flicker is caused by isearch-message?

That's not it, since isearch-mb overrides `isearch-message' completely,
and still requires inhibiting the redisplay.  It seems to be related to
selecting a different window.

>
>> 5. The command `isearch-forward-exit-minibuffer' should eventually be
>>    removed, and instead `isearch-repeat-forward' should work in both
>>    cases (this will probably be implemented with the help of a new
>>    macro).  The reason for this is that there is at least a dozen other
>>    Isearch commands that make sense in the minibuffer map as well
>>    (toggling modes, quitting and entering query-replace, and so on), and
>>    it would be annoying to write a minibuffer variant for each of them.
>
> This is the part where I don't yet have an idea how to handle
> all isearch commands from the minibuffer without using a macro
> to implement their duplicates to be callable from the minibuffer.

I don't think there's another way.  Do you see this as a big problem?

>
>> 6. Why is there the option to specify an `isearch-new-message' in
>>    `with-isearch-suspended'?  I've never seen any valid value other than
>>    `(mapconcat 'isearch-text-char-description isearch-string "")', which,
>>    by the way, repeats at several places in isearch.el
>
> This is just to handle existing uses of with-isearch-suspended that
> currently set isearch-new-message, i.e. this could be changed later.

Actually, in the patch attached to
https://lists.gnu.org/archive/html/emacs-devel/2021-04/msg01359.html
(which by the way, do you think we can merge it?) I added an
`isearch-set-string' function to encapsulate this.

This function would be useful to implement the minibuffer-controlled
mode, as well as for third-party packages and user tweaks.

>
>>> And here is a patch for updating the search from the minibuffer. This allows
>>> to implement https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00447.html
>>> to control the search from the minibuffer.  But I'm not sure if the same option
>>> isearch-buffer-local should enable this mode:
>>
>> I still don't understand why Isearch has to be so stringent about
>> backward compatibility of key sequences.  But I don't care about the
>> edit mode per se.  I only care about an alternative mode where `C-s'
>> immediately goes to the minibuffer, and exiting the minibuffer ends the
>> search.
>
> In such a new mode isearch-edit-string could be called at the end of
> isearch-mode.

True.  `RET' and `C-g', among a few other things, should behave
differently in the two cases, but that's a detail.



  reply	other threads:[~2021-05-03  5:30 UTC|newest]

Thread overview: 143+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210403001539.x4rb55dvh46rmhb3.ref@Ergus>
2021-04-03  0:15 ` Simple isearch concerns Ergus
2021-04-03  5:56   ` Thierry Volpiatto
2021-04-03  6:33   ` Manuel Uberti
2021-04-03 10:37     ` Daniel Martín
2021-04-06  7:12       ` Zhiwei Chen
2021-04-06 13:04         ` Stefan Monnier
2021-04-06 13:18           ` Gregory Heytings
2021-04-06 14:17             ` Gregory Heytings
2021-04-06 18:56               ` Juri Linkov
2021-04-06 20:10                 ` Gregory Heytings
2021-04-07 10:22                   ` Gregory Heytings
2021-04-07 16:24                     ` Juri Linkov
2021-04-07 17:03                       ` Gregory Heytings
2021-04-08 19:08                         ` Juri Linkov
2021-04-09  6:42                           ` Zhiwei Chen
2021-04-21 17:51         ` Juri Linkov
2021-04-25  8:16           ` Zhiwei Chen
2021-04-03 11:28     ` Philip Kaludercic
2021-04-03 12:26       ` Gregory Heytings
2021-04-03 16:37         ` Philip Kaludercic
2021-04-03 17:31           ` Gregory Heytings
2021-04-03 18:36             ` Philip Kaludercic
2021-04-03 19:36               ` Dmitry Gutov
2021-04-05  2:18                 ` Ergus
2021-04-05  8:39                   ` Juri Linkov
2021-04-03 17:45           ` Ergus
2021-04-22  7:15             ` Augusto Stoffel
2021-04-22 22:24               ` Juri Linkov
2021-04-25  7:15                 ` Augusto Stoffel
2021-04-25 17:24                   ` Juri Linkov
2021-04-25 18:41                     ` [External] : " Drew Adams
2021-04-26  5:39                     ` Augusto Stoffel
2021-04-27 17:41                       ` Juri Linkov
2021-04-29 16:29                         ` Juri Linkov
2021-04-29 17:50                           ` Augusto Stoffel
2021-04-29 23:00                             ` Juri Linkov
2021-04-30  7:07                               ` Augusto Stoffel
2021-04-30 16:41                                 ` Juri Linkov
2021-05-02  6:09                                   ` Augusto Stoffel
2021-05-02 22:18                                     ` Juri Linkov
2021-05-03  5:30                                       ` Augusto Stoffel [this message]
2021-05-03 16:51                                         ` Juri Linkov
2021-05-05 20:52                                           ` Juri Linkov
2021-05-07 17:14                                             ` Juri Linkov
2021-05-08 10:17                                               ` Augusto Stoffel
2021-05-09 19:12                                                 ` Juri Linkov
2021-05-09 19:53                                                   ` [External] : " Drew Adams
2021-05-10 21:11                                                     ` Juri Linkov
2021-05-10 23:06                                                       ` Drew Adams
2021-05-11 18:32                                                         ` Juri Linkov
2021-05-11 20:01                                                           ` Drew Adams
2021-05-11  6:20                                                       ` Yuri Khan
2021-05-11  9:01                                                         ` Augusto Stoffel
2021-05-11 18:37                                                         ` Juri Linkov
2021-05-11 20:56                                           ` Juri Linkov
2021-04-03 12:29       ` Gregory Heytings
2021-04-03 13:02         ` Daniel Martín
2021-04-03 13:25           ` Gregory Heytings
2021-04-03 17:25         ` Ergus
2021-04-03 10:28   ` Daniel Martín
2021-04-04 22:48   ` Juri Linkov
2021-04-04 23:27     ` Stefan Monnier
2021-04-05  1:41       ` Ergus
2021-04-05  2:22         ` [External] : " Drew Adams
2021-04-05  8:34           ` Juri Linkov
2021-04-05 14:58             ` Drew Adams
2021-04-05  2:38         ` Stefan Monnier
2021-04-05  8:30           ` Juri Linkov
2021-04-05  9:52           ` Basil L. Contovounesios
2021-04-05 15:08             ` [External] : " Drew Adams
2021-04-05  2:08     ` Ergus
2021-04-05 20:37   ` Juri Linkov
2021-04-05 21:18     ` [External] : " Drew Adams
2021-04-05 21:35       ` Juri Linkov
2021-04-05 22:37         ` Ergus
2021-04-06 19:11           ` Juri Linkov
2021-04-06 19:30             ` Eli Zaretskii
2021-04-06 20:10               ` Gregory Heytings
2021-04-07 16:30                 ` Juri Linkov
2021-04-07 17:14                   ` Gregory Heytings
2021-04-07 20:12             ` Gregory Heytings
2021-04-05 23:06         ` Drew Adams
2021-04-05 22:16     ` Ergus
2021-04-06 19:17       ` Juri Linkov
2021-04-06  0:30     ` Gregory Heytings
2021-04-06  0:44       ` Gregory Heytings
2021-04-06 18:53         ` Juri Linkov
2021-04-06 20:10           ` Gregory Heytings
2021-04-07 16:36             ` Juri Linkov
2021-04-07 17:21               ` Gregory Heytings
2021-04-07 20:12                 ` Juri Linkov
2021-04-07 21:09                   ` Gregory Heytings
2021-04-08  8:08                     ` Juri Linkov
2021-04-08  8:48                       ` Gregory Heytings
2021-04-08 19:12                         ` Juri Linkov
2021-04-08 19:27                           ` Gregory Heytings
2021-04-08 20:05                             ` Juri Linkov
2021-04-08 20:10                               ` Gregory Heytings
2021-04-08 22:40                               ` Gregory Heytings
2021-04-09  6:22                                 ` Eli Zaretskii
2021-04-09  7:20                                   ` Gregory Heytings
2021-04-09  8:37                                     ` Juri Linkov
2021-04-09 10:50                                       ` Eli Zaretskii
2021-04-09 16:49                                         ` Juri Linkov
2021-04-09 10:46                                     ` Eli Zaretskii
2021-04-09 11:27                                       ` Gregory Heytings
2021-04-09 12:45                                         ` Eli Zaretskii
2021-04-09  6:05                               ` Eli Zaretskii
2021-04-09  8:39                                 ` Juri Linkov
2021-04-09 10:51                                   ` Eli Zaretskii
2021-04-09 11:48                                     ` Gregory Heytings
2021-04-09 12:48                                       ` Eli Zaretskii
2021-04-09 13:26                                         ` Gregory Heytings
2021-04-09 13:49                                           ` Eli Zaretskii
2021-04-09 14:36                                             ` Gregory Heytings
2021-04-09 14:56                                               ` Eli Zaretskii
2021-04-09 15:25                                                 ` Gregory Heytings
2021-04-09 19:01                                                   ` Eli Zaretskii
2021-04-09 19:04                                                     ` [External] : " Drew Adams
2021-04-09 23:18                                                     ` Gregory Heytings
2021-04-10  7:17                                                       ` Eli Zaretskii
2021-04-10 10:36                                                         ` Gregory Heytings
2021-04-10 10:46                                                           ` Eli Zaretskii
2021-04-10 10:57                                                             ` Gregory Heytings
2021-04-10 11:13                                                               ` Eli Zaretskii
2021-04-10 19:02                                                               ` Now branch isearch-vertical Ergus
2021-04-10 20:00                                                                 ` Gregory Heytings
2021-04-10 22:12                                                               ` Simple isearch concerns Juri Linkov
2021-04-10 23:55                                                                 ` Gregory Heytings
2021-04-11  7:07                                                                 ` Eli Zaretskii
2021-04-11  8:49                                                                   ` Gregory Heytings
2021-04-11 10:16                                                                     ` Gregory Heytings
2021-04-11 22:09                                                                       ` Juri Linkov
2021-04-11 22:17                                                                       ` Juri Linkov
2021-04-11 23:06                                                                         ` Gregory Heytings
2021-04-11 22:05                                                                   ` Juri Linkov
2021-04-08  3:32                   ` Ergus
2022-03-03 16:36                   ` Augusto Stoffel
2022-03-03 17:50                     ` Alan Mackenzie
2022-03-03 18:39                       ` Augusto Stoffel
2022-03-03 18:46                         ` Eli Zaretskii
2021-04-07 16:41             ` Howard Melman
2021-04-06  2:21       ` Ergus

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=87h7jk75b7.fsf@gmail.com \
    --to=arstoffel@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=gregory@heytings.org \
    --cc=juri@linkov.net \
    --cc=manuel.uberti@inventati.org \
    --cc=philipk@posteo.net \
    --cc=spacibba@aol.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).