Loading ...
Sorry, an error occurred while loading the content.

RE: [jasspa] How to search forward for selection

Expand Messages
  • Phillips, Steven
    All, Isearch is a bit of an oddity and breaks many of the conventions in this area, this is not just ME s isearch but Big emacs too and there are good reasons
    Message 1 of 14 , Dec 10, 2003
    • 0 Attachment
      All,

      Isearch is a bit of an oddity and breaks many of the conventions in this area, this is not just ME's isearch but Big emacs too and there are good reasons for this.

      I will not bore you with all the reasons I can think of, but I will try to highlight the main one. Consider doing an isearch at the top of this email and isearch for 'isX' ME would first find the 'is' on the first line and then jump to the last line which has the first occurrence of "isX". Now consider executing C-a C-k, does this mean you want to go back to the top and search for a new string or start from the current location for a new string, I think probably the latter. Given this now consider executing C-a ' instead, i.e. changing the search string from "isX" to "'isX", given that the cursor is at the first isX which does have a ' preceding it should ME move one character back and match at the current location? Almost certainly so, in which case what does it mean to do C-a . * instead (i.e. change to ".*isX") and how is the history (using the backspace) meant to cope?

      For those who lost the will to live in the middle of that paragraph the summary is that if you start allowing standard message line editing such as C-a the behaviour becomes ambiguous, very complex and everyone will starts losing the will to live (especially me who'd probably end up trying to implement it!).

      So I think the trick is to keep the isearch command simple and predictable and learn how to get around its short comings in the most efficient way possible. So to take the above as an example, if I was searching for isX and I wanted to change this to 'isX I would do the following:

      C-a - go to beginning of the line, this exits the Isearch keeping 'isX' in the search history.

      C-s - execute isearch

      C-up - enter the standard message line editing with "isX" (this works only for the first key), 'esc p' also works. This gives you full access to all the search history and all standard message-line editing.

      C-a - go to beginning of search string

      ' - alter search string

      C-s - search for it.

      A very quick and easy way to overcome this common problem (and works in big emacs as well),

      Steve

      > -----Original Message-----
      > From: Mike Hopkirk [mailto:hops@...]
      > Sent: 09 December 2003 18:16
      > To: jasspa@yahoogroups.com
      > Subject: Re: [jasspa] How to search forward for selection
      >
      >
      > Jon Green wrote:
      > >
      > > Thomas Hundt wrote:
      > > > > On all but isearch C-w can be currently used to clear
      > the message line
      > > > > so it is not easy for us to simply change this as it
      > may hinder more
      > > > > people than it helps.
      > > >
      > > > I like the ^W feature in isearch (now that I know it's
      > there!) but agree
      > > > that there ought to be a way to clear the search text (^A
      > ^K doesn't
      > > > work) since I do this all the time (by cancelling the search and
      > > > starting over) when I mistype something at the beginning
      > of the search text.
      > > >
      > > > -Th
      > > >
      > >
      > > I must admit I did not know that ^W existed.
      >
      > Ditto - ^W to me on cmdline is delete a word
      > > I also think
      > > that ^A (possibly ^P) that returned to an editable
      > > search-forward type command line which is resumed to
      > > isearch-forward by ^S would actually be quite nice.
      >
      > big emacs/Xemacs does something like this - I found it more confusing
      > than helpful
      > in being able to determine what searching mode you were in and what
      > keystrokes toggled you back and fwd and did searches and ...
      >
      > -- hops
      >
      > ------------------------ Yahoo! Groups Sponsor
      > ---------------------~-->
      > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
      > Printer at MyInks.com. Free s/h on orders $50 or more to the
      > US & Canada.
      > http://www.c1tracking.com/l.asp?cid=5511
      > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/89EolB/TM
      > --------------------------------------------------------------
      > -------~->
      >
      > ______________________________________________________________
      > ____________
      >
      > This is an unmoderated list. JASSPA is not responsible for
      > the content of
      > any material posted to this list.
      >
      > To unsubscribe, send a mail message to
      >
      > mailto:jasspa-unsubscribe@yahoogroups.com
      >
      > or visit http://groups.yahoo.com/group/jasspa and
      > modify your account settings manually.
      >
      >
      >
      >
      > Your use of Yahoo! Groups is subject to
      http://docs.yahoo.com/info/terms/
    • Phillips, Steven
      One thing I neglected to mention that I guess I should is that if you do C-s return (i.e. execute isearch and then press Enter) isearch drops into the
      Message 2 of 14 , Dec 10, 2003
      • 0 Attachment
        One thing I neglected to mention that I guess I should is that if you do 'C-s return' (i.e. execute isearch and then press Enter) isearch drops into the standard message line editing mode in which it remains until you type one of the following:

        C-g - abort
        C-s - isearch forward for the current message line content
        C-r - isearch backward for current ml content
        return - perform a search-forward for current ml content, i.e. isearch becomes search-forward

        So at the cost of an extra return isearch can become the standard search-forward (I bet no one knew that either - does anyone rtfm??). So what ever you can do in search-forward you can easily do with isearch-forward!

        So who's still using search-forward??

        Steve

        > -----Original Message-----
        > From: Phillips, Steven
        > Sent: 10 December 2003 13:27
        > To: jasspa@yahoogroups.com
        > Subject: RE: [jasspa] How to search forward for selection
        >
        >
        > All,
        >
        > Isearch is a bit of an oddity and breaks many of the
        > conventions in this area, this is not just ME's isearch but
        > Big emacs too and there are good reasons for this.
        >
        > I will not bore you with all the reasons I can think of, but
        > I will try to highlight the main one. Consider doing an
        > isearch at the top of this email and isearch for 'isX' ME
        > would first find the 'is' on the first line and then jump to
        > the last line which has the first occurrence of "isX". Now
        > consider executing C-a C-k, does this mean you want to go
        > back to the top and search for a new string or start from the
        > current location for a new string, I think probably the
        > latter. Given this now consider executing C-a ' instead, i.e.
        > changing the search string from "isX" to "'isX", given that
        > the cursor is at the first isX which does have a ' preceding
        > it should ME move one character back and match at the current
        > location? Almost certainly so, in which case what does it
        > mean to do C-a . * instead (i.e. change to ".*isX") and how
        > is the history (using the backspace) meant to cope?
        >
        > For those who lost the will to live in the middle of that
        > paragraph the summary is that if you start allowing standard
        > message line editing such as C-a the behaviour becomes
        > ambiguous, very complex and everyone will starts losing the
        > will to live (especially me who'd probably end up trying to
        > implement it!).
        >
        > So I think the trick is to keep the isearch command simple
        > and predictable and learn how to get around its short comings
        > in the most efficient way possible. So to take the above as
        > an example, if I was searching for isX and I wanted to change
        > this to 'isX I would do the following:
        >
        > C-a - go to beginning of the line, this exits the
        > Isearch keeping 'isX' in the search history.
        >
        > C-s - execute isearch
        >
        > C-up - enter the standard message line editing with
        > "isX" (this works only for the first key), 'esc p' also
        > works. This gives you full access to all the search history
        > and all standard message-line editing.
        >
        > C-a - go to beginning of search string
        >
        > ' - alter search string
        >
        > C-s - search for it.
        >
        > A very quick and easy way to overcome this common problem
        > (and works in big emacs as well),
        >
        > Steve
        >
        > > -----Original Message-----
        > > From: Mike Hopkirk [mailto:hops@...]
        > > Sent: 09 December 2003 18:16
        > > To: jasspa@yahoogroups.com
        > > Subject: Re: [jasspa] How to search forward for selection
        > >
        > >
        > > Jon Green wrote:
        > > >
        > > > Thomas Hundt wrote:
        > > > > > On all but isearch C-w can be currently used to clear
        > > the message line
        > > > > > so it is not easy for us to simply change this as it
        > > may hinder more
        > > > > > people than it helps.
        > > > >
        > > > > I like the ^W feature in isearch (now that I know it's
        > > there!) but agree
        > > > > that there ought to be a way to clear the search text (^A
        > > ^K doesn't
        > > > > work) since I do this all the time (by cancelling the search and
        > > > > starting over) when I mistype something at the beginning
        > > of the search text.
        > > > >
        > > > > -Th
        > > > >
        > > >
        > > > I must admit I did not know that ^W existed.
        > >
        > > Ditto - ^W to me on cmdline is delete a word
        > > > I also think
        > > > that ^A (possibly ^P) that returned to an editable
        > > > search-forward type command line which is resumed to
        > > > isearch-forward by ^S would actually be quite nice.
        > >
        > > big emacs/Xemacs does something like this - I found it more
        > confusing
        > > than helpful
        > > in being able to determine what searching mode you were in and what
        > > keystrokes toggled you back and fwd and did searches and ...
        > >
        > > -- hops
        > >
        > > ------------------------ Yahoo! Groups Sponsor
        > > ---------------------~-->
        > > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon
        > or Lexmark
        > > Printer at MyInks.com. Free s/h on orders $50 or more to the
        > > US & Canada.
        > > http://www.c1tracking.com/l.asp?cid=5511
        > > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/89EolB/TM
        > > --------------------------------------------------------------
        > > -------~->
        > >
        > > ______________________________________________________________
        > > ____________
        > >
        > > This is an unmoderated list. JASSPA is not responsible for
        > > the content of
        > > any material posted to this list.
        > >
        > > To unsubscribe, send a mail message to
        > >
        > > mailto:jasspa-unsubscribe@yahoogroups.com
        > >
        > > or visit http://groups.yahoo.com/group/jasspa and
        > > modify your account settings manually.
        > >
        > >
        > >
        > >
        > > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        > ---------------------~-->
        > Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
        > Printer at MyInks.com. Free s/h on orders $50 or more to the
        > US & Canada.
        > http://www.c1tracking.com/l.asp?cid=5511
        > http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/89EolB/TM
        > --------------------------------------------------------------
        > -------~->
        >
        > ______________________________________________________________
        > ____________
        >
        > This is an unmoderated list. JASSPA is not responsible for
        > the content of
        > any material posted to this list.
        >
        > To unsubscribe, send a mail message to
        >
        > mailto:jasspa-unsubscribe@yahoogroups.com
        >
        > or visit http://groups.yahoo.com/group/jasspa and
        > modify your account settings manually.
        >
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        http://docs.yahoo.com/info/terms/
      • Thomas Hundt
        ... Cool :-) ... Not if we think we know how it works already :-D Also RTFM is an area where ME could use some improvement. It s pretty painful at the moment.
        Message 3 of 14 , Dec 10, 2003
        • 0 Attachment
          Steve wrote:
          > So at the cost of an extra return isearch can become the standard
          > search-forward

          Cool :-)

          > (I bet no one knew that either - does anyone rtfm??).

          Not if we think we know how it works already :-D

          Also RTFM is an area where ME could use some improvement. It's pretty
          painful at the moment. Specifically, the box that pops up when you do
          General Help from the menu is cumbersome. One can't isearch, for
          example ;-) And using the mouse wheel to scroll moves the darned thing
          instead of scrolling. And there's no scroll bar. And scrolling wraps
          from the end back to the beginning. And the cursor bar seems to fight
          between mouse and keyboard control (when you do PgUp and PgDn, for
          example). And the search order is case-sensitive. And the window is
          too small. And doesn't go away when you select something.

          Sorry for all the gripes. I'm sure nobody wants to work on the
          documentation!! ;-)


          --
          Thomas Hundt
        • Mike Hopkirk
          The proposal made for handling keys in isearch sounds fine = Its a thorny problem given the dynamic behaviour and uncertainty about intent that editing the
          Message 4 of 14 , Dec 10, 2003
          • 0 Attachment
            The proposal made for handling keys in isearch sounds fine = Its a
            thorny problem
            given the dynamic behaviour and uncertainty about intent that editing
            the search string
            causes ..
            FWIW I'd say editing the isearch string shpuld restart the search from
            the start point rather than any current hit but thats just me...

            "Phillips, Steven" wrote:
            >
            > One thing I neglected to mention that I guess I should is that if you do 'C-s return' (i.e. execute isearch and then press Enter) isearch drops into the standard message line editing mode in which it remains until you type one of the following:
            >
            > C-g - abort
            > C-s - isearch forward for the current message line content
            > C-r - isearch backward for current ml content
            > return - perform a search-forward for current ml content, i.e. isearch becomes search-forward
            >
            > So at the cost of an extra return isearch can become the standard search-forward

            Sure - thats sometime useful when isearch isnt doing what you want, its
            not
            ideal if what you want is to just do a search...

            >(I bet no one knew that either - does anyone rtfm??). So what ever you can do in search-forward you can easily do with isearch-forward!

            The cost - an extra cognitive dissonance keystroke to get into the right
            mode is
            still non-optimal
            It'd be as convenient if there was a keystroke in search that boosted
            the
            search to an isearch as well...
            making both searches just search modes..

            > So who's still using search-forward??

            me - extra keystrokes to get where I want isnt goanna cut it....
            -- hops
          • Phillips, Steven
            ... So how come it has taken you several years before you bring these problems to our attention? There I was merrily thinking that the world was rosy and all
            Message 5 of 14 , Dec 11, 2003
            • 0 Attachment
              > Also RTFM is an area where ME could use some improvement. It's pretty
              > painful at the moment. Specifically, the box that pops up when you do
              > General Help from the menu is cumbersome. One can't isearch, for
              > example ;-) And using the mouse wheel to scroll moves the darned thing
              > instead of scrolling. And there's no scroll bar. And scrolling wraps
              > from the end back to the beginning. And the cursor bar seems to fight
              > between mouse and keyboard control (when you do PgUp and PgDn, for
              > example). And the search order is case-sensitive. And the window is
              > too small. And doesn't go away when you select something.
              >
              > Sorry for all the gripes. I'm sure nobody wants to work on the
              > documentation!! ;-)

              So how come it has taken you several years before you bring these problems to our attention? There I was merrily thinking that the world was rosy and all the time the docs interface was pants!

              Seriously though, please send us you gripes when you find them otherwise they may never be fixed. Just because we implemented a feature does not mean that we use it ourselves and therefore aware of its short comings.

              Steve
            Your message has been successfully submitted and would be delivered to recipients shortly.