[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Recentish C-s M-y change
From: |
Drew Adams |
Subject: |
RE: Recentish C-s M-y change |
Date: |
Tue, 5 Jan 2021 08:30:27 -0800 (PST) |
> > > Except that with many control characters defined, it is hard to
> > > remember which ones are defined -- hard to be confident that a given
> > > control character is one that will exit the search for you.
>
> > To this point (only), let me point out that we will
> > have `describe-keymap' (in Emacs 28, I guess), to
> > which you can enter `isearch-mode-map' at the prompt
> > to see all of its key bindings human-readably.
>
> Sure -- there are various ways to find the current state
> of these bindings. But not while thinking about how to
> exit the current search.
Not to belabor this, but in case it helps as food for
thought, to help deal with your concern:
1. We could provide a key in `isearch-mode-map', by
default, that shows that info, and that continues
searching normally when you hit some other key.
2. We could provide behavior similar to that of Icicles
key completion or `which-key.el' but adapted to handle
Isearch. That is, continually show the keys available
currently (either on demand or by option).
3. Provide such on-the-fly key help in some other way.
___
FWIW, although I haven't tried to address that need
directly, with my library isearch+.el you can already
get it currently, albeit in a somewhat roundabout way:
1. `C-x o' in Isearch opens a recursive edit.
2. `C-h M-k isearch-mode-map' shows Isearch keys.
3. `C-M-c' ends recursive edit and continues Isearch
where you left off.
(`C-x o' is a general Isearch command. It lets you
interrupt a search, do whatever, then continue the
search where you left off.)
___
And here's a quick and dirty command (thrown together
in a minute) that if bound to an Isearch key shows the
Isearch bindings in another window without interrupting
Isearch. It makes use of another Isearch+ feature.
(defun isearchp-show-keys (arg)
"..."
(interactive "P")
(save-window-excursion
(let ((isearchp-on-demand-action-function
'isearch-describe-bindings))
(isearchp-act-on-demand arg))
(setq this-command 'isearchp-act-on-demand)))
(define-key isearch-mode-map <SOME KEY>
'isearchp-show-keys)
[`isearchp-act-on-demand' is itself bound in Isearch
to `C-M-RET'. It invokes the value of option
`isearchp-on-demand-action-function', passing it the
current search hit string and its start/end positions.
Repeating it continues the action on subsequent hits.
The default value of the action function replaces the
search hit. This means you can replace (or delete)
chosen search hits on demand.]
___
I'm not proposing any of this. Just showing that we
could provide some on-the-fly key help, to give users
an idea what's possible at any time during Isearch.
(Yes, doing that might involve binding some key in
Isearch or setting some option.)
- Re: Recentish C-s M-y change, (continued)
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/01
- Re: Recentish C-s M-y change, Gregory Heytings, 2021/01/01
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/02
- Re: Recentish C-s M-y change, Gregory Heytings, 2021/01/02
- Re: Recentish C-s M-y change, Alfred M. Szmidt, 2021/01/02
- Re: Recentish C-s M-y change, Gregory Heytings, 2021/01/02
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/03
- RE: Recentish C-s M-y change, Drew Adams, 2021/01/03
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/05
- RE: Recentish C-s M-y change,
Drew Adams <=
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/06
- Re: Recentish C-s M-y change, Gregory Heytings, 2021/01/06
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/08
- Re: Recentish C-s M-y change, Gregory Heytings, 2021/01/04
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/05
- Re: Recentish C-s M-y change, Gregory Heytings, 2021/01/05
- Re: Recentish C-s M-y change, Richard Stallman, 2021/01/07
RE: Recentish C-s M-y change, Drew Adams, 2021/01/01
Re: Recentish C-s M-y change, Lars Ingebrigtsen, 2021/01/01