help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rgrep-find a separate frame?


From: Emanuel Berg
Subject: Re: rgrep-find a separate frame?
Date: Fri, 25 Mar 2016 22:35:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> You're right, it should just be 'M-x rgrep' and
> followed by 'C-x `' which then works its way through
> all the iterations that it has found.
>
> But what I'm looking for is the ability to have 'C-x
> 5 2' automatically to open up rgrep's findings in
> another frame.

I don't use frames but windows which I'd recommend...
But unlike the moais of the Pua Mau valley, I'm not
cut in stone. Try this code. The "grep-frame" is what
you should use interactively (well, it is the only
thing you can use interactively). If it works bind it
to whatever shortcut, but note that `C-x 5 2' is
spoken for.

(defvar *grep-frame* nil)

(defun new-frame-show-grep ()
  (let ((new-frame (make-frame-command)))
    (setq *grep-frame* new-frame)
    (with-selected-frame new-frame
      (switch-to-buffer "*grep*") )))

(defun grep-frame ()
  (interactive)
  (if *grep-frame* (select-frame-set-input-focus *grep-frame*)
    (new-frame-show-grep) ))

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 19 Blogomatic articles -                   




reply via email to

[Prev in Thread] Current Thread [Next in Thread]