From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78206 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: Application resource storage Date: Tue, 29 Mar 2011 14:58:39 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87y63xem1c.fsf@lifelogs.com> References: <87d3ln9b7y.fsf@stupidchicken.com> <87aagqsh4e.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1301428849 4654 80.91.229.12 (29 Mar 2011 20:00:49 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 29 Mar 2011 20:00:49 +0000 (UTC) Cc: emacs-devel@gnu.org To: ding@gnus.org Original-X-From: ding-owner+M26517@lists.math.uh.edu Tue Mar 29 22:00:45 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4f5a-0001b3-Of for ding-account@gmane.org; Tue, 29 Mar 2011 22:00:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q4f5P-0005Jl-BY; Tue, 29 Mar 2011 15:00:19 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q4f5N-0005JY-Uu for ding@lists.math.uh.edu; Tue, 29 Mar 2011 15:00:17 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q4f5E-0001PI-MO for ding@lists.math.uh.edu; Tue, 29 Mar 2011 15:00:12 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q4f5D-00026L-VT for ding@gnus.org; Tue, 29 Mar 2011 22:00:07 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q4f5B-0001Hn-Ul for ding@gnus.org; Tue, 29 Mar 2011 22:00:05 +0200 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2011 22:00:05 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 29 Mar 2011 22:00:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 53 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:fyn5P6P7TPZrd2dCPLZ55fadUTg= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78206 gmane.emacs.devel:137867 Archived-At: On Tue, 29 Mar 2011 21:34:05 +0200 Lars Magne Ingebrigtsen wrote: LMI> Lars Magne Ingebrigtsen writes: >> Even though this means duplicating data, somewhat, I think we should >> keep normal application defaults separate from secret credentials. LMI> Which reminds me of something we discussed half a year ago: Storing LMI> responses to questions. LMI> Today, if Emacs prompts the user for something, and it's something that LMI> should be remembered always by Emacs, Emacs uses custom to save the LMI> value. This works well for things that map nicely to one single LMI> variable. LMI> But if the question is of the kind "do you want to use port 587 when LMI> connecting to smtp.gmail.com?", then that doesn't really map LMI> straightforwardly to a simple variable. It might map to an alist of LMI> some kind, but the user may set that alist somewhere else, which makes LMI> all this kind of tricky. I think you're describing an assistant.el walkthrough. Right now the assistants store their return in an artificial data structure but the walkthrough with the user decisions and answers could *be* the data structure (it's a decision tree, right?) Also assistant.el is currently a full-buffer application but it could be implemented as a prompting interface as well to make these queries less distracting. LMI> Wouldn't it be nice if Emacs had a way to store these values in a LMI> simpler manner without encroaching on the variable space? LMI> That is, I'm kinda thinking of something like LMI> (store-value "smtpmail-smtp-server-smtp.gmail.com-port" 587) LMI> The first is a token uniquely identifying the resource, and the second LMI> is the value. LMI> These could be stored in ~/.emacs.d/resources, which could then be LMI> queried by the applications. LMI> Does this exist already? Stupid idea? It seems like an application-specific thing. I would implement it as an assistant.el facility to save the walkthrough and to query nodes in it. As a global Emacs facility it would be easy to make all these strings part of a big global-registry alist, which can then be customized and saved independently. But I think it would squash the decision tree from assistant.el into unwieldy string representations of the nodes and edges. Ted