[Top][All Lists]

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

Re: [emms-help] Emms lyrics bug

From: Rasmus
Subject: Re: [emms-help] Emms lyrics bug
Date: Wed, 21 Dec 2016 14:35:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Yoni Rabkin <address@hidden> writes:

>>>> A handful of compilation bugs are left. Among them:
>>>> In emms-lyrics-visit-lyric:
>>>> emms-lyrics.el:240:53:Warning: reference to free variable ‘filename’
>>>> emms-lyrics.el:248:47:Warning: reference to free variable
>>>>     ‘eww-after-render-hook’
>>>> These seem to trace back to Rasmus' commit
>>>> 6bc53c76eadaee1ba37d6301c28ac987d77c0124 from 2015.
>>>> Rasmus, can you please fix that issue by either re-binding filename to
>>>> the right value in that `let' or doing away with it altogether?
>>> I don't understand why it's unhappy about filename.
>> Because filename is unbound. It used to be bound in the enclosing `let',
>> but you removed that.
> To be more specific, here is the function. Note that filename isn't
> bound, but referenced.

Sorry, there was a git merge action required that I didn't catch.

Should I install the attached patch.


Vote for proprietary math!
>From 2fabd6869ca93ab07b10fcdbeab9d3c5c26502ac Mon Sep 17 00:00:00 2001
From: Rasmus <address@hidden>
Date: Wed, 21 Dec 2016 14:32:44 +0100
Subject: [PATCH] * lisp/emms-lyrics.el (emms-lyrics-visit-lyric): Fix error
 from 6bc5

 lisp/emms-lyrics.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/emms-lyrics.el b/lisp/emms-lyrics.el
index 6325ceb..95b8e29 100644
--- a/lisp/emms-lyrics.el
+++ b/lisp/emms-lyrics.el
@@ -237,18 +237,18 @@ If we can't find it from local disk, then search it from 
                      ;; systems, we'd better fall back on filename.
                      (format emms-lyrics-chinese-url
-                              (encode-coding-string filename 'gb2312))))
-                    (t ; English lyrics.
+                              (encode-coding-string name 'gb2312))))
+                    (t ; English lyrics.g
                      (format emms-lyrics-latin-url
                              (if artist (concat (emms-url-quote-underscore 
artist) ":") "")
                              (emms-url-quote-underscore title))))))
         (if (fboundp 'eww)
-            (let ((readable-hook (when (and (fboundp 'eww-readable)
-                                            (not (memq 'eww-readable 
-                                   (add-hook 'eww-after-render-hook 
-              (eww url)
-              (when readable-hook
-                (remove-hook 'eww-after-render-hook 'eww-readable)))
+            (progn (require 'eww)
+                   (let ((readable-hook (when (fboundp 'eww-readable)
+                                          (add-hook 'eww-after-render-hook 
+                     (eww url)
+                     (when readable-hook
+                       (remove-hook 'eww-after-render-hook 'eww-readable))))
           (browse-url url))
         (message "Lyric file does not exist on file-system.  Searching 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]