Subject: bug#47236: 28.0.50; ebdb-mua-pop-up bad interaction with gnus window configurations

From: Eric Abrahamsen <[email-masked]>
Date: Wed, 02 Jun 2021 11:56:21 -0700

Eric Abrahamsen <[email-masked]> writes:

> Robert Pluim <[email-masked]> writes:
>
>> Hi Eric,
>>
>> This is with ebdb 0.6.22.
>>
>> I set up gnus to have a window configuration that shows the *Group*,
>> *Summary*, *Article* windows simultaneously:
>>
>> (gnus-add-configuration
>>  '(article
>>    (horizontal 1.0
>>                (vertical 50 (group 1.0))
>>                (vertical 1.0
>>                          (summary 0.3 point)
>>                          (article 1.0)))))
>> (gnus-add-configuration
>>  '(summary
>>    (horizontal 1.0
>>                (vertical 50 (group 1.0))
>>                (vertical 1.0 (summary 1.0 point)))))
>>
>> And also to pop up a new frame whenever I write a message:
>>
>> (dolist (key '(message edit-article post reply forward reply-yank bug))
>>   (gnus-add-configuration
>>    `(,key
>>      (frame 1.0
>>             (if (not (buffer-live-p gnus-summary-buffer))
>>                 (car (cdr (assoc 'group gnus-buffer-configuration)))
>>               (car (cdr (assoc 'summary gnus-buffer-configuration))))
>>             (vertical ((user-position . t) (top . 1) (left . 1)
>>                        (name . ,(symbol-name key)))
>>                       (message 1.0 point))))))
>>
>> Unfortunately, when ebdb-mua-pop-up is t, two things happen:
>>
>> 1. When I enter a group from the *Group* buffer, I end up with only
>> the *Summary* and *Article* buffer.
>>
>> 2. When I reply to a message, I donʼt get a new frame popping up.
>
> Ooh, I don't look forward to messing with Gnus' window configuration. So
> first of all, the relevant customization options will be:
>
> ebdb-gnus-window-configuration
> ebdb-message-reply-window-config
> ebdb-message-reply-yank-window-config
>
> They can be used to add the relevant clauses to
> `gnus-buffer-configuration'. (Composing new mail/news doesn't need this
> config, because the EBDB buffer won't be popped up until you start
> completing addresses.)
>
> Of course this doesn't make any sense at all, because it obliges you to
> define your entire (e.g.) `article' configuration inside an
> EBDB-specific customization option, rather than in your Gnus config.

Okay, I've just pushed a new update to EBDB that should come down the
pipeline in the next few hours.

It greatly simplifies all the above: if you don't touch anything, it
will attempt to display the *EBDB* buffer next to the *Article* buffer
(in Gnus), or next to the reply composition buffer (in message-mode).

If you're using Gnus' window config stuff, as you are, then you can set
two options like so:

(setq ebdb-gnus-window-configuration 'ebdb-gnus
      ebdb-message-window-configuration 'ebdb-message)

And then use those two symbols inside your `gnus-add-configuration'
trees. They can be any symbols you like, but should be distinct
(because Gnus and message-mode will update two distinct buffers).

This is in 0.6.23, which should appear later today.

Please let me know when you've had a chance to try it out!

Eric