unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* suggestion for C-s (isearch-.*) key-bindings
@ 2007-07-21 14:07 Dieter Wilhelm
  2007-07-21 19:03 ` Juri Linkov
  2007-07-22  1:49 ` Richard Stallman
  0 siblings, 2 replies; 5+ messages in thread
From: Dieter Wilhelm @ 2007-07-21 14:07 UTC (permalink / raw)
  To: emacs-devel; +Cc: Juri Linkov

Hi

I'm very grateful for the supplementary search string features of the
isearch-.* commands.  But I think their key-bindings
have--unfortunately--little to do with regular Emacs bindings.

I'd like to suggest the following re-bindings based on Emacs bindings
for either marking or killing or moving types.

1.)
| Key        | marking | killing | moving | type                  |
|------------+---------+---------+--------+-----------------------|
| C-M-y      | -       | C-d     | C-f    | char                  |
| C-w        | M-@     | M-d     | M-f    | word                  |
| C-y        | -       | C-k     | C-e    | line                  |
|------------+---------+---------+--------+-----------------------|
| suggestion | C-M-@   | C-M-d   | C-M-f  | sexp (sorely missing) |

I also like to plead for the inclusion of a sexp type in the
isearch-.* commands.

2.) M-y -> C-y

By the way, C-M-w is in fact unnecessary since backspace is doing the
job already.

(And above table shows also neatly that a marking command for lines
would keep Emacs in good stead, sorry I couldn't resist 8-).)

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: suggestion for C-s (isearch-.*) key-bindings
  2007-07-21 14:07 suggestion for C-s (isearch-.*) key-bindings Dieter Wilhelm
@ 2007-07-21 19:03 ` Juri Linkov
  2007-07-22  1:35   ` Dieter Wilhelm
  2007-07-22  1:49 ` Richard Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Juri Linkov @ 2007-07-21 19:03 UTC (permalink / raw)
  To: Dieter Wilhelm; +Cc: emacs-devel

> I'm very grateful for the supplementary search string features of the
> isearch-.* commands.  But I think their key-bindings
> have--unfortunately--little to do with regular Emacs bindings.

Yes, unfortunately, there is a full mismatch between cursor motion
commands and isearch yanking commands.

I had an idea of using a key to activate special isearch mode that will
use cursor motion commands to select the text in the buffer and to add
it to the search string.

> I'd like to suggest the following re-bindings based on Emacs bindings
> for either marking or killing or moving types.
>
> 1.)
> | Key        | marking | killing | moving | type                  |
> |------------+---------+---------+--------+-----------------------|
> | C-M-y      | -       | C-d     | C-f    | char                  |
> | C-w        | M-@     | M-d     | M-f    | word                  |
> | C-y        | -       | C-k     | C-e    | line                  |
> |------------+---------+---------+--------+-----------------------|
> | suggestion | C-M-@   | C-M-d   | C-M-f  | sexp (sorely missing) |
>
> I also like to plead for the inclusion of a sexp type in the
> isearch-.* commands.

With a new key these key sequences could be

M-s C-f   - yank char to the search string
M-s M-f   - yank word to the search string
M-s C-e   - yank line to the search string
M-s C-M-f - yank sexp to the search string

> 2.) M-y -> C-y
>
> By the way, C-M-w is in fact unnecessary since backspace is doing the
> job already.

backspace deletes the last isearch input (which can be a yanked word, line
etc.), and not the character from the search string.

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: suggestion for C-s (isearch-.*) key-bindings
  2007-07-21 19:03 ` Juri Linkov
@ 2007-07-22  1:35   ` Dieter Wilhelm
  2007-07-22 21:45     ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Dieter Wilhelm @ 2007-07-22  1:35 UTC (permalink / raw)
  To: Juri Linkov; +Cc: emacs-devel

Juri Linkov <juri@jurta.org> writes:

>> marking or killing or motion types

(I would also choose the motion keys, they seem to be the most
natural.  The marking commands are more costly to type and the killing
commands can be better used: Sometimes I pinpoint a region with C-s
and then wants to kill or save immediately the region without the need
to end isearch with RET.)

> With a new key these key sequences could be
>
> M-s C-f   - yank char to the search string
> M-s M-f   - yank word to the search string
> M-s C-e   - yank line to the search string
> M-s C-M-f - yank sexp to the search string

Why do you prefer a special key combo beforehand the motion commands?
I, personally, am very happy with the current 'isearch mode' which
changes the meaning of some key-bindings.  (Vi's modal philosophy in
Emacs by stealth!).  And it makes sense, they are normally exclusive:
Either I want to move point by motion commands or I want to move by
searching commands, I don't see yet the rub.

>
>> 2.) M-y -> C-y
>>

The M-y -> C-y would be good, wouldn't it?

>> By the way, C-M-w is in fact unnecessary since backspace is doing the
>> job already.
>
> backspace deletes the last isearch input (which can be a yanked word, line
> etc.), and not the character from the search string.

Thanks for pointing out my preconception.

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: suggestion for C-s (isearch-.*) key-bindings
  2007-07-21 14:07 suggestion for C-s (isearch-.*) key-bindings Dieter Wilhelm
  2007-07-21 19:03 ` Juri Linkov
@ 2007-07-22  1:49 ` Richard Stallman
  1 sibling, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2007-07-22  1:49 UTC (permalink / raw)
  To: Dieter Wilhelm; +Cc: juri, emacs-devel

    1.)
    | Key        | marking | killing | moving | type                  |
    |------------+---------+---------+--------+-----------------------|
    | C-M-y      | -       | C-d     | C-f    | char                  |
    | C-w        | M-@     | M-d     | M-f    | word                  |
    | C-y        | -       | C-k     | C-e    | line                  |
    |------------+---------+---------+--------+-----------------------|
    | suggestion | C-M-@   | C-M-d   | C-M-f  | sexp (sorely missing) |

This is terse, so I am not really sure you are proposing.

If you are suggesting that we give special search meanings
to C-d and C-f and M-d and M-f, we certainly won't do that.
Their current meanings, to exit a search, are too useful.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: suggestion for C-s (isearch-.*) key-bindings
  2007-07-22  1:35   ` Dieter Wilhelm
@ 2007-07-22 21:45     ` Juri Linkov
  0 siblings, 0 replies; 5+ messages in thread
From: Juri Linkov @ 2007-07-22 21:45 UTC (permalink / raw)
  To: Dieter Wilhelm; +Cc: emacs-devel

>> M-s C-f   - yank char to the search string
>> M-s M-f   - yank word to the search string
>> M-s C-e   - yank line to the search string
>> M-s C-M-f - yank sexp to the search string
>
> Why do you prefer a special key combo beforehand the motion commands?
> I, personally, am very happy with the current 'isearch mode' which
> changes the meaning of some key-bindings.  (Vi's modal philosophy in
> Emacs by stealth!).  And it makes sense, they are normally exclusive:
> Either I want to move point by motion commands or I want to move by
> searching commands, I don't see yet the rub.

Unfortunately, there are too little keys that are not useful to exit
isearch and be applied to the buffer where the search was exited.
So it is hard to find a suitable key for the search type you proposed -
to yank sexp to the search string.  A special prefix key allows more keys
to extend isearch functionality.

>>> 2.) M-y -> C-y
>
> The M-y -> C-y would be good, wouldn't it?

This is not a backward compatible change :(

-- 
Juri Linkov
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-22 21:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-21 14:07 suggestion for C-s (isearch-.*) key-bindings Dieter Wilhelm
2007-07-21 19:03 ` Juri Linkov
2007-07-22  1:35   ` Dieter Wilhelm
2007-07-22 21:45     ` Juri Linkov
2007-07-22  1:49 ` Richard Stallman

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