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

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

bug#42977: 28.0.50; New gnus-dbus library providing (optional) D-Bus->Gn


From: Eric Abrahamsen
Subject: bug#42977: 28.0.50; New gnus-dbus library providing (optional) D-Bus->Gnus integration
Date: Tue, 25 Aug 2020 12:33:26 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

On 08/25/20 21:21 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Okay, there it goes. This was made a tiny bit more difficult to test by
>> the fact that the 'closed status (in `gnus-opened-servers') is set at
>> various calling sites, and not centrally in `gnus-close-server'.
>> `gnus-open-server' sets the 'open status, it seems like
>> `gnus-close-server' should do the equivalent. I could take it out of
>> `gnus-group-suspend', and look at whether `gnus-server-set-status' was
>> really necessary.
>
> I think the use case is stuff like this:
>
> (defun gnus-agent-toggle-group-plugged (group)
>   "Toggle the status of the server of the current group."
>   (interactive (list (gnus-group-group-name)))
>   (let* ((method (gnus-find-method-for-group group))
>        (status (cadr (assoc method gnus-opened-servers))))
>     (if (eq status 'offline)
>       (gnus-server-set-status method 'closed)
>       (gnus-close-server method)
>       (gnus-server-set-status method 'offline))
>
> Where we close the server (i.e., the backends close the network
> connections), but don't set the status to 'closed, because it's still
> open on the Gnus side.

Okay, I see. But even given that, leaving `gnus-server-set-status'
alone, it might be fine to have `gnus-close-server' set a 'closed status
-- the server will just re-set it afterwards.

Alternately, we could just have `gnus-close-all-servers' set the status,
too.





reply via email to

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