emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple isearch concerns


From: Augusto Stoffel
Subject: Re: Simple isearch concerns
Date: Sun, 02 May 2021 08:09:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hi Juri,

I tested your patch a bit and it seem to work well.  I have a few
comments below.

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?

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.

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.

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.

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.

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

On Fri, 30 Apr 2021 at 19:41, Juri Linkov <juri@linkov.net> wrote:

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]