[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make moccur results to be inside the bottom window?
From: |
martin rudalics |
Subject: |
Re: How to make moccur results to be inside the bottom window? |
Date: |
Mon, 18 Feb 2008 11:31:10 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> 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!