[Pkg-emacsen-addons] htmlize.el and elpa-muse/muse-el

Nicholas D Steeves nsteeves at gmail.com
Thu Sep 1 04:13:35 UTC 2016


Hi,

Spwhitton and I were chatting about this on #debian-emacs last night.
It is concerning elpa-muse, which is currently in the emacsen-addons
git project as the muse-el repo.

First the problem:  with htmlize.el from either/both
org-mode/emacs-goodies-el, the following occurs during installation/configuration:

    In toplevel form:
    htmlize-hack.el:5:1:Error: Cannot open load file: no such file or directory, htmlize
    Wrote /usr/share/emacs24/site-lisp/elpa/muse-3.20/httpd.elc

Full pastebin: https://paste.debian.net/799783/

I created the following quilt patch and tested it locally, but haven't
pushed it yet.  I've tested two versions of it, one with just (require
'htmlize.el), and one that has both (require 'htmlize.el) and (provide
'htmlize-hack), but not the obsolete version check.  Both avoid the
above block-quoted error.  What blows my mind is that function should
be skipped when the version check fails to find (equal htmlize-version
= "1.34")...

Index: muse-el/contrib/htmlize-hack.el                                                      
===================================================================
--- muse-el.orig/contrib/htmlize-hack.el                                                    
+++ muse-el/contrib/htmlize-hack.el                                                         
@@ -4,16 +4,16 @@
                                                                                            
 (require 'htmlize)                                                                         
                                                                                            
-(when (equal htmlize-version "1.34")                                                       
-  (defun htmlize-face-size (face)                                                          
-    ;; The size (height) of FACE, taking inheritance into account.                         
-    ;; Only works in Emacs 21 and later.                                                   
-    (let ((size-list                                                                       
-           (loop                                                                           
-            for f = face then (face-attribute f :inherit)                                  
-            until (or (null f) (eq f 'unspecified))                                        
-            for h = (face-attribute f :height)                                             
-            collect (if (eq h 'unspecified) nil h))))                                      
-      (reduce 'htmlize-merge-size (cons nil size-list)))))                                 
+;; (when (equal htmlize-version "1.34")                                                    
+;;   (defun htmlize-face-size (face)                                                       
+;;     ;; The size (height) of FACE, taking inheritance into account.                      
+;;     ;; Only works in Emacs 21 and later.                                                
+;;     (let ((size-list                                                                    
+;;            (loop                                                                        
+;;             for f = face then (face-attribute f :inherit)                               
+;;             until (or (null f) (eq f 'unspecified))                                     
+;;             for h = (face-attribute f :height)                                          
+;;             collect (if (eq h 'unspecified) nil h))))                                   
+;;       (reduce 'htmlize-merge-size (cons nil size-list)))))                              
                                                                                            
 (provide 'htmlize-hack)

Does this mean that there is a bug in elpa that is triggered by
version checks?  Or was the installation/configurations previously
failing because the version check failed because htmlize wasn't
actually loadable?  I would expect that it would fail immediately at
(require 'htmlize) if htmlize cannot be found...

Cheers,
Nicholas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-emacsen-addons/attachments/20160901/8f8c4617/attachment.sig>


More information about the Pkg-emacsen-addons mailing list