From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: Persistence of variables Date: Wed, 21 Mar 2018 23:16:16 +0100 Message-ID: <87sh8txefj.fsf@fastmail.fm> References: <87a7v20xlf.fsf@mbork.pl> <83a7v1lxxz.fsf@gnu.org> <87605p28ma.fsf@mbork.pl> <874ll94uvs.fsf@ericabrahamsen.net> <77e3430c-8533-4962-92fa-3b87e2226563@default> <20180321151926.GF12393@tuxteam.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: blaine.gmane.org 1521670548 28909 195.159.176.226 (21 Mar 2018 22:15:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Mar 2018 22:15:48 +0000 (UTC) User-Agent: mu4e 1.1.0; emacs 25.3.50.1 Cc: Eric Abrahamsen , help-gnu-emacs@gnu.org To: tomas@tuxteam.de Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 21 23:15:43 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eym1G-0007PM-Cv for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Mar 2018 23:15:42 +0100 Original-Received: from localhost ([::1]:57742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eym3J-0004Hb-Aw for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Mar 2018 18:17:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eym23-0003qA-GQ for help-gnu-emacs@gnu.org; Wed, 21 Mar 2018 18:16:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eym1y-0006oP-Iw for help-gnu-emacs@gnu.org; Wed, 21 Mar 2018 18:16:31 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37989) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eym1y-0006lk-B6 for help-gnu-emacs@gnu.org; Wed, 21 Mar 2018 18:16:26 -0400 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 55A1920FC9; Wed, 21 Mar 2018 18:16:24 -0400 (EDT) Original-Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Wed, 21 Mar 2018 18:16:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=UmxWw6EVdnEJUG3ooB870npIXCQpWR36pq0UYHTF56U=; b=YxLy3sY4 4/OgKh11Y3VP8tly8qIDiEBLSGN6TeYl52DJI+TKmvP8nfY3UNicmQWHEjuhjX4k hfwpIiKyrREd7dZKv8Z+HAa0PACa9cGOguZVdUV7ODZtEatIY2NPf1QLqwRcUngh VaGXjk0gxaQszdQ+TIhlDL4h4FhXI/du5cU7xUm2U/I+fWwETm3wQXeEWwFyqMmj s7SUkACwDDq+6eS2pRxhkOuwLoBDn2eOgAhU4/o7DmgAANztXeuMd3v0N2qf1YMV iA991IPwOkfMUOgt2KuQflzjP5TaogzJx5Faampf1cfQ3+rYf58exPPk48rkswcq CF/IemCHrbrhnQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=UmxWw6EVdnEJUG3ooB870npIXCQpW R36pq0UYHTF56U=; b=ATV3C6oEcBD1T8JH/N7N6tE2Voj01YjNN964XzSw8clKG PAuE0pHbxArrzNBWYAgABxJpoGQ1BuFczokAuLKM1Me3lqa7o30e8NA3eXG0vT2R 4kjEYSBEsyNcR9KNoo92HBkvjGRBPW7OaL65li45rcwdxamzOyYoKqTecqBvMaPM iK5quVCTANsYGnIgPkFbwow7IanRxAS7KrFf2iKIGaBxk+NmyE5ELXFhG/tPmXfg scUl44rKlKH29ndTlGYFTJ6xeOdaNPKsR/og3DTBrJe6bHwK7PPn7QBBgdSY4MsI jQFpkwXaBBii1yIVji5w3LDrPC+TE6sj1meQ4rPWQ== X-ME-Sender: Original-Received: from IdeaPad.fastmail.com (ip5f5ac82b.dynamic.kabel-deutschland.de [95.90.200.43]) by mail.messagingengine.com (Postfix) with ESMTPA id 2E3B6240DB; Wed, 21 Mar 2018 18:16:23 -0400 (EDT) In-reply-to: <20180321151926.GF12393@tuxteam.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116252 Archived-At: On Wed, Mar 21 2018, tomas@tuxteam.de wrote: > On Wed, Mar 21, 2018 at 08:12:40AM -0700, Drew Adams wrote: >> If you only want to save one variable, just use an option. > > Of course! > > What Drew said. The whole thing was in front of us all, we > just had to squint the right way. Well, that depends on the variable. Options (i.e., those defined with defcustom) are really meant for user customisation: meant to be set explicitly by the user, and meant to be forgotten once set. If you want to save a variable that changes regularly and that the user doesn't set explicitly, then a user option is a bad fit. IMHO the best way to deal with that is indeed to use a separate file and to provide a user option to set the file path & name. That way, users can decide for themselves if they want to keep the file under version control, sync it across machines, or not. -- Joost Kremers Life has its moments