From: Jean Louis <bugs@gnu.support>
To: Drew Adams <drew.adams@oracle.com>
Cc: GNU Emacs Help <help-gnu-emacs@gnu.org>
Subject: Re: How to save custom variable programmatically?
Date: Tue, 10 Nov 2020 22:23:52 +0300 [thread overview]
Message-ID: <X6royAu6GeyVW9kD@protected.rcdrun.com> (raw)
In-Reply-To: <31315912-2ddd-455e-912d-a5d0e405cf25@default>
* Drew Adams <drew.adams@oracle.com> [2020-11-10 19:25]:
> > I would like to use custom variables in such way to ask user
> > pragmatically, not through customize interface, to change a
> > variable. This could be for example user's location.
> >
> > Upon changing it, I would like programatically to save it for future.
> >
> > Should I use below function? Or maybe something else is recommended?
> >
> > (defun customize-save-variable (variable value &optional comment)
> >
> > This way it is not working:
> >
> > (require 'cus-edit)
> > (customize-save hyperscope-default-server "localhost")
> >
> > Any good way?
>
> Michael has given the answer: `customize-save-variable'.
> ___
>
> This page has more on the topic of Customize and saving,
> if you're interested. (Just one opinion.)
>
> https://www.emacswiki.org/emacs/CustomizingAndSaving
Thank you for reference. I was looking into it for reason to enable
those functions to save to other files. Instead customization of Emacs
to use it to save any variables like a simple database in different
files.
prev parent reply other threads:[~2020-11-10 19:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 7:51 How to save custom variable programmatically? Jean Louis
2020-11-10 10:43 ` Robert Pluim
2020-11-10 13:42 ` Jean Louis
2020-11-10 11:23 ` Michael Heerdegen
2020-11-10 13:55 ` Jean Louis
2020-11-10 14:36 ` Michael Heerdegen
2020-11-10 19:19 ` Jean Louis
2020-11-10 20:42 ` Marcin Borkowski
2020-11-10 21:46 ` Jean Louis
2020-11-11 21:20 ` Marcin Borkowski
2020-11-10 20:43 ` Michael Heerdegen
2020-11-10 21:52 ` Jean Louis
2020-11-11 18:00 ` Michael Heerdegen
2020-11-11 18:05 ` Jean Louis
2020-11-17 12:24 ` Michael Heerdegen
2020-11-17 15:07 ` Jean Louis
2020-11-10 21:15 ` Michael Heerdegen
2020-11-10 21:55 ` Jean Louis
2020-11-11 10:55 ` Michael Heerdegen
2020-11-17 15:44 ` Jean Louis
2020-11-17 16:38 ` Michael Heerdegen
2020-11-17 21:30 ` Stefan Monnier
2020-11-10 16:24 ` Drew Adams
2020-11-10 19:23 ` Jean Louis [this message]
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=X6royAu6GeyVW9kD@protected.rcdrun.com \
--to=bugs@gnu.support \
--cc=drew.adams@oracle.com \
--cc=help-gnu-emacs@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.
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).