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: Lars Ingebrigtsen
Subject: bug#42977: 28.0.50; New gnus-dbus library providing (optional) D-Bus->Gnus integration
Date: Tue, 25 Aug 2020 21:21:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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