help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to save custom variable programmatically?


From: Jean Louis
Subject: Re: How to save custom variable programmatically?
Date: Tue, 10 Nov 2020 22:23:52 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]