[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/mpdired 5626857ca4 103/133: playlist -> mpdired--direct
From: |
ELPA Syncer |
Subject: |
[elpa] externals/mpdired 5626857ca4 103/133: playlist -> mpdired--directory |
Date: |
Sun, 10 Mar 2024 15:59:40 -0400 (EDT) |
branch: externals/mpdired
commit 5626857ca41ba31dd72dbafa31129861468da9fd
Author: Manuel Giraud <manuel@ledu-giraud.fr>
Commit: Manuel Giraud <manuel@ledu-giraud.fr>
playlist -> mpdired--directory
Current playlist is stored into 'mpdired--directory'.
---
mpdired.el | 38 +++++++++++++++++---------------------
1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/mpdired.el b/mpdired.el
index c1f4af2f6f..6df7f47aa2 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -140,8 +140,6 @@
'((t :inherit dired-special))
"Face used to show the progress of a song.")
-
-
(defface mpdired-marked
'((t :inherit dired-marked))
"Face used to show a marked entry.")
@@ -157,6 +155,7 @@
(defvar-local mpdired--main-buffer nil
"Link to the main MPDired buffer.")
(defvar-local mpdired--ascending-p nil)
+(defvar-local mpdired--playlist nil)
(defvar-local mpdired--message nil)
(defun mpdired--subdir-p (dir-a dir-b)
@@ -309,9 +308,7 @@
(defvar-local mpdired--view nil
"Current view of the MPDired buffer.")
(defvar-local mpdired--directory nil
- "Current directory of the browser view.")
-(defvar-local mpdired--playlist nil
- "Current browsed playlist.")
+ "Current directory (or MPD playlist) of the browser view.")
(defvar-local mpdired--comm-buffer nil
"Communication buffer associated to this MPDired buffer.")
(defvar-local mpdired--status nil
@@ -423,21 +420,22 @@
ascending-p from)
;; Retrieve infos from this process buffer
(with-current-buffer (process-buffer proc)
- (setq ascending-p mpdired--ascending-p))
+ (setq ascending-p mpdired--ascending-p
+ playlist mpdired--playlist))
(with-current-buffer (get-buffer-create main-buffer)
(let* ((inhibit-read-only t)
;; `content' is always of the form ("" rest...) so if there
;; is only one "rest" use it as content.
(content (if (cddr content) content (cadr content)))
- (top (unless (string= "" (car content)) (car content)))
+ (top (if playlist
+ playlist
+ (unless (string= "" (car content)) (car content))))
(data (cdr content)))
(erase-buffer)
;; Insert the content
(save-excursion
- (cond ((stringp top)
- (insert (propertize top 'face 'mpdired-currdir) ":\n"))
- (mpdired--playlist
- (insert (propertize mpdired--playlist 'face 'mpdired-currdir)
":\n")))
+ (when (stringp top)
+ (insert (propertize top 'face 'mpdired-currdir) ":\n"))
(dolist (e data) (mpdired--insert-entry e)))
;; Set mode and memorize stuff
(mpdired-mode)
@@ -597,9 +595,8 @@ an optional communication buffer."
(defun mpdired-listplaylist-internal (path &optional ascending-p)
(mpdired--with-comm-buffer process nil
(setq mpdired--last-command 'listplaylist
- mpdired--ascending-p ascending-p)
- (with-current-buffer mpdired--main-buffer
- (setq mpdired--playlist path))
+ mpdired--ascending-p ascending-p
+ mpdired--playlist path)
(process-send-string process (format "listplaylist \"%s\"\n" path))))
(defun mpdired-queue-internal (&optional buffer)
@@ -798,21 +795,20 @@ In the queue view, start playing the song at point."
(apply 'concat (reverse res))))
(defun mpdired--parent ()
- (cond ((stringp mpdired--directory)
- (let ((split (split-string mpdired--directory "/")))
+ (when (stringp mpdired--directory)
+ (let ((split (split-string mpdired--directory "/")))
(if (= 1 (length split))
""
- (mpdired--unsplit (butlast split) "/"))))
- ;; The parent of a playlist is toplevel
- (mpdired--playlist "")))
+ (mpdired--unsplit (butlast split) "/")))))
(defun mpdired-goto-parent ()
"Browse the parent directory of the current one."
(interactive)
(let ((parent (mpdired--parent)))
(cond (parent
- (setq mpdired--browser-point nil
- mpdired--playlist nil)
+ (setq mpdired--browser-point nil)
+ (with-current-buffer mpdired--comm-buffer
+ (setq mpdired--playlist nil))
(mpdired-listall-internal parent t))
(t (message "You are at the toplevel.")))))
- [elpa] externals/mpdired ef4b7bbe23 120/133: package requirements, (continued)
- [elpa] externals/mpdired ef4b7bbe23 120/133: package requirements, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 8aef3a4cff 122/133: more meaningful than "? ", ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired a1d613a6d5 133/133: invert progression, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired ea686b71c3 127/133: a docstring for unsplit, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 57081d175d 060/133: add a message system, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired e40891fa3a 069/133: change marks, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 6242a3ab19 071/133: don't clear mark when there is none, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 150283738e 077/133: another key for mark at point, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired b5d5220a44 086/133: wrap some long lines, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 1243df446c 096/133: a DB update command, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 5626857ca4 103/133: playlist -> mpdired--directory,
ELPA Syncer <=
- [elpa] externals/mpdired 5719e8d4a0 112/133: bogus cut from a previous patch, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired a3f8972f8f 117/133: mostly comments, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 5363e1565c 132/133: drop copyright to FSF, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 0bead27006 065/133: fix bol positioning in some case, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 384bcbaf87 072/133: message is already reset when displayed, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 6df5870a7d 067/133: try to go to a correct place upon deletion, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired f5e5350ac0 070/133: unmark all marks, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 6c846ec87d 080/133: message for pause, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 2be9c24398 075/133: use the function reader macro, ELPA Syncer, 2024/03/10
- [elpa] externals/mpdired 2ac5d2f759 095/133: more text, ELPA Syncer, 2024/03/10