Subject: bug#1806: dired-pop-to-buffer in wrong place

From: Juri Linkov <[email-masked]>
Date: Wed, 07 Oct 2009 01:38:35 +0300

>> What's more, I have things configured so that calling Calendar also
>> pops up the fancy diary display, and starting with a single
>> (screen-) wide window, the result is similar to the above, namely:
>>
>>      +-------------------------+        +------------+------------+
>>      |                         |        |            |            |
>>      |                         |        |            |            |
>>      |                         |        |            |            |
>>      |                         |        |            |            |
>>      |                         |        |            |            |
>>      |                         |        |            |            |
>>      |                         |  ===>  |            |            |
>>      |                         |        |            |            |
>>      |                         |        |            | *Messages* |
>>      |                         |        |            +------------+
>>      |                         |        |            |            |
>>      | *scratch*               |        |    Diary   | *Calendar* |
>>      +-------------------------+        +------------+------------+
>
> As I wrote:
>
>    The only remaining calendar issue I can see is that one might
>    prefer the diary to always appear directly above (or below) the
>    calendar, rather than to one side. This could be achieved by the
>    use of windmove. I might install something along those lines, or I
>    might not bother.

I think the most expected way would be to display the calendar window
below the current buffer, and to display the diary above the calendar
(effectively what `d' does when invoked from the calendar) that replaces
the original buffer (*scratch* in this case) with the diary buffer:

    +-------------------------+        +-------------------------+
    |                         |        |                         |
    |                         |        |                         |
    |                         |        |                         |
    |                         |        |                         |
    |                         |        |                         |
    |                         |        |                         |
    |                         |  ===>  |                         |
    |                         |        |                         |
    |                         |        | *Diary*                 |
    |                         |        +-------------------------+
    |                         |        |                         |
    | *scratch*               |        | *Calendar*              |
    +-------------------------+        +-------------------------+

-- 
Juri Linkov
http://www.jurta.org/emacs/