Use for questions about the built-in GUI customization features
Questions tagged [custom]
22 questions
89
votes
4 answers
Advantages of setting variables with setq instead of custom.el?
I see a lot of people (extension authors and others) give configuration examples with setq:
(setq foo 'bar)
These parameters are often defined with defcustom, making them available for customization through custom.el.
I typically use custom.el to…

J David Smith
- 2,635
- 1
- 16
- 27
31
votes
3 answers
Reset custom variable to default value programmatically
Q: Using Elisp, how can I reset a variable to its default value without knowing what that value is?
I tried to figure out how to do this by bringing up the Customize interface for a variable I set to a non-default value in my init-file and pressing…

itsjeyd
- 14,586
- 3
- 58
- 87
7
votes
2 answers
Stop org-mode from defining agenda files in custom
I have the following line in my .emacs:
(setq org-agenda-files (directory-files "~/org-files" 'absolute "[^#]*.org$" 'no-sort))
I would like for org-agenda-files to be defined in this way on startup. However, a (custom-set-variables…

Matthew Piziak
- 5,958
- 3
- 29
- 77
7
votes
1 answer
Where is the default color / custom theme defined?
When you start Emacs with emacs -Q, there appears to be some sort of default color scheme. Where are these colors defined? The default theme does not show up with M-x customize, nor can I find it in etc/themes. I have even tried taking a screenshot…

Jackson
- 1,218
- 9
- 19
7
votes
1 answer
Add to a list that defcustom has not yet defined
We can avoid adding duplicate elements to a list variable by using add-to-list.
When setting a customizable variable (i.e. one that is or will be defined by defcustom) from our init file, we're encouraged to use custom-set-variables (or…

ivan
- 1,928
- 10
- 20
3
votes
2 answers
A custom type specification like “repeat,” but when there’s only one item, it’s inline
So, I’m trying to add Customize support to packages that use a lot of plists, and where the value of pretty much any option can be either a single item or a list. I could have every single plist option’s value-type wrapped in a choice between…

Tina Russell
- 380
- 2
- 10
3
votes
1 answer
how to use custom-set-variables safely?
The help for custom-set-variables says:
The arguments should each be a list of the form:
(SYMBOL EXP [NOW [REQUEST [COMMENT]]])
This stores EXP (without evaluating it) as the saved value for SYMBOL.
If NOW is present and non-nil, then also…

Adam Spiers
- 235
- 2
- 12
2
votes
1 answer
What is causing this error: "Cannot open load file, no such file or directory, session"?
From time to time my Emacs doesn't load my init file at startup and gives me the following error message:
File error: Cannot open load file, no such file or directory, session
To ensure normal operation, you should investigate and remove the
cause…

clemera
- 3,401
- 13
- 40
1
vote
1 answer
Automatically prompt for comment character and apply it in older versions of emacs
When I try to comment a block of code using comment-region in a file type emacs doesn't know the proper comment type for, then it prompts me No comment syntax is defined. Use: so I can specify the comment character and it works.
However this only…

Joey O
- 135
- 3
1
vote
1 answer
How to check if a customize group exists in Emacs Lisp code?
How can I programmatically check if a customize group exists?
Interactively I can use M-x customize-group and use completion to see if a specific group exists or not. But that's not what I need.
If I evaluate:
(customize-group…

PRouleau
- 744
- 3
- 10
1
vote
1 answer
Replace a filename in init.el using sed from bash script
So I have different customized themes. Different customized themes are written to a separate custom .el files and get called in the main init.el file. For example:
(setq custom-file "~/.emacs.d/myCustomSettings/customDarkLaptop.el")
will call the…

mle0312
- 295
- 1
- 8
1
vote
0 answers
Massively long text boxes and yasnippet highlighting
Why are my text boxes and yasnippet field highlights so massively long?
Is there a way to change this behavior?
If so, what are the necessary steps that need to be taken to solve this issue?
The behavior can be seen like so:
When…

John DeBord
- 550
- 3
- 13
1
vote
1 answer
macro takes multiple pairs of arguments
I found this snippet of code from oremacs
(defmacro csetq (variable value)
`(funcall (or (get ',variable 'custom-set) 'set-default) ',variable ,value))
I would like to expand this macro so that is can take multiple pairs of arguments similar to…

Prgrm.celeritas
- 849
- 6
- 15
1
vote
1 answer
What happens when there is more than one custom-set-variables?
a quote from my init.el:
;; custom-set-variables was added by Custom.
...
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
What exactly will happen? I've found no hint in…

Markus Grunwald
- 199
- 10
1
vote
1 answer
Save filesets-data in file which is not the custom-file or other emacs config file
Background
I store Emacs my configuration in a .emacs and separate custom file. I would like to store both in a public repository like Github. I also use filesets which saves filenames & file paths in one of these files. Data associated with…

Mikef
- 153
- 6