unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: snarf up text when at query-replace from: prompt
       [not found]   ` <87u1gloopx.fsf@jidanni.org>
@ 2003-01-09  7:28     ` Richard Stallman
  2003-01-09 12:32       ` Robert J. Chassell
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2003-01-09  7:28 UTC (permalink / raw)
  Cc: emacs-devel

    well actually lets talk about C-s.  If one hit C-s C-h, wouldn't it be
    neat if it were like when one hit C-h k C-s?  At least give some hints
    in the minibuffer about goodies like:

    Type C-s to search again forward, C-r to search again backward.
    Type C-w to yank word from buffer onto end of search string and search for it.
    Type C-y to yank rest of line onto end of search string and search for it.
    Type M-y to yank last killed text onto end of search string and search for it.
    etc.

Such a feature was implemented, but I turned it off.

    ;; Turned off because I find I expect to get the global definition--rms.
    ;; ;; Instead bind C-h to special help command for isearch-mode.
    ;; (define-key map "\C-h" 'isearch-mode-help)

I think I found it inconvenient because I would type C-h expecting it
to exit the search and do its usual job.  However, if this feature is
significantly good for beginners, maybe we should turn it on again,
and I can turn it of in my .emacs file.

Does anyone else have an opinion?

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

* Re: snarf up text when at query-replace from: prompt
  2003-01-09  7:28     ` snarf up text when at query-replace from: prompt Richard Stallman
@ 2003-01-09 12:32       ` Robert J. Chassell
  2003-01-10  9:53         ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Robert J. Chassell @ 2003-01-09 12:32 UTC (permalink / raw)


       well actually lets talk about C-s.  If one hit C-s C-h, wouldn't it be
       neat if it were like when one hit C-h k C-s?  

No, because that action will confuse beginners.  Acting on the
principle of `least surprise' they will come to expect all commands to
work like that.  Thus, a beginner would expect `s C-h' to provide the
same results as `C-h k s' rather than the current result.

If you made such a change, to what would you rebind `C-h' to so as to
continue to provide the current features?

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                                     bob@gnu.org

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

* Re: snarf up text when at query-replace from: prompt
  2003-01-09 12:32       ` Robert J. Chassell
@ 2003-01-10  9:53         ` Richard Stallman
  2003-01-10 12:02           ` Robert J. Chassell
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Stallman @ 2003-01-10  9:53 UTC (permalink / raw)
  Cc: emacs-devel

    If you made such a change, to what would you rebind `C-h' to so as to
    continue to provide the current features?

The point of the HELP key is that it does various kinds of help.
Whenever HELP has a special local meaning, its normal meaning is
unavailable.

However, while in isearch, if you want to use the global meaning
of HELP, RET HELP would always do it.  The question is what HELP
should do if you don't type RET.

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

* Re: snarf up text when at query-replace from: prompt
  2003-01-10  9:53         ` Richard Stallman
@ 2003-01-10 12:02           ` Robert J. Chassell
  2003-01-10 14:25             ` Kim F. Storm
  0 siblings, 1 reply; 6+ messages in thread
From: Robert J. Chassell @ 2003-01-10 12:02 UTC (permalink / raw)


   However, while in isearch, if you want to use the global meaning
   of HELP, RET HELP would always do it.  

No!  His proposal, which I am against, suggests (by the principle of
`least surprise') converting RET HELP to being equivalent to `C-h k
RET'.  Without a new keybinding, the global meaning of HELP would lack
a keybinding.  We should stick with what we have.

-- 
    Robert J. Chassell                         Rattlesnake Enterprises
    http://www.rattlesnake.com                  GnuPG Key ID: 004B4AC8
    http://www.teak.cc                                     bob@gnu.org

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

* Re: snarf up text when at query-replace from: prompt
  2003-01-10 12:02           ` Robert J. Chassell
@ 2003-01-10 14:25             ` Kim F. Storm
  2003-01-12 11:54               ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Kim F. Storm @ 2003-01-10 14:25 UTC (permalink / raw)
  Cc: emacs-devel

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

>    However, while in isearch, if you want to use the global meaning
>    of HELP, RET HELP would always do it.  
> 
> No!  His proposal, which I am against, suggests (by the principle of
> `least surprise') converting RET HELP to being equivalent to `C-h k
> RET'.  Without a new keybinding, the global meaning of HELP would lack
> a keybinding.  We should stick with what we have.

As I understood Dan's proposal, he would like C-h during isearch to
tell you what options (special bindings) you have in isearch mode
[also known as context-sensitive help].

IMO, context sensitive help is a good thing, and it could be done
quite cleanly like this (examplified by isearch):

User enters isearch mode with C-s and maybe types a few characters.
Minibuffer (or really the echo-area) contains:

  ========================
  I-search: fewchars

User now enters C-h; this enlarges the minibuffer/echo area to
contain:

  ========================
  C-w: copy word, C-t: toggle case, C-r: toggle regexp,
  C-s: next match, C-r: prev match, RET: quit
  I-search: fewchars

Now, if the user hits C-h again, that could work like the normal help
prefix (terminating I-search).  

We can even make the first C-h wait 0.3 seconds to see if the user
enters another C-h and not show the context sensitive help in that
case.

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

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

* Re: snarf up text when at query-replace from: prompt
  2003-01-10 14:25             ` Kim F. Storm
@ 2003-01-12 11:54               ` Richard Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2003-01-12 11:54 UTC (permalink / raw)
  Cc: emacs-devel

    User now enters C-h; this enlarges the minibuffer/echo area to
    contain:

      ========================
      C-w: copy word, C-t: toggle case, C-r: toggle regexp,
      C-s: next match, C-r: prev match, RET: quit
      I-search: fewchars

The old code I commented out displayed the doc string isearch-forward,
in a window.  This could be more convenient.  We could also add

    C-h: normal help commands in search

to show how to get those commands.

Want to implement it?

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

end of thread, other threads:[~2003-01-12 11:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87n0mjmaat.fsf@jidanni.org>
     [not found] ` <E18UYT9-0004yJ-00@fencepost.gnu.org>
     [not found]   ` <87u1gloopx.fsf@jidanni.org>
2003-01-09  7:28     ` snarf up text when at query-replace from: prompt Richard Stallman
2003-01-09 12:32       ` Robert J. Chassell
2003-01-10  9:53         ` Richard Stallman
2003-01-10 12:02           ` Robert J. Chassell
2003-01-10 14:25             ` Kim F. Storm
2003-01-12 11:54               ` 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).