* isearch and M-x occur questions(several)
@ 2003-04-25 18:23 Javier Oviedo
2003-04-25 18:26 ` Javier Oviedo
2003-04-26 14:16 ` Kai Großjohann
0 siblings, 2 replies; 6+ messages in thread
From: Javier Oviedo @ 2003-04-25 18:23 UTC (permalink / raw)
Hello all:
I'm running emacs 21.2.1 on WindowsXP.
I have just discovered "M-x occur" and like it very much.
1. Is there a way, or an already existing package, to combine isearch and
occur. What I like about occur is the window that lists the line number and
matching expression. Is there a way that isearch could do something similar?
I like the ability to quickly run through all matches in isearch using
isearch-forward, but would also like the option of having that window simply
show me all lines with matches.
2. Can the occur-mode window, which lists all line with matching
expressions, display the line in the particular font-lock-face for the mode
of the file being searched? For example, if my expression happens to exist
in a C function prototype, the occur-more window would show that line with
the appropriate c-mode faces.
3. Can occur highlight the matching expression in the occur-mode window?
I hope that my questions make sense. Thanks in advance.
--
=======
Javier
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: isearch and M-x occur questions(several)
2003-04-25 18:23 isearch and M-x occur questions(several) Javier Oviedo
@ 2003-04-25 18:26 ` Javier Oviedo
2003-04-26 14:16 ` Kai Großjohann
1 sibling, 0 replies; 6+ messages in thread
From: Javier Oviedo @ 2003-04-25 18:26 UTC (permalink / raw)
Please ignore question numbers 2 and 3. Occur-mode already handles these
issues.
--
=======
Javier
"Javier Oviedo" <email_joviedo@yahoo.com> wrote in message
news:b8buaj$ajp$1@tilde.itg.ti.com...
> Hello all:
>
> I'm running emacs 21.2.1 on WindowsXP.
>
> I have just discovered "M-x occur" and like it very much.
>
> 1. Is there a way, or an already existing package, to combine isearch and
> occur. What I like about occur is the window that lists the line number
and
> matching expression. Is there a way that isearch could do something
similar?
> I like the ability to quickly run through all matches in isearch using
> isearch-forward, but would also like the option of having that window
simply
> show me all lines with matches.
>
> 2. Can the occur-mode window, which lists all line with matching
> expressions, display the line in the particular font-lock-face for the
mode
> of the file being searched? For example, if my expression happens to exist
> in a C function prototype, the occur-more window would show that line with
> the appropriate c-mode faces.
>
> 3. Can occur highlight the matching expression in the occur-mode window?
>
> I hope that my questions make sense. Thanks in advance.
>
>
> --
> =======
> Javier
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: isearch and M-x occur questions(several)
2003-04-25 18:23 isearch and M-x occur questions(several) Javier Oviedo
2003-04-25 18:26 ` Javier Oviedo
@ 2003-04-26 14:16 ` Kai Großjohann
2003-04-26 19:00 ` Johan Bockgård
1 sibling, 1 reply; 6+ messages in thread
From: Kai Großjohann @ 2003-04-26 14:16 UTC (permalink / raw)
"Javier Oviedo" <email_joviedo@yahoo.com> writes:
> 1. Is there a way, or an already existing package, to combine isearch and
> occur. What I like about occur is the window that lists the line number and
> matching expression. Is there a way that isearch could do something similar?
> I like the ability to quickly run through all matches in isearch using
> isearch-forward, but would also like the option of having that window simply
> show me all lines with matches.
Maybe M-x occur RET could default to (regexp-quote
THE-LAST-ISEARCH-STRING). But this is unimplemented.
Another useful thing might be to bind a key in isearch-mode-map that
runs occur with the right options.
--
file-error; Data: (Opening input file no such file or directory ~/.signature)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: isearch and M-x occur questions(several)
2003-04-26 14:16 ` Kai Großjohann
@ 2003-04-26 19:00 ` Johan Bockgård
2003-04-26 20:02 ` drf5n
2003-04-28 13:51 ` Javier Oviedo
0 siblings, 2 replies; 6+ messages in thread
From: Johan Bockgård @ 2003-04-26 19:00 UTC (permalink / raw)
kai.grossjohann@gmx.net (Kai Großjohann) writes:
> Another useful thing might be to bind a key in isearch-mode-map that
> runs occur with the right options.
I like that.
(defun isearch-occur ()
"Run `occur' with current isearch string."
(interactive)
(let ((case-fold-search isearch-case-fold-search)
(search-string (if isearch-regexp
isearch-string
(regexp-quote isearch-string))))
(occur search-string)))
(define-key isearch-mode-map [(control o)] 'isearch-occur)
--
Johan Bockgård
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: isearch and M-x occur questions(several)
2003-04-26 19:00 ` Johan Bockgård
@ 2003-04-26 20:02 ` drf5n
2003-04-28 13:51 ` Javier Oviedo
1 sibling, 0 replies; 6+ messages in thread
From: drf5n @ 2003-04-26 20:02 UTC (permalink / raw)
Cc: help-gnu-emacs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: TEXT/PLAIN; charset=X-UNKNOWN, Size: 687 bytes --]
On Sat, 26 Apr 2003, Johan [iso-8859-1] Bockgård wrote:
> kai.grossjohann@gmx.net (Kai Großjohann) writes:
...
> I like that.
>
> (defun isearch-occur ()
> "Run `occur' with current isearch string."
> (interactive)
> (let ((case-fold-search isearch-case-fold-search)
> (search-string (if isearch-regexp
> isearch-string
> (regexp-quote isearch-string))))
> (occur search-string)))
>
> (define-key isearch-mode-map [(control o)] 'isearch-occur)
I like it too. I didn't know of occur. Thanks!
Dave
--
Dave Forrest (434)924-3954w(111B) (804)642-0662h (804)695-2026p
drf5n@virginia.edu http://mug.sys.virginia.edu/~drf5n/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: isearch and M-x occur questions(several)
2003-04-26 19:00 ` Johan Bockgård
2003-04-26 20:02 ` drf5n
@ 2003-04-28 13:51 ` Javier Oviedo
1 sibling, 0 replies; 6+ messages in thread
From: Javier Oviedo @ 2003-04-28 13:51 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
I like that idea quite a bit. I will test it out. Thanks.
--
=======
Javier
"Johan Bockgård" <bojohan+news@dd.chalmers.se> wrote in message
news:yoijbrytf5j7.fsf@helm.dd.chalmers.se...
> kai.grossjohann@gmx.net (Kai Großjohann) writes:
>
> > Another useful thing might be to bind a key in isearch-mode-map that
> > runs occur with the right options.
>
> I like that.
>
> (defun isearch-occur ()
> "Run `occur' with current isearch string."
> (interactive)
> (let ((case-fold-search isearch-case-fold-search)
> (search-string (if isearch-regexp
> isearch-string
> (regexp-quote isearch-string))))
> (occur search-string)))
>
> (define-key isearch-mode-map [(control o)] 'isearch-occur)
>
>
> --
> Johan Bockgård
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-04-28 13:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-25 18:23 isearch and M-x occur questions(several) Javier Oviedo
2003-04-25 18:26 ` Javier Oviedo
2003-04-26 14:16 ` Kai Großjohann
2003-04-26 19:00 ` Johan Bockgård
2003-04-26 20:02 ` drf5n
2003-04-28 13:51 ` Javier Oviedo
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.