From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaus Rath Newsgroups: gmane.emacs.devel Subject: Re: nnoo.el: how to update server variables Date: Sat, 26 Dec 2015 20:09:02 -0800 Message-ID: <87y4cgttwh.fsf@vostro.rath.org> References: <874mla7a2e.fsf@vostro.rath.org> <87a8ozu6q4.fsf@gnus.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1451189369 6815 80.91.229.3 (27 Dec 2015 04:09:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Dec 2015 04:09:29 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 27 05:09:19 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aD2dy-00025z-IL for ged-emacs-devel@m.gmane.org; Sun, 27 Dec 2015 05:09:18 +0100 Original-Received: from localhost ([::1]:40674 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD2dx-0005Kr-Ql for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2015 23:09:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD2dq-0005KT-TX for emacs-devel@gnu.org; Sat, 26 Dec 2015 23:09:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aD2dn-00012k-7R for emacs-devel@gnu.org; Sat, 26 Dec 2015 23:09:10 -0500 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aD2dn-00012g-3c for emacs-devel@gnu.org; Sat, 26 Dec 2015 23:09:07 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D0FCF20187 for ; Sat, 26 Dec 2015 23:09:03 -0500 (EST) Original-Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 26 Dec 2015 23:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=yFZCNPKZcE/Rhtv q5VPh/nmNE1o=; b=juo3tlEjxjnwH+XsViiQTHPgnUuxVGKiS9OsiDeAnlENXBT /ElaEPr4utCgsqceWyUqGwgX6G/WalLMg0quB6vxWKMm3IwGgNmKhAvSWAsplo1r OglfJs8bz5AUJv17e+AF91R6tfnktVpD7o07L7X3IQ2jOYw6E37HGeeWjseA= X-Sasl-enc: LrrY1FuSaTFianZ/GIhuZS5dmmwcAU7H4jMCyZC3+gAf 1451189343 Original-Received: from ebox.rath.org (ebox.rath.org [45.79.69.51]) by mail.messagingengine.com (Postfix) with ESMTPA id 81B7DC013FE for ; Sat, 26 Dec 2015 23:09:03 -0500 (EST) Original-Received: from vostro.rath.org (vostro [192.168.12.4]) by ebox.rath.org (Postfix) with ESMTPS id 8BD3A168F4F for ; Sun, 27 Dec 2015 04:09:02 +0000 (UTC) Original-Received: by vostro.rath.org (Postfix, from userid 1000) id 418D1F247C0; Sat, 26 Dec 2015 20:09:02 -0800 (PST) Mail-Copies-To: never Mail-Followup-To: emacs-devel@gnu.org In-Reply-To: <87a8ozu6q4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 24 Dec 2015 17:55:15 +0100") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:196960 Archived-At: On Dec 24 2015, Lars Ingebrigtsen wrote: > Nikolaus Rath 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 --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB