redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.42k stars 615 forks source link

Warning (initialization): An error occurred while loading ‘/home/vagrant/.emacs.d/init.el’: Wrong type argument: stringp, nil #850

Closed nshigit closed 2 years ago

nshigit commented 4 years ago

OS: cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.4 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic

emacs: dpkg --list | grep emacs
ii emacs26-common 26.3~1.git96dd019-kk1+18.04 all GNU Emacs editor (common files used by Gtk and NoX variants)
ii emacs26-nox 26.3~1.git96dd019-kk1+18.04 amd64 GNU Emacs editor (with text-only user interface)
ii emacsen-common 2.0.8 all Common facilities for all emacsen

emacs.d: git log
commit f231da174bbaf17ed7d6064faf5df53484347933 (HEAD -> master, origin/master, origin/HEAD) Author: Chen Bin chenbin.sh@gmail.com Date: Tue Jul 7 13:56:34 2020 +1000

README

commit bd2109b249c26ab09b45070eeb9406295758a67d Author: Chen Bin chenbin.sh@gmail.com Date: Tue Jul 7 00:11:45 2020 +1000

add tide

commit 99c1676a069964f8a3ece5844715163d31ee4d9e Author: Chen Bin chenbin.sh@gmail.com Date: Mon Jul 6 23:30:01 2020 +1000

remove multi-term

commit c12affec69491e9c212ca3bbb894c2b2a0be5388 Author: Chen Bin chenbin.sh@gmail.com Date: Mon Jul 6 20:53:35 2020 +1000

clean doc

commit 5f8d28a53fb2fadb34c798c9ef154382b08c2d09 Author: Chen Bin chenbin.sh@gmail.com Date: Fri Jul 3 21:27:33 2020 +1000

move comint configuration into init-term-mode.el

emacs --debug-init

Debugger entered--Lisp error: (wrong-type-argument stringp nil) string-match("\`https?:" nil nil) package-install-from-archive(#s(package-desc :name csv-mode :version (1 7) :summary "Major mode for editing comma/char separated values" :reqs nil :kind single :archive "gnu" :dir nil :extras ((:url . "http://elpa.gnu.org/packages/csv-$ mapc(package-install-from-archive (#s(package-desc :name csv-mode :version (1 7) :summary "Major mode for editing comma/char separated values" :reqs nil :kind single :archive "gnu" :dir nil :extras ((:url . "http://elpa.gnu.org/package$ package-download-transaction((#s(package-desc :name csv-mode :version (1 7) :summary "Major mode for editing comma/char separated values" :reqs nil :kind single :archive "gnu" :dir nil :extras ((:url . "http://elpa.gnu.org/packages/csv$ package-install(csv-mode) (cond ((package-installed-p package min-version) t) ((or (assoc package package-archive-contents) no-refresh) (package-install package)) (t (package-refresh-contents) (require-package package min-version t))) require-package(csv-mode) eval-buffer(#<buffer load-769059> nil "/home/vagrant/.emacs.d/lisp/init-elpa.el" nil t) ; Reading at buffer position 7142 load-with-code-conversion("/home/vagrant/.emacs.d/lisp/init-elpa.el" "/home/vagrant/.emacs.d/lisp/init-elpa.el" t t) load("/home/vagrant/.emacs.d/lisp/init-elpa" t t) (progn (load (file-truename (format "%s/%s" my-lisp-dir pkg)) t t)) (if (or (not maybe-disabled) (not (my-vc-merge-p))) (progn (load (file-truename (format "%s/%s" my-lisp-dir pkg)) t t))) require-init(init-elpa) (let ((file-name-handler-alist nil)) (require-init (quote init-autoload)) (require-init (quote init-modeline)) (require-init (quote init-utils)) (require-init (quote init-file-type)) (require-init (quote init-elpa)) (require-init (quo$ eval-buffer(#<buffer load*> nil "/home/vagrant/.emacs.d/init.el" nil t) ; Reading at buffer position 6784 load-with-code-conversion("/home/vagrant/.emacs.d/init.el" "/home/vagrant/.emacs.d/init.el" t t) load("/home/vagrant/.emacs.d/init" t t)

f(compiled-function () #<bytecode 0x238f49>)()

command-line() normal-top-level()

redguardtoo commented 4 years ago

My emacs.d is fine. Looks you got network problem to download package from https://elpa.gnu.org

nshigit commented 4 years ago

add empty .emacs file in $HOME can avoid this problem. According to the readme, after download the offline myelpa-stable package. it works file.

redguardtoo commented 4 years ago

You should remove ~/.emacs. It will overshadow ~/.emacs.d/init.el. If you got network problem, just restart emacs.