1

After installing the new Emacs 25.1 (universal binary) on my Mac OSX 10.11.6 I got the following init error after starting with --debug-init. I don't know what to do. Can you help me?

Debugger entered--Lisp error: (void-function set-fringe-mode)
  (set-fringe-mode (quote (5 . 5)))
  eval-buffer(#<buffer  *load*-808999> nil "/Users/sergiobacelar/.emacs.d/starter-kit-bindings.el" nil t)  ; Reading at buffe$

UPDATE: After solving fringe-modeproblem I got new ones: This is the new debug-init:

Debugger entered--Lisp error: (invalid-function (quote (["Comment Out Region" comment-region (c-fn-region-is-active-p)] ["Uncomment Region" (comment-region (region-beginning) (region-end) (quote (4))) (c-fn-region-is-active-p)] ["Indent Expression" c-indent-exp (memq (char-after) (quote (40 91 123)))] ["Indent Line or Region" c-indent-line-or-region t] ["Fill Comment Paragraph" c-fill-paragraph t] "----" ["Backward Statement" stan-beginning-of-statement t] ["Forward Statement" stan-end-of-statement t] ["Backward Block" stan-beginning-of-block t] ["Forward Block" stan-end-of-block t] ["Mark Block" stan-mark-block t] "----" ("Style..." ["Set Style..." c-set-style t] ["Show Current Style Name" (message "Style Name: %s" c-indentation-style) t] ["Guess Style from this Buffer" c-guess-buffer-no-install t] ["Install the Last Guessed Style" c-guess-install (and c-guess-guessed-offsets-alist c-guess-guessed-basic-offset)] ["View the Last Guessed Style" c-guess-view (and c-guess-guessed-offsets-alist c-guess-guessed-basic-offset)]) "----" ("Toggle..." ["Syntactic indentation" c-toggle-syntactic-indentation t] ["Electric mode" c-toggle-electric-state t] ["Auto newline" c-toggle-auto-newline t] ["Hungry delete" c-toggle-hungry-state t] ["Subword mode" c-subword-mode t]))))
  signal(invalid-function ((quote (["Comment Out Region" comment-region (c-fn-region-is-active-p)] ["Uncomment Region" (comment-region (region-beginning) (region-end) (quote (4))) (c-fn-region-is-active-p)] ["Indent Expression" c-indent-exp (memq (char-after) (quote (40 91 123)))] ["Indent Line or Region" c-indent-line-or-region t] ["Fill Comment Paragraph" c-fill-paragraph t] "----" ["Backward Statement" stan-beginning-of-statement t] ["Forward Statement" stan-end-of-statement t] ["Backward Block" stan-beginning-of-block t] ["Forward Block" stan-end-of-block t] ["Mark Block" stan-mark-block t] "----" ("Style..." ["Set Style..." c-set-style t] ["Show Current Style Name" (message "Style Name: %s" c-indentation-style) t] ["Guess Style from this Buffer" c-guess-buffer-no-install t] ["Install the Last Guessed Style" c-guess-install (and c-guess-guessed-offsets-alist c-guess-guessed-basic-offset)] ["View the Last Guessed Style" c-guess-view (and c-guess-guessed-offsets-alist c-guess-guessed-basic-offset)]) "----" ("Toggle..." ["Syntactic indentation" c-toggle-syntactic-indentation t] ["Electric mode" c-toggle-electric-state t] ["Auto newline" c-toggle-auto-newline t] ["Hungry delete" c-toggle-hungry-state t] ["Subword mode" c-subword-mode t])))))
  c-get-lang-constant(c-mode-menu (cc-langs) stan-mode)
  byte-code("\302\303\304\305   \306=\203\307\202\310\311\312\313#B$\207" [stan-mode-map c-version-sym easy-menu-do-define stan-menu "Stan Mode Commands" "Stan" 5\.32\.5 (["Comment Out Region" comment-region (c-fn-region-is-active-p)] ["Uncomment Region" (comment-region (region-beginning) (region-end) (quote (4))) (c-fn-region-is-active-p)] ["Indent Expression" c-indent-exp (memq (char-after) (quote (40 91 123)))] ["Indent Line or Region" c-indent-line-or-region t] ["Fill Comment Paragraph" c-fill-paragraph t] "----" ["Backward Statement" stan-beginning-of-statement t] ["Forward Statement" stan-end-of-statement t] ["Backward Block" stan-beginning-of-block t] ["Forward Block" stan-end-of-block t] ["Mark Block" stan-mark-block t] "----" ("Style..." ["Set Style..." c-set-style t] ["Show Current Style Name" (message "Style Name: %s" c-indentation-style) t] ["Guess Style from this Buffer" c-guess-buffer-no-install t] ["Install the Last Guessed Style" c-guess-install (and c-guess-guessed-offsets-alist c-guess-guessed-basic-offset)] ["View the Last Guessed Style" c-guess-view (and c-guess-guessed-offsets-alist c-guess-guessed-basic-offset)]) "----" ("Toggle..." ["Syntactic indentation" c-toggle-syntactic-indentation t] ["Electric mode" c-toggle-electric-state t] ["Auto newline" c-toggle-auto-newline t] ["Hungry delete" c-toggle-hungry-state t] ["Subword mode" c-subword-mode t])) c-get-lang-constant c-mode-menu (cc-langs) stan-mode] 9)
  require(stan-mode)
  byte-code("\300\301!\210\300\302!\207" [require stan-mode yasnippet] 2)
  (stan-snippets-initialize)
  (lambda nil (stan-snippets-initialize))()
  eval-after-load-helper("/Users/sergiobacelar/.emacs.d/elpa/yasnippet-20160801.1142/yasnippet.elc")
  run-hook-with-args(eval-after-load-helper "/Users/sergiobacelar/.emacs.d/elpa/yasnippet-20160801.1142/yasnippet.elc")
  do-after-load-evaluation("/Users/sergiobacelar/.emacs.d/elpa/yasnippet-20160801.1142/yasnippet.elc")
  require(yasnippet)
  eval-buffer(#<buffer  *load*-202317> nil "/Users/sergiobacelar/.emacs.d/starter-kit-completion.el" nil t)  ; Reading at buffer position 226
  load-with-code-conversion("/Users/sergiobacelar/.emacs.d/starter-kit-completion.el" "/Users/sergiobacelar/.emacs.d/starter-kit-completion.el" nil nil)
  load("/Users/sergiobacelar/.emacs.d/starter-kit-completion.el" nil nil t)
  load-file("/Users/sergiobacelar/.emacs.d/starter-kit-completion.el")
  org-babel-load-file("/Users/sergiobacelar/.emacs.d/starter-kit-completion.org")
  starter-kit-load("starter-kit-completion.org")
  eval-buffer(#<buffer  *load*-77724> nil "/Users/sergiobacelar/.emacs.d/starter-kit.el" nil t)  ; Reading at buffer position 3859
  load-with-code-conversion("/Users/sergiobacelar/.emacs.d/starter-kit.el" "/Users/sergiobacelar/.emacs.d/starter-kit.el" nil nil)
  load("/Users/sergiobacelar/.emacs.d/starter-kit.el" nil nil t)
  load-file("/Users/sergiobacelar/.emacs.d/starter-kit.el")
  org-babel-load-file("/Users/sergiobacelar/.emacs.d/starter-kit.org")
  eval-buffer(#<buffer  *load*> nil "/Users/sergiobacelar/.emacs.d/init.el" nil t)  ; Reading at buffer position 3581
  load-with-code-conversion("/Users/sergiobacelar/.emacs.d/init.el" "/Users/sergiobacelar/.emacs.d/init.el" t t)
  load("/Users/sergiobacelar/.emacs.d/init" t t)
  #[0 "\205\266 \306=\203\307\310Q\202? \311=\204\307\312Q\202?\313\307\314\315#\203*\316\202?\313\307\314\317#\203>\320\321\322!D\nB\323\202?\316\324\325\324\211#\210\324=\203e\326\327\330\307\331Q!\"\325\324\211#\210\324=\203d\210\203\247\332!\333\232\203\247\334!\211\335P\336!\203\201\211\202\214\336!\203\213\202\214\314\262\203\245\337\"\203\243\340\341#\210\342\343!\210\266\f?\205\264\314\325\344\324\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" initialization format-message "`_emacs' init file is deprecated, please use `.emacs'" "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7]()
  command-line()
  normal-top-level()
  • Could you check if fringe-mode works? Just eval (fringe-mode '(5 . 5)). – caisah Sep 18 '16 at 9:42
  • It evaluates to ((vertical-scroll-bars) (left-fringe . 5) (right-fringe . 5). I tried to comment fringe-mode but others errors started to show. – sbac Sep 18 '16 at 9:58
  • I think it's a problem with your init. You should try to see what's going on there. Try bisecting/disable starter-kit-bindings and see if it's still reproducing. – caisah Sep 18 '16 at 10:40
  • I commented out references to minimal-mode and fringe-mode in starter-kit-bindings and starter-kit-misc and the result of emacs --debug-init is now (part of): require(yasnippet) eval-buffer(#<buffer *load*-591772> nil "/Users/sergiobacelar/.emacs.d/starter-kit-completion.el" nil t) ; Reading at buffer position 226 load-with-code-conversion("/Users/sergiobacelar/.emacs.d/starter-kit-completion.el" – sbac Sep 18 '16 at 11:05
  • Do you have all the dependencies in your load-path? Do you run package-initialize somewhere? – caisah Sep 18 '16 at 11:57
2

The original poster is suffering from two (2) distinct issues.

Issue #1:  The first issue is resolved by placing (require 'fringe) at the top of the .emacs file, saving the modified file, and restarting Emacs. The first error message tells us that the function set-fringe-mode has not been defined yet, and a quick grep of the Emacs lisp source-code reveals that the function at issue is contained in the library fringe.el. If we open up fringe.el, we can see that it contains a provide statement at the bottom of the file -- so a require statement in the .emacs file is sufficient to load the entire fringe.el file (assuming it is in its default location within the load-path). We put the require statement at the top of the .emacs file because we are guaranteed that it will load first in time -- before whatever else in the user-configuration is calling a function from that library.

Issue #2: The second issue/diagnosis was identified by @npostavs as being a known problem with stan-mode incapatibality with Emacs 25: https://github.com/stan-dev/stan-mode/issues/47 There are a few general approaches (1) disable stan-mode in the user-configuration and don't use it; (2) wait patiently for a fix from the stan-mode maintainers; (3) dig-into stan-mode and cc-mode and contribute to fixing Github issue number 47; or, (4) go back to a previous version of Emacs where stan-mode still plays nice with cc-mode.

  • Solved fringe problem but the init error remains: Eval error in the ‘c-lang-defconst’ for ‘c-mode-menu’ in stan-mode:I have no space for debug-initoutput. – sbac Sep 18 '16 at 20:16
  • You will need to debug one error at a time, and debug output similar to what was listed in the question above would be helpful. The one-liner debug output just isn't enough to go on other than telling us there is a problem loading stan-mode, whatever that is. Either edit the question above using something like a separator to indicate it is an update, and mention the progress made so far . . ., or launch a new question dealing with the new error. – lawlist Sep 18 '16 at 20:20
  • I have edited the initial question with an update. – sbac Sep 18 '16 at 21:01
  • I'm going to take a wild guess and suggest try placing (require 'cc-mode) on the line following (require 'fringe), but that's not a guarantee it will fix it. If it works, then great -- if not, let me know please and I'll keep spinning my mental wheels. Most of the functions mentioned in the debugger message (containing the edited material) are loaded by cc-mode and related libraries that get triggered/loaded. – lawlist Sep 18 '16 at 21:29
  • 1
    @sbac: looks like stan-mode doesn't support Emacs 25 (apparently due to changes in cc-mode), see stan-mode#47 – npostavs Sep 18 '16 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.