all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* programatically save customization for future sessions
@ 2009-01-30 20:23 emacsnews
  0 siblings, 0 replies; 5+ messages in thread
From: emacsnews @ 2009-01-30 20:23 UTC (permalink / raw
  To: help-gnu-emacs

Hi ,
   is there any function to save a variable customization for future
   sessions (i.e. to the custom-set-variables section of my .emacs),
   or do I have to write it myself?

   Just to clarify; I know how to save a customization manually from the
   custom buffer, but I want to do this by calling a function from
   within some other elisp code.

-- 
aleblanc





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: programatically save customization for future sessions
       [not found] <mailman.6333.1233408608.26697.help-gnu-emacs@gnu.org>
@ 2009-01-31 15:34 ` Pascal J. Bourguignon
  2009-01-31 22:36   ` emacsnews
  2009-01-31 15:35 ` B. T. Raven
  1 sibling, 1 reply; 5+ messages in thread
From: Pascal J. Bourguignon @ 2009-01-31 15:34 UTC (permalink / raw
  To: help-gnu-emacs

<emacsnews@aleblanc.cotse.net> writes:
>    is there any function to save a variable customization for future
>    sessions (i.e. to the custom-set-variables section of my .emacs),
>    or do I have to write it myself?
>
>    Just to clarify; I know how to save a customization manually from the
>    custom buffer, but I want to do this by calling a function from
>    within some other elisp code.

What is your bet?

How do you think the customization buffer does it?

Do you know about C-h -k ?

Since the customization buffer saves these variables when you type C-x
C-s, you can learn what command is called by typing in a
customization buffer:  C-h k C-x C-s

In the help buffer giving the help about that command, you can clic on
the link to the command source, and there you can read it and find
what function is called to save all the custom variables.  Go see the
source of that function to check that it does exactly what you want,
and if yes, then use it.

-- 
__Pascal Bourguignon__


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: programatically save customization for future sessions
       [not found] <mailman.6333.1233408608.26697.help-gnu-emacs@gnu.org>
  2009-01-31 15:34 ` programatically save customization for future sessions Pascal J. Bourguignon
@ 2009-01-31 15:35 ` B. T. Raven
  2009-01-31 22:31   ` emacsnews
  1 sibling, 1 reply; 5+ messages in thread
From: B. T. Raven @ 2009-01-31 15:35 UTC (permalink / raw
  To: help-gnu-emacs

emacsnews@aleblanc.cotse.net wrote:
> Hi ,
>    is there any function to save a variable customization for future
>    sessions (i.e. to the custom-set-variables section of my .emacs),
>    or do I have to write it myself?
> 
>    Just to clarify; I know how to save a customization manually from the
>    custom buffer, but I want to do this by calling a function from
>    within some other elisp code.
> 


C-h f custom... will reveal a couple hundred custom- or customize- 
functions. It looks like customize-save-variable is a start.

Ed


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: programatically save customization for future sessions
  2009-01-31 15:35 ` B. T. Raven
@ 2009-01-31 22:31   ` emacsnews
  0 siblings, 0 replies; 5+ messages in thread
From: emacsnews @ 2009-01-31 22:31 UTC (permalink / raw
  To: help-gnu-emacs

"B. T. Raven" <nihil@nihilo.net> writes:

> emacsnews@aleblanc.cotse.net wrote:
>> Hi ,
>>    is there any function to save a variable customization for future
>>    sessions (i.e. to the custom-set-variables section of my .emacs),
>>    or do I have to write it myself?
>>
>>    Just to clarify; I know how to save a customization manually from the
>>    custom buffer, but I want to do this by calling a function from
>>    within some other elisp code.
>>
>
>
> C-h f custom... will reveal a couple hundred custom- or customize- 
> functions. It looks like customize-save-variable is a start.
>
> Ed

Thanks, that did the job. 
I don't know why I didn't find that before.


-- 
aleblanc





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: programatically save customization for future sessions
  2009-01-31 15:34 ` programatically save customization for future sessions Pascal J. Bourguignon
@ 2009-01-31 22:36   ` emacsnews
  0 siblings, 0 replies; 5+ messages in thread
From: emacsnews @ 2009-01-31 22:36 UTC (permalink / raw
  To: help-gnu-emacs

pjb@informatimago.com (Pascal J. Bourguignon) writes:

> <emacsnews@aleblanc.cotse.net> writes:
>>    is there any function to save a variable customization for future
>>    sessions (i.e. to the custom-set-variables section of my .emacs),
>>    or do I have to write it myself?
>>
>>    Just to clarify; I know how to save a customization manually from the
>>    custom buffer, but I want to do this by calling a function from
>>    within some other elisp code.
>
> What is your bet?
>
> How do you think the customization buffer does it?
>
> Do you know about C-h -k ?
>
> Since the customization buffer saves these variables when you type C-x
> C-s, you can learn what command is called by typing in a
> customization buffer:  C-h k C-x C-s
>
> In the help buffer giving the help about that command, you can clic on
> the link to the command source, and there you can read it and find
> what function is called to save all the custom variables.  Go see the
> source of that function to check that it does exactly what you want,
> and if yes, then use it.
Hi Pascal,
          that was the first thing I tried.
It lead me to the function that saves all changes in the *Customize     
Group* buffer (I want to save just a single variable). I followed a
trail which led back to a c function, and still didn't give me the answer.


-- 
aleblanc





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-31 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.6333.1233408608.26697.help-gnu-emacs@gnu.org>
2009-01-31 15:34 ` programatically save customization for future sessions Pascal J. Bourguignon
2009-01-31 22:36   ` emacsnews
2009-01-31 15:35 ` B. T. Raven
2009-01-31 22:31   ` emacsnews
2009-01-30 20:23 emacsnews

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.