I am setting up my ERC client to connect to my ZNC IRC proxy server, and I am following this Emacs wiki. At the following step:
;; Configure
M-x customize-group znc RET
I am in the Emacs customize menu where I enter my ZNC server information, but this information is only saved for the current session, and I have to re-enter for every session.
Here is the menu, with a warning at the top indicating that I cannot save my custom settings:
I try to save with C-x C-s
, but I get the following message in the mini buffer:
Saving settings from "emacs -q" would overwrite existing customizations
. This doesn't make sense to me because I am not starting Emacs with a -q
flag. I am using the default Emacs desktop file from my Ubuntu installation, which loads my .emac.d/init.el
file.
I tried investigating this Emacs wiki page, where it says: Customize stores saved values (for future sessions) in the property saved-value
, but I'm not sure how to set this value, or where to begin with setting variables inside the Customize code. Any suggestions?
The only other hint I have is that clicking on State
> Show Saved Lisp Expression
at the bottom of the page, reveals my values as follows:
'(("irc.lukeswart.net" 5005 nil
((irc\.freenode\.net "zncuser" "foo"))))
Update
Thank you for the tips, it led me to discover the underlying problem and eventually fix it.
The problem was in my Ubuntu desktop file, saved under ~/.local/share/applications/emacs24.desktop
. Under this file, Emacs was starting with emacs -q --load ~/path/to/my/init.el
. I initially missed this desktop file because I was checking under /usr/share/applications/emacs24.desktop
. Anyway, here is the code that Customize adds to my init.el
, although this should not be added manually:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(markdown-command "/usr/bin/pandoc")
'(znc-servers (quote (("irc.lukeswart.net" 5005 nil ((irc\.freenode\.net "zncuser" "foo")))))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
custom-file
; it means that the value ofuser-init-file
seems to benil
. What is the value ofuser-init-file
in your setup?user-init-file
wasnil
. It turned out to be a problem with my desktop file after all, explained in my updated question.