all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to make moccur results to be inside the bottom window?
@ 2008-02-11 15:01 bdimych
  0 siblings, 0 replies; 4+ messages in thread
From: bdimych @ 2008-02-11 15:01 UTC (permalink / raw)
  To: Help-gnu-emacs


After moccur, window is splitted vertically and results appear inside the top
window, but I would like to see them inside the bottom window like it is
made in many other editors

I looked into the color-moccur.el - there are many
switch-to-buffer-other-window calls, Is it possible to configure this
function or "defadvice" it so that it would open other-window at the top?

Please help
-- 
View this message in context: http://www.nabble.com/How-to-make-moccur-results-to-be-inside-the-bottom-window--tp15412779p15412779.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





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

* Re: How to make moccur results to be inside the bottom window?
@ 2008-02-12 19:56 martin rudalics
  0 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2008-02-12 19:56 UTC (permalink / raw)
  To: bdimych; +Cc: help-gnu-emacs

 > After moccur, window is splitted vertically and results appear inside the top
 > window, but I would like to see them inside the bottom window like it is
 > made in many other editors
 >
 > I looked into the color-moccur.el - there are many
 > switch-to-buffer-other-window calls, Is it possible to configure this
 > function or "defadvice" it so that it would open other-window at the top?

I'm not quite sure whether I understand what you mean.  In the first
paragraph it seems you want the occurrences listed in the bottom window.
That's what `switch-to-buffer-other-window' should do: If it doesn't
find a suitable window it may split the largest or least recently used
one.  The original window should become the upper one and the results of
`moccur' should go to the lower one.  Please verify whether this fails
to happen on your system, for example, by invoking C-x 4 b from the
original window and typing in the name of the "moccur" buffer.

In the second paragraph it seems that you want to see the results in an
"other-window at the top".  Please clarify this.





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

* Re: How to make moccur results to be inside the bottom window?
@ 2008-02-18  9:32 Dmitry Bolshakov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Bolshakov @ 2008-02-18  9:32 UTC (permalink / raw)
  To: martin rudalics; +Cc: help-gnu-emacs

> 

> > After moccur, window is splitted vertically and results appear inside the top

>  > window, but I would like to see them inside the bottom window like it is

>  > made in many other editors

>  >

>  > I looked into the color-moccur.el - there are many

>  > switch-to-buffer-other-window calls, Is it possible to configure this

>  > function or "defadvice" it so that it would open other-window at the top?

> 

> I'm not quite sure whether I understand what you mean.  In the first

> paragraph it seems you want the occurrences listed in the bottom window.

> That's what `switch-to-buffer-other-window' should do: If it doesn't

> find a suitable window it may split the largest or least recently used

> one.  The original window should become the upper one and the results of

> `moccur' should go to the lower one.  Please verify whether this fails

> to happen on your system, for example, by invoking C-x 4 b from the

> original window and typing in the name of the "moccur" buffer.

> 

> In the second paragraph it seems that you want to see the results in an

> "other-window at the top".  Please clarify this.



It seems that you did not try color-moccur library. As I think, moccur acts approximately so:

searches buffers -> displays results in the _current_ window -> binds up/down keys to the "go to prev/next occurence" -> in the "go to", calls (switch-to-buffer-other-window found-buffer) + (goto-line found-line)



so _found buffers_ are displayed inside the bottom window but I want them inside the top



PS thanks for C-x 4 b, I did not know this key



--

with best regards

Dmitry Bolshakov







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

* Re: How to make moccur results to be inside the bottom window?
       [not found] <575411203326946@webmail23.yandex.ru>
@ 2008-02-18 10:31 ` martin rudalics
  0 siblings, 0 replies; 4+ messages in thread
From: martin rudalics @ 2008-02-18 10:31 UTC (permalink / raw)
  To: Dmitry Bolshakov; +Cc: help-gnu-emacs

 > It seems that you did not try color-moccur library. As I think, moccur
 > acts approximately so: searches buffers -> displays results in the
 > _current_ window -> binds up/down keys to the "go to prev/next
 > occurence" -> in the "go to", calls (switch-to-buffer-other-window
 > found-buffer) + (goto-line found-line) so _found buffers_ are
 > displayed inside the bottom window but I want them inside the top

I didn't try it because it doesn't compile correctly here.  But I
suppose your analysis is correct.  The problem seems with the
`pop-to-buffer' calls (I found three of them) since they open a window
below the window showing the list of matches.  You can try to replace
two of these calls - namely those appearing as

           (pop-to-buffer moccur-mocur-buffer)

with

	  (let ((window (selected-window)))
	    (select-window (split-window))
	    (set-window-buffer window moccur-mocur-buffer))

Note: The `select-window' is here to select the window listing the
matches - I suppose that's how moccur operates.  Without warranty!





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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12 19:56 How to make moccur results to be inside the bottom window? martin rudalics
     [not found] <575411203326946@webmail23.yandex.ru>
2008-02-18 10:31 ` martin rudalics
  -- strict thread matches above, loose matches on Subject: below --
2008-02-18  9:32 Dmitry Bolshakov
2008-02-11 15:01 bdimych

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.