benma / visual-regexp.el

A regexp/replace command for Emacs with interactive visual feedback
392 stars 28 forks source link

Windows 10, Emacs 25.1: Symbol's value as variable is void: closed #49

Closed alexei-28 closed 7 years ago

alexei-28 commented 7 years ago

Windows 10 (64 bit), Emacs 25.1. Install package visual-regexp from Melpa.

Package installed in folder: d:\Programs\emacs.emacs.d\elpa\visual-regexp-20170228.1716\

In my init.el

(add-to-list 'load-path "~/.emacs.d/elpa")
(require 'visual-regexp)

When I run eval (C-x e) I get error:

eval-buffer(#<buffer *load*> nil "d:/Programs/emacs/.emacs.d/elpa/visual-regexp-20170228.1716/visual-regexp.el" nil t) ; Reading at buffer position 7 load-with-code-conversion("d:/Programs/emacs/.emacs.d/elpa/visual-regexp-20170228.1716/visual-regexp.el" "d:/Programs/emacs/.emacs.d/elpa/visual-regexp-20170228.1716/visual-regexp.el" nil t) require(visual-regexp) eval((require (quote visual-regexp)) nil) elisp--eval-last-sexp(nil) eval-last-sexp(nil) funcall-interactively(eval-last-sexp nil) call-interactively(eval-last-sexp nil nil) command-execute(eval-last-sexp)

When start Emacs get error:


`Warning (initialization): An error occurred while loading ‘d:/Programs/emacs/.emacs.d/init.el’:
Symbol's value as variable is void: closed`
benma commented 7 years ago

Have you tried running that with emacs -q? The symbol name closed' is unknown to me, so it might be something else in your config that is wrong.

(add-to-list 'load-path "~/.emacs.d/elpa") does nothing for enabling the next line. If you go this way, you need to add the full path to the visual-regexp folder to the load-path.

I use (package-initialize) do set up load paths etc.

alexei-28 commented 7 years ago

I try emacs -q - as result Emacs start success.

My init.el:

`;; start package.el with emacs
(require 'package)
;; add MELPA to repository list
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; initialize package.el
(package-initialize)

(add-to-list 'load-path "~/.emacs.d/elpa")
(load "~/.emacs.d/custom.el")
(load "~/.emacs.d/emacs-init-keybindings.el")
(load "~/.emacs.d/emacs-keyboard-macros.el")`

(require 'visual-regexp)

I get error:

Symbol's value as variable is void: closed

After install package from Emacs I get the next message:

Leaving directory ‘d:/Programs/emacs/.emacs.d/elpa/visual-regexp-20170228.1716’

Compiling file d:/Programs/emacs/.emacs.d/elpa/visual-regexp-20170228.1716/visual-regexp.el at Sat Jun  3 14:14:28 2017
Entering directory ‘d:/Programs/emacs/.emacs.d/elpa/visual-regexp-20170228.1716/’
visual-regexp.el:3:17:Warning: reference to free variable ‘O’
visual-regexp.el:3:36:Warning: reference to free variable ‘CN’
visual-regexp.el:4:59:Error: End of file during parsing

Compiling no file at Sat Jun  3 14:14:28 2017
benma commented 7 years ago

What happens if you remove those lines?

(add-to-list 'load-path "~/.emacs.d/elpa")
(load "~/.emacs.d/custom.el")
(load "~/.emacs.d/emacs-init-keybindings.el")
(load "~/.emacs.d/emacs-keyboard-macros.el")`
alexei-28 commented 7 years ago

If remove those lines

(add-to-list 'load-path "~/.emacs.d/elpa")
(load "~/.emacs.d/custom.el")
(load "~/.emacs.d/emacs-init-keybindings.el")
(load "~/.emacs.d/emacs-keyboard-macros.el")`

I get the same error (when start Emacs)

Symbol's value as variable is void: closed

alexei-28 commented 7 years ago

I found the problem. In file ....emacs.d\elpa\visual-regexp-20170228.1716\visual-regexp.el

has the the next content:


closed
WARNING: can't open config file: /etc/ssl/openssl.cnf
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify error:num=20:unable to get local issuer certificate

So I download visual-regexp.el from Melpa:
http://melpa.milkbox.net/packages/visual-regexp-20170228.1716.el

Replace file, and now it's work fine!

benma commented 7 years ago

Great!