[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: error upon load and tab navigation [PATCH included]



In [emacs-w3m : No.12748]
On Fri, 14 Jul 2017 05:27:24 -0400, Boruch Baum wrote:
[...]
> The w3m section of my .emacs file currently reads

>   #+BEGIN_SRC emacs-lisp
>   (require 'htmlize) ; html syntax highlighting
>   ; (autoload 'w3m-browse-url "w3m" "Ask a WWW browser to show a URL." t)
>   (global-set-key "\C-xm" 'browse-url-at-point)

>   (setq
>     browse-url-browser-function  'w3m-goto-url-new-session
>     emacs-w3m-path  "/usr/share/emacs/site-lisp/w3m/"
>     w3m-init-file   "~/.emacs.d/emacs-w3m-init")
>   (add-to-list 'load-path emacs-w3m-path)
>   (require 'w3m-load)
>   #+END_SRC

Ok, I tried the following steps:

$ emacs -q

;; I don't have to modify `load-path' because:
(locate-library "w3m-load")
 => "/usr/local/share/emacs/26.0.50/site-lisp/w3m/w3m-load.elc"

;; I got the htmlize.el 1.51 from GitHub, slightly modified[1]
;; it, and ran `batch-byte-compile' on it.
(require 'htmlize)

(global-set-key "\C-xm" 'browse-url-at-point)
(setq browse-url-browser-function 'w3m-goto-url-new-session)
(require 'w3m-load)

And invoked `C-x m' on this line:

<http://www.gnu.org>

Then the page opened with no error nor warning.  There seems to
be no bad in Hrvoje Niksic's htmlize.el as long as I ran my eyes
through it.

[1] Avoid run-time cl:
--- htmlize.el~	2017-07-17 22:53:12.786392700 +0000
+++ htmlize.el	2017-07-17 22:59:45.732576200 +0000
@@ -83,4 +83,4 @@
 
-(require 'cl)
 (eval-when-compile
+  (require 'cl)
   (defvar unresolved)