emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/emms a107112d0a 2/3: * emms-player-mpv.el: remove emms-


From: ELPA Syncer
Subject: [elpa] externals/emms a107112d0a 2/3: * emms-player-mpv.el: remove emms-player-mpv-ipc-conn-emacs-26.1-workaround
Date: Fri, 12 Jan 2024 16:04:39 -0500 (EST)

branch: externals/emms
commit a107112d0a06a643a1ad022c9f8280897d9c2088
Author: Mike Kazantsev <mk.fraggod@gmail.com>
Commit: fraggod@malediction <mk.fraggod@gmail.com>

    * emms-player-mpv.el: remove emms-player-mpv-ipc-conn-emacs-26.1-workaround
    
    Emms should support emacs 28-29 series, and 26 is way out of date by now.
    And that workaround was only needed for bug in initial 26.1 release there.
---
 emms-player-mpv.el | 47 ++++++++++++++++-------------------------------
 1 file changed, 16 insertions(+), 31 deletions(-)

diff --git a/emms-player-mpv.el b/emms-player-mpv.el
index 0dc7b09096..0db807b7de 100644
--- a/emms-player-mpv.el
+++ b/emms-player-mpv.el
@@ -178,7 +178,7 @@ if it refuses to exit cleanly on 
`emms-player-mpv-proc-stop'.")
 instance.")
 
 (defvar emms-player-mpv-ipc-buffer " *emms-player-mpv-ipc*"
-       "Buffer to associate with `emms-player-mpv-ipc-proc' socket process.")
+  "Buffer to associate with `emms-player-mpv-ipc-proc' socket process.")
 
 (defvar emms-player-mpv-ipc-connect-timer nil
   "Timer for connection attempts to JSON IPC unix socket.")
@@ -243,14 +243,6 @@ to indicate that playback should stop instead of switching 
to next track.")
   "Delay before issuing `emms-player-stopped\\=' when mpv unexpectedly goes 
idle.")
 
 
-(defvar emms-player-mpv-ipc-conn-emacs-26.1-workaround
-  (and (= emacs-major-version 26)
-       (= emacs-minor-version 1))
-  "Non-nil to enable workaround for issue #31901 in emacs 26.1.
-Emacs 26.1 fails to indicate missing socket file error for unix socket
-network processes that were started with :nowait t, so blocking connections
-are used there instead.")
-
 (make-obsolete 'emms-player-mpv-ipc-method nil "Emms 18")
 
 (defcustom emms-player-mpv-ipc-method nil
@@ -415,29 +407,22 @@ MEDIA-ARGS are used instead of --idle, if specified."
 (cdr DELAYS) gets passed to next connection attempt,
 so it can be rescheduled further until function runs out of DELAYS values.
 Sets `emms-player-mpv-ipc-proc' value to resulting process on success."
-  ;; Note - emacs handles missing unix socket files in different ways between 
versions:
-  ;;  emacs <26 returns nil, emacs 26.1 leaves process in a stuck 'open
-  ;;  state (see issue #31901), emacs 26.2+ sets 'file-missing status.
-  ;;  None of these cases call sentinel function, so status must also be 
checked here.
   (emms-player-mpv-debug-msg "ipc: connect-delay %s" (car delays))
-  (let ((use-nowait (not emms-player-mpv-ipc-conn-emacs-26.1-workaround)))
-    (setq emms-player-mpv-ipc-proc
-          (condition-case nil
-              (make-network-process
-               :name "emms-player-mpv-ipc"
-               :family 'local
-               :service emms-player-mpv-ipc-socket
-               :nowait use-nowait
-               :coding '(utf-8 . utf-8)
-               :buffer (get-buffer-create emms-player-mpv-ipc-buffer)
-               :noquery t
-               :filter #'emms-player-mpv-ipc-filter
-               :sentinel #'emms-player-mpv-ipc-sentinel)
-            (file-error nil)))
-    (unless (process-live-p emms-player-mpv-ipc-proc)
-      (setq emms-player-mpv-ipc-proc nil))
-    (when (and emms-player-mpv-ipc-proc (not use-nowait))
-      (emms-player-mpv-ipc-sentinel emms-player-mpv-ipc-proc 'open)))
+  (setq emms-player-mpv-ipc-proc
+        (condition-case nil
+            (make-network-process
+             :name "emms-player-mpv-ipc"
+             :family 'local
+             :service emms-player-mpv-ipc-socket
+             :nowait t
+             :coding '(utf-8 . utf-8)
+             :buffer (get-buffer-create emms-player-mpv-ipc-buffer)
+             :noquery t
+             :filter #'emms-player-mpv-ipc-filter
+             :sentinel #'emms-player-mpv-ipc-sentinel)
+          (file-error nil)))
+  (unless (process-live-p emms-player-mpv-ipc-proc)
+    (setq emms-player-mpv-ipc-proc nil))
   (when (and (not emms-player-mpv-ipc-proc)
              delays)
     (run-at-time (car delays)



reply via email to

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