From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: uzibalqa Newsgroups: gmane.emacs.help Subject: Re: [External] : Saving variables for use between emacs sessions Date: Thu, 15 Sep 2022 16:51:30 +0000 Message-ID: <9NtSR1Mo-D0FKDHQrU7DS26HNA_Bzp59Tgk_tXgVrNdUBd_k7tmn3TDbA-nZ2ttXKMq1cZYjgsQaGuxbY5ngGZoUg1QAwumZu3BL7Slg8z8=@proton.me> References: <87fsgskdk4.fsf@gmail.com> <87v8po6a5u.fsf@mbork.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31359"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Robert Pluim , Drew Adams , uzibalqa via Users list for the GNU Emacs text editor To: Marcin Borkowski Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 15 18:53:14 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oYs70-00082T-9f for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 18:53:14 +0200 Original-Received: from localhost ([::1]:54442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYs6y-0005Jo-FI for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 12:53:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYs5f-0005IJ-VW for help-gnu-emacs@gnu.org; Thu, 15 Sep 2022 12:51:51 -0400 Original-Received: from mail-40140.protonmail.ch ([185.70.40.140]:29343) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYs5c-0006p5-0N for help-gnu-emacs@gnu.org; Thu, 15 Sep 2022 12:51:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1663260698; x=1663519898; bh=ipg68QA6sMK+F4BJA/VhTSoa5QeeI9awsGfGacppxt8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=hOpPTUub0b0taLNK7nhd+RLJy3vlA+3vU/ICjg1D/+mnDyN7aN0IhpII5XvNb24TB sydiBcGdOcA57kevLuT3zt0iVDtfF2I25jlfREXpDtuawOdZ/OvvWV5ZIX+GVgFhKM pWao83my+6kDeWTXrlZHgIR17iUUb/5RH58Vp2P3y0xVWOmpEQPkP3qrcGdfv4Kfcc 5DjNh2FXcGdGbciEAqFzS8fw6XyyaFsLB/TUY9aaiTVZdHkkS5uwSXDdQD6WNPjErV KVsYUvj/Jy3YWGpogkxDtuCx1eYCTc4q+VdAk3/KmIFAXBpxZ1h6iU4OKvtPoqYxdx fdFRWg/EQ1S8Q== In-Reply-To: <87v8po6a5u.fsf@mbork.pl> Feedback-ID: 52887082:user:proton Received-SPF: pass client-ip=185.70.40.140; envelope-from=uzibalqa@proton.me; helo=mail-40140.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139490 Archived-At: Sent with Proton Mail secure email. ------- Original Message ------- On Thursday, September 15th, 2022 at 1:26 PM, Marcin Borkowski wrote: > On 2022-09-15, at 14:49, Robert Pluim rpluim@gmail.com wrote: >=20 > > > > > > > On Thu, 15 Sep 2022 11:46:57 +0000, Drew Adams drew.adams@ora= cle.com said: > >=20 > > >> How can I save variable that can be reused between emacs sessions? > > Drew> Lots of ways. Some: > >=20 > > Drew> 1. savehist.el > > Drew> 2. desktop.el > > Drew> 3. Bookmark+ bookmark variable-list bookmark > >=20 > > Drew> https://www.emacswiki.org/emacs/BookmarkPlus#FunctionSequenceVarl= istBookmarks > >=20 > > Drew> 4. If it's a user option (defcustom), then in your `custom-file' = (or init file). > >=20 > > And in emacs-29, `define-multisession-variable', although that=CA=BCs > > intended more for packages than user config. >=20 >=20 > Also, the `persist' package. Right, I want to have a user option, but although I want to allow a user to= set the value, I also would like to set a value in an automatic way, using a function that= does the=20 necessary calculations, and stares the answer in the variable. How does one let a user change a value, and how can I save it automatically= as well?