emacs-devel
[Top][All Lists]
Advanced

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

Re: nnoo.el: how to update server variables


From: Nikolaus Rath
Subject: Re: nnoo.el: how to update server variables
Date: Sat, 26 Dec 2015 20:09:02 -0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)

On Dec 24 2015, Lars Ingebrigtsen <address@hidden> wrote:
> 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.

Ok, so why doesn't the above work then?

Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«



reply via email to

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