all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customise grep-find
@ 2015-02-04 10:14 Sam Halliday
  2015-02-04 12:27 ` Marco Wahl
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Halliday @ 2015-02-04 10:14 UTC (permalink / raw)
  To: help-gnu-emacs

Hi all,

I use grep-find a lot[1] but it irks me that:

1. it opens the results in a new window
2. when selecting a result (e.g. with RET), navigation happens in the other window.

Ideally I'd like the results buffer to appear in the current window, and for selected entries to open in a new window.


Sadly I was unable to find any way to customise this behaviour in the docs[2].

Does anybody have a way to customise either of these two actions?



[1] https://github.com/fommil/unix/blob/master/.emacs#L130
[2] http://www.gnu.org/software/emacs/manual/html_node/emacs/Grep-Searching.html

Best regards, Sam


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

* Re: customise grep-find
  2015-02-04 10:14 customise grep-find Sam Halliday
@ 2015-02-04 12:27 ` Marco Wahl
  2015-02-04 21:58   ` Sam Halliday
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Wahl @ 2015-02-04 12:27 UTC (permalink / raw)
  To: help-gnu-emacs

Sam Halliday <sam.halliday@gmail.com> writes:

Hi,

> I use grep-find a lot[1] but it irks me that:
>
> 1. it opens the results in a new window

Still open for more comments.

> 2. when selecting a result (e.g. with RET), navigation happens in the
> other window.

C-o runs the command compilation-display-error for me.  This could be
what you want.

> Ideally I'd like the results buffer to appear in the current window,
> and for selected entries to open in a new window.
>
>
> Sadly I was unable to find any way to customise this behaviour in the
> docs[2].

Not a direct answer, but have you played already with "You can find the
corresponding lines in the original files using C-x ` ..." (from the
docs)?


                                          Marco
-- 
http://www.wahlzone.de
GPG: 0x49010A040A3AE6F2


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

* Re: customise grep-find
  2015-02-04 12:27 ` Marco Wahl
@ 2015-02-04 21:58   ` Sam Halliday
  2015-02-05  0:37     ` Robert Thorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Halliday @ 2015-02-04 21:58 UTC (permalink / raw)
  To: help-gnu-emacs

On Wednesday, 4 February 2015 12:27:13 UTC, Marco Wahl  wrote:
> Sam Halliday <sam.halliday@gmail.com> writes:
> > I use grep-find a lot[1] but it irks me that:
> >
> > 1. it opens the results in a new window
> Still open for more comments.


> > 2. when selecting a result (e.g. with RET), navigation happens in the
> > other window.
> C-o runs the command compilation-display-error for me.  This could be
> what you want.

I think that is the same behaviour as I'm currently seeing. I want to navigate in the current window, not the other one.

> > Ideally I'd like the results buffer to appear in the current window,
> > and for selected entries to open in a new window.
> >
> >
> > Sadly I was unable to find any way to customise this behaviour in the
> > docs[2].
> 
> Not a direct answer, but have you played already with "You can find the
> corresponding lines in the original files using C-x ` ..." (from the
> docs)?


That, also, does the navigation in the other window.


Best regards,
Sam


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

* Re: customise grep-find
  2015-02-04 21:58   ` Sam Halliday
@ 2015-02-05  0:37     ` Robert Thorpe
  0 siblings, 0 replies; 4+ messages in thread
From: Robert Thorpe @ 2015-02-05  0:37 UTC (permalink / raw)
  To: Sam Halliday; +Cc: help-gnu-emacs

Sam Halliday <sam.halliday@gmail.com> writes:

> I think that is the same behaviour as I'm currently seeing. I want to navigate in the current window, not the other one.

So, you want the *grep* buffer to open with the cursor in it rather than
with the cursor in the buffer you started in?

That's going to be tricky.  Grep & grep-find work by using compile
mode.  This is compile mode's default behaviour, it can't be easily
changed as far as I can tell.  Changing the code in compile.el would
change all buffers that use it.

BR,
Robert Thorpe



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

end of thread, other threads:[~2015-02-05  0:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04 10:14 customise grep-find Sam Halliday
2015-02-04 12:27 ` Marco Wahl
2015-02-04 21:58   ` Sam Halliday
2015-02-05  0:37     ` Robert Thorpe

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.