When using the menu system to modify customizations (Options > Customize Emacs > ...etc...), I am
Able to "Apply" the change for the curent session
Unable to "Apply and save" for future sessions
The error message I get is 'forward-sexp: Scan error: "Unbalanced parentheses", 30586, 41369'.
I have no idea how to deal with this message. Online searches produce random results, none of which relate to my problem.
I am exploring and learning about org-mode. About three days ago I was able to make a change related to customizing a default option for org-mode without a problem.
Then a few minutes later when I tried to add another custom setting, I got the above "forward-sexp..." error and continue to. I get this error when attempting to "Apply and save" any setting whatsoever, such as changing the color of the default face.
I tried swapping in an old "init.el" file, firing up a new emacs session, and making a change, but "Apply and save" also fails under those circumstances, so the problem does not appear related to my "init.el" file being corrupt.
Beyond that, I'm clueless.
Update 2015-11-03
Thank you Drew for your long and thoughtful reply. I'm still out to sea though.
I put (setq debug-on-error t)
at the top of my init.el file and attempted to change the color of the default face, uisng the Cutsomize option from the emacs menu.
I had to try three times before I got any backtrace output. Unfortunately, to me it's meaningless, but here it is...
Debugger entered--Lisp error: (scan-error "Unbalanced parentheses" 30598 41177) scan-sexps(1 41176) forward-sexp(41176)
custom-save-delete(custom-set-variables) custom-save-variables()
custom-save-all() Custom-save((push-button :tag " Apply and Save " :help-echo "Apply settings and save for future sessions." :action Custom-save :button-overlay # :from # :to #) (mouse-1 (# 191 (270 . 121) 23286452 nil 191 (26 . 5) nil (0 . 12) (10 . 25))))
widget-apply((push-button :tag " Apply and Save " :help-echo "Apply settings and save for future sessions." :action Custom-save :button-overlay # :from # :to #) :action (mouse-1 (# 191 (270 . 121) 23286452 nil 191 (26 . 5) nil (0 . 12) (10 . 25))))
widget-apply-action((push-button :tag " Apply and Save " :help-echo "Apply settings and save for future sessions." :action Custom-save :button-overlay # :from # :to #) (mouse-1 (# 191 (270 . 121) 23286452 nil 191 (26 . 5) nil (0 . 12) (10 . 25)))) #[0 "\306 r\307\310\311\312\313\314!\315\"\316\317%DC\216\320\321\300@!\211,@)!\210\212\321\300@!,\322,8\206B`
Then I used diff to compare the resulting modified but unsaved init.el, and an init.el from last May.
There were two differences,
- (setq debug-on-error t) on line one of today's init.el. and
- a macro that I edited about three weeks ago
Since I was able to do one customization a couple of days ago with no problem, and unable since then, the macro editing is not an issue
The main part of the custom-set-variables secton of the init file hasn't been changed for years.
It is...
(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.
'(auto-save-interval 75)
'(auto-save-timeout 10)
'(blink-cursor-mode nil)
'(bookmark-save-flag 0)
'(column-number-mode t)
'(dired-listing-switches "-al --group-directories-first --time-style=long-iso")
'(display-time-day-and-date t)
'(display-time-mode t)
'(fill-column 110)
'(fringe-mode 2 nil (fringe))
'(inhibit-startup-screen t)
'(ispell-highlight-face (quote highlight))
'(ispell-highlight-p t)
'(ispell-program-name "aspell" t)
'(load-home-init-file t t)
'(ls-lisp-dirs-first t)
'(make-backup-files nil)
'(scroll-bar-mode (quote right))
'(sentence-end-double-space nil)
'(sort-fold-case t t)
'(tool-bar-mode nil)
'(truncate-lines t)
'(vc-make-backup-files t)
'(version-control t)
'(visible-bell t)
'(x-select-enable-clipboard t))
;;(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.
;; )
The other part has been set for many months, and is...
;; make pandoc the default markdown parser
(custom-set-variables '(markdown-command "/usr/bin/pandoc"))
Earlier today I reinstalled all the Emacs packages as well, but no change from that either.
Update 2015-11-06: Edited. Reply reconfigured and moved into a whole new answer for clarity.
emacs -Q
and do the same thing. Does this produce an error?customize
settings part of your init file or are they in a separate file?