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: Drew Adams
Subject: RE: How to save custom variable programmatically?
Date: Tue, 10 Nov 2020 08:24:25 -0800 (PST)

> 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



reply via email to

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