unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* tags-loop-continue backwards?
@ 2008-02-15 16:10 Felix E. Klee
  2008-02-16 17:55 ` Drew Adams
  2008-02-17 23:28 ` Alan
  0 siblings, 2 replies; 4+ messages in thread
From: Felix E. Klee @ 2008-02-15 16:10 UTC (permalink / raw)
  To: help-gnu-emacs

Suppose, I started searching through files by hitting "A" (dired-do-
search) in dired mode. I then can continue searching by hitting
"M-," (tags-loop-continue). However, how do I search backwards?

Searching backwards may for example be necessary, when I suddenly
realize that, five files ago, I have missed something. In fact it is a
very important feature for me.


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

* RE: tags-loop-continue backwards?
  2008-02-15 16:10 tags-loop-continue backwards? Felix E. Klee
@ 2008-02-16 17:55 ` Drew Adams
  2008-02-26 16:31   ` Felix E. Klee
  2008-02-17 23:28 ` Alan
  1 sibling, 1 reply; 4+ messages in thread
From: Drew Adams @ 2008-02-16 17:55 UTC (permalink / raw)
  To: 'Felix E. Klee', help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3711 bytes --]

> Suppose, I started searching through files by hitting "A" (dired-do-
> search) in dired mode. I then can continue searching by hitting
> "M-," (tags-loop-continue). However, how do I search backwards?
> 
> Searching backwards may for example be necessary, when I suddenly
> realize that, five files ago, I have missed something. In fact it is a
> very important feature for me.

AFAIK, there is no way to go backward. And you must access all of the search
hits, in sequence - no skipping.

If you use Icicles, however, you can use `M-s' in Dired to search the marked
files (and possibly replace selected search hits). You first type a regexp
to search for. All matches appear as candidates in buffer *Completions* -
each match is accompanied by the name of its file. You can then access any
candidates, in any order, sequentially or not.

When searching, you can also type another pattern (e.g. regexp) in the
minibuffer, to filter the search hits to those that match it. Your current
minibuffer input can filter against the search hit text or the file name or
both. 

You can change your input on the fly to filter differently. At any time, you
can access the matching hits in any order. Access some hits matching one
pattern, change the pattern and access hits matching the new pattern,...,
any number of times.

You can match any number of regexps cumulatively, narrowing the search space
incrementally. This means you can use a collection of simple patterns,
rather than trying to come up with a single complex regexp that DTRT. You
can easily match patterns A and B and C and D, regardless of the order of
their matches in a given search hit.

You can also complement the set of matches at any time (relative to the
superset it filtered), so you can easily chip away large search-hit chunks
that don't interest you and quickly focus in on what you want to visit. For
example, use that to ignore a certain file on the fly, during some of your
searching.

As mentioned, you can also replace matching search text on the fly. You are
not queried about replacement, so you don't need to reply yes or no to each
search hit - just hit a key when you want to replace the current hit you've
navigated to.

The same Icicles search behavior is available for other Emacs contexts:
imenu, grep, shell/comint, and tags searches. So you can, for example, visit
tags other than by using `M-,' (which runs through them all, sequentially,
without backing up).

http://www.emacswiki.org/cgi-bin/wiki/Icicles_-_Dired_Enhancements

Attached: 

1. Screenshot of search-hit candidates: matches against some Icicles source
files that I marked in Dired. The initial search regexp was ".*dired.*". The
current input at the time of the screenshot was "search". The current input
match is highlighted in red. The longest common match is in pink, and the
file names have a light green background. (You can customize the
highlighting, of course.)

2. Screenshot of visited source file for the fourth search-hit candidate.
Pink background means it is the current hit (matches ".dired.*"). Green
background indicates the text that matches your current input ("search").
Cyan background shows other matches for .*dired.*.

Wrt replacement: you can optionally replace the entire current search
context (pink and green) or just the match for your current input (green).
You can toggle that replacement focus at any time while searching.

The green highlighting shows that your current-input ("search") match is
expanded to the longest match ("icicle-search-dired-marked") that is common
to all hits. That expansion is optional; you can toggle it on/off at any
time while searching. If I toggled it off, then only "search" would be
green.


[-- Attachment #2: icicles-search-hit-visit.png --]
[-- Type: image/png, Size: 26191 bytes --]

[-- Attachment #3: icicles-search-candidates.png --]
[-- Type: image/png, Size: 26985 bytes --]

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

* Re: tags-loop-continue backwards?
  2008-02-15 16:10 tags-loop-continue backwards? Felix E. Klee
  2008-02-16 17:55 ` Drew Adams
@ 2008-02-17 23:28 ` Alan
  1 sibling, 0 replies; 4+ messages in thread
From: Alan @ 2008-02-17 23:28 UTC (permalink / raw)
  To: help-gnu-emacs

On Feb 15, 10:10 am, "Felix E. Klee" <felixedgark...@googlemail.com>
wrote:
> Suppose, I started searching through files by hitting "A" (dired-do-
> search) in dired mode. I then can continue searching by hitting
> "M-," (tags-loop-continue). However, how do I search backwards?
>
> Searching backwards may for example be necessary, when I suddenly
> realize that, five files ago, I have missed something. In fact it is a
> very important feature for me.

That would be a nice feature.  However, looking at the code, it uses
're-search-forward' & doesn't provide for going backwards.  Within a
file buffer you can interactively move to the top and "M-," will start
from there again.


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

* RE: tags-loop-continue backwards?
  2008-02-16 17:55 ` Drew Adams
@ 2008-02-26 16:31   ` Felix E. Klee
  0 siblings, 0 replies; 4+ messages in thread
From: Felix E. Klee @ 2008-02-26 16:31 UTC (permalink / raw)
  To: Drew Adams, help-gnu-emacs

Hi Drew

On Sat, 16 Feb 2008 09:55:07 -0800, "Drew Adams"
<drew.adams@oracle.com> said:
> > Suppose, I started searching through files by hitting "A" (dired-do-
> > search) in dired mode. I then can continue searching by hitting "M-
> > ," (tags-loop-continue). However, how do I search backwards?
> >
> > Searching backwards may for example be necessary, when I suddenly
> > realize that, five files ago, I have missed something. In fact it is
> > a very important feature for me.
>
> AFAIK, there is no way to go backward. And you must access all of the
> search hits, in sequence - no skipping.
>
> [Icicles]

Great suggestions - thanks! Sorry for replying so late.

- Felix

-- 
Felix E. Klee
Jabber/Google Talk: feklee@jabber.org, SIP: 9779619@sipgate.de
ICQ: 158124695, Yahoo!: feklee, AIM: felix.klee@inka.de
Gizmo: felixklee, Skype: felix.klee





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

end of thread, other threads:[~2008-02-26 16:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15 16:10 tags-loop-continue backwards? Felix E. Klee
2008-02-16 17:55 ` Drew Adams
2008-02-26 16:31   ` Felix E. Klee
2008-02-17 23:28 ` Alan

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