unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Cc: emacs-devel@gnu.org
Subject: Re: Application resource storage
Date: Tue, 29 Mar 2011 14:58:39 -0500	[thread overview]
Message-ID: <87y63xem1c.fsf@lifelogs.com> (raw)
In-Reply-To: m339m5zpoy.fsf_-_@quimbies.gnus.org

On Tue, 29 Mar 2011 21:34:05 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> wrote: 

LMI> Lars Magne Ingebrigtsen <larsi@gnus.org> 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




  reply	other threads:[~2011-03-29 19:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 17:04 Outgoing mail defaults Lars Magne Ingebrigtsen
2011-03-17 17:17 ` Ted Zlatanov
2011-03-17 17:31   ` Lars Magne Ingebrigtsen
2011-03-17 18:18     ` Ted Zlatanov
2011-03-17 18:33       ` Lars Magne Ingebrigtsen
2011-03-17 19:35         ` Ted Zlatanov
2011-03-17 17:25 ` David Reitter
2011-03-17 17:43   ` Lars Magne Ingebrigtsen
2011-03-17 18:22     ` Ted Zlatanov
2011-03-18 14:10       ` John Sullivan
2011-03-17 19:02     ` David Reitter
2011-03-17 22:27       ` chad
2011-03-18  2:38         ` Ted Zlatanov
2011-03-18  4:17           ` chad
     [not found]           ` <87bp14ntn8.fsf@topper.koldfront.dk>
2011-03-21 19:50             ` Ted Zlatanov
2011-03-17 20:57 ` Stefan Monnier
2011-03-19 19:11 ` Chong Yidong
2011-03-20  1:41   ` Ted Zlatanov
2011-03-20  3:06     ` Stefan Monnier
2011-03-20 12:20       ` Ted Zlatanov
2011-03-21 14:20         ` Stefan Monnier
2011-03-21 19:42           ` Ted Zlatanov
2011-03-21 22:14             ` Stefan Monnier
2011-03-22  2:01               ` Ted Zlatanov
2011-03-29 19:22     ` Lars Magne Ingebrigtsen
2011-03-29 19:34       ` Application resource storage (was: Outgoing mail defaults) Lars Magne Ingebrigtsen
2011-03-29 19:58         ` Ted Zlatanov [this message]
2011-03-29 20:14           ` Application resource storage Lars Magne Ingebrigtsen
2011-03-29 21:02             ` Ted Zlatanov
2011-03-29 20:51           ` chad
2011-03-29 21:23       ` Outgoing mail defaults Stefan Monnier
2011-03-22 11:26 ` Simon Josefsson
2011-04-16 16:45 ` Lars Magne Ingebrigtsen
2011-04-16 16:47   ` Lars Magne Ingebrigtsen
2011-04-16 16:51   ` Ted Zlatanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y63xem1c.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).