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: Fri, 16 Sep 2022 02:40:57 +0000 Message-ID: References: <87fsgskdk4.fsf@gmail.com> <87v8po6a5u.fsf@mbork.pl> <9NtSR1Mo-D0FKDHQrU7DS26HNA_Bzp59Tgk_tXgVrNdUBd_k7tmn3TDbA-nZ2ttXKMq1cZYjgsQaGuxbY5ngGZoUg1QAwumZu3BL7Slg8z8=@proton.me> 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="26366"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Marcin Borkowski , Robert Pluim , uzibalqa via Users list for the GNU Emacs text editor To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 16 04:42:02 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 1oZ1In-0006dJ-A6 for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 16 Sep 2022 04:42:01 +0200 Original-Received: from localhost ([::1]:42044 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZ1Im-0001Kw-A4 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Sep 2022 22:42:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZ1Hz-0001Fn-Je for help-gnu-emacs@gnu.org; Thu, 15 Sep 2022 22:41:11 -0400 Original-Received: from mail-4319.protonmail.ch ([185.70.43.19]:31967) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZ1Hv-0006Hf-KM for help-gnu-emacs@gnu.org; Thu, 15 Sep 2022 22:41:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1663296064; x=1663555264; bh=XNzSyuGv58bf5HmrGUfaPb2MNbVIOrgQb6uIQ+jXxKI=; 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=MfqRYjMmdBjJnj7yy5Z/l0zM7QudUb5alG7sn73xnDsQqdevrvB+HJ4Egs+KenMUn Xpsom1GL6cdzb3bnecRu6qY9UHZ9Exf3cihTXj6MfFPU/qkuIs6qFHWdXfij/y9vCc OcJZaxxixu6DnN4Xtc0ji+6kJSk2OwCxTGokSmGf2ioSXU3CWQ/AYQXvVAwTT/RMUq ept6PlR416vE0aLn6kFCSt3sb2zYPUssK9gz2Osrwk+TLM8dfmK6/Vxmg+ww2jqMlf YMgrHNlnhPp0Ba0wbILvlCRgotX/KV3UDhw2jMyFqjj4OLeB2bv9XQuf6k5MGXJb7h twchtBbv+z7rA== In-Reply-To: Feedback-ID: 52887082:user:proton Received-SPF: pass client-ip=185.70.43.19; envelope-from=uzibalqa@proton.me; helo=mail-4319.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:139506 Archived-At: ------- Original Message ------- On Friday, September 16th, 2022 at 2:19 AM, Drew Adams wrote: > > > Just define the option with defcustom. > > >=20 > > > Users can use Customize to change the > > > value and save that new setting to their > > > `custom-file' or init file. Or they can use` custom*' functions to > > > set and to save. Or you can use such > > > functions to do that for them "in an > > > automatic way". > > >=20 > > > Just look into what's available - it's > > > all there. You, yourself, can easily > > > check it out. > >=20 > > I have coded as follows > > (defgroup tpframe-pos nil > > "Set position of frame." > > :group 'convenience) > > (defcustom tpfxpos 8 > > "X position of initial frame." > > :group 'tpframe-pos :type 'integer) > > (defcustom tpfypos 8 > > "Y position of initial frame." > > :group 'tpframe-pos :type 'integer) > >=20 > > Then I have a function that changes the values with > > (setq tpfxpos nlft) and (setq tpfypos ntop) >=20 >=20 > What part of this: >=20 > > > use `custom*' functions to set and to save. >=20 > ^^^^^^^^^ ^^^^ >=20 > did you not understand? Or did you just ignore > it all? >=20 > Do you think `setq' is a` custom*' function? > Do you think it saves the variable value > persistently? I do not understand. Once I define a variable with the declaration "defcus= tom", how can I make a function change the value?