Discussion:
[emms-help] Emms lyrics bug
Yoni Rabkin
2017-02-19 17:06:06 UTC
Permalink
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.
Another ping about this patch. It is one of only three compilation
warnings that we have, and would be nice to get down to zero before 4.3.
Rasmus
--
Vote for proprietary math!
From 2fabd6869ca93ab07b10fcdbeab9d3c5c26502ac Mon Sep 17 00:00:00 2001
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 internet."
;; systems, we'd better fall back on filename.
(format emms-lyrics-chinese-url
(emms-url-quote-plus
- (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 eww-after-render-hook)))
- (add-hook 'eww-after-render-hook 'eww-readable))))
- (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-readable))))
+ (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 online...")))))
--
"Cut your own wood and it will warm you twice"
Rasmus
2017-02-22 14:25:03 UTC
Permalink
Post by Yoni Rabkin
Another ping about this patch. It is one of only three compilation
warnings that we have, and would be nice to get down to zero before 4.3.
Sorry, I forgot! I pushed it now.

I still get this warning, though:

In emms-player-mpd-ensure-process:
emms-player-mpd.el:325:8:Warning: ‘process-kill-without-query’ is an obsolete
function (as of 22.1); use ‘process-query-on-exit-flag’ or
‘set-process-query-on-exit-flag’.
--
Not everything that goes around comes back around, you know
Yoni Rabkin
2017-02-26 22:31:08 UTC
Permalink
Post by Rasmus
Post by Yoni Rabkin
Another ping about this patch. It is one of only three compilation
warnings that we have, and would be nice to get down to zero before 4.3.
Sorry, I forgot! I pushed it now.
Thank you; it's appreciated.
Post by Rasmus
emms-player-mpd.el:325:8:Warning: ‘process-kill-without-query’ is an obsolete
function (as of 22.1); use ‘process-query-on-exit-flag’ or
‘set-process-query-on-exit-flag’.
I just pushed a change replacing that with:

(set-process-query-on-exit-flag emms-player-mpd-process nil)

...which should be the equivalent.
--
"Cut your own wood and it will warm you twice"
Loading...