From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Incorporating caching into defgroup/defcustom/defvar for Emacs 25 Date: Mon, 2 Feb 2015 11:16:43 -0200 Message-ID: References: <6AD4DF07-EFCD-48F4-AEE6-333F8D27BA87@seanallred.com> <87a90xqfxg.fsf@uwakimon.sk.tsukuba.ac.jp> <87wq40pit3.fsf@uwakimon.sk.tsukuba.ac.jp> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1422883022 19083 80.91.229.3 (2 Feb 2015 13:17:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2015 13:17:02 +0000 (UTC) Cc: Sean Allred , emacs-devel To: "Stephen J. Turnbull" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 14:17:01 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 1YIGs9-00057k-1r for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2015 14:17:01 +0100 Original-Received: from localhost ([::1]:54602 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIGs8-0005Uq-3b for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2015 08:17:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIGrv-0005Uh-KK for emacs-devel@gnu.org; Mon, 02 Feb 2015 08:16:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIGrs-0002Ti-K3 for emacs-devel@gnu.org; Mon, 02 Feb 2015 08:16:47 -0500 Original-Received: from mail-ob0-x231.google.com ([2607:f8b0:4003:c01::231]:64673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIGrs-0002Ta-Fm for emacs-devel@gnu.org; Mon, 02 Feb 2015 08:16:44 -0500 Original-Received: by mail-ob0-f177.google.com with SMTP id wp18so12784026obc.8 for ; Mon, 02 Feb 2015 05:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=63NS4qNvE6kOpOXYID1p2V20hAOQx4fG9GxUuPAe/2E=; b=SXyK3Mr8k6YFcL2t2fEPlabVl6H8WGNqYhxmwBhASisbjE3tVM3WbZeuYUDmzpa4ha KGc7cN7lzIEtmbVXLlC9/oYCHzWh5P1z0PxcyNownopOcBMcyrXXkqr4VSBrWwFMvCFH 7+7cvvoRC5YDmeKJEJTautw95/LDQKPZ8DfPZXsPd7bwuuveA6gTVXsCxDmzZgrvl+KA Yf29SUX1SQObxCxG2n9XNSeR+InBqQnksbiI7kqcpofF8pjxg87W7cN3z9IAM2rOXY2A NFbAITXmXXrvi7Z85uMUGZq55dbNoST46ORwPp4fodRP6fhMxh1eIwTTd3XwX68err0v R/GQ== X-Received: by 10.182.231.230 with SMTP id tj6mr12095874obc.58.1422883004044; Mon, 02 Feb 2015 05:16:44 -0800 (PST) Original-Received: by 10.76.125.1 with HTTP; Mon, 2 Feb 2015 05:16:43 -0800 (PST) In-Reply-To: <87wq40pit3.fsf@uwakimon.sk.tsukuba.ac.jp> X-Google-Sender-Auth: RQxmDTZ56QX0-PZQr3W1WpyE6G8 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::231 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:182249 Archived-At: 2015-02-02 13:03 GMT+00:00 Stephen J. Turnbull : > Artur Malabarba writes: > > On 2 Feb 2015 01:07, "Stephen J. Turnbull" wrote: > > > > Why not? Custom provides a "reset" functionality if the user *wants* > > > to reset. It's not clear to me that a user wouldn't want changes to > > > customizable variables to persist. > > > > I wasn't saying defcustoms shouldn't be persistent, I was just > > saying they already have a great mechanism for that so they don't > > need to use this caching mechanism that is being suggested for > > internal variables. > > Yes, they might. A user who is testing out a new custom setting might > like the setting to persist without explicitly saving it if Emacs > crashes or he runs out of memory and needs to stop and restart Emacs, > or something like that. > > > > What does stash provide that a session manager such as desktop.el > > > doesn't? That wasn't clear to me from your long email. > > > > With stash, a package can specify that a global variable is supposed to be > > persistent, and this variable will automatically be saved/loaded from disk. > > > > I understand desktop.el provides similar functionality, but, IIUC, > > desktop.el is more of a user interface. By that I mean sessions are > > only saved/loaded if desktop-mode is enabled, > > The people I know who use desktop generally enable it in init.el. The > only way to disable it AFAIK is -q. > > > Stash provides a simple abstraction for a variable that will be > > persistent accross sessions. You just declare a variable to be > > persistent (Sean suggested a `defvar*' macro, > > Ah, OK, so the important thing is that the programmer controls it, not > the user. Precisely.