unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-18  4:51 @#$! new behavior of C-b & C-f in i-search Miles Bader
@ 2004-05-18  0:15 ` Karl Fogel
  2004-05-18  6:05 ` Juri Linkov
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Karl Fogel @ 2004-05-18  0:15 UTC (permalink / raw)
  Cc: emacs-devel

Oh well.  I was kind of liking the new behavior.  But it sounds like
we have different usage patterns.

I don't know whether it's best to leave the change in the code or not.
I did want to chime in to say that it's not been a negative experience
for everyone, though.

-Karl

Miles Bader <miles@lsi.nec.co.jp> writes:
> I originally liked the idea of `C-b' & `C-f' in i-search doing special
> stuff, but ever since this was installed, it's been driving me batty --
> I apparently use those keystrokes to exit i-search _way_ more than I
> thought.
> 
> The behavior is especially insidious because following scenario happens
> really often:
> 
> I'll do an i-search, try to exit it by hitting C-b a few times expecting
> the cursor to move, and when it _doesn't_ move, I'll realize `Oh, it's
> the new behavior' and try to exit i-search by hitting RET -- but that
> doesn't work, because hitting C-b has emptied the search string (without
> moving the search location), so RET drops me into the non-incremental
> Search: prompt, and when I then hit C-g to try to _really_ exit, it
> aborts the search, and warps me back to where I began!
> 
> At that point I can't even just redo the search by hitting `C-s C-s',
> because the aborted i-search didn't save it.
> 
> Grrrrrrrr....
> 
> -Miles
> -- 
> `...the Soviet Union was sliding in to an economic collapse so comprehensive
>  that in the end its factories produced not goods but bads: finished products
>  less valuable than the raw materials they were made from.'  [The Economist]
> 
> 
> _______________________________________________
> Emacs-devel mailing list
> Emacs-devel@gnu.org
> http://mail.gnu.org/mailman/listinfo/emacs-devel

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

* @#$! new behavior of C-b & C-f in i-search
@ 2004-05-18  4:51 Miles Bader
  2004-05-18  0:15 ` Karl Fogel
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Miles Bader @ 2004-05-18  4:51 UTC (permalink / raw)


I originally liked the idea of `C-b' & `C-f' in i-search doing special
stuff, but ever since this was installed, it's been driving me batty --
I apparently use those keystrokes to exit i-search _way_ more than I
thought.

The behavior is especially insidious because following scenario happens
really often:

I'll do an i-search, try to exit it by hitting C-b a few times expecting
the cursor to move, and when it _doesn't_ move, I'll realize `Oh, it's
the new behavior' and try to exit i-search by hitting RET -- but that
doesn't work, because hitting C-b has emptied the search string (without
moving the search location), so RET drops me into the non-incremental
Search: prompt, and when I then hit C-g to try to _really_ exit, it
aborts the search, and warps me back to where I began!

At that point I can't even just redo the search by hitting `C-s C-s',
because the aborted i-search didn't save it.

Grrrrrrrr....

-Miles
-- 
`...the Soviet Union was sliding in to an economic collapse so comprehensive
 that in the end its factories produced not goods but bads: finished products
 less valuable than the raw materials they were made from.'  [The Economist]

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-18  4:51 @#$! new behavior of C-b & C-f in i-search Miles Bader
  2004-05-18  0:15 ` Karl Fogel
@ 2004-05-18  6:05 ` Juri Linkov
  2004-05-18  7:06 ` Kai Grossjohann
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 27+ messages in thread
From: Juri Linkov @ 2004-05-18  6:05 UTC (permalink / raw)
  Cc: emacs-devel

Miles Bader <miles@lsi.nec.co.jp> writes:
> Grrrrrrrr....

I noticed this problem too.  One solution is to always retain
one character in the search string.  Another solution is to
exit isearch when C-b is typed with the empty isearch string.

But still apparently C-b and C-f can't be made fully transparent
as motion keys, because they change the search string when users
use them as motion keys in isearch mode and don't expect that
they will change the search history.

So other key bindings are needed.  I already proposed some of them:

    (define-key isearch-mode-map "\C-w"    'isearch-yank-word)
    (define-key isearch-mode-map "\C-\M-w" 'isearch-yank-word-or-char)
    (define-key isearch-mode-map "\C-\M-b" 'isearch-del-char)
    (define-key isearch-mode-map "\C-\M-f" 'isearch-yank-char)

    (define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
    (define-key isearch-mode-map "\M-w"    'isearch-yank-word)
    (define-key isearch-mode-map "\C-\M-w" 'isearch-del-char)
    (define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char)

    (define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
    (define-key isearch-mode-map "\M-w"    'isearch-del-char)
    (define-key isearch-mode-map "\C-\M-w" 'isearch-yank-char)
    (define-key isearch-mode-map "\C-\M-y" 'isearch-yank-word)

The last group seems most preferable since these key are less probable
to be used in isearch mode.

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

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-18  4:51 @#$! new behavior of C-b & C-f in i-search Miles Bader
  2004-05-18  0:15 ` Karl Fogel
  2004-05-18  6:05 ` Juri Linkov
@ 2004-05-18  7:06 ` Kai Grossjohann
  2004-05-18  7:16   ` David Kastrup
  2004-05-19  5:22   ` Karl Eichwalder
  2004-05-18 12:27 ` Robert J. Chassell
  2004-05-19  1:26 ` Richard Stallman
  4 siblings, 2 replies; 27+ messages in thread
From: Kai Grossjohann @ 2004-05-18  7:06 UTC (permalink / raw)


Miles Bader <miles@lsi.nec.co.jp> writes:

> I originally liked the idea of `C-b' & `C-f' in i-search doing special
> stuff, but ever since this was installed, it's been driving me batty --
> I apparently use those keystrokes to exit i-search _way_ more than I
> thought.

I have similar feelings.  However, I have decided that I would like
to try it for a while longer before reaching a decision.  Perhaps I
can retrain myself to always exit with RET.

Just another voice,
Kai

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-18  7:06 ` Kai Grossjohann
@ 2004-05-18  7:16   ` David Kastrup
  2004-05-19  5:22   ` Karl Eichwalder
  1 sibling, 0 replies; 27+ messages in thread
From: David Kastrup @ 2004-05-18  7:16 UTC (permalink / raw)
  Cc: emacs-devel

Kai Grossjohann <kgrossjo@eu.uu.net> writes:

> Miles Bader <miles@lsi.nec.co.jp> writes:
> 
> > I originally liked the idea of `C-b' & `C-f' in i-search doing
> > special stuff, but ever since this was installed, it's been
> > driving me batty -- I apparently use those keystrokes to exit
> > i-search _way_ more than I thought.
> 
> I have similar feelings.  However, I have decided that I would like
> to try it for a while longer before reaching a decision.  Perhaps I
> can retrain myself to always exit with RET.

No problems up to now.  I guess it depends on habits.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-18  4:51 @#$! new behavior of C-b & C-f in i-search Miles Bader
                   ` (2 preceding siblings ...)
  2004-05-18  7:06 ` Kai Grossjohann
@ 2004-05-18 12:27 ` Robert J. Chassell
  2004-05-19  1:26 ` Richard Stallman
  4 siblings, 0 replies; 27+ messages in thread
From: Robert J. Chassell @ 2004-05-18 12:27 UTC (permalink / raw)


   I originally liked the idea of `C-b' & `C-f' in i-search doing special
   stuff, but ever since this was installed, it's been driving me batty --
   I apparently use those keystrokes to exit i-search _way_ more than I
   thought.

Same here.  Please change them, perhaps to M-C-b and M-C-f.

The feature itself is exellent.  But I still have trouble with the
keybindings.  I never knew I used `C-b' & `C-f' so often, but I do,
and the habit is very hard to break.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    As I slowly update it,                     bob@rattlesnake.com
        I rewrite a "What's New" segment for   http://www.rattlesnake.com

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-18  4:51 @#$! new behavior of C-b & C-f in i-search Miles Bader
                   ` (3 preceding siblings ...)
  2004-05-18 12:27 ` Robert J. Chassell
@ 2004-05-19  1:26 ` Richard Stallman
  2004-05-19  6:32   ` @#$! new behavior of C-b & C-f in i-searchi Alan Mackenzie
  2004-05-19  8:33   ` @#$! new behavior of C-b & C-f in i-search Juri Linkov
  4 siblings, 2 replies; 27+ messages in thread
From: Richard Stallman @ 2004-05-19  1:26 UTC (permalink / raw)
  Cc: emacs-devel

    I originally liked the idea of `C-b' & `C-f' in i-search doing special
    stuff, but ever since this was installed, it's been driving me batty --
    I apparently use those keystrokes to exit i-search _way_ more than I
    thought.

I am not surprised.

	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
	(define-key isearch-mode-map "\M-w"    'isearch-yank-word)
	(define-key isearch-mode-map "\C-\M-w" 'isearch-del-char)
	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char)

	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
	(define-key isearch-mode-map "\M-w"    'isearch-del-char)
	(define-key isearch-mode-map "\C-\M-w" 'isearch-yank-char)
	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-word)

C-M-w and C-M-y might be good to use, but I suspect
people use M-w to exit a search.  It makes sense there,
to copy the text from where the search started.

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-18  7:06 ` Kai Grossjohann
  2004-05-18  7:16   ` David Kastrup
@ 2004-05-19  5:22   ` Karl Eichwalder
  2004-05-20  6:03     ` Juri Linkov
  1 sibling, 1 reply; 27+ messages in thread
From: Karl Eichwalder @ 2004-05-19  5:22 UTC (permalink / raw)


Kai Grossjohann <kgrossjo@eu.uu.net> writes:

> I have similar feelings.  However, I have decided that I would like
> to try it for a while longer before reaching a decision.  Perhaps I
> can retrain myself to always exit with RET.

Agreed.  The current implementation looks clean and I'm sure I can get
used to it the next weeks.


"Robert J. Chassell" <bob@rattlesnake.com> writes:

> Same here.  Please change them, perhaps to M-C-b and M-C-f.

Being force to press three key to move one step forward or backward is
too expensive.  As long as you can press M-f or M-b to break out of the
search the implementation is okay - To break out I mostly use: RET,
C-SPC, M-f or M-b, or - yes - arrow-left or arrow-right.

> The feature itself is exellent.  But I still have trouble with the
> keybindings.  I never knew I used `C-b' & `C-f' so often, but I do,
> and the habit is very hard to break.

yes, but I think it is more important that having found the first
occurance of the (beginning of) string you can press several C-f in a
row to extent the search string; that less error prone than being force
to enter all the different letters: k-i-n-d-e-r-g-a-r-t-e-n.  Yes, I
know, you can complete the search word using C-w; but often, you are not
interested in the complete word and thus you cannot make use of C-w.

-- 
                                                         |      ,__o
                                                         |    _-\_<,
http://www.gnu.franken.de/ke/                            |   (*)/'(*)

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

* Re: @#$! new behavior of C-b & C-f in i-searchi
  2004-05-19  1:26 ` Richard Stallman
@ 2004-05-19  6:32   ` Alan Mackenzie
  2004-05-19  8:33   ` @#$! new behavior of C-b & C-f in i-search Juri Linkov
  1 sibling, 0 replies; 27+ messages in thread
From: Alan Mackenzie @ 2004-05-19  6:32 UTC (permalink / raw)




On Tue, 18 May 2004, Richard Stallman wrote:

>    I originally liked the idea of `C-b' & `C-f' in i-search doing
>    special stuff, but ever since this was installed, it's been driving
>    me batty -- I apparently use those keystrokes to exit i-search _way_
>    more than I thought.

>I am not surprised.

> #1	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
> #2	(define-key isearch-mode-map "\M-w"    'isearch-yank-word)
> #3	(define-key isearch-mode-map "\C-\M-w" 'isearch-del-char)
> #4	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char)

> #5	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
> #6	(define-key isearch-mode-map "\M-w"    'isearch-del-char)
> #7	(define-key isearch-mode-map "\C-\M-w" 'isearch-yank-char)
> #8	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-word)

>C-M-w and C-M-y might be good to use, but I suspect people use M-w to
>exit a search.  It makes sense there, to copy the text from where the
>search started.

<sticks up hand>.  Yes, I frequently use M-w this way.  I put point at
the beginning of something I want to copy, use C-s, C-w, C-w, ...... to
move over and highlight the something, then M-w to copy in into the kill
ring.  I'd be C-f'ing and C-b'linding myself, if this stopped working.  ;-(

Please be _very_ careful, what bindings get shadowed here.

-- 
Alan Mackenzie (Munich, Germany)

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-19  1:26 ` Richard Stallman
  2004-05-19  6:32   ` @#$! new behavior of C-b & C-f in i-searchi Alan Mackenzie
@ 2004-05-19  8:33   ` Juri Linkov
  2004-05-19  9:06     ` Miles Bader
  1 sibling, 1 reply; 27+ messages in thread
From: Juri Linkov @ 2004-05-19  8:33 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:
> 	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
> 	(define-key isearch-mode-map "\M-w"    'isearch-yank-word)
> 	(define-key isearch-mode-map "\C-\M-w" 'isearch-del-char)
> 	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char)
>
> 	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
> 	(define-key isearch-mode-map "\M-w"    'isearch-del-char)
> 	(define-key isearch-mode-map "\C-\M-w" 'isearch-yank-char)
> 	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-word)
>
> C-M-w and C-M-y might be good to use, but I suspect
> people use M-w to exit a search.  It makes sense there,
> to copy the text from where the search started.

It makes no less sense to use C-w to kill the text from where the
search started, but people already know that C-w has special meaning
in isearch mode.

Anyway, it seems that C-M-w and C-M-y are sufficient, and final
key bindings could be:

	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
	(define-key isearch-mode-map "\C-\M-w" 'isearch-del-char)
	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char)

C-M-w is even more convenient than C-b because `isearch-del-char' and
`isearch-yank-word-or-char' are on the same `w' key, which will
allow more easily to type C-M-w when C-w grabs too much text.

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

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-19  8:33   ` @#$! new behavior of C-b & C-f in i-search Juri Linkov
@ 2004-05-19  9:06     ` Miles Bader
  2004-05-19  9:32       ` Juri Linkov
  0 siblings, 1 reply; 27+ messages in thread
From: Miles Bader @ 2004-05-19  9:06 UTC (permalink / raw)
  Cc: rms, emacs-devel

Juri Linkov <juri@jurta.org> writes:
> 	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
> 	(define-key isearch-mode-map "\C-\M-w" 'isearch-del-char)
> 	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char)
> 
> C-M-w is even more convenient than C-b because `isearch-del-char' and
> `isearch-yank-word-or-char' are on the same `w' key, which will
> allow more easily to type C-M-w when C-w grabs too much text.

Perhaps, but the mnemonics are pretty bizarre -- C-w adds _adds_ a word,
but C-M-w _deletes_ a char?

-Miles
-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-19  9:06     ` Miles Bader
@ 2004-05-19  9:32       ` Juri Linkov
  0 siblings, 0 replies; 27+ messages in thread
From: Juri Linkov @ 2004-05-19  9:32 UTC (permalink / raw)
  Cc: rms, emacs-devel

Miles Bader <miles@lsi.nec.co.jp> writes:
> Juri Linkov <juri@jurta.org> writes:
>> 	(define-key isearch-mode-map "\C-w"    'isearch-yank-word-or-char)
>> 	(define-key isearch-mode-map "\C-\M-w" 'isearch-del-char)
>> 	(define-key isearch-mode-map "\C-\M-y" 'isearch-yank-char)
>> 
>> C-M-w is even more convenient than C-b because `isearch-del-char' and
>> `isearch-yank-word-or-char' are on the same `w' key, which will
>> allow more easily to type C-M-w when C-w grabs too much text.
>
> Perhaps, but the mnemonics are pretty bizarre -- C-w adds _adds_ a word,
> but C-M-w _deletes_ a char?

There is not too much choice for good mnemonics in such extremely limited
decision space.

But C-M-w still makes sense because C-w not only adds a word, but also
a character (`isearch-yank-word-or-char').

And binding C-M-y to `isearch-yank-char' will have the same mnemonics
as C-y for `isearch-yank-line' (where `y' supposedly means `yank').

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

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-19  5:22   ` Karl Eichwalder
@ 2004-05-20  6:03     ` Juri Linkov
  2004-05-20  7:29       ` David Kastrup
  0 siblings, 1 reply; 27+ messages in thread
From: Juri Linkov @ 2004-05-20  6:03 UTC (permalink / raw)
  Cc: emacs-devel

Karl Eichwalder <ke@gnu.franken.de> writes:
> "Robert J. Chassell" <bob@rattlesnake.com> writes:
>> The feature itself is exellent.  But I still have trouble with the
>> keybindings.  I never knew I used `C-b' & `C-f' so often, but I do,
>> and the habit is very hard to break.
>
> yes, but I think it is more important that having found the first
> occurance of the (beginning of) string you can press several C-f in a
> row to extent the search string; that less error prone than being force
> to enter all the different letters: k-i-n-d-e-r-g-a-r-t-e-n.  Yes, I
> know, you can complete the search word using C-w; but often, you are not
> interested in the complete word and thus you cannot make use of C-w.

There is no doubt that functions to modify the search
string character-wise should have dedicated key bindings.
But it became apparent that C-f and C-b are quite intrusive.
Luckily, C-M-w and C-M-y are no less convenient to type,
because they are located on the same keys to which other
yank-related functions are bound: C-w, C-y, M-y.  And they
will cause no harm because C-M-w is a rare command (especially
in isearch mode) and C-M-y is undefined.

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

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20  6:03     ` Juri Linkov
@ 2004-05-20  7:29       ` David Kastrup
  2004-05-20  8:35         ` Kenichi Handa
  2004-05-20 17:34         ` Kevin Rodgers
  0 siblings, 2 replies; 27+ messages in thread
From: David Kastrup @ 2004-05-20  7:29 UTC (permalink / raw)
  Cc: emacs-devel, Karl Eichwalder

Juri Linkov <juri@jurta.org> writes:

> Karl Eichwalder <ke@gnu.franken.de> writes:
> > "Robert J. Chassell" <bob@rattlesnake.com> writes:
> >> The feature itself is exellent.  But I still have trouble with the
> >> keybindings.  I never knew I used `C-b' & `C-f' so often, but I do,
> >> and the habit is very hard to break.
> >
> > yes, but I think it is more important that having found the first
> > occurance of the (beginning of) string you can press several C-f in a
> > row to extent the search string; that less error prone than being force
> > to enter all the different letters: k-i-n-d-e-r-g-a-r-t-e-n.  Yes, I
> > know, you can complete the search word using C-w; but often, you are not
> > interested in the complete word and thus you cannot make use of C-w.
> 
> There is no doubt that functions to modify the search
> string character-wise should have dedicated key bindings.
> But it became apparent that C-f and C-b are quite intrusive.
> Luckily, C-M-w and C-M-y are no less convenient to type,

Disagree.  On many keyboards you have no Meta key, and even on those
that do, you need two hands to reach that combination.

I think that the search string modifying is more important feature
than search exiting via C-f and C-b.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20  7:29       ` David Kastrup
@ 2004-05-20  8:35         ` Kenichi Handa
  2004-05-20 10:48           ` David Kastrup
  2004-05-20 17:34         ` Kevin Rodgers
  1 sibling, 1 reply; 27+ messages in thread
From: Kenichi Handa @ 2004-05-20  8:35 UTC (permalink / raw)
  Cc: juri, ke, emacs-devel

In article <x57jv736b9.fsf@lola.goethe.zz>, David Kastrup <dak@gnu.org> writes:
>>  There is no doubt that functions to modify the search
>>  string character-wise should have dedicated key bindings.
>>  But it became apparent that C-f and C-b are quite intrusive.
>>  Luckily, C-M-w and C-M-y are no less convenient to type,

> Disagree.  On many keyboards you have no Meta key, and even on those
> that do, you need two hands to reach that combination.

We anyway use two hands to type C-b, but I agree C-M-w and
C-M-y are very inconvenient keys.

> I think that the search string modifying is more important feature
> than search exiting via C-f and C-b.

To me, their importance are almost the same, and I prefer
convient keys to keys of meaningful mnemonic.  So, I'm using
adjoining C-i and C-o for isearch-del-char and
isearch-yank-char recently.  This is quite convenient at
least for me (I have been using C-q C-i to isearch for TAB).
What do you think?
	
And, i(n) and o(ut) may give some meaning to these keys.

---
Ken'ichi HANDA
handa@m17n.org

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20  8:35         ` Kenichi Handa
@ 2004-05-20 10:48           ` David Kastrup
  2004-05-20 11:31             ` Kenichi Handa
  0 siblings, 1 reply; 27+ messages in thread
From: David Kastrup @ 2004-05-20 10:48 UTC (permalink / raw)
  Cc: juri, emacs-devel, ke

Kenichi Handa <handa@m17n.org> writes:

> In article <x57jv736b9.fsf@lola.goethe.zz>, David Kastrup <dak@gnu.org> writes:
> >>  There is no doubt that functions to modify the search
> >>  string character-wise should have dedicated key bindings.
> >>  But it became apparent that C-f and C-b are quite intrusive.
> >>  Luckily, C-M-w and C-M-y are no less convenient to type,
> 
> > Disagree.  On many keyboards you have no Meta key, and even on those
> > that do, you need two hands to reach that combination.
> 
> We anyway use two hands to type C-b,

You do?  I usually type C-b with just the left hand, and I guess that
would be the usual way for touch typists.  Or sometimes I do just with
the right, in case I am busy with the left hand eating or something.

> but I agree C-M-w and C-M-y are very inconvenient keys.

> > I think that the search string modifying is more important feature
> > than search exiting via C-f and C-b.
> 
> To me, their importance are almost the same, and I prefer convient
> keys to keys of meaningful mnemonic.  So, I'm using adjoining C-i
> and C-o for isearch-del-char and isearch-yank-char recently.  This
> is quite convenient at least for me (I have been using C-q C-i to
> isearch for TAB).  What do you think?

Well, considering that the right control key on today's keyboards is
rather small if at all existent, those are definitely less convenient
than C-f and C-b.

> And, i(n) and o(ut) may give some meaning to these keys.

But I think it rather common to be searching for TAB characters in
isearch strings, particularly in regexps.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20 10:48           ` David Kastrup
@ 2004-05-20 11:31             ` Kenichi Handa
  0 siblings, 0 replies; 27+ messages in thread
From: Kenichi Handa @ 2004-05-20 11:31 UTC (permalink / raw)
  Cc: juri, emacs-devel, ke

In article <x5u0yb1ii1.fsf@lola.goethe.zz>, David Kastrup <dak@gnu.org> writes:
>>  We anyway use two hands to type C-b,

> You do?  I usually type C-b with just the left hand, and I guess that
> would be the usual way for touch typists.  Or sometimes I do just with
> the right, in case I am busy with the left hand eating or something.

Touch typists don't have to type C-b.  And I think they use
Right Shift to type B (i.e. both hands).

At least with my hand (I think it's average as Japanese, but
perhaps smaller than average Western person), pressing both
Ctrl and b with the left hand is a little bit difficult.

>>  To me, their importance are almost the same, and I prefer convient
>>  keys to keys of meaningful mnemonic.  So, I'm using adjoining C-i
>>  and C-o for isearch-del-char and isearch-yank-char recently.  This
>>  is quite convenient at least for me (I have been using C-q C-i to
>>  isearch for TAB).  What do you think?

> Well, considering that the right control key on today's keyboards is
> rather small if at all existent, those are definitely less convenient
> than C-f and C-b.

I think we don't have to consider that kind of convenience
(i.e. requires two hands or not) to decide a key binding.

>>  And, i(n) and o(ut) may give some meaning to these keys.

> But I think it rather common to be searching for TAB characters in
> isearch strings, particularly in regexps.

For me, not that frequent as using isearch-del-char.  And,
as I wrote, TAB can be easily searched for by typing C-q
C-i.

---
Ken'ichi HANDA
handa@m17n.org

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20  7:29       ` David Kastrup
  2004-05-20  8:35         ` Kenichi Handa
@ 2004-05-20 17:34         ` Kevin Rodgers
  2004-05-20 18:02           ` David Kastrup
  1 sibling, 1 reply; 27+ messages in thread
From: Kevin Rodgers @ 2004-05-20 17:34 UTC (permalink / raw)


David Kastrup wrote:
 > Juri Linkov <juri@jurta.org> writes:
 >>There is no doubt that functions to modify the search
 >>string character-wise should have dedicated key bindings.
 >>But it became apparent that C-f and C-b are quite intrusive.
 >>Luckily, C-M-w and C-M-y are no less convenient to type,
 >
 > Disagree.  On many keyboards you have no Meta key, and even on those
 > that do, you need two hands to reach that combination.
 >
 > I think that the search string modifying is more important feature
 > than search exiting via C-f and C-b.

"Hi, my name is Kevin and I use C-f and C-b to exit isearch."

Since incremental search is a mode, how about C-c C-f and C-c C-b?

-- 
Kevin Rodgers

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20 17:34         ` Kevin Rodgers
@ 2004-05-20 18:02           ` David Kastrup
  2004-05-20 20:08             ` Peter Lee
  0 siblings, 1 reply; 27+ messages in thread
From: David Kastrup @ 2004-05-20 18:02 UTC (permalink / raw)
  Cc: emacs-devel

Kevin Rodgers <ihs_4664@yahoo.com> writes:

> David Kastrup wrote:
>  > Juri Linkov <juri@jurta.org> writes:
>  >>There is no doubt that functions to modify the search
>  >>string character-wise should have dedicated key bindings.
>  >>But it became apparent that C-f and C-b are quite intrusive.
>  >>Luckily, C-M-w and C-M-y are no less convenient to type,
>  >
>  > Disagree.  On many keyboards you have no Meta key, and even on those
>  > that do, you need two hands to reach that combination.
>  >
>  > I think that the search string modifying is more important feature
>  > than search exiting via C-f and C-b.
> 
> "Hi, my name is Kevin and I use C-f and C-b to exit isearch."
> 
> Since incremental search is a mode, how about C-c C-f and C-c C-b?

While multiple keypresses of that still require much more action than
C-f and C-b, I guess I could live with that.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20 18:02           ` David Kastrup
@ 2004-05-20 20:08             ` Peter Lee
  2004-05-24  8:48               ` Juri Linkov
  0 siblings, 1 reply; 27+ messages in thread
From: Peter Lee @ 2004-05-20 20:08 UTC (permalink / raw)


>>>> David Kastrup writes:

    David> While multiple keypresses of that still require much more
    David> action than C-f and C-b, I guess I could live with that.

I wouldn't find this useful if it's more than a single keypress.
Otherwise it becomes more efficient to simply M-e and edit the string.
Personally I could become quite fond of C-f and C-b since I usually
use M-b to exit anyway.  My ½ cents :)

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-20 20:08             ` Peter Lee
@ 2004-05-24  8:48               ` Juri Linkov
  2004-06-07  6:43                 ` Juri Linkov
  0 siblings, 1 reply; 27+ messages in thread
From: Juri Linkov @ 2004-05-24  8:48 UTC (permalink / raw)
  Cc: emacs-devel

Peter Lee <pete_lee@swbell.net> writes:
>>>>> David Kastrup writes:
>     David> While multiple keypresses of that still require much more
>     David> action than C-f and C-b, I guess I could live with that.
>
> I wouldn't find this useful if it's more than a single keypress.
> Otherwise it becomes more efficient to simply M-e and edit the string.

M-e is a good method to delete characters from the search string,
but it can't append characters from the buffer where isearch is active.

But it's possible to use something like below.  When C-f is typed
in the end of the isearch minibuffer (activated by M-e) it could append
characters from the isearch buffer to the search string in the minibuffer.

(define-key minibuffer-local-isearch-map "\C-f"  'isearch-yank-char-in-minibuffer)
(define-key minibuffer-local-isearch-map [right] 'isearch-yank-char-in-minibuffer)

(defun isearch-yank-char-in-minibuffer ()
  "Pull next character from isearch buffer into end of search string in minibuffer."
  (interactive "p")
  (if (eobp)
      (insert
       (save-excursion
         (set-buffer (cadr (buffer-list)))
         (buffer-substring-no-properties
          (point) (progn (forward-char 1) (point)))))
    (forward-char 1)))

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

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-05-24  8:48               ` Juri Linkov
@ 2004-06-07  6:43                 ` Juri Linkov
  2004-06-07 19:17                   ` Richard Stallman
  0 siblings, 1 reply; 27+ messages in thread
From: Juri Linkov @ 2004-06-07  6:43 UTC (permalink / raw)


Juri Linkov <juri@jurta.org> writes:
> When C-f is typed in the end of the isearch minibuffer (activated by
> M-e) it could append characters from the isearch buffer to the
> search string in the minibuffer.

Since no one objected, I propose the following patch.  Generally, this
means that to pull characters into the search string instead of typing

C-s C-f C-f ... C-f C-s

to type one key more:

C-s M-e C-f C-f ... C-f C-s

But there is another small difference: the cursor is moved into the
minibuffer.  So separate keybindings for `isearch-yank-char' and
`isearch-del-char' are still needed.  I propose to bind them to
C-M-w and C-M-y, because these keybindings are absolutely harmless
(unlike other proposals) and have good mnemonics being bound to the
same keys as `isearch-yank-word-or-char' and `isearch-yank-line'.
For keyboards where C-M-w and C-M-y are not easy to type, the
alternative is `isearch-yank-char-in-minibuffer' accessible by M-e.

Index: lisp/isearch.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.228
diff -u -w -b -r1.228 isearch.el
--- lisp/isearch.el	6 Jun 2004 13:57:39 -0000	1.228
+++ lisp/isearch.el	7 Jun 2004 00:59:38 -0000
@@ -294,6 +294,8 @@
     (define-key map " " 'isearch-whitespace-chars)
     (define-key map [?\S-\ ] 'isearch-whitespace-chars)
 
+    (define-key map "\C-\M-w" 'isearch-del-char)
+    (define-key map "\C-\M-y" 'isearch-yank-char)
     (define-key map "\C-w" 'isearch-yank-word-or-char)
     (define-key map "\C-y" 'isearch-yank-line)
 
@@ -343,11 +345,14 @@
     (define-key map "\M-\t" 'isearch-complete-edit)
     (define-key map "\C-s" 'isearch-forward-exit-minibuffer)
     (define-key map "\C-r" 'isearch-reverse-exit-minibuffer)
+    (define-key map "\C-f"  'isearch-yank-char-in-minibuffer)
+    (define-key map [right] 'isearch-yank-char-in-minibuffer)
     map)
   "Keymap for editing isearch strings in the minibuffer.")
 
@@ -1126,10 +1131,21 @@
 	  (goto-char isearch-other-end))
      (buffer-substring-no-properties (point) (funcall jumpform)))))
 
+(defun isearch-yank-char-in-minibuffer (&optional arg)
+  "Pull next character from isearch buffer into end of search string in minibuffer."
+  (interactive "p")
+  (if (eobp)
+      (insert
+       (save-excursion
+         (set-buffer (cadr (buffer-list)))
+         (buffer-substring-no-properties
+          (point) (progn (forward-char arg) (point)))))
+    (forward-char arg)))
+
 (defun isearch-yank-char (&optional arg)
   "Pull next character from buffer into search string."
   (interactive)
   (isearch-yank-internal (lambda () (forward-char 1) (point))))

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

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-06-07  6:43                 ` Juri Linkov
@ 2004-06-07 19:17                   ` Richard Stallman
  2004-06-11  8:17                     ` Juri Linkov
  0 siblings, 1 reply; 27+ messages in thread
From: Richard Stallman @ 2004-06-07 19:17 UTC (permalink / raw)
  Cc: emacs-devel

    > When C-f is typed in the end of the isearch minibuffer (activated by
    > M-e) it could append characters from the isearch buffer to the
    > search string in the minibuffer.

    Since no one objected, I propose the following patch.  Generally, this
    means that to pull characters into the search string instead of typing

This change is ok with me.

Please write the changes in NEWS and the Emacs Manual before
you install the change in the code.

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-06-07 19:17                   ` Richard Stallman
@ 2004-06-11  8:17                     ` Juri Linkov
  2004-06-11  8:35                       ` Kim F. Storm
                                         ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Juri Linkov @ 2004-06-11  8:17 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:
>     > When C-f is typed in the end of the isearch minibuffer (activated by
>     > M-e) it could append characters from the isearch buffer to the
>     > search string in the minibuffer.
>
>     Since no one objected, I propose the following patch.  Generally, this
>     means that to pull characters into the search string instead of typing
>
> This change is ok with me.

I have another idea (I'm sorry, it didn't occur to me earlier).

C-M-w could be used as a key switching between word and character
modes, i.e. after typing C-M-w in isearch mode subsequent
C-w will pull a character and DEL will delete a character.
Another C-M-w will switch back to word mode with C-w and DEL
restoring their current meaning.

However, this might be too complicated to be useful.

So unless someone finds this idea worth considering further,
a simpler solution with C-M-y to pull and C-M-w to delete
a character will be installed.

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

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-06-11  8:17                     ` Juri Linkov
@ 2004-06-11  8:35                       ` Kim F. Storm
  2004-06-11  8:48                       ` Alan Mackenzie
  2004-06-12  1:50                       ` Richard Stallman
  2 siblings, 0 replies; 27+ messages in thread
From: Kim F. Storm @ 2004-06-11  8:35 UTC (permalink / raw)
  Cc: rms, emacs-devel

Juri Linkov <juri@jurta.org> writes:

> C-M-w could be used as a key switching between word and character
> modes, i.e. after typing C-M-w in isearch mode subsequent
> C-w will pull a character and DEL will delete a character.
> Another C-M-w will switch back to word mode with C-w and DEL
> restoring their current meaning.
> 
> However, this might be too complicated to be useful.

I think so.

> 
> So unless someone finds this idea worth considering further,
> a simpler solution with C-M-y to pull and C-M-w to delete
> a character will be installed.

I think that is good enough.  Those of us who want simpler bindings
(that don't interfere with personal habits) can just make them
ourselves.


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-06-11  8:17                     ` Juri Linkov
  2004-06-11  8:35                       ` Kim F. Storm
@ 2004-06-11  8:48                       ` Alan Mackenzie
  2004-06-12  1:50                       ` Richard Stallman
  2 siblings, 0 replies; 27+ messages in thread
From: Alan Mackenzie @ 2004-06-11  8:48 UTC (permalink / raw)




On Fri, 11 Jun 2004, Juri Linkov wrote:

>Richard Stallman <rms@gnu.org> writes:
>>     > When C-f is typed in the end of the isearch minibuffer (activated by
>>     > M-e) it could append characters from the isearch buffer to the
>>     > search string in the minibuffer.

>>     Since no one objected, I propose the following patch.  Generally, this
>>     means that to pull characters into the search string instead of typing

>> This change is ok with me.

>I have another idea (I'm sorry, it didn't occur to me earlier).

>C-M-w could be used as a key switching between word and character modes,
>i.e. after typing C-M-w in isearch mode subsequent C-w will pull a
>character and DEL will delete a character.  Another C-M-w will switch
>back to word mode with C-w and DEL restoring their current meaning.

Please don't!  This would inevitably lead to certain types of users (of
which I am one) continually getting a word instead of a character, or
vice versa, and getting angry about it.

There are programs in which one has manually to switch between modes to
get work done.  Emacs isn't one of them.  "If you want vi, you know where
to find it."

>However, this might be too complicated to be useful.

>So unless someone finds this idea worth considering further, a simpler
>solution with C-M-y to pull and C-M-w to delete a character will be
>installed.

>Juri Linkov

-- 
Alan Mackenzie (Munich, Germany)
acm@muc.de

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

* Re: @#$! new behavior of C-b & C-f in i-search
  2004-06-11  8:17                     ` Juri Linkov
  2004-06-11  8:35                       ` Kim F. Storm
  2004-06-11  8:48                       ` Alan Mackenzie
@ 2004-06-12  1:50                       ` Richard Stallman
  2 siblings, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2004-06-12  1:50 UTC (permalink / raw)
  Cc: emacs-devel

    C-M-w could be used as a key switching between word and character
    modes, i.e. after typing C-M-w in isearch mode subsequent
    C-w will pull a character and DEL will delete a character.
    Another C-M-w will switch back to word mode with C-w and DEL
    restoring their current meaning.

This might be too complex to be useful.  But people could try it out
and report if they use it.

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

end of thread, other threads:[~2004-06-12  1:50 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-18  4:51 @#$! new behavior of C-b & C-f in i-search Miles Bader
2004-05-18  0:15 ` Karl Fogel
2004-05-18  6:05 ` Juri Linkov
2004-05-18  7:06 ` Kai Grossjohann
2004-05-18  7:16   ` David Kastrup
2004-05-19  5:22   ` Karl Eichwalder
2004-05-20  6:03     ` Juri Linkov
2004-05-20  7:29       ` David Kastrup
2004-05-20  8:35         ` Kenichi Handa
2004-05-20 10:48           ` David Kastrup
2004-05-20 11:31             ` Kenichi Handa
2004-05-20 17:34         ` Kevin Rodgers
2004-05-20 18:02           ` David Kastrup
2004-05-20 20:08             ` Peter Lee
2004-05-24  8:48               ` Juri Linkov
2004-06-07  6:43                 ` Juri Linkov
2004-06-07 19:17                   ` Richard Stallman
2004-06-11  8:17                     ` Juri Linkov
2004-06-11  8:35                       ` Kim F. Storm
2004-06-11  8:48                       ` Alan Mackenzie
2004-06-12  1:50                       ` Richard Stallman
2004-05-18 12:27 ` Robert J. Chassell
2004-05-19  1:26 ` Richard Stallman
2004-05-19  6:32   ` @#$! new behavior of C-b & C-f in i-searchi Alan Mackenzie
2004-05-19  8:33   ` @#$! new behavior of C-b & C-f in i-search Juri Linkov
2004-05-19  9:06     ` Miles Bader
2004-05-19  9:32       ` Juri Linkov

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