[Top][All Lists]

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

Re: nnoo.el: how to update server variables

From: Lars Ingebrigtsen
Subject: Re: nnoo.el: how to update server variables
Date: Thu, 24 Dec 2015 17:55:15 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

Nikolaus Rath <address@hidden> writes:

> I am trying to update a server variable from one of (Gnus') backend
> functions. My first attempt was
> (defvoo nnimap-my-state nil)
> (deffoo nnimap-request-list (&optional server)
>   (nnoo-change-server 'nnimap server nil)
>   (message "Old state: %s" nnimap-my-state)
>   (setq nnimap-my-state 42))
> but that did not work (successive invocations would all run with
> nnimap-my-state being nil). After studying the nnoo.el sources for a
> bit, I concluded that nnoo-change-server updates the declared server
> variables to the per-server values, but does not copy any changes back.

I don't think that's correct.  When you change the server, nnoo will
stash all the values of all the "defvoo" values, and will copy them back
again when you change back to the original server.

(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]