Yuchen Pei <[email protected]> writes:

Yoni Rabkin <[email protected]> writes:

Yuchen Pei <[email protected]> writes:

Hello,

When I invoke (emms-playing-time-display-mode t) I get an error message about max-eval-depth being reached. It seems the problem is at:
https://git.savannah.gnu.org/cgit/emms.git/tree/emms-playing-time.el#n167

Would it make sense to remove the if statement?

If it fixes the problem, yes. I haven't checked.

OK, but then there's a comment before this if statement:

 > ;; When disabling the mode, don't disable   >
     `emms-playing-time-display-mode'
 > ;; since that may be used by other packages.

which I don't quite understand and so i'm not sure if the if statement
can be removed. When disabling which mode?

I'm sending a patch (see below) instead of pushing to a branch directly, since I'm not confident whether this will cause problems. Does it look OK?

From bbe2a14bed9716e6a6e16c281c85b305bd247cff Mon Sep 17 00:00:00 2001
From: Yuchen Pei <[email protected]>
Date: Tue, 24 Aug 2021 21:43:24 +1000
Subject: [PATCH] Removing an infinite loop enabling
 emms-playing-time-display-mode.

---
 emms-playing-time.el | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/emms-playing-time.el b/emms-playing-time.el
index c52d13a..e2a02fb 100644
--- a/emms-playing-time.el
+++ b/emms-playing-time.el
@@ -161,11 +161,7 @@ could call `emms-playing-time-enable-display' and
 ;;;###autoload
 (define-minor-mode emms-playing-time-display-mode
   "Minor mode to display playing time on mode line."
-  :global t
-  ;; When disabling the mode, don't disable `emms-playing-time-display-mode'
-  ;; since that may be used by other packages.
-  (if emms-playing-time-display-mode
-      (emms-playing-time-display-mode 1)))
+  :global t)
 
 ;;;###autoload
 (defun emms-playing-time-enable-display ()
-- 
2.33.0


--
Best,
Yuchen

PGP Key: 47F9 D050 1E11 8879 9040  4941 2126 7E93 EF86 DFD0
          <https://ypei.me/assets/ypei-pubkey.txt>

Attachment: signature.asc
Description: PGP signature

Reply via email to