I am getting an error Wrong type argument: listp, closed while starting my Emacs. I tried to debug each line and do a M-x eval-buffer during configuration. At at time, it was showing only End of line in buffer reached. I pasting my complete code below even though most of the come I have commented. I am a newbie in emacs and org-mode, so debugging is bit difficult for me. Kindly help.

Updated .emacs File

;; .emacs after suggestion from lawlist

;; Added by Package.el.  This must come before configurations of
;; installed packages.  Don't delete this line.  If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.

(progn (load-theme 'manoj-dark)
       (setq frame-title-format "shree@emacs")
       (tool-bar-mode -1)
       (scroll-bar-mode -1)
       (require 'package)
       (add-to-list 'package-archives 
           '("melpa" . "http://melpa.org/packages/") t)        
       (add-to-list 'package-archives
           '("marmalade" . "http://marmalade-repo.org/packages/") t))

Update: Added the back trace of error:

Debugger entered--Lisp error: (wrong-type-argument listp closed)
  eval-buffer()  ; Reading at buffer position 339
  call-interactively(eval-buffer record nil)
  command-execute(eval-buffer record)
  execute-extended-command(nil "eval-buffer" "eval-buffer")
  funcall-interactively(execute-extended-command nil "eval-buffer" "eval-buffer")
  call-interactively(execute-extended-command nil nil)
  • Your problem is somewhere other than the user-configuration that you have posted ... perhaps inside the manoj-dark theme, but that is just a guess. Might I suggest that you eliminate all of your commented out lines and reduce your configuration in the question to just the nine (9) lines that are actually being loaded ... There is no point having the forum participants reading code that is not being evaluated; i.e., the commented out stuff does not help anyone answer your question ... In general, a minimal working example or minimal non-working example is the preferred type of question.. – lawlist Dec 4 '19 at 6:05
  • Your 163-line user-configuration can be reduced to the following snippet: (progn (load-theme 'manoj-dark) (setq frame-title-format "shree@emacs") (tool-bar-mode -1) (scroll-bar-mode -1) (show-paren-mode) (windmove-default-keybindings) (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t)) Moreover, evaluating that code snippet after loading Emacs without any user configuration does not throw any errors. – lawlist Dec 4 '19 at 6:09
  • Please check my new .emacs file. I have done according to your suggestion. The first comment is by me, and the rest by Emacs while starting. Still, I am getting the same error. Earlier also, I was getting error in package-initialize. – Sreekumar R Dec 4 '19 at 7:38
  • starting emacs as emacs --debug-init might give us some more clues as to where the error is coming from. – Tyler Dec 4 '19 at 17:21
  • I tried that. It is starting a different Emacs insistence. In my emacs/bin folder, I have emacs.exe, emacs-25.1.exe, and runemacs.exe. When starting from command line, I am getting a fresh new verison not configured yet. However, when start by clicking the icon, I am getting this current instance with manoj-dark theme. The init folders are also different. Icon based starting refers to C:\Users\Sreekumar\AppData\Roaming, while starting from command line the folder is C:\Users\Sreekumar. – Sreekumar R Dec 4 '19 at 20:45

Your Answer

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

Browse other questions tagged or ask your own question.