[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: |
Thu, 03 Mar 2022 17:36:35 +0100 |
The non-quitting scroll commands in isearch are an extremely useful
addition. But I looked at the implementation now and I'm finding it
problematic.
At some point it was decided that instead of just defining
'isearch-scroll-up' and 'isearch-scroll-down commands', some
pre-command-hook trickery would be used. Presumably this is so that an
user option, 'isearch-allow-scroll', could be provided (that's what I
gather from the parent message of this email).
But this has several disadvantages: you can't assign different keys for
the quitting and non-quitting versions of the scroll commands; you can't
put the (nonexistent) isearch-scroll-up/down commands in a repeat map;
you can't activate the feature selectively, e.g. so that scrolling
doesn't quit isearch but beginning/end of buffer does; you can't advice
or redefine isearch-scroll-up/down, because they don't exist; it's
harder for external package to integrate (I had to copy a piece of the
isearch-pre-command-hook into isearch-mb.el).
The obvious and natural way to implement this feature would be to define
isearch-scroll-up/down commands, bind them in the M-s prefix, and let
whoever wants it by default to rebind the keys.
Perhaps it's not too late to fix this. Sorry I didn't bring this up at
the time of the discussion.
- Re: Simple isearch concerns,
Augusto Stoffel <=