[elpa] externals/isearch-mb c081427cf1: Mention avy integration, drop mention to the anzu package

2024-03-10 Thread ELPA Syncer
branch: externals/isearch-mb
commit c081427cf14705cf79e3dfbbdf82446b09ba70b9
Author: Augusto Stoffel 
Commit: Augusto Stoffel 

Mention avy integration, drop mention to the anzu package
---
 README.org | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index 77e0d39a18..3e90496fe1 100644
--- a/README.org
+++ b/README.org
@@ -9,9 +9,9 @@ commands do not end the search. Moreover, the search status
 information in the echo area and some keybindings are slightly
 simplified.
 
-isearch-mb is part of [[https://elpa.gnu.org/packages/isearch-mb.html][GNU 
ELPA]] and can be installed with =M-x
-package-install RET isearch-mb RET=. To activate it, type =M-x
-isearch-mb-mode RET=.
+isearch-mb is part of [[https://elpa.gnu.org/packages/isearch-mb.html][GNU 
ELPA]] and can be installed with
+=M-x package-install RET isearch-mb RET=. To activate it, type
+=M-x isearch-mb-mode RET=.
 
 ** Keybindings
 
@@ -105,19 +105,19 @@ order to work with isearch-mb. There are three cases to 
consider:
 
 - *Commands that end the isearch session* should be added to the list
   =isearch-mb--after-exit=. Examples of this case are
-  [[https://github.com/emacsorphanage/anzu][=anzu-isearch-query-replace=]] and 
[[https://github.com/minad/consult][=consult-line=]]:
+  [[https://github.com/abo-abo/avy][=avy-isearch=]] and 
[[https://github.com/minad/consult][=consult-line=]]:
 
   #+begin_src emacs-lisp
-(add-to-list 'isearch-mb--after-exit #'anzu-isearch-query-replace)
-(define-key isearch-mb-minibuffer-map (kbd "M-%") 
'anzu-isearch-query-replace)
+(add-to-list 'isearch-mb--after-exit #'avy-isearch)
+(define-key isearch-mb-minibuffer-map (kbd "C-'") #'avy-isearch)
 
 (add-to-list 'isearch-mb--after-exit #'consult-line)
-(define-key isearch-mb-minibuffer-map (kbd "M-s l") 'consult-line)
+(define-key isearch-mb-minibuffer-map (kbd "M-s l") #'consult-line)
   #+end_src
 
-  Making motion commands quit the search as in standard isearch is out
-  of the scope of this package, but you can define your own commands
-  to emulate that effect. Here is one possibility:
+  Arranging for motion commands to quit the search, as in standard
+  isearch, is out of the scope of this package, but you can define
+  your own commands to emulate that effect.  Here is one possibility:
 
   #+begin_src emacs-lisp
 (defun move-end-of-line-maybe-ending-isearch (arg)



[elpa] externals/jinx b2ef3af285: Version 1.4

2024-03-10 Thread ELPA Syncer
branch: externals/jinx
commit b2ef3af2857896e20cff0488c46a4bfcfee39ecc
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 1.4
---
 CHANGELOG.org | 2 +-
 jinx.el   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 9a8efdc567..28fd91fd24 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,7 +2,7 @@
 #+author: Daniel Mendler
 #+language: en
 
-* Development
+* Version 1.4 (2024-03-10)
 
 - Bugfix: Ensure that ~jinx-correct~ saves words without text properties in the
   file-local variable ~jinx-local-words~.
diff --git a/jinx.el b/jinx.el
index aea3d1b388..de3a2b51c1 100644
--- a/jinx.el
+++ b/jinx.el
@@ -5,7 +5,7 @@
 ;; Author: Daniel Mendler 
 ;; Maintainer: Daniel Mendler 
 ;; Created: 2023
-;; Version: 1.3
+;; Version: 1.4
 ;; Package-Requires: ((emacs "27.1") (compat "29.1.4.4"))
 ;; Homepage: https://github.com/minad/jinx
 ;; Keywords: convenience, text



[elpa] externals/dape eb20d0917c: Fix hooks example

2024-03-10 Thread ELPA Syncer
branch: externals/dape
commit eb20d0917cc5a18c81043b4d409e32cae643ab51
Author: Daniel Pettersson 
Commit: Daniel Pettersson 

Fix hooks example
---
 README.org | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 1a154ef39c..d95fdfc34f 100644
--- a/README.org
+++ b/README.org
@@ -47,9 +47,9 @@ Currently =Dape= does not come with any debug adapter 
configuration.
 
 :hook
 ;; Save breakpoints on quit
-;; (kill-emacs . dape-breakpoint-save)
+;; ((kill-emacs . dape-breakpoint-save)
 ;; Load breakpoints on startup
-;; (after-init . dape-breakpoint-load))
+;;  (after-init . dape-breakpoint-load))
 
 :init
 ;; To use window configuration like gud (gdb-mi)



[elpa] externals/jinx d4988b7d00 2/3: Update changelog

2024-03-10 Thread ELPA Syncer
branch: externals/jinx
commit d4988b7d00f293cd2bbcc3b261b787343a8c7014
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update changelog
---
 CHANGELOG.org | 4 
 1 file changed, 4 insertions(+)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 28fd91fd24..cc3b69edbd 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,6 +2,10 @@
 #+author: Daniel Mendler
 #+language: en
 
+* Development
+
+- Bugfix: Ensure that ~jinx-next~ unfolds hidden misspellings.
+
 * Version 1.4 (2024-03-10)
 
 - Bugfix: Ensure that ~jinx-correct~ saves words without text properties in the



[elpa] externals/jinx updated (b2ef3af285 -> 65d90fcb9a)

2024-03-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/jinx.

  from  b2ef3af285 Version 1.4
   new  bfeceb1441 jinx-next: Unfold hidden misspelling
   new  d4988b7d00 Update changelog
   new  65d90fcb9a Minor simplification


Summary of changes:
 CHANGELOG.org |  4 
 jinx.el   | 75 +--
 2 files changed, 51 insertions(+), 28 deletions(-)



[elpa] externals/jinx 65d90fcb9a 3/3: Minor simplification

2024-03-10 Thread ELPA Syncer
branch: externals/jinx
commit 65d90fcb9a02cda9e541108bc36212218cabb814
Author: Daniel Mendler 
Commit: Daniel Mendler 

Minor simplification
---
 jinx.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/jinx.el b/jinx.el
index ff7b0257b1..79af461508 100644
--- a/jinx.el
+++ b/jinx.el
@@ -663,8 +663,8 @@ See `isearch-open-necessary-overlays' and 
`isearch-open-overlay-temporary'."
 (let ((hl (make-overlay (overlay-start overlay) (overlay-end 
overlay
   (overlay-put hl 'face 'jinx-highlight)
   (overlay-put hl 'window (selected-window))
-  (push (lambda () (delete-overlay hl)) restore)
-  (cl-callf2 append (jinx--invisible-open-temporarily) restore)
+  (setq restore (cons (lambda () (delete-overlay hl))
+  (jinx--invisible-open-temporarily)))
   (funcall fun))
   (mapc #'funcall restore
 



[elpa] externals/jinx bfeceb1441 1/3: jinx-next: Unfold hidden misspelling

2024-03-10 Thread ELPA Syncer
branch: externals/jinx
commit bfeceb1441b8655b4723cf44937afe68d94740ce
Author: Daniel Mendler 
Commit: Daniel Mendler 

jinx-next: Unfold hidden misspelling
---
 jinx.el | 75 +
 1 file changed, 47 insertions(+), 28 deletions(-)

diff --git a/jinx.el b/jinx.el
index de3a2b51c1..ff7b0257b1 100644
--- a/jinx.el
+++ b/jinx.el
@@ -614,39 +614,57 @@ If CHECK is non-nil, always check first."
  (unless jinx-mode (jinx-mode 1))
  ,@body))
 
+(defun jinx--invisible-open-temporarily ()
+  "Temporarily open overlays which hide the current line.
+See `isearch-open-necessary-overlays' and `isearch-open-overlay-temporary'."
+  (if (and (derived-mode-p 'org-mode)
+   (fboundp 'org-fold-show-set-visibility)
+   (fboundp 'org-fold-core-get-regions)
+   (fboundp 'org-fold-core-region))
+  ;; New Org 9.6 fold-core API
+  (let ((regions (delq nil (org-fold-core-get-regions
+:with-markers t :from (point-min) :to 
(point-max)
+(let ((inhibit-redisplay t)) ;; HACK: Prevent flicker due to premature 
redisplay
+  (org-fold-show-set-visibility 'canonical))
+(list (lambda ()
+(cl-loop for (beg end spec) in regions do
+ (org-fold-core-region beg end t spec)
+(let (restore)
+  (dolist (ov (overlays-in (pos-bol) (pos-eol)))
+(let ((inv (overlay-get ov 'invisible)))
+  (when (and (invisible-p inv) (overlay-get ov 
'isearch-open-invisible))
+(push (if-let ((fun (overlay-get ov 
'isearch-open-invisible-temporary)))
+  (progn
+(funcall fun ov nil)
+(lambda () (funcall fun ov t)))
+(overlay-put ov 'invisible nil)
+(lambda () (overlay-put ov 'invisible inv)))
+  restore
+  restore)))
+
+(defun jinx--invisible-open-permanently ()
+  "Open overlays which hide the current line.
+See `isearch-open-necessary-overlays' and `isearch-open-overlay-temporary'."
+  (if (and (derived-mode-p 'org-mode) (fboundp 'org-fold-show-set-visibility))
+  ;; New Org 9.6 fold-core API
+  (let ((inhibit-redisplay t)) ;; HACK: Prevent flicker due to premature 
redisplay
+(org-fold-show-set-visibility 'canonical))
+(dolist (ov (overlays-in (pos-bol) (pos-eol)))
+  (when-let (fun (overlay-get ov 'isearch-open-invisible))
+(when (invisible-p (overlay-get ov 'invisible))
+  (funcall fun ov))
+
 (defun jinx--correct-highlight (overlay fun)
   "Highlight and show OVERLAY during FUN."
   (declare (indent 1))
   (let (restore)
 (goto-char (overlay-end overlay))
 (unwind-protect
-(progn
-  (if (and (derived-mode-p 'org-mode)
-   (fboundp 'org-fold-show-set-visibility)
-   (fboundp 'org-fold-core-get-regions)
-   (fboundp 'org-fold-core-region))
-  ;; New Org 9.6 fold-core API
-  (let ((regions (delq nil (org-fold-core-get-regions
-:with-markers t :from (point-min) :to 
(point-max)
-(org-fold-show-set-visibility 'canonical)
-(push (lambda ()
-(cl-loop for (beg end spec) in regions do
- (org-fold-core-region beg end t spec)))
-  restore))
-(dolist (ov (overlays-in (pos-bol) (pos-eol)))
-  (let ((inv (overlay-get ov 'invisible)))
-(when (and (invisible-p inv) (overlay-get ov 
'isearch-open-invisible))
-  (push (if-let ((fun (overlay-get ov 
'isearch-open-invisible-temporary)))
-(progn
-  (funcall fun ov nil)
-  (lambda () (funcall fun ov t)))
-  (overlay-put ov 'invisible nil)
-  (lambda () (overlay-put ov 'invisible inv)))
-restore)
-  (let ((hl (make-overlay (overlay-start overlay) (overlay-end 
overlay
-(overlay-put hl 'face 'jinx-highlight)
-(overlay-put hl 'window (selected-window))
-(push (lambda () (delete-overlay hl)) restore))
+(let ((hl (make-overlay (overlay-start overlay) (overlay-end 
overlay
+  (overlay-put hl 'face 'jinx-highlight)
+  (overlay-put hl 'window (selected-window))
+  (push (lambda () (delete-overlay hl)) restore)
+  (cl-callf2 append (jinx--invisible-open-temporarily) restore)
   (funcall fun))
   (mapc #'funcall restore
 
@@ -1018,7 +1036,8 @@ This command dispatches to the following commands:
   (let ((ov (jinx--force-overlays (point-min) (point-max
 (unless (or (> n 0) (<= (overlay-start (car ov)) (point) (overlay-end 
(car ov
   (cl-incf n))
- 

[nongnu] main 101ae0a28c: * elpa-packages (consult-flycheck): New package

2024-03-10 Thread Stefan Monnier via
branch: main
commit 101ae0a28c649dc95898117e0ff571c4c5922d20
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-packages (consult-flycheck): New package
---
 elpa-packages | 9 +
 1 file changed, 9 insertions(+)

diff --git a/elpa-packages b/elpa-packages
index 6c772afac3..d8c06b9ecc 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -103,6 +103,8 @@
 
  (coffee-mode  :url "https://github.com/defunkt/coffee-mode";)
 
+ (consult-flycheck :url "https://github.com/minad/consult-flycheck";)
+
  (corfu-terminal   :url "https://codeberg.org/akib/emacs-corfu-terminal";)
 
  (crux :url "https://github.com/bbatsov/crux";
@@ -134,6 +136,8 @@
  (diff-ansi:url "https://codeberg.org/ideasman42/emacs-diff-ansi";
   :ignored-files ("LICENSE"))
 
+ ;; (dirvish   :url "https://github.com/alexluigit/dirvish";)
+
  (doc-show-inline  :url 
"https://codeberg.org/ideasman42/emacs-doc-show-inline";
   :news "changelog.rst")
 
@@ -243,6 +247,11 @@
  (flycheck  :url "https://github.com/flycheck/flycheck";
   :ignored-files (".github" "maint" "test" "Makefile" "doc"))
 
+ ;; (flymake-collection:url 
"https://github.com/mohkale/flymake-collection";
+ ;;  ;; :shell-command "emacs --batch -l package --eval 
'(package-generate-autoloads `flymake-collection-checkers \"src/checkers/\")'"
+ ;;  :make "checkers-autoloads"
+ ;;  :lisp-dir "src")
+
  (flymake-guile:url 
"https://framagit.org/flymake-backends/flymake-guile.git";)
 
  (flymake-kondor   :url "https://github.com/turbo-cafe/flymake-kondor";



[elpa] externals/hyperbole ab6fddeafd 2/2: Merge pull request #482 from rswgnu/rsw

2024-03-10 Thread ELPA Syncer
branch: externals/hyperbole
commit ab6fddeafdafcb9654b0584d1db530fb338caa9e
Merge: a05abaadf7 05c6149932
Author: Robert Weiner 
Commit: GitHub 

Merge pull request #482 from rswgnu/rsw

Small updates in prep for major release
---
 ChangeLog |  13 ++
 HY-ANNOUNCE   |  83 -
 MANIFEST  |   1 -
 Makefile  |   4 +-
 hactypes.el   |   5 +-
 hload-path.el |  10 +-
 hmail.el  |   9 +-
 hsys-org.el   |   8 +-
 hui.el|   8 +-
 hvm.el| 547 --
 hypb.el   |   5 +-
 hyperbole.el  |   9 +-
 12 files changed, 80 insertions(+), 622 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6981d20f6c..dc09b9bbcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-03-10  Bob Weiner  
+
+* hload-path.el (make-directory-autoloads): Remove 'ext:' since this is an 
Emacs
+built-in library available in version 28 and above.
+
+* hvm.el: Remove from Hyperbole as VM (the mail reader) is a very old package 
that is
+not available in normal package distributions today.
+
+* hsys-org.el (hsys-org-search-internal-link-p,
+   hsys-org-search-radio-target-link-p):
+  hactypes.el (link-to-org-id-marker): Conditionalize call of 
'org-fold-show-context'
+on whether 'org-fold' feature exists.
+
 2024-03-08  Mats Lidell  
 
 * test/hmouse-drv-tests.el 
(hmouse-drv--hmouse-choose-link-and-referent-windows--two-windows-same-frame)
diff --git a/HY-ANNOUNCE b/HY-ANNOUNCE
index 1615d3..da6eacb709 100644
--- a/HY-ANNOUNCE
+++ b/HY-ANNOUNCE
@@ -1,22 +1,29 @@
 From: Bob Weiner 
 To: gnu-emacs-sour...@gnu.org, emacs-tange...@gnu.org, 
hyperbole-us...@gnu.org, hyperbole-annou...@gnu.org
-Subject: GNU Hyperbole Major Release 9
+Subject: GNU Hyperbole Major Release 9 (V9.0.1)
 --text follows this line--
 
 * Overview
 
 
-GNU Hyperbole 9.0.0, the Rhapsody release, is now available on GNU ELPA.
+GNU Hyperbole 9.0.1, the Rhapsody release, is now available on GNU ELPA.
 And oh what a release it is: extensive new features, new video demos,
 org and org roam integration, Markdown and Org file support in HyRolo,
 recursive directory and wildcard file scanning in HyRolo and much more.
 
-Hyperbole is a unique hypertextual information management Emacs package
-that works across all Emacs modes, letting the computer do the hard work
-while you benefit from its sophisticated context-sensitive linking and
-navigation capabilities.  Hyperbole has always been one of the best
-documented Emacs packages.  With Version 9 comes excellent test coverage:
-over 340 automated tests to ensure quality.  We hope you'll give it a try.
+Hyperbole is a unique hypertextual information management Emacs
+package that works across all Emacs modes, letting the computer do the
+hard work while you benefit from its sophisticated context-sensitive
+linking and navigation capabilities.
+
+Hyperbole has always been one of the best documented Emacs packages.
+With Version 9 comes excellent test coverage: over 400 automated tests
+are run with every update against every major version of Emacs since
+version 27, to ensure quality.  We hope you'll give it a try.
+
+
+* What's New
+
 
 What's new in this release is described here:
 
@@ -25,8 +32,8 @@ What's new in this release is described here:
   Everything back until release 8.0.0 is new since the last major release
   announcement (almost a year and a half ago), so updates are extensive.
 
-If you prefer video introductions, visit the videos linked to below; otherwise,
-skip to the next section.
+If you prefer video introductions, visit the videos linked to below;
+otherwise, skip to the next section.
 
   
|--+--|
   | GNU Hyperbole Videos | Web Link
 |
@@ -66,34 +73,32 @@ skip to the next section.
 
 Hyperbole is like Markdown for hypertext.  Hyperbole automatically
 recognizes dozens of common patterns in any buffer regardless of mode
-and can instantly activate them as hyperbuttons with a single key:
-email addresses, URLs, grep -n outputs, programming backtraces,
-sequences of Emacs keys, programming identifiers, Texinfo and Info
-cross-references, Org links, Markdown links and on and on.  All you do
-is load Hyperbole and then your text comes to life with no extra
-effort or complex formatting.
-
-Hyperbole interlinks all your working information within Emacs for
-fast access and editing, not just within special modes.  Every button
-is automatically assigned a type and new types can be developed for
-your own buttons with simple function definitions.  You can create
-your own buttons by

[elpa] externals/hyperbole 05c6149932 1/2: Small updates in prep for major release

2024-03-10 Thread ELPA Syncer
branch: externals/hyperbole
commit 05c6149932476f784633f2c6295099b4db075c11
Author: bw 
Commit: bw 

Small updates in prep for major release
---
 ChangeLog |  13 ++
 HY-ANNOUNCE   |  83 -
 MANIFEST  |   1 -
 Makefile  |   4 +-
 hactypes.el   |   5 +-
 hload-path.el |  10 +-
 hmail.el  |   9 +-
 hsys-org.el   |   8 +-
 hui.el|   8 +-
 hvm.el| 547 --
 hypb.el   |   5 +-
 hyperbole.el  |   9 +-
 12 files changed, 80 insertions(+), 622 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6981d20f6c..dc09b9bbcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-03-10  Bob Weiner  
+
+* hload-path.el (make-directory-autoloads): Remove 'ext:' since this is an 
Emacs
+built-in library available in version 28 and above.
+
+* hvm.el: Remove from Hyperbole as VM (the mail reader) is a very old package 
that is
+not available in normal package distributions today.
+
+* hsys-org.el (hsys-org-search-internal-link-p,
+   hsys-org-search-radio-target-link-p):
+  hactypes.el (link-to-org-id-marker): Conditionalize call of 
'org-fold-show-context'
+on whether 'org-fold' feature exists.
+
 2024-03-08  Mats Lidell  
 
 * test/hmouse-drv-tests.el 
(hmouse-drv--hmouse-choose-link-and-referent-windows--two-windows-same-frame)
diff --git a/HY-ANNOUNCE b/HY-ANNOUNCE
index 1615d3..da6eacb709 100644
--- a/HY-ANNOUNCE
+++ b/HY-ANNOUNCE
@@ -1,22 +1,29 @@
 From: Bob Weiner 
 To: gnu-emacs-sour...@gnu.org, emacs-tange...@gnu.org, 
hyperbole-us...@gnu.org, hyperbole-annou...@gnu.org
-Subject: GNU Hyperbole Major Release 9
+Subject: GNU Hyperbole Major Release 9 (V9.0.1)
 --text follows this line--
 
 * Overview
 
 
-GNU Hyperbole 9.0.0, the Rhapsody release, is now available on GNU ELPA.
+GNU Hyperbole 9.0.1, the Rhapsody release, is now available on GNU ELPA.
 And oh what a release it is: extensive new features, new video demos,
 org and org roam integration, Markdown and Org file support in HyRolo,
 recursive directory and wildcard file scanning in HyRolo and much more.
 
-Hyperbole is a unique hypertextual information management Emacs package
-that works across all Emacs modes, letting the computer do the hard work
-while you benefit from its sophisticated context-sensitive linking and
-navigation capabilities.  Hyperbole has always been one of the best
-documented Emacs packages.  With Version 9 comes excellent test coverage:
-over 340 automated tests to ensure quality.  We hope you'll give it a try.
+Hyperbole is a unique hypertextual information management Emacs
+package that works across all Emacs modes, letting the computer do the
+hard work while you benefit from its sophisticated context-sensitive
+linking and navigation capabilities.
+
+Hyperbole has always been one of the best documented Emacs packages.
+With Version 9 comes excellent test coverage: over 400 automated tests
+are run with every update against every major version of Emacs since
+version 27, to ensure quality.  We hope you'll give it a try.
+
+
+* What's New
+
 
 What's new in this release is described here:
 
@@ -25,8 +32,8 @@ What's new in this release is described here:
   Everything back until release 8.0.0 is new since the last major release
   announcement (almost a year and a half ago), so updates are extensive.
 
-If you prefer video introductions, visit the videos linked to below; otherwise,
-skip to the next section.
+If you prefer video introductions, visit the videos linked to below;
+otherwise, skip to the next section.
 
   
|--+--|
   | GNU Hyperbole Videos | Web Link
 |
@@ -66,34 +73,32 @@ skip to the next section.
 
 Hyperbole is like Markdown for hypertext.  Hyperbole automatically
 recognizes dozens of common patterns in any buffer regardless of mode
-and can instantly activate them as hyperbuttons with a single key:
-email addresses, URLs, grep -n outputs, programming backtraces,
-sequences of Emacs keys, programming identifiers, Texinfo and Info
-cross-references, Org links, Markdown links and on and on.  All you do
-is load Hyperbole and then your text comes to life with no extra
-effort or complex formatting.
-
-Hyperbole interlinks all your working information within Emacs for
-fast access and editing, not just within special modes.  Every button
-is automatically assigned a type and new types can be developed for
-your own buttons with simple function definitions.  You can create
-your own buttons by simply dragging between two buffers.
-
-But Hyperbole is also a hub controller for your info

[nongnu] elpa/consult-flycheck 51b1b48e8d 07/18: Bump dependencies

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 51b1b48e8dad314f9c9d963376f2ea8de94b97f2
Author: Daniel Mendler 
Commit: Daniel Mendler 

Bump dependencies
---
 consult-flycheck.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index eb88ef9d22..b5a4153c7e 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -5,7 +5,7 @@
 ;; Created: 2020
 ;; License: GPL-3.0-or-later
 ;; Version: 0.9
-;; Package-Requires: ((consult "0.20") (flycheck "31") (emacs "27.1"))
+;; Package-Requires: ((emacs "27.1") (consult "0.32") (flycheck "32"))
 ;; Homepage: https://github.com/minad/consult
 
 ;; This file is not part of GNU Emacs.



[nongnu] elpa/consult-flycheck fda630411a 10/18: Add keyword completion

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit fda630411ad9219f45136310f671b44eaefafcab
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add keyword completion

In order to use package keywords, do the following:

1. (package-initialize)
2. (finder-compile-keywords)
3. Put the resulting finder-inf.el file on your load-path
4. Add unknown keywords, e.g.,
   (add-to-list 'finder-known-keywords '(completion . "Minibuffer and Code 
Completion"))
5. M-x finder-list-keywords
---
 consult-flycheck.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index b3bf8fd644..c62dac6d72 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -7,7 +7,7 @@
 ;; Version: 0.9
 ;; Package-Requires: ((emacs "27.1") (consult "0.32") (flycheck "32"))
 ;; Homepage: https://github.com/minad/consult
-;; Keywords: languages, tools
+;; Keywords: languages, tools, completion
 
 ;; This file is not part of GNU Emacs.
 



[nongnu] elpa/consult-flycheck 9aae5b4eb9 09/18: Add finder keywords

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 9aae5b4eb999ca9c916c41c6517054967c9aa32b
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add finder keywords
---
 consult-flycheck.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index 3b5ead566c..b3bf8fd644 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -7,6 +7,7 @@
 ;; Version: 0.9
 ;; Package-Requires: ((emacs "27.1") (consult "0.32") (flycheck "32"))
 ;; Homepage: https://github.com/minad/consult
+;; Keywords: languages, tools
 
 ;; This file is not part of GNU Emacs.
 



[nongnu] elpa/consult-flycheck 3f2a7c17cc 12/18: Fix formatting bug when newline character is in error messages (#3)

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 3f2a7c17cc2fe64e0c07e3bf90e33c885c0d7062
Author: Sergey Firsov <95489807+intram...@users.noreply.github.com>
Commit: GitHub 

Fix formatting bug when newline character is in error messages (#3)
---
 consult-flycheck.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index 460bdb3d1c..2a102a35c8 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -96,7 +96,9 @@ In contrast to `flycheck-error-level-<' sort errors first."
(_ ?i)))
  (propertize line 'face 'flycheck-error-list-line-number)
  (propertize level-name 'face 
(flycheck-error-level-error-list-face level))
- (propertize (flycheck-error-message err) 'face 
'flycheck-error-list-error-message)
+ (propertize (subst-char-in-string ?\n ?\s
+   (flycheck-error-message 
err))
+ 'face 'flycheck-error-list-error-message)
  (propertize (symbol-name (flycheck-error-checker err))
  'face 'flycheck-error-list-checker-name
  errors)))



[nongnu] elpa/consult-flycheck 9ac99d656b 17/18: README: Add NonGNU ELPA badges

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 9ac99d656ba13d07c77da86aed6081c85fc245cb
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Add NonGNU ELPA badges
---
 README.org | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.org b/README.org
index da487611b6..cdcbce55a1 100644
--- a/README.org
+++ b/README.org
@@ -3,6 +3,8 @@
 #+language: en
 
 #+html: https://www.gnu.org/software/emacs/";>https://github.com/minad/corfu/blob/screenshots/emacs.svg?raw=true"/>
+#+html: https://elpa.nongnu.org/nongnu/consult-flycheck.html";>https://elpa.nongnu.org/nongnu/consult-flycheck.svg"/>
+#+html: https://elpa.nongnu.org/nongnu-devel/consult-flycheck.html";>https://elpa.nongnu.org/nongnu-devel/consult-flycheck.svg"/>
 #+html: https://melpa.org/#/consult-flycheck";>https://melpa.org/packages/consult-flycheck-badge.svg"/>
 #+html: https://stable.melpa.org/#/consult-flycheck";>https://stable.melpa.org/packages/consult-flycheck-badge.svg"/>
 



[nongnu] branch elpa/consult-flycheck created (now 754f5497d8)

2024-03-10 Thread ELPA Syncer
elpasync pushed a change to branch elpa/consult-flycheck.

at  754f5497d8 Update package header

This branch includes the following new commits:

   new  44e7528d3a Import consult-flycheck
   new  92b259e6a8 Version 0.8
   new  0ad7e8ff15 Add link to Emacs
   new  9b40f136c0 Drop Emacs 26 support
   new  1d43437c1f Remove consult--jump-state argument (#1)
   new  7a10be316d Version 0.9
   new  51b1b48e8d Bump dependencies
   new  c371996c57 Update header
   new  9aae5b4eb9 Add finder keywords
   new  fda630411a Add keyword completion
   new  b73fc4bcce Add support for non-standard error levels (#2)
   new  3f2a7c17cc Fix formatting bug when newline character is in error 
messages (#3)
   new  0662839aa5 Version 1.0
   new  19fe6f4181 Add .gitignore
   new  62b036a17c .gitignore backups
   new  d83f87581a Bump copyright years
   new  9ac99d656b README: Add NonGNU ELPA badges
   new  754f5497d8 Update package header




[nongnu] elpa/consult-flycheck d83f87581a 16/18: Bump copyright years

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit d83f87581af74f7a2739d8b1b90c37da5ae3d310
Author: Daniel Mendler 
Commit: Daniel Mendler 

Bump copyright years
---
 consult-flycheck.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index 4e439cc064..06d751facd 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -1,5 +1,7 @@
 ;;; consult-flycheck.el --- Provides the command `consult-flycheck' -*- 
lexical-binding: t -*-
 
+;; Copyright (C) 2021-2024 Daniel Mendler
+
 ;; Author: Daniel Mendler and Consult contributors
 ;; Maintainer: Daniel Mendler 
 ;; SPDX-License-Identifier: GPL-3.0-or-later



[nongnu] elpa/consult-flycheck c371996c57 08/18: Update header

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit c371996c571b7139ef4d9a8db142bf37a7ee826b
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update header
---
 consult-flycheck.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index b5a4153c7e..3b5ead566c 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -2,8 +2,8 @@
 
 ;; Author: Daniel Mendler and Consult contributors
 ;; Maintainer: Daniel Mendler 
+;; SPDX-License-Identifier: GPL-3.0-or-later
 ;; Created: 2020
-;; License: GPL-3.0-or-later
 ;; Version: 0.9
 ;; Package-Requires: ((emacs "27.1") (consult "0.32") (flycheck "32"))
 ;; Homepage: https://github.com/minad/consult



[nongnu] elpa/consult-flycheck 754f5497d8 18/18: Update package header

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 754f5497d827f7d58009256a21af614cc44378a3
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update package header
---
 consult-flycheck.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index 06d751facd..ee1d645bd1 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -4,11 +4,10 @@
 
 ;; Author: Daniel Mendler and Consult contributors
 ;; Maintainer: Daniel Mendler 
-;; SPDX-License-Identifier: GPL-3.0-or-later
 ;; Created: 2020
 ;; Version: 1.0
-;; Package-Requires: ((emacs "27.1") (consult "1.0") (flycheck "32"))
-;; Homepage: https://github.com/minad/consult
+;; Package-Requires: ((emacs "27.1") (consult "1.4") (flycheck "34"))
+;; Homepage: https://github.com/minad/consult-flycheck
 ;; Keywords: languages, tools, completion
 
 ;; This file is not part of GNU Emacs.



[nongnu] elpa/consult-flycheck 0ad7e8ff15 03/18: Add link to Emacs

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 0ad7e8ff15683a4d64b79c29b3fcf847edfe244b
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add link to Emacs
---
 README.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.org b/README.org
index 6f3505b9c4..da487611b6 100644
--- a/README.org
+++ b/README.org
@@ -2,6 +2,7 @@
 #+author: Daniel Mendler
 #+language: en
 
+#+html: https://www.gnu.org/software/emacs/";>https://github.com/minad/corfu/blob/screenshots/emacs.svg?raw=true"/>
 #+html: https://melpa.org/#/consult-flycheck";>https://melpa.org/packages/consult-flycheck-badge.svg"/>
 #+html: https://stable.melpa.org/#/consult-flycheck";>https://stable.melpa.org/packages/consult-flycheck-badge.svg"/>
 



[nongnu] elpa/consult-flycheck 1d43437c1f 05/18: Remove consult--jump-state argument (#1)

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 1d43437c1f8305051954b972aa9dd18413b3379b
Author: Frédéric Giquel 
Commit: GitHub 

Remove consult--jump-state argument (#1)
---
 consult-flycheck.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index dc97dd8b0d..c649358856 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -106,7 +106,7 @@ In contrast to `flycheck-error-level-<' sort errors first."
:group (consult--type-group consult-flycheck--narrow)
:narrow (consult--type-narrow consult-flycheck--narrow)
:lookup #'consult--lookup-candidate
-   :state (consult--jump-state 'consult-preview-error)))
+   :state (consult--jump-state)))
 
 (provide 'consult-flycheck)
 ;;; consult-flycheck.el ends here



[nongnu] elpa/consult-flycheck 9b40f136c0 04/18: Drop Emacs 26 support

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 9b40f136c017fadf6239d7602d16bf73b4ad5198
Author: Daniel Mendler 
Commit: Daniel Mendler 

Drop Emacs 26 support

Emacs 28.1 has been released. Emacs 27.1 is widely available, even on Debian
stable. The recommended completion systems Vertico and Mct require Emacs 27 
and
newer. In the future we can use the compat.el library to ensure backward
compatibility while still having access to newly introduced Emacs APIs. 
However
we will still have to work around bugs, which affect this package. By 
dropping
support for Emacs 26 maintainance is simplified a little bit since most of 
my
packages already require Emacs 27.1. Emacs 27.1 support will probably be 
kept
for longer, e.g., until the release of Emacs 30.
---
 consult-flycheck.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index 5ff5a81766..dc97dd8b0d 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -5,7 +5,7 @@
 ;; Created: 2020
 ;; License: GPL-3.0-or-later
 ;; Version: 0.8
-;; Package-Requires: ((consult "0.8") (flycheck "31") (emacs "26.1"))
+;; Package-Requires: ((consult "0.16") (flycheck "31") (emacs "27.1"))
 ;; Homepage: https://github.com/minad/consult
 
 ;; This file is not part of GNU Emacs.



[nongnu] elpa/consult-flycheck 0662839aa5 13/18: Version 1.0

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 0662839aa5db429130f5ffd15c14d4a980b2e694
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 1.0
---
 consult-flycheck.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index 2a102a35c8..4e439cc064 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -4,8 +4,8 @@
 ;; Maintainer: Daniel Mendler 
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 ;; Created: 2020
-;; Version: 0.9
-;; Package-Requires: ((emacs "27.1") (consult "0.32") (flycheck "32"))
+;; Version: 1.0
+;; Package-Requires: ((emacs "27.1") (consult "1.0") (flycheck "32"))
 ;; Homepage: https://github.com/minad/consult
 ;; Keywords: languages, tools, completion
 



[nongnu] elpa/consult-flycheck 19fe6f4181 14/18: Add .gitignore

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 19fe6f41811b9ee3a710b105cb918df53f9e
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add .gitignore
---
 .gitignore | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00..2a7853167b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*-autoloads.el
+*-pkg.el
+*.elc
+*.info
+*.texi
+README-elpa



[nongnu] elpa/consult-flycheck 7a10be316d 06/18: Version 0.9

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 7a10be316d728d3384fa25574a30857c53fb3655
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 0.9
---
 consult-flycheck.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index c649358856..eb88ef9d22 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -4,8 +4,8 @@
 ;; Maintainer: Daniel Mendler 
 ;; Created: 2020
 ;; License: GPL-3.0-or-later
-;; Version: 0.8
-;; Package-Requires: ((consult "0.16") (flycheck "31") (emacs "27.1"))
+;; Version: 0.9
+;; Package-Requires: ((consult "0.20") (flycheck "31") (emacs "27.1"))
 ;; Homepage: https://github.com/minad/consult
 
 ;; This file is not part of GNU Emacs.



[nongnu] elpa/consult-flycheck 62b036a17c 15/18: .gitignore backups

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 62b036a17c08f57aa73c5a75e93ae6fd3645ca44
Author: Daniel Mendler 
Commit: Daniel Mendler 

.gitignore backups
---
 .gitignore | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 2a7853167b..d00328a171 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,6 @@
 *.elc
 *.info
 *.texi
-README-elpa
+*~
+\#*\#
+/README-elpa



[nongnu] elpa/consult-flycheck 44e7528d3a 01/18: Import consult-flycheck

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 44e7528d3a536755e731688c9ad9b5480b0eb880
Author: Daniel Mendler 
Commit: Daniel Mendler 

Import consult-flycheck
---
 README.org  |   9 +
 consult-flycheck.el | 112 
 2 files changed, 121 insertions(+)

diff --git a/README.org b/README.org
new file mode 100644
index 00..6f3505b9c4
--- /dev/null
+++ b/README.org
@@ -0,0 +1,9 @@
+#+title: consult-flycheck.el - Consult integration for Flycheck
+#+author: Daniel Mendler
+#+language: en
+
+#+html: https://melpa.org/#/consult-flycheck";>https://melpa.org/packages/consult-flycheck-badge.svg"/>
+#+html: https://stable.melpa.org/#/consult-flycheck";>https://stable.melpa.org/packages/consult-flycheck-badge.svg"/>
+
+This package provides the =consult-flycheck= command, which integrates 
[[https://github.com/minad/consult][Consult]]
+with [[https://github.com/flycheck/flycheck][Flycheck]]. Take a look at the 
[[https://github.com/minad/consult/blob/main/README.org][Consult README]] for 
an extensive documentation.
diff --git a/consult-flycheck.el b/consult-flycheck.el
new file mode 100644
index 00..3eb643ee3a
--- /dev/null
+++ b/consult-flycheck.el
@@ -0,0 +1,112 @@
+;;; consult-flycheck.el --- Provides the command `consult-flycheck' -*- 
lexical-binding: t -*-
+
+;; Author: Daniel Mendler and Consult contributors
+;; Maintainer: Daniel Mendler 
+;; Created: 2020
+;; License: GPL-3.0-or-later
+;; Version: 0.7
+;; Package-Requires: ((consult "0.7") (flycheck "31") (emacs "26.1"))
+;; Homepage: https://github.com/minad/consult
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; Provides the command `consult-flycheck'. This is an extra package,
+;; since the consult.el package only depends on Emacs core components.
+
+;;; Code:
+
+(require 'consult)
+(require 'flycheck)
+
+(defconst consult-flycheck--narrow
+  '((?e . "Error")
+(?w . "Warning")
+(?i . "Info")))
+
+(defun consult-flycheck--sort-predicate (x y)
+  "Compare X and Y first by severity, then by location.
+In contrast to `flycheck-error-level-<' sort errors first."
+  (let* ((lx (flycheck-error-level x))
+ (ly (flycheck-error-level y))
+ (sx (flycheck-error-level-severity lx))
+ (sy (flycheck-error-level-severity ly)))
+(if (= sx sy)
+(if (string= lx ly)
+(flycheck-error-< x y)
+  (string< lx ly))
+  (> sx sy
+
+(defun consult-flycheck--candidates ()
+  "Return flycheck errors as alist."
+  (consult--forbid-minibuffer)
+  (unless flycheck-current-errors
+(user-error "No flycheck errors (Status: %s)" flycheck-last-status-change))
+  (let* ((errors (mapcar
+  (lambda (err)
+(list
+ (if-let (file (flycheck-error-filename err))
+ (file-name-nondirectory file)
+   (buffer-name (flycheck-error-buffer err)))
+ (number-to-string (flycheck-error-line err))
+ err))
+  (seq-sort #'consult-flycheck--sort-predicate 
flycheck-current-errors)))
+ (file-width (apply #'max (mapcar (lambda (x) (length (car x))) 
errors)))
+ (line-width (apply #'max (mapcar (lambda (x) (length (cadr x))) 
errors)))
+ (fmt (format "%%-%ds %%-%ds %%-7s %%s (%%s)" file-width line-width)))
+(mapcar
+ (pcase-lambda (`(,file ,line ,err))
+   (let ((level (flycheck-error-level err)))
+ (format fmt
+ (propertize file
+ 'face 'flycheck-error-list-filename
+ 'consult--candidate
+ (set-marker (make-marker)
+ (flycheck-error-pos err)
+ (if (flycheck-error-filename err)
+ (find-file-noselect 
(flycheck-error-filename err) 'nowarn)
+   (flycheck-error-buffer err)))
+ 'consult--type
+ (pcase level
+   ('error ?e)
+   ('warning ?w)
+   (_ ?i)))
+ (propertize line 'face 'flycheck-error-list-line-number

[nongnu] elpa/consult-flycheck 92b259e6a8 02/18: Version 0.8

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit 92b259e6a8ebe6439f67d3d7ffa44b7e64b76478
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 0.8
---
 consult-flycheck.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index 3eb643ee3a..5ff5a81766 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -4,8 +4,8 @@
 ;; Maintainer: Daniel Mendler 
 ;; Created: 2020
 ;; License: GPL-3.0-or-later
-;; Version: 0.7
-;; Package-Requires: ((consult "0.7") (flycheck "31") (emacs "26.1"))
+;; Version: 0.8
+;; Package-Requires: ((consult "0.8") (flycheck "31") (emacs "26.1"))
 ;; Homepage: https://github.com/minad/consult
 
 ;; This file is not part of GNU Emacs.



[nongnu] elpa/consult-flycheck b73fc4bcce 11/18: Add support for non-standard error levels (#2)

2024-03-10 Thread ELPA Syncer
branch: elpa/consult-flycheck
commit b73fc4bcce9c68d01ba9f4100f1c518ee3f3d28b
Author: Sergey Firsov <95489807+intram...@users.noreply.github.com>
Commit: GitHub 

Add support for non-standard error levels (#2)

* Fix doc comment to match coding standard

* Add support for auxiliary error levels
---
 consult-flycheck.el | 22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/consult-flycheck.el b/consult-flycheck.el
index c62dac6d72..460bdb3d1c 100644
--- a/consult-flycheck.el
+++ b/consult-flycheck.el
@@ -26,7 +26,7 @@
 
 ;;; Commentary:
 
-;; Provides the command `consult-flycheck'. This is an extra package,
+;; Provides the command `consult-flycheck'.  This is an extra package,
 ;; since the consult.el package only depends on Emacs core components.
 
 ;;; Code:
@@ -64,13 +64,15 @@ In contrast to `flycheck-error-level-<' sort errors first."
  (file-name-nondirectory file)
(buffer-name (flycheck-error-buffer err)))
  (number-to-string (flycheck-error-line err))
+ (symbol-name (flycheck-error-level err))
  err))
   (seq-sort #'consult-flycheck--sort-predicate 
flycheck-current-errors)))
  (file-width (apply #'max (mapcar (lambda (x) (length (car x))) 
errors)))
  (line-width (apply #'max (mapcar (lambda (x) (length (cadr x))) 
errors)))
- (fmt (format "%%-%ds %%-%ds %%-7s %%s (%%s)" file-width line-width)))
+ (level-width (apply #'max (mapcar (lambda (x) (length (caddr x))) 
errors)))
+ (fmt (format "%%%ds %%%ds %%-%ds\t%%s\t(%%s)" file-width line-width 
level-width)))
 (mapcar
- (pcase-lambda (`(,file ,line ,err))
+ (pcase-lambda (`(,file ,line ,level-name ,err))
(let ((level (flycheck-error-level err)))
  (format fmt
  (propertize file
@@ -82,12 +84,18 @@ In contrast to `flycheck-error-level-<' sort errors first."
  (find-file-noselect 
(flycheck-error-filename err) 'nowarn)
(flycheck-error-buffer err)))
  'consult--type
- (pcase level
-   ('error ?e)
-   ('warning ?w)
+ (pcase level-name
+   ((rx (and (0+ nonl)
+ "error"
+ (0+ nonl)))
+?e)
+   ((rx (and (0+ nonl)
+ "warning"
+ (0+ nonl)))
+?w)
(_ ?i)))
  (propertize line 'face 'flycheck-error-list-line-number)
- (propertize (symbol-name level) 'face 
(flycheck-error-level-error-list-face level))
+ (propertize level-name 'face 
(flycheck-error-level-error-list-face level))
  (propertize (flycheck-error-message err) 'face 
'flycheck-error-list-error-message)
  (propertize (symbol-name (flycheck-error-checker err))
  'face 'flycheck-error-list-checker-name



[elpa] main 5027481bb3: * elpa-packages (mpdired): New package

2024-03-10 Thread Philip Kaludercic
branch: main
commit 5027481bb39df93a6136f1ce71722e42d75a50cf
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

* elpa-packages (mpdired): New package
---
 elpa-packages | 1 +
 1 file changed, 1 insertion(+)

diff --git a/elpa-packages b/elpa-packages
index 4e9c2172ba..65b50cd4f1 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -483,6 +483,7 @@
   :readme "README.md"
   :news "CHANGELOG.org"
   :ignored-files ("COPYING" "doclicense.texi"))
+ (mpdired  :url "https://ledu-giraud.fr/mpdired.git";)
  (multi-mode   :url nil)
  (multishell   :url "https://github.com/kenmanheimer/EmacsMultishell";)
  (muse :url "https://github.com/alexott/muse"; ;FIXME: Not 
nearly in-sync



[elpa] externals/hyperbole a034ed553f 2/3: Merge branch 'master' into rsw

2024-03-10 Thread ELPA Syncer
branch: externals/hyperbole
commit a034ed553f98ade73a56561e896831e3f0ebc9a7
Merge: 23b118ddb6 ab6fddeafd
Author: Bob Weiner 
Commit: Bob Weiner 

Merge branch 'master' into rsw



[elpa] externals/js2-mode 6bee6cc9a6 1/3: Replace deprecated `lsh' with `ash'

2024-03-10 Thread ELPA Syncer
branch: externals/js2-mode
commit 6bee6cc9a6a38aa05bec63a1e501b2d287d7f00f
Author: Damien Cassou 
Commit: Damien Cassou 

Replace deprecated `lsh' with `ash'

Both are equivalent when the second argument is positive.
---
 js2-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index 9961a72b53..123101421a 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -778,7 +778,7 @@ parser as a frontend to an interpreter or byte compiler.")
 
 ;;; Parser instance variables (buffer-local vars for js2-parse)
 
-(defconst js2-ti-after-eol (lsh 1 16)
+(defconst js2-ti-after-eol (ash 1 16)
   "Flag:  first token of the source line.")
 
 ;; Inline Rhino's CompilerEnvirons vars as buffer-locals.
@@ -5855,7 +5855,7 @@ corresponding number.  Otherwise return -1."
   (cl-decf c (- ?a 10))
   (throw 'check nil
   (throw 'return -1))
-(logior c (lsh accumulator 4
+(logior c (ash accumulator 4
 
 (defun js2-get-token (&optional modifier)
   "If `js2-ti-lookahead' is zero, call scanner to get new token.



[elpa] externals/js2-mode e92829da3d 3/3: Merge pull request #600 from DamienCassou/deprecation

2024-03-10 Thread ELPA Syncer
branch: externals/js2-mode
commit e92829da3d6387252a0a5737c0c5344cb3de1578
Merge: dfbc6dad4c 06e8372c5a
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #600 from DamienCassou/deprecation

Cleanup some deprecated code
---
 js2-mode.el | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index 9961a72b53..20fdb98488 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -778,7 +778,7 @@ parser as a frontend to an interpreter or byte compiler.")
 
 ;;; Parser instance variables (buffer-local vars for js2-parse)
 
-(defconst js2-ti-after-eol (lsh 1 16)
+(defconst js2-ti-after-eol (ash 1 16)
   "Flag:  first token of the source line.")
 
 ;; Inline Rhino's CompilerEnvirons vars as buffer-locals.
@@ -2129,8 +2129,8 @@ Returns nil if element is not found in the list."
 
 (defsubst js2-same-line (pos)
   "Return t if POS is on the same line as current point."
-  (and (>= pos (point-at-bol))
-   (<= pos (point-at-eol
+  (and (>= pos (line-beginning-position))
+   (<= pos (line-end-position
 
 (defun js2-code-bug ()
   "Signal an error when we encounter an unexpected code path."
@@ -5855,7 +5855,7 @@ corresponding number.  Otherwise return -1."
   (cl-decf c (- ?a 10))
   (throw 'check nil
   (throw 'return -1))
-(logior c (lsh accumulator 4
+(logior c (ash accumulator 4
 
 (defun js2-get-token (&optional modifier)
   "If `js2-ti-lookahead' is zero, call scanner to get new token.
@@ -8497,7 +8497,7 @@ Last token scanned is the close-curly for the function 
body."
 (let ((pos (save-excursion
  (goto-char (js2-current-token-end))
  (max (js2-node-abs-pos (js2-function-node-body fn-node))
-  (point-at-bol
+  (line-beginning-position
   (end (js2-current-token-end)))
   (if (cl-plusp (js2-name-node-length name))
   (js2-add-strict-warning "msg.no.return.value"
@@ -8655,7 +8655,7 @@ node are given relative start positions and correct 
lengths."
   (setq end (js2-node-end pn))
   (save-excursion
 (goto-char end)
-(setq beg (max (js2-node-pos pn) (point-at-bol
+(setq beg (max (js2-node-pos pn) (line-beginning-position
   (js2-add-strict-warning "msg.no.side.effects" nil beg end))
 pn))
 
@@ -8698,7 +8698,7 @@ node are given relative start positions and correct 
lengths."
 ;; back up to beginning of statement or line
 (max beg (save-excursion
(goto-char end)
-   (point-at-bol)))
+   (line-beginning-position)))
 end)))
 
 (defconst js2-no-semi-insertion
@@ -10767,7 +10767,7 @@ array-literals, array comprehensions and regular 
expressions."
   ;; the scanner or one of its subroutines reported the error.
   (make-js2-error-node))
  ((= tt js2-EOF)
-  (let* ((px-pos (point-at-bol))
+  (let* ((px-pos (line-beginning-position))
  (len (- js2-ts-cursor px-pos)))
 (js2-report-error "msg.unexpected.eof" nil px-pos len))
   (make-js2-error-node :pos (1- js2-ts-cursor)))
@@ -11472,12 +11472,12 @@ If HARDCODED-ARRAY-INDEX provided, array index in 
JSON path is replaced with it.
 (defun js2-arglist-close ()
   "Return non-nil if we're on a line beginning with a close-paren/brace."
   (save-excursion
-(goto-char (point-at-bol))
+(goto-char (line-beginning-position))
 (js2-forward-sws)
 (looking-at "[])}]")))
 
 (defun js2-indent-looks-like-label-p ()
-  (goto-char (point-at-bol))
+  (goto-char (line-beginning-position))
   (js2-forward-sws)
   (looking-at (concat js2-mode-identifier-re ":")))
 
@@ -11512,7 +11512,7 @@ If HARDCODED-ARRAY-INDEX provided, array index in JSON 
path is replaced with it.
   (save-excursion
 (back-to-indentation)
 (js2-backward-sws)
-(goto-char (point-at-bol))
+(goto-char (line-beginning-position))
 (skip-chars-forward " \t")
 (looking-at "case\\s-.+:")))
 
@@ -11562,9 +11562,9 @@ in reverse."
   ;; line containing actual code.
   (setq pos (save-excursion
   (forward-line -1)
-  (goto-char (point-at-bol))
+  (goto-char (line-beginning-position))
   (when (re-search-forward "\\s-+\\(=\\)\\s-+"
-   (point-at-eol) t)
+   (line-end-position) t)
 (goto-char (match-end 1))
 (skip-chars-forward " \t\r\n")
 (current-column
@@ -11578,14 +11578,14 @@ in reverse."
   ;; both this line and prev line look like object-literal
   ;; elements.
   (setq pos (save-excursion
-  (goto-char (point-at-bol))
+  (goto-char (line-beginning-position))

[elpa] externals/js2-mode 06e8372c5a 2/3: Replace deprecated point-at-{bol, eol}

2024-03-10 Thread ELPA Syncer
branch: externals/js2-mode
commit 06e8372c5a2e8e9884b4678ed315e6c01cd45bcb
Author: Damien Cassou 
Commit: Damien Cassou 

Replace deprecated point-at-{bol,eol}
---
 js2-mode.el | 38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/js2-mode.el b/js2-mode.el
index 123101421a..20fdb98488 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -2129,8 +2129,8 @@ Returns nil if element is not found in the list."
 
 (defsubst js2-same-line (pos)
   "Return t if POS is on the same line as current point."
-  (and (>= pos (point-at-bol))
-   (<= pos (point-at-eol
+  (and (>= pos (line-beginning-position))
+   (<= pos (line-end-position
 
 (defun js2-code-bug ()
   "Signal an error when we encounter an unexpected code path."
@@ -8497,7 +8497,7 @@ Last token scanned is the close-curly for the function 
body."
 (let ((pos (save-excursion
  (goto-char (js2-current-token-end))
  (max (js2-node-abs-pos (js2-function-node-body fn-node))
-  (point-at-bol
+  (line-beginning-position
   (end (js2-current-token-end)))
   (if (cl-plusp (js2-name-node-length name))
   (js2-add-strict-warning "msg.no.return.value"
@@ -8655,7 +8655,7 @@ node are given relative start positions and correct 
lengths."
   (setq end (js2-node-end pn))
   (save-excursion
 (goto-char end)
-(setq beg (max (js2-node-pos pn) (point-at-bol
+(setq beg (max (js2-node-pos pn) (line-beginning-position
   (js2-add-strict-warning "msg.no.side.effects" nil beg end))
 pn))
 
@@ -8698,7 +8698,7 @@ node are given relative start positions and correct 
lengths."
 ;; back up to beginning of statement or line
 (max beg (save-excursion
(goto-char end)
-   (point-at-bol)))
+   (line-beginning-position)))
 end)))
 
 (defconst js2-no-semi-insertion
@@ -10767,7 +10767,7 @@ array-literals, array comprehensions and regular 
expressions."
   ;; the scanner or one of its subroutines reported the error.
   (make-js2-error-node))
  ((= tt js2-EOF)
-  (let* ((px-pos (point-at-bol))
+  (let* ((px-pos (line-beginning-position))
  (len (- js2-ts-cursor px-pos)))
 (js2-report-error "msg.unexpected.eof" nil px-pos len))
   (make-js2-error-node :pos (1- js2-ts-cursor)))
@@ -11472,12 +11472,12 @@ If HARDCODED-ARRAY-INDEX provided, array index in 
JSON path is replaced with it.
 (defun js2-arglist-close ()
   "Return non-nil if we're on a line beginning with a close-paren/brace."
   (save-excursion
-(goto-char (point-at-bol))
+(goto-char (line-beginning-position))
 (js2-forward-sws)
 (looking-at "[])}]")))
 
 (defun js2-indent-looks-like-label-p ()
-  (goto-char (point-at-bol))
+  (goto-char (line-beginning-position))
   (js2-forward-sws)
   (looking-at (concat js2-mode-identifier-re ":")))
 
@@ -11512,7 +11512,7 @@ If HARDCODED-ARRAY-INDEX provided, array index in JSON 
path is replaced with it.
   (save-excursion
 (back-to-indentation)
 (js2-backward-sws)
-(goto-char (point-at-bol))
+(goto-char (line-beginning-position))
 (skip-chars-forward " \t")
 (looking-at "case\\s-.+:")))
 
@@ -11562,9 +11562,9 @@ in reverse."
   ;; line containing actual code.
   (setq pos (save-excursion
   (forward-line -1)
-  (goto-char (point-at-bol))
+  (goto-char (line-beginning-position))
   (when (re-search-forward "\\s-+\\(=\\)\\s-+"
-   (point-at-eol) t)
+   (line-end-position) t)
 (goto-char (match-end 1))
 (skip-chars-forward " \t\r\n")
 (current-column
@@ -11578,14 +11578,14 @@ in reverse."
   ;; both this line and prev line look like object-literal
   ;; elements.
   (setq pos (save-excursion
-  (goto-char (point-at-bol))
+  (goto-char (line-beginning-position))
   (js2-backward-sws)
   (back-to-indentation)
   (prog1
   (current-column)
 ;; while we're here, look for trailing comma
 (if (save-excursion
-  (goto-char (point-at-eol))
+  (goto-char (line-end-position))
   (js2-backward-sws)
   (eq (char-before) ?,))
 (setq arglist-cont (1- (point)))
@@ -11694,7 +11694,7 @@ If so, we don't ever want to use bounce-indent."
 ;; This has to be set before calling parse-partial-sexp below.
 (inhibit-point-motion-hooks t))
 (setq pa

[elpa] externals/listen 5083dc108d 2/2: Change: Improve max-volume, especially with VLC

2024-03-10 Thread ELPA Syncer
branch: externals/listen
commit 5083dc108d116c6549afeb75fbc733e6d14c2bde
Author: Adam Porter 
Commit: Adam Porter 

Change: Improve max-volume, especially with VLC
---
 README.org|  1 +
 listen-lib.el |  5 -
 listen-vlc.el | 33 -
 listen.el |  5 +++--
 4 files changed, 32 insertions(+), 12 deletions(-)

diff --git a/README.org b/README.org
index 465bdf0668..c81b2566d9 100644
--- a/README.org
+++ b/README.org
@@ -84,6 +84,7 @@ Use the command ~listen~ to show the Transient menu.  From 
there, it is--hopeful
 + Command ~listen-queue~ switches to existing queue buffers without reverting 
them.
 + Transient ~qq~ command exits the transient.
 + Optimize updating of individual tracks in queue buffer.
++ Improve handling of maximum volume with VLC (allowing boosting over 100%).
 
 ** v0.6
 
diff --git a/listen-lib.el b/listen-lib.el
index 7ddaae463a..a63c708424 100644
--- a/listen-lib.el
+++ b/listen-lib.el
@@ -44,7 +44,10 @@
 
 (cl-defstruct listen-player
   ;; TODO: Add queue slot.
-  process command args etc)
+  process command args
+  (max-volume
+   100 :documentation "Maximum volume in percent (may be greater than 100 for 
some players).")
+  etc)
 
 (cl-defstruct listen-queue
   name tracks current etc)
diff --git a/listen-vlc.el b/listen-vlc.el
index 4646c537f4..7d61671a8a 100755
--- a/listen-vlc.el
+++ b/listen-vlc.el
@@ -31,10 +31,19 @@
 
  Types
 
-(cl-defstruct (listen-player-vlc
-   (:include listen-player
- (command "vlc")
- (args '("-I" "rc")
+(cl-defstruct
+(listen-player-vlc
+ (:include listen-player
+   (command "vlc")
+   (args '("-I" "rc"))
+   (max-volume
+;; VLC allows very large volume percentages to boost volume 
far beyond what would be
+;; practical (but it's sometimes useful).  It's not clear what 
the actual maximum
+;; percentage is, even from looking at VLC's source code, but 
testing shows that
+;; values up to at least 800 seem to work.  The Qt GUI for VLC 
3.0.20 allows up to
+;; 200% (in the OSD text, while showing a max of 125% in the 
slider), so let's go
+;; with that.
+200
 
  Functions
 
@@ -116,11 +125,17 @@ Stops playing, clears playlist, adds FILE, and plays it."
 (cl-defmethod listen--volume ((player listen-player-vlc) &optional volume)
   "Return or set PLAYER's VOLUME.
 VOLUME is an integer percentage."
-  (if volume
-  (progn
-(cl-assert (<= 0 volume 100) nil "VOLUME must be 0-100")
-(listen--send player (format "volume %s" (* 255 (/ volume 100.0)
-(* 100 (/ (string-to-number (listen--send player "volume")) 255.0
+  ;; While it is unclear from VLC's documentation, and even its source code at 
some revisions,
+  ;; testing shows that the "rc" interface handles volume on a scale of 256 
steps, where 255 = 100%
+  ;; (and values >255 are >100%).  See 
 and
+  ;; 
.
+  (pcase-let (((cl-struct listen-player max-volume) player))
+(if volume
+(progn
+  (unless (<= 0 volume max-volume)
+(user-error "VOLUME must be 0-%s" max-volume))
+  (listen--send player (format "volume %s" (* 255 (/ volume 100.0)
+  (* 100 (/ (string-to-number (listen--send player "volume")) 255.0)
 
 (provide 'listen-vlc)
 
diff --git a/listen.el b/listen.el
index f8a26ee1d4..3286d2b118 100755
--- a/listen.el
+++ b/listen.el
@@ -362,8 +362,9 @@ TIME is a string like \"SS\", \"MM:SS\", or \"HH:MM:SS\"."
  :transient t)
 ("V" "Up" (lambda ()
 (interactive)
-(let ((player (listen-current-player)))
-  (listen-volume player (min 100 (+ (listen--volume player) 
5)
+(let* ((player (listen-current-player))
+   (max-volume (listen-player-max-volume player)))
+  (listen-volume player (min max-volume (+ (listen--volume 
player) 5)
  :transient t)]
["Repeat"
 ("rn" "None" (lambda () (interactive) (setopt listen-queue-repeat-mode 
nil))



[elpa] externals/js2-mode updated (dfbc6dad4c -> e92829da3d)

2024-03-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/js2-mode.

  from  dfbc6dad4c Add a test for #599
   new  6bee6cc9a6 Replace deprecated `lsh' with `ash'
   new  06e8372c5a Replace deprecated point-at-{bol,eol}
   new  e92829da3d Merge pull request #600 from DamienCassou/deprecation


Summary of changes:
 js2-mode.el | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)



[elpa] externals/hyperbole updated (ab6fddeafd -> b36debbea8)

2024-03-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/hyperbole.

  from  ab6fddeafd Merge pull request #482 from rswgnu/rsw
   new  23b118ddb6 Release Hyperbole version 9.0.1
   new  a034ed553f Merge branch 'master' into rsw
   new  b36debbea8 Merge pull request #483 from rswgnu/rsw


Summary of changes:
 ChangeLog   | 5 +
 HY-ABOUT| 4 +-
 HY-ANNOUNCE |84 +-
 HY-NEWS | 2 +-
 Makefile|10 +-
 README.md   | 4 +-
 README.md.html  |14 +-
 README.toc.md   |13 +-
 hversion.el | 6 +-
 hyperbole.el| 6 +-
 man/hyperbole.html  | 16006 ++
 man/hyperbole.info  |   Bin 629665 -> 629779 bytes
 man/hyperbole.pdf   |   Bin 1377764 -> 1378725 bytes
 man/hyperbole.texi  |10 +-
 man/version.texi| 8 +-
 test/kcell-tests.el | 6 +-
 16 files changed, 8569 insertions(+), 7609 deletions(-)



[elpa] externals/listen updated (f71086974e -> 5083dc108d)

2024-03-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/listen.

  from  f71086974e Comment: Add TODO
   new  a708d834a3 Fix: (listen-mpd-tracks-matching) Autoload
   new  5083dc108d Change: Improve max-volume, especially with VLC


Summary of changes:
 README.org|  1 +
 listen-lib.el |  5 -
 listen-mpd.el |  1 +
 listen-vlc.el | 33 -
 listen.el |  5 +++--
 5 files changed, 33 insertions(+), 12 deletions(-)



[elpa] externals/listen a708d834a3 1/2: Fix: (listen-mpd-tracks-matching) Autoload

2024-03-10 Thread ELPA Syncer
branch: externals/listen
commit a708d834a344bde377435a06773df5b0a4626310
Author: Adam Porter 
Commit: Adam Porter 

Fix: (listen-mpd-tracks-matching) Autoload

Needed for, e.g. bookmarks that call this function before the library
is loaded.
---
 listen-mpd.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/listen-mpd.el b/listen-mpd.el
index d5fdf515cc..1047fc108a 100644
--- a/listen-mpd.el
+++ b/listen-mpd.el
@@ -80,6 +80,7 @@ If SELECT-TAG-P, read TAG with completion."
 ('file "MPC Search (track): ")
 (_ (format "MPC Search (%s): " tag))
 
+;;;###autoload
 (cl-defun listen-mpd-tracks-matching (query &key (tag "file") select-tag-p)
   "Return tracks matching QUERY on TAG.
 If SELECT-TAG-P, prompt for TAG with completion.  If QUERY is



[elpa] externals/mpdired a9d1cddab5 037/133: arrange keymap

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit a9d1cddab58a8a34cd74a3b96030ef8834304c7e
Author: Manuel Giraud 
Commit: Manuel Giraud 

arrange keymap
---
 mpdired.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 9484fef26b..5c8c08f71a 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -9,17 +9,20 @@
 (defvar-keymap mpdired-mode-map
   :doc "Local keymap for MPDired."
   "C-n"   'mpdired-next-line
-  "n" 'mpdired-next
+  "n" 'mpdired-next-line
   "C-p"   'mpdired-previous-line
-  "p" 'mpdired-previous
-  "q" 'bury-buffer
+  "p" 'mpdired-previous-line
   "C-m"   'mpdired-enter
   "^" 'mpdired-goto-parent
   "o" 'mpdired-toggle-view
+  "g" 'mpdired-update
+  "q" 'bury-buffer
   "" 'mpdired-toggle-play/pause
+  "N" 'mpdired-next
+  "P" 'mpdired-previous
   "a" 'mpdired-add-at-point
-  "D" 'mpdired-delete
-  "g" 'mpdired-update)
+  ;; Only for queue
+  "D" 'mpdired-delete)
 
 (defun mpdired--subdir-p (dir-a dir-b)
   (let ((pos (string-search dir-a dir-b)))



[elpa] externals/mpdired d47b227dda 114/133: sort and document keymap

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit d47b227ddaba867ef27e8903c57ef1a6b386
Author: Manuel Giraud 
Commit: Manuel Giraud 

sort and document keymap
---
 mpdired.el | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 79519f512b..c75ac8a749 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -84,6 +84,7 @@
   :doc "Local keymap for MPDired."
   :full t
   :parent special-mode-map
+  ;; Navigation
   "C-n"#'mpdired-next-line
   "n"  #'mpdired-next-line
   "" #'mpdired-next-line
@@ -93,14 +94,17 @@
   "C-m"#'mpdired-enter
   "^"  #'mpdired-goto-parent
   "o"  #'mpdired-toggle-view
+  ;; Actions
   "g"  #'mpdired-update
   "G"  #'mpdired-db-update
-  ""  #'mpdired-pause-internal
   "N"  #'mpdired-next-internal
   "P"  #'mpdired-previous-internal
   "a"  #'mpdired-add
+  "x"  #'mpdired-flagged-delete
+  "D"  #'mpdired-delete
+  ;; Status settings and toggles
+  ""  #'mpdired-pause-internal
   "v"  #'mpdired-set-volume-internal
-  ;; Status toggles
   "s s"#'mpdired-stop
   "s R"#'mpdired-toggle-repeat
   "s r"#'mpdired-toggle-random
@@ -121,9 +125,7 @@
   "* t"#'mpdired-toggle-marks
   "* c"#'mpdired-change-marks
   "% d"#'mpdired-flag-files-regexp
-  "% m"#'mpdired-mark-files-regexp
-  "x"  #'mpdired-flagged-delete
-  "D"  #'mpdired-delete)
+  "% m"#'mpdired-mark-files-regexp)
 
 (defface mpdired-currdir
   '((t :inherit dired-header))



[elpa] externals/mpdired 67161b74fd 058/133: reset point

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 67161b74fd1273a249eed31bb89fbe9b6741873e
Author: Manuel Giraud 
Commit: Manuel Giraud 

reset point
---
 mpdired.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index d3dcb77071..f06de9f639 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -259,6 +259,10 @@
   (put-text-property bol eol 'type 'song)
   (put-text-property bol eol 'uri uri
 
+(defun mpdired--reset-point (point)
+  (goto-char point)
+  (goto-char (mpdired--bol)))
+
 (defun mpdired--present-listall (proc)
   ;; Called by filter of the communication buffer.
   (let* ((peer-info (process-contact proc t))
@@ -298,7 +302,7 @@
   (goto-char (mpdired--bol))
   (setq mpdired--browser-point (point)))
  (mpdired--browser-point
-  (goto-char mpdired--browser-point))
+  (mpdired--reset-point mpdired--browser-point))
  (t (goto-char (point-min))
 (when top (mpdired-next-line
 
@@ -337,7 +341,7 @@
;; Set mode, restore point and memorize stuff
(mpdired-mode)
(when mpdired--queue-point
- (goto-char mpdired--queue-point))
+ (mpdired--reset-point mpdired--queue-point))
(setq mpdired--comm-buffer (process-buffer proc)
  mpdired--view 'queue)
 



[elpa] externals/mpdired d7c42d2e6d 010/133: kill the global process

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit d7c42d2e6d64eab4feedc8ef2826506057788c44
Author: Manuel Giraud 
Commit: Manuel Giraud 

kill the global process

Now everything is done through the process of the communication
buffer.
---
 mpdired.el | 55 ++-
 1 file changed, 30 insertions(+), 25 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 76ebd3e37e..0ef1de167d 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -101,38 +101,43 @@
   (unless (string-search "connection broken" event)
 (message "Process: %s had the event '%s'" process event)))
 
-(defvar mpdired-process nil)
-
-(defun mpdired-local-p (host)
+(defun mpdired--local-p (host)
   ;; Hack: if the `expand-file-name' of host leads to an existing
   ;; file, that should be our Unix socket.
   (file-exists-p (expand-file-name host)))
 
-(defun mpdired--maybe-init ()
-  ;; Always reparse host should the user have changed it.
-  (let* ((localp (mpdired-local-p mpdired-host))
-(host (if localp (expand-file-name mpdired-host) mpdired-host))
-(service (if localp host mpdired-port)))
-(with-current-buffer (get-buffer-create "*mpdired-work*")
-  (setq-local buffer-read-only nil)
-  (erase-buffer)
+(defun mpdired--comm-name (host service localp)
+  (if localp
+  (format "*mpdired-%s" host)
+(format "*mpdired-%s:%s" host service)))
+
+(defun mpdired--maybe-init (host service localp)
+  (with-current-buffer (get-buffer-create (mpdired--comm-name host service 
localp))
+(setq-local buffer-read-only nil)
+(erase-buffer)
+(let ((process (get-buffer-process (current-buffer
   ;; Create a new connection if needed
-  (unless (and mpdired-process
-  (eq (process-status mpdired-process) 'open))
-   (setq mpdired-process (make-network-process :name "mpdired"
-   :buffer (current-buffer)
-   :host host
-   :service service
-   :family (if localp 'local)
-   :coding 'utf-8
-   :filter 'my-filter
-   :sentinel 'msg-me))
+  (unless (and process
+  (eq (process-status process) 'open))
+   (set-process-buffer (make-network-process :name "mpdired"
+ :buffer (current-buffer)
+ :host host
+ :service service
+ :family (if localp 'local)
+ :coding 'utf-8
+ :filter 'my-filter
+ :sentinel 'msg-me)
+   (current-buffer))
 
 (defun mpdired-listall (path)
-  (mpdired--maybe-init)
-  (with-current-buffer "*mpdired-work*"
-(setq-local mpdired--last-command 'listall)
-(process-send-string mpdired-process (format "listall \"%s\"\n" path
+  ;; Always reparse host should the user have changed it.
+  (let* ((localp (mpdired--local-p mpdired-host))
+(host (if localp (expand-file-name mpdired-host) mpdired-host))
+(service (if localp host mpdired-port)))
+(mpdired--maybe-init host service localp)
+(with-current-buffer (mpdired--comm-name host service localp)
+  (setq-local mpdired--last-command 'listall)
+  (process-send-string (get-buffer-process (current-buffer)) (format 
"listall \"%s\"\n" path)
 
 (defun mpdired-test-me ()
   (interactive)



[elpa] externals/mpdired f8f6218d73 131/133: use on some standard shortcuts

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit f8f6218d73b13e31741943917a3bde6a20f9ffd2
Author: Manuel Giraud 
Commit: Manuel Giraud 

use  on some standard shortcuts
---
 mpdired.el | 72 ++
 1 file changed, 35 insertions(+), 37 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 4358a0bf3d..7b95a400b0 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -90,47 +90,45 @@
   :full t
   :parent special-mode-map
   ;; Navigation
-  "C-n"#'mpdired-next-line
-  "n"  #'mpdired-next-line
-  "" #'mpdired-next-line
-  "C-p"#'mpdired-previous-line
-  "p"  #'mpdired-previous-line
-  ""   #'mpdired-previous-line
-  "C-m"#'mpdired-enter
-  "^"  #'mpdired-goto-parent
-  "o"  #'mpdired-toggle-view
+  " " #'mpdired-next-line
+  " " #'mpdired-previous-line
+  "n"   #'mpdired-next-line
+  "p"   #'mpdired-previous-line
+  "C-m" #'mpdired-enter
+  "^"   #'mpdired-goto-parent
+  "o"   #'mpdired-toggle-view
   ;; Actions
-  "g"  #'mpdired-update
-  "G"  #'mpdired-db-update
-  "N"  #'mpdired-next-internal
-  "P"  #'mpdired-previous-internal
-  "a"  #'mpdired-add
-  "x"  #'mpdired-flagged-delete
-  "D"  #'mpdired-delete
+  " " #'mpdired-update
+  "G"   #'mpdired-db-update
+  "N"   #'mpdired-next-internal
+  "P"   #'mpdired-previous-internal
+  "a"   #'mpdired-add
+  "x"   #'mpdired-flagged-delete
+  "D"   #'mpdired-delete
   ;; Status settings and toggles
-  ""  #'mpdired-pause-internal
-  "v"  #'mpdired-set-volume-internal
-  "s s"#'mpdired-stop
-  "s R"#'mpdired-toggle-repeat
-  "s r"#'mpdired-toggle-random
-  "s S"#'mpdired-toggle-single
-  "s c"#'mpdired-toggle-consume
+  ""   #'mpdired-pause-internal
+  "v"   #'mpdired-set-volume-internal
+  "s s" #'mpdired-stop
+  "s R" #'mpdired-toggle-repeat
+  "s r" #'mpdired-toggle-random
+  "s S" #'mpdired-toggle-single
+  "s c" #'mpdired-toggle-consume
   ;; Playlist commands
-  "l c"#'mpdired-playlist-create
-  "l a"#'mpdired-playlist-append
+  "l c" #'mpdired-playlist-create
+  "l a" #'mpdired-playlist-append
   ;; Marks
-  "m"  #'mpdired-mark-at-point
-  "* m"#'mpdired-mark-at-point
-  "d"  #'mpdired-flag-at-point
-  "u"  #'mpdired-unmark-at-point
-  ""  #'mpdired-previous-unmark
-  "* !"#'mpdired-unmark-all-marks
-  "U"  #'mpdired-unmark-all-marks
-  "t"  #'mpdired-toggle-marks
-  "* t"#'mpdired-toggle-marks
-  "* c"#'mpdired-change-marks
-  "% d"#'mpdired-flag-files-regexp
-  "% m"#'mpdired-mark-files-regexp)
+  "m"   #'mpdired-mark-at-point
+  "* m" #'mpdired-mark-at-point
+  "d"   #'mpdired-flag-at-point
+  "u"   #'mpdired-unmark-at-point
+  ""   #'mpdired-previous-unmark
+  "* !" #'mpdired-unmark-all-marks
+  "U"   #'mpdired-unmark-all-marks
+  "t"   #'mpdired-toggle-marks
+  "* t" #'mpdired-toggle-marks
+  "* c" #'mpdired-change-marks
+  "% d" #'mpdired-flag-files-regexp
+  "% m" #'mpdired-mark-files-regexp)
 
 (defface mpdired-currdir
   '((t :inherit dired-header))



[elpa] externals/mpdired 60bc2f4e8e 083/133: hide the communication buffer

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 60bc2f4e8e897005c860a38b712bd486ee32cfa2
Author: Manuel Giraud 
Commit: Manuel Giraud 

hide the communication buffer
---
 mpdired.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index b083ee94e8..c7634a0f06 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -241,7 +241,7 @@
   (format "%s:%s" host service
 
 (defun mpdired--comm-name (host service localp)
-  (format "*mpdired-%s*" (mpdired--hostname host service localp)))
+  (format " *mpdired-comm-%s*" (mpdired--hostname host service localp)))
 
 (defun mpdired--main-name (host service localp)
   (format "*MPDired (%s)*" (mpdired--hostname host service localp)))
@@ -451,7 +451,7 @@
 (erase-buffer)
 (let ((process (get-buffer-process (current-buffer
   (unless (and process (eq (process-status process) 'open))
-   (let ((params (list :name "mpdired"
+   (let ((params (list :name "mpdired-comm"
:buffer (current-buffer)
:host host
:service service



[elpa] externals/mpdired a10691c402 025/133: add songs!

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit a10691c4027d1a1c7d393b9f1bd89570d021ad1a
Author: Manuel Giraud 
Commit: Manuel Giraud 

add songs!
---
 mpdired.el | 19 +++
 1 file changed, 19 insertions(+)

diff --git a/mpdired.el b/mpdired.el
index 0e237fd8c2..486c7b585c 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -17,6 +17,7 @@
   "^" 'mpdired-goto-parent
   "o" 'mpdired-toggle-view
   "" 'mpdired-toggle-play/pause
+  "a" 'mpdired-add-at-point
   "D" 'mpdired-delete
   "g" 'mpdired-update)
 
@@ -288,6 +289,15 @@
(setq mpdired--last-command 'playid)
(process-send-string process (format "playid %d\n" id))
 
+(defun mpdired-add-internal (uri)
+  (with-current-buffer mpdired--comm-buffer
+(erase-buffer)
+(mpdired--maybe-reconnect (current-buffer))
+(let ((process (get-buffer-process (current-buffer
+  (when (process-live-p process)
+   (setq mpdired--last-command 'add)
+   (process-send-string process (format "add \"%s\"\n" uri))
+
 (defun mpdired-deleteid-internal (id)
   (with-current-buffer mpdired--comm-buffer
 (erase-buffer)
@@ -379,6 +389,15 @@
   (interactive)
   (mpdired-toggle-play/pause-internal))
 
+(defun mpdired-add-at-point ()
+  (interactive)
+  (goto-char (line-beginning-position))
+  (save-excursion
+(re-search-forward "^\\(.*\\)$" (line-end-position) t))
+  (let ((uri (match-string 1)))
+(when uri
+  (mpdired-add-internal uri
+
 (defun mpdired-deleteid-at-point ()
   (let ((id (get-text-property (line-beginning-position) 'id)))
 (when id



[elpa] externals/mpdired 6bb7fab67b 019/133: fix more navigation

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 6bb7fab67b2f536aa801d766483b3704809d6545
Author: Manuel Giraud 
Commit: Manuel Giraud 

fix more navigation
---
 mpdired.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index b81233df04..cb5f325bde 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -6,7 +6,9 @@
 
 (defvar-keymap mpdired-browse-mode-map
   :doc "Local keymap for MPDired browser."
+  "C-n" 'mpdired-next-line
   "n"   'mpdired-next-line
+  "C-p" 'mpdired-previous-line
   "p"   'mpdired-previous-line
   "q"   'bury-buffer
   "C-m" 'mpdired-listall-at-point
@@ -124,10 +126,10 @@
  (insert "\n"))
(mpdired--insert-entry (car (last data
  ;; Go to the previous directory line when ascending
- (cond (mpdired--ascending-p
+ (cond (ascending-p
 (goto-char (point-min))
 (re-search-forward from-directory nil t)
-(goto-char (match-beginning 1)))
+(goto-char (line-beginning-position)))
(t
 (goto-char (point-min))
 (if top (mpdired-next-line



[elpa] externals/mpdired 90a310e954 026/133: helper macro

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 90a310e954456bb6c692d78acdf87ffbac007982
Author: Manuel Giraud 
Commit: Manuel Giraud 

helper macro
---
 mpdired.el | 93 --
 1 file changed, 36 insertions(+), 57 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 486c7b585c..62f6d96345 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -254,76 +254,55 @@
  (set-process-buffer (apply 'make-network-process params)
  (current-buffer)))
 
-(defun mpdired-listall-internal (path &optional ascending-p buffer)
-  (with-current-buffer (or buffer mpdired--comm-buffer)
-(erase-buffer)
-(mpdired--maybe-reconnect (current-buffer))
-(let ((process (get-buffer-process (current-buffer
-  (when (process-live-p process)
-   (setq mpdired--last-command 'listall
- mpdired--previous-directory mpdired--directory
- mpdired--ascending-p ascending-p)
-   (process-send-string process (format "listall \"%s\"\n" path))
-
-(defun mpdired-listall (path comm-buffer)
-  (mpdired-listall-internal path nil comm-buffer))
+(defmacro mpdired--with-comm-buffer (process buffer &rest body)
+  "Helper macro when sending a command via the communication buffer."
+  (declare (indent defun))
+  `(with-current-buffer (or ,buffer mpdired--comm-buffer)
+ (erase-buffer)
+ (mpdired--maybe-reconnect (current-buffer))
+ (let ((,process (get-buffer-process (current-buffer
+   (when (process-live-p ,process)
+,@body
+
+(defun mpdired-listall-internal (path &optional ascending-p)
+  (mpdired--with-comm-buffer process nil
+(setq mpdired--last-command 'listall
+ mpdired--previous-directory mpdired--directory
+ mpdired--ascending-p ascending-p)
+(process-send-string process (format "listall \"%s\"\n" path
 
 (defun mpdired-playlist-internal (&optional buffer)
-  (with-current-buffer (or buffer mpdired--comm-buffer)
-(erase-buffer)
-(mpdired--maybe-reconnect (current-buffer))
-(let ((process (get-buffer-process (current-buffer
-  (when (process-live-p process)
-   (setq mpdired--last-command 'playlist)
-   (process-send-string process "playlistid\n")
+  (mpdired--with-comm-buffer process buffer
+(setq mpdired--last-command 'playlist)
+(process-send-string process "playlistid\n")))
 
 (defun mpdired-playlist (comm-buffer)
   (mpdired-playlist-internal comm-buffer))
 
 (defun mpdired-playid-internal (id)
-  (with-current-buffer mpdired--comm-buffer
-(erase-buffer)
-(mpdired--maybe-reconnect (current-buffer))
-(let ((process (get-buffer-process (current-buffer
-  (when (process-live-p process)
-   (setq mpdired--last-command 'playid)
-   (process-send-string process (format "playid %d\n" id))
+  (mpdired--with-comm-buffer process nil
+(setq mpdired--last-command 'playid)
+(process-send-string process (format "playid %d\n" id
 
 (defun mpdired-add-internal (uri)
-  (with-current-buffer mpdired--comm-buffer
-(erase-buffer)
-(mpdired--maybe-reconnect (current-buffer))
-(let ((process (get-buffer-process (current-buffer
-  (when (process-live-p process)
-   (setq mpdired--last-command 'add)
-   (process-send-string process (format "add \"%s\"\n" uri))
+  (mpdired--with-comm-buffer process nil
+(setq mpdired--last-command 'add)
+(process-send-string process (format "add \"%s\"\n" uri
 
 (defun mpdired-deleteid-internal (id)
-  (with-current-buffer mpdired--comm-buffer
-(erase-buffer)
-(mpdired--maybe-reconnect (current-buffer))
-(let ((process (get-buffer-process (current-buffer
-  (when (process-live-p process)
-   (setq mpdired--last-command 'deleteid)
-   (process-send-string process (format "deleteid %d\n" id))
+  (mpdired--with-comm-buffer process nil
+(setq mpdired--last-command 'deleteid)
+(process-send-string process (format "deleteid %d\n" id
 
 (defun mpdired-toggle-play/pause-internal (&optional buffer)
-  (with-current-buffer (or buffer mpdired--comm-buffer)
-(erase-buffer)
-(mpdired--maybe-reconnect (current-buffer))
-(let ((process (get-buffer-process (current-buffer
-  (when (process-live-p process)
-   (setq mpdired--last-command 'pause)
-   (process-send-string process "pause\n")
-
-(defun mpdired-status-internal (&optional buffer)
-  (with-current-buffer (or buffer mpdired--comm-buffer)
-(erase-buffer)
-(mpdired--maybe-reconnect (current-buffer))
-(let ((process (get-buffer-process (current-buffer
-  (when (process-live-p process)
-   (setq mpdired--last-command 'status)
-   (process-send-string process "status\n")
+  (mpdired--with-comm-buffer process buffer
+(setq mpdired--last-command 'pause)
+(process-send-string process "pause\n")))
+
+(defun mpdired-status-internal ()
+  (mpdired--with-comm-buffer process nil
+

[elpa] externals/mpdired 0514ea90fc 022/133: maybe we just need one main buffer

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 0514ea90fcc07328dd3052286abcc02efaeabf02
Author: Manuel Giraud 
Commit: Manuel Giraud 

maybe we just need one main buffer
---
 mpdired.el | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index ceff6c7c3e..7fb8a2a855 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -4,8 +4,8 @@
 (defcustom mpdired-port (or (getenv "MPD_PORT") 6600)
   "Host for MPD.")
 
-(defvar-keymap mpdired-browse-mode-map
-  :doc "Local keymap for MPDired browser."
+(defvar-keymap mpdired-mode-map
+  :doc "Local keymap for MPDired."
   "C-n" 'mpdired-next-line
   "n"   'mpdired-next-line
   "C-p" 'mpdired-previous-line
@@ -23,7 +23,7 @@
 (defvar-local mpdired--parse-endp nil)
 (defvar-local mpdired--last-command nil)
 (defvar-local mpdired--previous-directory nil
-  "Previous directory used to pass to the browser buffer.")
+  "Previous directory used to pass to the MPDired buffer.")
 (defvar-local mpdired--ascending-p nil)
 
 (defun mpdired--parse-listall-1 (current accum)
@@ -63,13 +63,13 @@
   ;; It have the good property of being a prefix of any string.
   (mpdired--parse-listall-1 "" (list "")))
 
-(defun mpdired-browse-mode ()
-  "Major mode for MPDired browser."
+(defun mpdired-mode ()
+  "Major mode for MPDired."
   (kill-all-local-variables)
-  (use-local-map mpdired-browse-mode-map)
+  (use-local-map mpdired-mode-map)
   (set-buffer-modified-p nil)
-  (setq major-mode 'mpdired-browse-mode
-   mode-name "MPDired Browse"
+  (setq major-mode 'mpdired-mode
+   mode-name "MPDired"
buffer-read-only t))
 
 (defun mpdired--hostname (host service localp)
@@ -80,16 +80,16 @@
 (defun mpdired--comm-name (host service localp)
   (format "*mpdired-%s*" (mpdired--hostname host service localp)))
 
-(defun mpdired--browser-name (host service localp)
-  (format "*MPDired Browser (%s)*" (mpdired--hostname host service localp)))
+(defun mpdired--main-name (host service localp)
+  (format "*MPDired (%s)*" (mpdired--hostname host service localp)))
 
 ;; Global state variables.
 (defvar mpdired--directory nil
-  "Current directory of the browser buffer.")
+  "Current directory of the browser view.")
 
-;; State variables for the browser
+;; State variables for the main buffer
 (defvar-local mpdired--comm-buffer nil
-  "Communication buffer associated to this browser.")
+  "Communication buffer associated to this MPDired buffer.")
 
 (defun mpdired--insert-entry (entry)
   (cond ((stringp entry)
@@ -105,7 +105,7 @@
 (peer-host (plist-get peer-info :host))
 (peer-service (plist-get peer-info :service))
 (peer-localp (eq (plist-get peer-info :family) 'local))
-(buffer-name (mpdired--browser-name peer-host peer-service 
peer-localp))
+(buffer-name (mpdired--main-name peer-host peer-service peer-localp))
 (content (mpdired--parse-listall))
 from-directory ascending-p)
 ;; Retrieve infos from this process buffer
@@ -136,7 +136,7 @@
 (goto-char (point-min))
 (if top (mpdired-next-line
  ;; Set mode and memorize directory
- (mpdired-browse-mode)
+ (mpdired-mode)
  (setq mpdired--directory (when top top)
mpdired--comm-buffer (process-buffer proc)))
 



[elpa] externals/mpdired 7bbcf712a1 033/133: fix a bug on progress bar

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 7bbcf712a1f9cdd88c51fe511e5a75e7a8feae38
Author: Manuel Giraud 
Commit: Manuel Giraud 

fix a bug on progress bar
---
 mpdired.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 6a834f284f..bc60b0ea25 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -222,9 +222,10 @@
(mpdired--insert-song song)
(insert "\n"))
  (when songs
-   (mpdired--insert-song (car (last songs
- ;; Go to the current song and display elasped time with a face
- ;; on the URI.
+   (mpdired--insert-song (car (last songs)
+   ;; Go to the current song and display elasped time with a face
+   ;; on the URI.
+   (save-excursion
  (when songid
(while (let ((id (get-text-property (point) 'id)))
 (and id (/= songid id)))



[elpa] externals/mpdired ec768308ac 005/133: a recursive parser for listall

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit ec768308ac026f508cba33c5be3e52b4e894dbfe
Author: Manuel Giraud 
Commit: Manuel Giraud 

a recursive parser for listall
---
 mpdired.el | 72 +++---
 1 file changed, 55 insertions(+), 17 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index f6d511cf21..4f2ecf8b64 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -4,24 +4,61 @@
 (defcustom mpdired-port (or (getenv "MPD_PORT") 6600)
   "Host for MPD.")
 
-(defun my-filter (proc string)
-  (when (buffer-live-p (process-buffer proc))
-(with-current-buffer (process-buffer proc)
-  (let ((moving (= (point) (process-mark proc
-(save-excursion
-  ;; Insert the text, advancing the process marker.
-  (goto-char (process-mark proc))
-  (insert string)
-  (set-marker (process-mark proc) (point)))
-(if moving (goto-char (process-mark proc)))
-   (when (re-search-backward "^OK$" nil t)
- (goto-char (point-min))
- (set-buffer-modified-p nil)
- (message "Fini"))
+(defun mpdired--subdir-p (dir-a dir-b)
+  (let ((pos (string-search dir-a dir-b)))
+(and pos (zerop pos
+
+(defvar mpdired--parse-end nil)
+
+(defun mpdired--parse-listall-1 (current accum)
+  ;; Recursively rebuild the directory hierarchy from a "listall"
+  ;; command into a list.  In the output, a directory is list which
+  ;; `car' is its name and its `cdr' is the files or other directory
+  ;; it contains.
+  (catch 'exit
+(while (not (or mpdired--parse-end
+   (setq mpdired--parse-end
+ (re-search-forward "^OK$" (line-end-position) t 1
+  ;; Look for file or directory line by line (I'm not interested
+  ;; in playlist)
+  (re-search-forward "^\\(file\\|directory\\): \\(.*\\)$" 
(line-end-position) t 1)
+  (let ((type (match-string 1))
+   (new (match-string 2)))
+   (cond ((string= "file" type) (push new accum))
+ ((string= "directory" type)
+  ;; This new directory is either a subdir of the current
+  ;; one or a new directory of the same level of the
+  ;; current one.  In this last case we need to go one
+  ;; line backward and quit the loop.
+  (cond ((mpdired--subdir-p current new)
+ (forward-line)
+ (push (mpdired--parse-listall-1 new (list new)) accum))
+(t (forward-line -1)
+   (throw 'exit t))
+  (forward-line)))
+  (reverse accum))
+
+(defun mpdired--parse-listall ()
+  ;; Called from *mpdired-work*
+  (goto-char (point-min))
+  (setq mpdired--parse-end nil)
+  ;; XXX Empty string is the directory name of the toplevel directory.
+  (mpdired--parse-listall-1 "" (list "")))
+
+(defun mpdired-present-listall (contact)
+  ;; Called from *mpdired-work*
+  (let ((out (get-buffer-create (format "*MPDired (%s:%d)*"
+   (car contact) (cadr contact
+   (content (mpdired--parse-listall)))
+(with-current-buffer out
+  (erase-buffer)
+  (dolist (e content)
+   (cond ((stringp e) (insert (format "%s\n" e)))
+ ((consp e) (insert (format ">%s\n" (car e)
 
 (defun msg-me (process event)
-  (princ
-   (format "Process: %s had the event '%s'" process event)))
+  (unless (string-search "connection broken" event)
+(message "Process: %s had the event '%s'" process event)))
 
 (defvar mpdired-process nil)
 
@@ -31,7 +68,8 @@
   (file-exists-p (expand-file-name host)))
 
 (defun mpc-connect ()
-  (with-current-buffer (get-buffer-create "*mpc*")
+  (with-current-buffer (get-buffer-create "*mpdired-work*")
+(setq-local buffer-read-only nil)
 (erase-buffer)
 (let* ((localp (mpdired-local-p mpdired-host))
   (host (if localp (expand-file-name mpdired-host) mpdired-host)))



[elpa] externals/mpdired 7f617d8f33 064/133: toggle marks

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 7f617d8f3342aa56e4e6dcca2f40efc75aab0c8b
Author: Manuel Giraud 
Commit: Manuel Giraud 

toggle marks
---
 mpdired.el | 39 ---
 1 file changed, 28 insertions(+), 11 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 7f1c93b869..6708debeb6 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -62,6 +62,7 @@
   "u"  'mpdired-unmark-at-point
   ""  'mpdired-previous-unmark
   "d"  'mpdired-mark-deletion-at-point
+  "t"  'mpdired-toggle-marks
   ;; Only in the queue view
   "x"  'mpdired-flagged-delete
   "D"  'mpdired-delete)
@@ -587,27 +588,43 @@
   (delete-char 1)
   (insert-char mark))
 (put-text-property (mpdired--bol) (line-end-position) 'mark mark)
+(mpdired--reset-face)))
+
+(defun mpdired--clear-mark ()
+  (let ((inhibit-read-only t))
+(remove-text-properties (mpdired--bol) (line-end-position) '(mark face))
 (mpdired--reset-face)
-(mpdired-next-line)))
+(save-excursion
+  (goto-char (line-beginning-position))
+  (delete-char 1)
+  (insert-char ? 
 
 (defun mpdired-mark-at-point ()
   (interactive)
-  (mpdired--mark ?*))
+  (mpdired--mark ?*)
+  (mpdired-next-line))
 
 (defun mpdired-mark-deletion-at-point ()
   (interactive)
-  (mpdired--mark ?d))
+  (mpdired--mark ?d)
+  (mpdired-next-line))
+
+(defun mpdired-toggle-marks ()
+  (interactive)
+  (save-excursion
+(goto-char (point-min))
+(let ((max (point-max)))
+  (while (< (point) max)
+   (let ((mark (get-text-property (mpdired--bol) 'mark)))
+ (if (and mark (char-equal mark ?*))
+ (mpdired--clear-mark)
+   (mpdired--mark ?*)))
+   (forward-line)
 
 (defun mpdired-unmark-at-point ()
   (interactive)
-  (let ((inhibit-read-only t))
-(remove-text-properties (mpdired--bol) (line-end-position) '(mark face))
-(mpdired--reset-face)
-(save-excursion
-  (goto-char (line-beginning-position))
-  (delete-char 1)
-  (insert-char ? ))
-(mpdired-next-line)))
+  (mpdired--clear-mark)
+  (mpdired-next-line))
 
 (defun mpdired-previous-unmark ()
   (interactive)



[elpa] externals/mpdired 6d94b7529b 045/133: more apropriate place for `mpdired--previous-directory'

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 6d94b7529b6310cd4753f86c646caa40bdc911ed
Author: Manuel Giraud 
Commit: Manuel Giraud 

more apropriate place for `mpdired--previous-directory'
---
 mpdired.el | 68 ++
 1 file changed, 33 insertions(+), 35 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 3d8761db59..9ab74c1dde 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -36,8 +36,6 @@
 (defvar-local mpdired--last-command nil)
 (defvar-local mpdired--main-buffer nil
   "Link to the main MPDired buffer")
-(defvar-local mpdired--previous-directory nil
-  "Previous directory used to pass to the MPDired buffer.")
 (defvar-local mpdired--ascending-p nil)
 
 (defun mpdired--parse-listall-1 (current accum)
@@ -147,6 +145,8 @@
 ;; State variables for the main buffer
 (defvar-local mpdired--directory nil
   "Current directory of the browser view.")
+(defvar-local mpdired--previous-directory nil
+  "Previous directory of the browser view.")
 (defvar-local mpdired--view nil)
 (defvar-local mpdired--comm-buffer nil
   "Communication buffer associated to this MPDired buffer.")
@@ -183,41 +183,41 @@
 (peer-localp (eq (plist-get peer-info :family) 'local))
 (main-buffer (mpdired--main-name peer-host peer-service peer-localp))
 (content (mpdired--parse-listall))
-from-directory ascending-p)
+ascending-p)
 ;; Retrieve infos from this process buffer
 (with-current-buffer (process-buffer proc)
-  (setq from-directory mpdired--previous-directory
-   ascending-p mpdired--ascending-p))
+  (setq ascending-p mpdired--ascending-p))
 (with-current-buffer (get-buffer-create main-buffer)
-  (let ((inhibit-read-only t))
+  (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)))
+(data (cdr content)))
(erase-buffer)
-   ;; `content' is always of the form ("" rest...) so if there
-   ;; is only one "rest" use it as content.
-   (let* ((content (if (cddr content) content (cadr content)))
-  (top (unless (string= "" (car content)) (car content)))
-  (data (cdr content)))
- ;; Insert the content
- (save-excursion
-   (if top (insert (propertize top 'face 'dired-header) ":\n"))
-   (dolist (e (butlast data))
- (mpdired--insert-entry e)
- (insert "\n"))
-   (mpdired--insert-entry (car (last data
- ;; Set mode and memorize stuff
- (mpdired-mode)
- (setq mpdired--directory (when top top)
-   mpdired--comm-buffer (process-buffer proc)
-   mpdired--view 'browser)
- ;; Finally move point to the correct place.
- (cond (ascending-p
-(goto-char (point-min))
-(re-search-forward from-directory nil t)
-(goto-char (line-beginning-position))
-(setq mpdired--browser-point (point)))
-   (mpdired--browser-point
-(goto-char mpdired--browser-point))
-   (t (goto-char (point-min))
-  (when top (mpdired-next-line)
+   ;; Insert the content
+   (save-excursion
+ (if top (insert (propertize top 'face 'dired-header) ":\n"))
+ (dolist (e (butlast data))
+   (mpdired--insert-entry e)
+   (insert "\n"))
+ (mpdired--insert-entry (car (last data
+   ;; Set mode and memorize stuff
+   (mpdired-mode)
+   (if ascending-p (setq mpdired--previous-directory mpdired--directory))
+   (setq mpdired--directory (when top top)
+ mpdired--comm-buffer (process-buffer proc)
+ mpdired--view 'browser)
+   ;; Finally move point to the correct place.
+   (cond ((and ascending-p mpdired--previous-directory)
+  (goto-char (point-min))
+  (re-search-forward mpdired--previous-directory nil t)
+  (goto-char (line-beginning-position))
+  (setq mpdired--browser-point (point)))
+ (mpdired--browser-point
+  (goto-char mpdired--browser-point))
+ (t (goto-char (point-min))
+(when top (mpdired-next-line
 
 (defun mpdired--present-queue (proc)
   ;; Called by filter of the communication buffer.
@@ -324,8 +324,6 @@
 (defun mpdired-listall-internal (path &optional ascending-p)
   (mpdired--with-comm-buffer process nil
 (setq mpdired--last-command 'listall
- mpdired--previous-directory
- (with-current-buffer mpdired--main-buffer mpdired--directory)
  mpdired--ascending-p ascending-p)
 (process-send-string process (format "listall \"%s\"\n" path
 



[elpa] externals/mpdired 89eb2014ae 057/133: keep last linefeed

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 89eb2014ae5f51a74410b3d7dc8185ea06182021
Author: Manuel Giraud 
Commit: Manuel Giraud 

keep last linefeed
---
 mpdired.el | 11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index aef6271e26..d3dcb77071 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -282,10 +282,9 @@
;; Insert the content
(save-excursion
  (if top (insert (propertize top 'face 'dired-header) ":\n"))
- (dolist (e (butlast data))
+ (dolist (e data)
(mpdired--insert-entry e)
-   (insert "\n"))
- (mpdired--insert-entry (car (last data
+   (insert "\n")))
;; Set mode and memorize stuff
(mpdired-mode)
(if ascending-p (setq previous-directory mpdired--directory))
@@ -321,11 +320,9 @@
(erase-buffer)
;; Insert songs
(save-excursion
- (dolist (song (butlast songs))
+ (dolist (song songs)
(mpdired--insert-song song)
-   (insert "\n"))
- (when songs
-   (mpdired--insert-song (car (last songs)
+   (insert "\n")))
;; Go to the current song and display elasped time with a face
;; on the URI.
(save-excursion



[elpa] externals/mpdired 8aef3a4cff 122/133: more meaningful than "? "

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 8aef3a4cffceb88c5b55bb3c241b2f5065783371
Author: Manuel Giraud 
Commit: Manuel Giraud 

more meaningful than "? "
---
 mpdired.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mpdired.el b/mpdired.el
index 31d97c20bf..a91f2b0dae 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -907,7 +907,7 @@ In the queue view, starts playing the song at point."
   (save-excursion
(goto-char (line-beginning-position))
(delete-char 1)
-   (insert-char ? )
+   (insert-char ?\s)
 
 (defun mpdired-mark-at-point ()
   "Marks entry at point."



[elpa] externals/mpdired 27fff5c751 084/133: set volume

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 27fff5c7515ff14ae3315cc6687aec2f92e407e0
Author: Manuel Giraud 
Commit: Manuel Giraud 

set volume
---
 mpdired.el | 21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index c7634a0f06..1c21e12385 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -88,6 +88,7 @@
   "N"  #'mpdired-next-internal
   "P"  #'mpdired-previous-internal
   "a"  #'mpdired-add
+  "v"  #'mpdired-set-volume-internal
   ;; Marks
   "m"  #'mpdired-mark-at-point
   "* m"#'mpdired-mark-at-point
@@ -133,7 +134,7 @@
 (defvar-local mpdired--parse-endp nil)
 (defvar-local mpdired--last-command nil)
 (defvar-local mpdired--main-buffer nil
-  "Link to the main MPDired buffer")
+  "Link to the main MPDired buffer.")
 (defvar-local mpdired--ascending-p nil)
 (defvar-local mpdired--message nil)
 
@@ -536,13 +537,11 @@
 (setq mpdired--last-command 'previous)
 (process-send-string process "previous\n")))
 
-;; XXX for debugging
-(defun mpdired-status-internal ()
-  (mpdired--with-comm-buffer process nil
-(setq mpdired--last-command 'status)
-(process-send-string process "command_list_begin\n")
-(process-send-string process "status\n")
-(process-send-string process "command_list_end\n")))
+(defun mpdired-set-volume-internal (volume &optional buffer)
+  (interactive "nVolume: ")
+  (mpdired--with-comm-buffer process buffer
+(setq mpdired--last-command 'setvol)
+(process-send-string process (format "setvol %d\n" (min 100 (max 0 
volume))
 
 (defun mpdired--save-point ()
   (cond ((eq mpdired--view 'queue)
@@ -841,6 +840,11 @@
   (let ((buffers (mpdired--prepare)))
 (mpdired-previous-internal (car buffers
 
+(defun mpdired-set-volume (volume)
+  (interactive "nVolume: ")
+  (let ((buffers (mpdired--prepare)))
+(mpdired-set-volume-internal (min 100 (max 0 volume)) (car buffers
+
 ;; Main entry point.
 (defun mpdired ()
   (interactive)
@@ -852,3 +856,4 @@
 (pop-to-buffer main)))
 
 (provide 'mpdired)
+;;; mpdired.el ends here



[elpa] externals/mpdired d628211fc4 130/133: use `read-char' prompt

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit d628211fc407c4d327b4870630d0fcf5b89c30b6
Author: Manuel Giraud 
Commit: Manuel Giraud 

use `read-char' prompt
---
 mpdired.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 85b6bf944c..4358a0bf3d 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -943,9 +943,8 @@ SEPARATOR string."
   "Changes mark from OLD to NEW.  It asks the user for OLD and NEW."
   (interactive
(let* ((cursor-in-echo-area t)
- (old (progn (message "Change (old mark): ") (read-char)))
- (new (progn (message  "Change %c marks to (new mark): " old)
- (read-char
+ (old (read-char "Change (old mark): "))
+ (new (read-char (format "Change %c marks to (new mark): " old
  (list old new)))
   (let ((inhibit-read-only t))
 (save-excursion



[elpa] externals/mpdired d4c3e209f8 073/133: move next line in add at point

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit d4c3e209f8483f89911663c55fdcf889fe999d24
Author: Manuel Giraud 
Commit: Manuel Giraud 

move next line in add at point
---
 mpdired.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mpdired.el b/mpdired.el
index 62820e0163..a7e3a23f63 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -714,7 +714,8 @@
 (uri (get-text-property bol 'uri)))
 (when uri
   (mpdired--append-message (format "Adding %s..." uri))
-  (mpdired-add-internal uri
+  (mpdired-add-internal uri)
+  (mpdired-next-line
 
 (defun mpdired-deleteid-at-point ()
   (let ((id (get-text-property (mpdired--bol) 'id)))



[elpa] externals/mpdired 64abed57c6 074/133: fix a bug with deletion on last line

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 64abed57c6b81270c47791b427ef931cd939c55b
Author: Manuel Giraud 
Commit: Manuel Giraud 

fix a bug with deletion on last line
---
 mpdired.el | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index a7e3a23f63..f38b89fa79 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -722,8 +722,10 @@
 (when id
   (save-excursion
(forward-line)
-   (setq mpdired--songid-point
- (get-text-property (mpdired--bol) 'id)))
+   (let ((bol (mpdired--bol)))
+ (unless (>= bol (point-max))
+   (setq mpdired--songid-point
+ (get-text-property bol 'id)
   (mpdired-deleteid-internal id
 
 (defun mpdired-delete ()
@@ -737,7 +739,8 @@
   (while (and (< (point) max)
  (get-text-property (mpdired--bol) 'mark))
(forward-line))
-  (get-text-property (mpdired--bol) 'id
+  (unless (>= (mpdired--bol) max)
+   (get-text-property (mpdired--bol) 'id)
 
 (defun mpdired-flagged-delete ()
   (interactive)



[elpa] externals/mpdired d873668a3a 079/133: more text

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit d873668a3ad360be90bd90b5b6510ae6f8b6bed8
Author: Manuel Giraud 
Commit: Manuel Giraud 

more text
---
 mpdired.el | 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index f460c813e7..509de52830 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -28,14 +28,28 @@
 ;; inspired from Dired.  It features two views packed into the same
 ;; interactive buffer: the browser view and the queue view.
 ;;
-;; In those view, most of the interactions are mimic after Dired.
+;; In those view, most of the interactions are mimic after Dired mode
+;; with marks and action on them.  For example, in the queue view, you
+;; could flag songs for removal with `d' and then execute with `x'.
 
 ;;; Philosophy:
 ;;
 ;; MPDired is designed to be the least intrusive.  Nothing will be
 ;; shown into the mode line, which I consider to be user's territory.
 ;; There is no timers set by MPDired, so updating anything always
-;; comes from a user interaction.
+;; comes from a user action.
+;;
+;; The browser view is built only from the MPD's "listall" command.
+;; The MPD's documentation does *not* recommend to do so but AFAIU
+;; there is no other way to access your music collection in terms of
+;; directories and files.  As my music collection is already ordered
+;; into directories and with meaningful filenames, I prefer to use
+;; this interface rather then to rely on files' tags.
+;;
+;; If your music collection consists of just a set of not well named
+;; files into one big directory and that you rely on tags such as
+;; Genre, Album, Artist to find your way through it then, maybe,
+;; MPDired is not the right client for you.
 
 ;;; Bugs & Funs:
 ;;



[elpa] externals/mpdired 9144b48c3b 042/133: sort functions

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 9144b48c3bc24b21c1e183242b28f9b0648ad811
Author: Manuel Giraud 
Commit: Manuel Giraud 

sort functions
---
 mpdired.el | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 3faf01f8ac..5a13166bc2 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -338,9 +338,6 @@
 (process-send-string process "playlistid\n")
 (process-send-string process "command_list_end\n")))
 
-(defun mpdired-queue (comm-buffer)
-  (mpdired-queue-internal comm-buffer))
-
 (defun mpdired-playid-internal (id)
   (mpdired--with-comm-buffer process nil
 (setq mpdired--last-command 'playid)
@@ -502,9 +499,7 @@
((eq mpdired--view 'queue)
 (mpdired-previous-internal
 
-;; Main entry point
-(defun mpdired ()
-  (interactive)
+(defun mpdired--prepare ()
   ;; Get user's host and service current setting.
   (let* ((localp (mpdired--local-p mpdired-host))
 (host (if localp (expand-file-name mpdired-host) mpdired-host))
@@ -512,8 +507,16 @@
 (comm-name (mpdired--comm-name host service localp))
 (main-name (mpdired--main-name host service localp)))
 (mpdired--maybe-init host service localp)
+(cons main-name comm-name)))
+
+;; Main entry point
+(defun mpdired ()
+  (interactive)
+  (let* ((names (mpdired--prepare))
+(main-name (car names))
+(comm-name (cdr names)))
 ;; Defaults to queue view
-(mpdired-queue comm-name)
+(mpdired-queue-internal comm-name)
 (pop-to-buffer main-name)))
 
 (provide 'mpdired)



[elpa] externals/mpdired 610c1ad904 055/133: multiple removal and face fix

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 610c1ad904558e5ca735cb66f4d99e48e4ad8a46
Author: Manuel Giraud 
Commit: Manuel Giraud 

multiple removal and face fix
---
 mpdired.el | 56 +---
 1 file changed, 45 insertions(+), 11 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index a7e12dc1f8..7e02883541 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -27,7 +27,8 @@
   "u"  'mpdired-unmark-at-point
   ""  'mpdired-previous-unmark
   "d"  'mpdired-mark-deletion-at-point
-  ;; Only for queue
+  ;; Only in the queue view
+  "x"  'mpdired-flagged-delete
   "D"  'mpdired-delete)
 
 (defface mpdired-song
@@ -42,6 +43,14 @@
   '((t :inherit dired-directory))
   "Face used to show a directory.")
 
+(defface mpdired-marked
+  '((t :inherit dired-marked))
+  "Face used to show a marked entry.")
+
+(defface mpdired-flagged
+  '((t :inherit dired-flagged))
+  "Face used to show an entry flagged for deletion.")
+
 (defun mpdired--subdir-p (dir-a dir-b)
   (let ((pos (string-search dir-a dir-b)))
 (and pos (zerop pos
@@ -177,6 +186,21 @@
 (defun mpdired--short-name (string)
   (car (last (split-string string "/"
 
+(defun mpdired--reset-face ()
+  (let* ((bol (mpdired--bol))
+(eol (line-end-position))
+(type (get-text-property bol 'type))
+(mark (get-text-property bol 'mark)))
+(remove-text-properties bol eol '(face))
+(cond ((and mark (char-equal mark ?d))
+  (put-text-property bol eol 'face 'mpdired-flagged))
+ ((and mark (char-equal mark ?*))
+  (put-text-property bol eol 'face 'mpdired-marked))
+ ((eq type 'directory)
+  (put-text-property bol eol 'face 'mpdired-directory))
+ ((eq type 'song)
+  (put-text-property bol eol 'face 'mpdired-song)
+
 (defun mpdired--insert-entry (entry)
   (insert "  ")
   (let ((bol (mpdired--bol)))
@@ -197,6 +221,7 @@
 (let ((bol (mpdired--bol))
  (eol (line-end-position)))
   (put-text-property bol eol 'id id)
+  (put-text-property bol eol 'type 'song)
   (put-text-property bol eol 'uri uri
 
 (defun mpdired--present-listall (proc)
@@ -376,7 +401,10 @@
   (mpdired--with-comm-buffer process nil
 (setq mpdired--last-command 'deleteid)
 (process-send-string process "command_list_begin\n")
-(process-send-string process (format "deleteid %d\n" id))
+(if (listp id)
+   (dolist (i id)
+ (process-send-string process (format "deleteid %d\n" i)))
+  (process-send-string process (format "deleteid %d\n" id)))
 ;; XXX A playlistid should always be preceded by a status
 (process-send-string process "status\n")
 (process-send-string process "playlistid\n")
@@ -482,29 +510,29 @@
  (mpdired-listall-internal "")))
   (t (mpdired-listall-internal ""))
 
-(defun mpdired--mark (mark face)
+(defun mpdired--mark (mark)
   (let ((inhibit-read-only t))
 (save-excursion
   (goto-char (line-beginning-position))
   (delete-char 1)
   (insert-char mark))
 (put-text-property (mpdired--bol) (line-end-position) 'mark mark)
-(put-text-property (mpdired--bol) (line-end-position) 'face face)
+(mpdired--reset-face)
 (mpdired-next-line)))
 
 (defun mpdired-mark-at-point ()
   (interactive)
-  (mpdired--mark ?* 'dired-marked))
+  (mpdired--mark ?*))
 
 (defun mpdired-mark-deletion-at-point ()
   (interactive)
-  (mpdired--mark ?d 'dired-flagged))
+  (mpdired--mark ?d))
 
 (defun mpdired-unmark-at-point ()
   (interactive)
   (let ((inhibit-read-only t))
-(remove-text-properties (mpdired--bol) (line-end-position) '(mark))
-(put-text-property (mpdired--bol) (line-end-position) 'face 'mpdired-song)
+(remove-text-properties (mpdired--bol) (line-end-position) '(mark face))
+(mpdired--reset-face)
 (save-excursion
   (goto-char (line-beginning-position))
   (delete-char 1)
@@ -516,7 +544,7 @@
   (mpdired-previous-line)
   (let ((inhibit-read-only t))
 (remove-text-properties (mpdired--bol) (line-end-position) '(mark))
-(put-text-property (mpdired--bol) (line-end-position) 'face 'mpdired-song)
+(mpdired--reset-face)
 (save-excursion
   (goto-char (line-beginning-position))
   (delete-char 1)
@@ -531,9 +559,9 @@
   (while (zerop eob)
(let* ((bol (mpdired--bol))
   (mark (get-text-property bol 'mark))
-  (uri (get-text-property bol 'uri)))
+  (id (get-text-property bol 'id)))
  (when (and mark (char-equal mark want))
-   (push uri result)))
+   (push id result)))
(setq eob (forward-line)))
   result)))
 
@@ -552,6 +580,12 @@
   (cond ((eq mpdired--view 'queue)
 (mpdired-deleteid-at-point
 
+(defun mpdired-flagged-delete ()
+  (interactive)
+  (when (eq mpdired--view 'queue)
+(let ((flagged (mpdired--collect-marked ?d)))
+  (when flagged (mpdired-deleteid-internal flagged)
+
 (defun m

[elpa] externals/mpdired 57081d175d 060/133: add a message system

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 57081d175d366c9221195df497462ee35ee06e1e
Author: Manuel Giraud 
Commit: Manuel Giraud 

add a message system
---
 mpdired.el | 21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index d16db2966b..729e9ebc65 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -97,6 +97,7 @@
 (defvar-local mpdired--main-buffer nil
   "Link to the main MPDired buffer")
 (defvar-local mpdired--ascending-p nil)
+(defvar-local mpdired--message nil)
 
 (defun mpdired--parse-listall-1 (current accum)
   ;; Recursively rebuild the directory hierarchy from a "listall"
@@ -362,7 +363,9 @@
 (mpdired--present-listall proc))
((or (eq mpdired--last-command 'queue)
 (eq mpdired--last-command 'deleteid))
-(mpdired--present-queue proc
+(mpdired--present-queue proc)))
+ (when mpdired--message
+   (message (format "%s done." mpdired--message
 
 (defun mpdired--sentinel (process event)
   (unless (string-search "connection broken" event)
@@ -602,11 +605,25 @@
(forward-line))
   result)))
 
+(defun mpdired--reset-message ()
+  (with-current-buffer mpdired--comm-buffer
+(setq mpdired--message nil)))
+
+(defun mpdired--append-message (message)
+  "Put a message for the communication buffer."
+  (with-current-buffer mpdired--comm-buffer
+(if mpdired--message
+   (setq (format "%s %s" mpdired--message message))
+  (setq mpdired--message message
+
 (defun mpdired-add-at-point ()
   (interactive)
   (let* ((bol (mpdired--bol))
 (uri (get-text-property bol 'uri)))
-(when uri (mpdired-add-internal uri
+(when uri
+  (mpdired--reset-message)
+  (mpdired--append-message (format "Adding %s…" uri))
+  (mpdired-add-internal uri
 
 (defun mpdired-deleteid-at-point ()
   (let ((id (get-text-property (mpdired--bol) 'id)))



[elpa] externals/mpdired c8fcb8a87e 018/133: more hacking

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit c8fcb8a87e4d26a12a038ea26188c0412b924938
Author: Manuel Giraud 
Commit: Manuel Giraud 

more hacking
---
 mpdired.el | 117 ++---
 1 file changed, 73 insertions(+), 44 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index df6f0d0d11..b81233df04 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -16,7 +16,13 @@
   (let ((pos (string-search dir-a dir-b)))
 (and pos (zerop pos
 
-(defvar mpdired--parse-end nil)
+;; State variables for the communication buffer
+(defvar-local mpdired--network-params nil)
+(defvar-local mpdired--parse-endp nil)
+(defvar-local mpdired--last-command nil)
+(defvar-local mpdired--previous-directory nil
+  "Previous directory used to pass to the browser buffer.")
+(defvar-local mpdired--ascending-p nil)
 
 (defun mpdired--parse-listall-1 (current accum)
   ;; Recursively rebuild the directory hierarchy from a "listall"
@@ -24,8 +30,8 @@
   ;; `car' is its name and its `cdr' is the files or other directory
   ;; it contains.
   (catch 'exit
-(while (not (or mpdired--parse-end
-   (setq mpdired--parse-end
+(while (not (or mpdired--parse-endp
+   (setq mpdired--parse-endp
  (re-search-forward "^OK$" (line-end-position) t 1
   ;; Look for file or directory line by line (I'm not interested
   ;; in playlist)
@@ -50,7 +56,7 @@
 (defun mpdired--parse-listall ()
   ;; Called from *mpdired-work*
   (goto-char (point-min))
-  (setq mpdired--parse-end nil)
+  (setq mpdired--parse-endp nil)
   ;; XXX Empty string is the directory name of the toplevel directory.
   ;; It have the good property of being a prefix of any string.
   (mpdired--parse-listall-1 "" (list "")))
@@ -75,16 +81,18 @@
 (defun mpdired--browser-name (host service localp)
   (format "*MPDired Browser (%s)*" (mpdired--hostname host service localp)))
 
-(defvar-local mpdired--directory nil)
-(defvar-local mpdired--last-command nil)
-(defvar-local mpdired--previous-directory nil)
+;; State variables for the browser
+(defvar-local mpdired--directory nil
+  "Current directory of the browser buffer.")
+(defvar-local mpdired--comm-buffer nil
+  "Communication buffer associated to this browser.")
 
-(defun mpdired--insert-file/dir (element)
-  (cond ((stringp element)
-(insert element)
+(defun mpdired--insert-entry (entry)
+  (cond ((stringp entry)
+(insert entry)
 (put-text-property (line-beginning-position) (line-end-position) 'type 
'file))
-   ((consp element)
-(insert (propertize (car element) 'face 'dired-directory))
+   ((consp entry)
+(insert (propertize (car entry) 'face 'dired-directory))
 (put-text-property (line-beginning-position) (line-end-position) 'type 
'directory
 
 (defun mpdired--present-listall (proc)
@@ -93,10 +101,13 @@
 (peer-host (plist-get peer-info :host))
 (peer-service (plist-get peer-info :service))
 (peer-localp (eq (plist-get peer-info :family) 'local))
-(from-directory (with-current-buffer (process-buffer proc)
-  mpdired--previous-directory))
 (buffer-name (mpdired--browser-name peer-host peer-service 
peer-localp))
-(content (mpdired--parse-listall)))
+(content (mpdired--parse-listall))
+from-directory ascending-p)
+;; Retrieve infos from this process buffer
+(with-current-buffer (process-buffer proc)
+  (setq from-directory mpdired--previous-directory
+   ascending-p mpdired--ascending-p))
 (with-current-buffer (get-buffer-create buffer-name)
   (let ((inhibit-read-only t))
(erase-buffer)
@@ -109,20 +120,21 @@
  (save-excursion
(if top (insert (propertize top 'face 'bold) ":\n"))
(dolist (e (butlast data))
- (mpdired--insert-file/dir e)
+ (mpdired--insert-entry e)
  (insert "\n"))
-   (mpdired--insert-file/dir (car (last data
- ;; Go to the previous directory line
- (cond (from-directory
+   (mpdired--insert-entry (car (last data
+ ;; Go to the previous directory line when ascending
+ (cond (mpdired--ascending-p
 (goto-char (point-min))
 (re-search-forward from-directory nil t)
-(goto-char (line-beginning-position)))
+(goto-char (match-beginning 1)))
(t
 (goto-char (point-min))
 (if top (mpdired-next-line
  ;; Set mode and memorize directory
  (mpdired-browse-mode)
- (setq-local mpdired--directory (when top top)))
+ (setq mpdired--directory (when top top)
+   mpdired--comm-buffer (process-buffer proc)))
 
 (defun mpdired--filter (proc string)
   (when (buffer-live-p (process-buffer proc))
@@ -149,36 +161,53 @@
   ;; file, that should be our Unix socket.
   (file-exi

[elpa] externals/mpdired 9d40d1e63e 106/133: more text about bugs

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 9d40d1e63edfdf5439ef1f792dfb689402ef3ba5
Author: Manuel Giraud 
Commit: Manuel Giraud 

more text about bugs
---
 mpdired.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mpdired.el b/mpdired.el
index aecc7bbac7..9752adb793 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -61,6 +61,8 @@
 
 ;;; Bugs & Funs:
 ;;
+;; - MPDired does not handle MPD server with password.
+;;
 ;; - Marks are really temporary.  As I rebuild the views often and the
 ;;   mark is only stored in text property they will be wipe out
 ;;   regularly.



[elpa] externals/mpdired 6df5870a7d 067/133: try to go to a correct place upon deletion

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 6df5870a7d18f9d87ee23d7f205836cbde17cfc5
Author: Manuel Giraud 
Commit: Manuel Giraud 

try to go to a correct place upon deletion
---
 mpdired.el | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 3a4dcddf0e..3996c5b005 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -681,19 +681,34 @@
 
 (defun mpdired-deleteid-at-point ()
   (let ((id (get-text-property (mpdired--bol) 'id)))
-(when id (mpdired-deleteid-internal id
+(when id
+  (save-excursion
+   (forward-line)
+   (setq mpdired--songid-point
+ (get-text-property (mpdired--bol) 'id)))
+  (mpdired-deleteid-internal id
 
 (defun mpdired-delete ()
   (interactive)
   (cond ((eq mpdired--view 'queue)
 (mpdired-deleteid-at-point
 
+(defun mpdired--find-next-unmarked-id ()
+  (save-excursion
+(let ((max (point-max)))
+  (while (and (< (point) max)
+ (get-text-property (mpdired--bol) 'mark))
+   (forward-line))
+  (get-text-property (mpdired--bol) 'id
+
 (defun mpdired-flagged-delete ()
   (interactive)
   (when (eq mpdired--view 'queue)
 (let* ((flagged (mpdired--collect-marked ?d))
   (ids (mapcar 'car flagged)))
-  (when flagged (mpdired-deleteid-internal ids)
+  (when flagged
+   (setf mpdired--songid-point (mpdired--find-next-unmarked-id))
+   (mpdired-deleteid-internal ids)
 
 (defun mpdired-update ()
   (interactive)



[elpa] externals/mpdired 5ea11f65b6 066/133: also gather URI when collecting marked

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 5ea11f65b6e7e74e896f66aeb0f6024c164e5add
Author: Manuel Giraud 
Commit: Manuel Giraud 

also gather URI when collecting marked
---
 mpdired.el | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 0dbb2f35a6..3a4dcddf0e 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -28,8 +28,10 @@
 ;; inspired from Dired.  It features two views packed into the same
 ;; interactive buffer: the browser view and the queue view.
 
-;;; Bugs:
+;;; Bugs & Funs:
 ;;
+;; - URI based commands work in both view: in the queue, you can
+;;   append the song at point to the queue
 
 ;;; Code:
 
@@ -650,9 +652,10 @@
   (while (< (point) max)
(let* ((bol (mpdired--bol))
   (mark (get-text-property bol 'mark))
-  (id (get-text-property bol 'id)))
+  (id (get-text-property bol 'id))
+  (uri (get-text-property bol 'uri)))
  (when (and mark (char-equal mark want))
-   (push id result)))
+   (push (cons id uri) result)))
(forward-line))
   result)))
 
@@ -688,8 +691,9 @@
 (defun mpdired-flagged-delete ()
   (interactive)
   (when (eq mpdired--view 'queue)
-(let ((flagged (mpdired--collect-marked ?d)))
-  (when flagged (mpdired-deleteid-internal flagged)
+(let* ((flagged (mpdired--collect-marked ?d))
+  (ids (mapcar 'car flagged)))
+  (when flagged (mpdired-deleteid-internal ids)
 
 (defun mpdired-update ()
   (interactive)



[elpa] externals/mpdired 809a5df8e5 030/133: first command list for delete

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 809a5df8e5fe501929d788cf3a474e0b965bc262
Author: Manuel Giraud 
Commit: Manuel Giraud 

first command list for delete
---
 mpdired.el | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index e9c469d375..2bc3f7c676 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -217,7 +217,8 @@
(when (re-search-backward "^\\(OK\\|ACK.*\\)$" nil t)
  (cond ((eq mpdired--last-command 'listall)
 (mpdired--present-listall proc))
-   ((eq mpdired--last-command 'queue)
+   ((or (eq mpdired--last-command 'queue)
+(eq mpdired--last-command 'deleteid))
 (mpdired--present-queue proc
 
 (defun mpdired--sentinel (process event)
@@ -292,7 +293,10 @@
 (defun mpdired-deleteid-internal (id)
   (mpdired--with-comm-buffer process nil
 (setq mpdired--last-command 'deleteid)
-(process-send-string process (format "deleteid %d\n" id
+(process-send-string process "command_list_begin\n")
+(process-send-string process (format "deleteid %d\n" id))
+(process-send-string process "playlistid\n")
+(process-send-string process "command_list_end\n")))
 
 (defun mpdired-toggle-play/pause-internal (&optional buffer)
   (mpdired--with-comm-buffer process buffer
@@ -400,8 +404,7 @@
 (defun mpdired-delete ()
   (interactive)
   (cond ((eq mpdired--view 'queue)
-(mpdired-deleteid-at-point)
-(mpdired-queue-internal
+(mpdired-deleteid-at-point
 
 (defun mpdired-update ()
   (interactive)



[nongnu] elpa/cider updated (23540fdfcd -> c4fa1a84a3)

2024-03-10 Thread ELPA Syncer
elpasync pushed a change to branch elpa/cider.

  from  23540fdfcd Add scittle to runtime versions (#3600)
   new  6403a8d8b5 Use cider-nrepl 0.47.0 (#3631)
   new  c4fa1a84a3 Support new `cider.clj-reload/reload` cider-nrepl 
middlewarex


Summary of changes:
 CHANGELOG.md   |  9 +++--
 cider-ns.el| 33 ++--
 cider.el   |  2 +-
 dev/docker-sample-project/project.clj  |  2 +-
 dev/tramp-sample-project/project.clj   |  2 +-
 .../ROOT/pages/basics/middleware_setup.adoc| 12 +++---
 doc/modules/ROOT/pages/basics/up_and_running.adoc  |  4 +-
 doc/modules/ROOT/pages/cljs/shadow-cljs.adoc   |  2 +-
 doc/modules/ROOT/pages/cljs/up_and_running.adoc|  2 +-
 doc/modules/ROOT/pages/usage/misc_features.adoc| 17 +
 test/cider-tests.el| 44 +++---
 11 files changed, 87 insertions(+), 42 deletions(-)



[elpa] externals/mpdired e40891fa3a 069/133: change marks

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit e40891fa3ab86895859dfa8aff35d129263bf899
Author: Manuel Giraud 
Commit: Manuel Giraud 

change marks
---
 mpdired.el | 35 ---
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 68e35c4519..9fc9668689 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -32,10 +32,10 @@
 
 ;;; Philosophy:
 ;;
-;; MPDired is designed to be the least intrusive.  Nothing will shown
-;; into the mode line, which I consider to be user's territory.  There
-;; is no timers set by MPDired, so updating anything always comes from
-;; a user interaction.
+;; MPDired is designed to be the least intrusive.  Nothing will be
+;; shown into the mode line, which I consider to be user's territory.
+;; There is no timers set by MPDired, so updating anything always
+;; comes from a user interaction.
 
 ;;; Bugs & Funs:
 ;;
@@ -58,6 +58,8 @@
 
 (defvar-keymap mpdired-mode-map
   :doc "Local keymap for MPDired."
+  :full t
+  :parent special-mode-map
   "C-n"'mpdired-next-line
   "n"  'mpdired-next-line
   "" 'mpdired-next-line
@@ -68,16 +70,18 @@
   "^"  'mpdired-goto-parent
   "o"  'mpdired-toggle-view
   "g"  'mpdired-update
-  "q"  'bury-buffer
   ""  'mpdired-pause-internal
   "N"  'mpdired-next-internal
   "P"  'mpdired-previous-internal
   "a"  'mpdired-add-at-point
+  ;; Marks
   "m"  'mpdired-mark-at-point
+  "d"  'mpdired-flag-at-point
   "u"  'mpdired-unmark-at-point
   ""  'mpdired-previous-unmark
-  "d"  'mpdired-mark-deletion-at-point
   "t"  'mpdired-toggle-marks
+  "* t"'mpdired-toggle-marks
+  "* c"'mpdired-change-marks
   ;; Only in the queue view
   "x"  'mpdired-flagged-delete
   "D"  'mpdired-delete)
@@ -623,7 +627,7 @@
   (mpdired--mark ?*)
   (mpdired-next-line))
 
-(defun mpdired-mark-deletion-at-point ()
+(defun mpdired-flag-at-point ()
   (interactive)
   (mpdired--mark ?d)
   (mpdired-next-line))
@@ -640,6 +644,23 @@
(mpdired--mark ?*)))
(forward-line)
 
+(defun mpdired-change-marks (&optional old new)
+  (interactive
+   (let* ((cursor-in-echo-area t)
+ (old (progn (message "Change (old mark): ") (read-char)))
+ (new (progn (message  "Change %c marks to (new mark): " old)
+ (read-char
+ (list old new)))
+  (let ((inhibit-read-only t))
+(save-excursion
+  (goto-char (point-min))
+  (let ((max (point-max)))
+   (while (< (point) max)
+ (let ((mark (get-text-property (mpdired--bol) 'mark)))
+   (when (and mark (char-equal mark old))
+ (mpdired--mark new)))
+ (forward-line))
+
 (defun mpdired-unmark-at-point ()
   (interactive)
   (mpdired--clear-mark)



[elpa] externals/mpdired a52e1d37ca 001/133: init

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit a52e1d37ca44787fbced965077f0b3e87f3824ff
Author: Manuel Giraud 
Commit: Manuel Giraud 

init
---
 mpc.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mpc.el b/mpc.el
new file mode 100644
index 00..acd06556cc
--- /dev/null
+++ b/mpc.el
@@ -0,0 +1 @@
+;; nothing



[elpa] branch externals/mpdired created (now a1d613a6d5)

2024-03-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/mpdired.

at  a1d613a6d5 invert progression

This branch includes the following new commits:

   new  a52e1d37ca init
   new  a74ca07e9e rename
   new  356aae09c4 ideas and hack
   new  9063b7c80a better naming
   new  ec768308ac a recursive parser for listall
   new  5c777bc465 start cleaning display
   new  5699213525 mostly fancy
   new  651e7e2ff0 factorize connection
   new  2abd5dbd58 start mode and keymap
   new  d7c42d2e6d kill the global process
   new  fe835f4e0c better naming
   new  f6733f5577 factorize buffer naming
   new  f44c2e1810 navigation
   new  8498a52398 handle backtrack in navigation
   new  1f473c2840 no more *toplevel*
   new  2a7d82bbe9 identify file type with text property
   new  55e5bffec8 fix line movement
   new  c8fcb8a87e more hacking
   new  6bb7fab67b fix more navigation
   new  77a5b2aae8 mpdired--directory is global and only set in one place
   new  53544d970f start putting things in place for playlist
   new  0514ea90fc maybe we just need one main buffer
   new  6da84bce76 functional playlist view
   new  ef9152366f hack hack
   new  a10691c402 add songs!
   new  90a310e954 helper macro
   new  f167259c1b next/previous song in playlist view
   new  5755e4b4ff use the more apropriate "queue" for active playlist
   new  b74cb9b942 no more global var
   new  809a5df8e5 first command list for delete
   new  ef9eb96157 progress bar on the song's uri
   new  d6ffbd3d6a fix some bugs
   new  7bbcf712a1 fix a bug on progress bar
   new  def0f3a7ec better variable name for the main buffer
   new  38af5323d1 save point in queue view
   new  69020f1f01 put uri into a text property
   new  a9d1cddab5 arrange keymap
   new  2578a997f1 fix bug
   new  c706173fb3 also save/restore browser point
   new  f367a65ea7 provide
   new  7fbb564613 fix position tracking
   new  9144b48c3b sort functions
   new  02febab49f pause as an example of a general command
   new  517ccae79d continue with previous and next
   new  6d94b7529b more apropriate place for `mpdired--previous-directory'
   new  3381c37be3 kill `mpdired--previous-directory'
   new  384c19be84 short name in the browser view
   new  687eec724a start working on marks
   new  bf93b1f892 some progress on marks
   new  c7a25c8359 pause "connection broken" message
   new  063fc07288 fix bad bol
   new  2b60aded22 truncate lines
   new  ec312f3326 fix another wrong bol
   new  d76f23ae6f define my own face
   new  610c1ad904 multiple removal and face fix
   new  ca34f59824 insert header
   new  89eb2014ae keep last linefeed
   new  67161b74fd reset point
   new  91cd7e9d0f fix walking to the end of buffer
   new  57081d175d add a message system
   new  e78adc1fd2 position with songid in queue view
   new  c1e0eff8a4 tweak buffer names
   new  27258677fa fix going up (again)
   new  7f617d8f33 toggle marks
   new  0bead27006 fix bol positioning in some case
   new  5ea11f65b6 also gather URI when collecting marked
   new  6df5870a7d try to go to a correct place upon deletion
   new  8d3eb2c850 more comments
   new  e40891fa3a change marks
   new  f5e5350ac0 unmark all marks
   new  6242a3ab19 don't clear mark when there is none
   new  384bcbaf87 message is already reset when displayed
   new  d4c3e209f8 move next line in add at point
   new  64abed57c6 fix a bug with deletion on last line
   new  2be9c24398 use the function reader macro
   new  0f0e96d4b9 mark with regexp
   new  150283738e another key for mark at point
   new  7aba12aca2 same EOT regexp everywhere
   new  d873668a3a more text
   new  6c846ec87d message for pause
   new  192c308375 add marked files
   new  b869838bd3 custom message when adding multiple URI
   new  60bc2f4e8e hide the communication buffer
   new  27fff5c751 set volume
   new  4b4d78f513 address some checkdoc issues
   new  b5d5220a44 wrap some long lines
   new  218c95066c status line in the queue view
   new  fc0f1f692c stop command
   new  d16a87a0f0 explicit stopped
   new  38b0d18e24 fix bug with empty queue
   new  3f6a3bec12 copy mpd's status in a buffer local var
   new  e07d7509c7 random toggle
   new  511f9d7c1a fix mark
   new  fa2b2484b4 more status toggles
   new  2ac5d2f759 more text
   new  1243df446c a DB update command
   new  1adbc6d49c mostly docstrings
   new  7c67d5d631 put newline inside insert functions
   new  9690720c32 starts supporting playlist
   new  b7343a00ca playlist browsing
   new  95f4162d42 add playlist to queue
   new  92fe989306 faces
   new  5626857ca4 playlist -> mpdired--directory
   new  ba9a99a004 fix

[elpa] externals/mpdired 2a7d82bbe9 016/133: identify file type with text property

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 2a7d82bbe937e59a182484aede109ec605d1b3ef
Author: Manuel Giraud 
Commit: Manuel Giraud 

identify file type with text property
---
 mpdired.el | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index aa0b7e6c10..03f76fb7c9 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -52,6 +52,7 @@
   (goto-char (point-min))
   (setq mpdired--parse-end nil)
   ;; XXX Empty string is the directory name of the toplevel directory.
+  ;; It have the good property of being a prefix of any string.
   (mpdired--parse-listall-1 "" (list "")))
 
 (defun mpdired-browse-mode ()
@@ -79,9 +80,12 @@
 (defvar-local mpdired--previous-directory nil)
 
 (defun mpdired--insert-file/dir (element)
-  (cond ((stringp element) (insert element))
+  (cond ((stringp element)
+(insert element)
+(put-text-property (line-beginning-position) (line-end-position) 'type 
'file))
((consp element)
-(insert (propertize (car element) 'face 'dired-directory)
+(insert (propertize (car element) 'face 'dired-directory))
+(put-text-property (line-beginning-position) (line-end-position) 'type 
'directory
 
 (defun mpdired--present-listall (proc)
   ;; Called from *mpdired-work*
@@ -188,8 +192,12 @@
 
 (defun mpdired-listall-at-point ()
   (interactive)
-  (re-search-forward "^\\(.*\\)$" (line-end-position) t)
-  (mpdired-listall (match-string 1) mpdired--directory))
+  (goto-char (line-beginning-position))
+  (save-excursion
+(re-search-forward "^\\(.*\\)$" (line-end-position) t))
+  (if (eq (get-text-property (line-beginning-position) 'type) 'directory)
+  (mpdired-listall (match-string 1) mpdired--directory)
+(message "Cannot browse a file.")))
 
 (defun mpdired--unsplit (list separator)
   (let (res)



[elpa] externals/mpdired ef9152366f 024/133: hack hack

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit ef9152366f1735373c0046a9afbb39ebfdb06e02
Author: Manuel Giraud 
Commit: Manuel Giraud 

hack hack
---
 mpdired.el | 139 +
 1 file changed, 112 insertions(+), 27 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index e6cd3aa6fa..0e237fd8c2 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -8,14 +8,17 @@
 
 (defvar-keymap mpdired-mode-map
   :doc "Local keymap for MPDired."
-  "C-n" 'mpdired-next-line
-  "n"   'mpdired-next-line
-  "C-p" 'mpdired-previous-line
-  "p"   'mpdired-previous-line
-  "q"   'bury-buffer
-  "C-m" 'mpdired-listall-at-point
-  "^"   'mpdired-goto-parent
-  "o"   'mpdired-toggle-view)
+  "C-n"   'mpdired-next-line
+  "n" 'mpdired-next-line
+  "C-p"   'mpdired-previous-line
+  "p" 'mpdired-previous-line
+  "q" 'bury-buffer
+  "C-m"   'mpdired-enter
+  "^" 'mpdired-goto-parent
+  "o" 'mpdired-toggle-view
+  "" 'mpdired-toggle-play/pause
+  "D" 'mpdired-delete
+  "g" 'mpdired-update)
 
 (defun mpdired--subdir-p (dir-a dir-b)
   (let ((pos (string-search dir-a dir-b)))
@@ -66,20 +69,32 @@
   ;; It have the good property of being a prefix of any string.
   (mpdired--parse-listall-1 "" (list "")))
 
+;; All my functions are called *-playlist but the correct "playlistid"
+;; MPD interface is used.
 (defun mpdired--parse-playlist ()
   ;; Called from the communication buffer.
   (goto-char (point-min))
   (setq mpdired--parse-endp nil)
-  (let (result)
+  (let (result file time id)
 (while (not (or mpdired--parse-endp
(setq mpdired--parse-endp
  (re-search-forward "^OK$" (line-end-position) t 1
-  ;; Look for file with id in the playlist
-  (when (re-search-forward "^\\([0-9]+\\):file: \\(.*\\)$" 
(line-end-position) t 1)
-   (let ((id (string-to-number (match-string 1)))
- (name (match-string 2)))
- (push (cons id name) result)))
+  ;; File
+  (when (re-search-forward "^file: \\(.*\\)$" (line-end-position) t 1)
+   ;; if file is already set store the previous entry in the
+   ;; list.
+   (when file
+ (push (list id file time) result))
+   (setq file (match-string 1)))
+  ;; Time
+  (when (re-search-forward "^Time: \\(.*\\)$" (line-end-position) t 1)
+   (setq time (string-to-number (match-string 1
+  ;; Id
+  (when (re-search-forward "^Id: \\(.*\\)$" (line-end-position) t 1)
+   (setq id (string-to-number (match-string 1
   (forward-line))
+;; The last one
+(when file (push (list id file time) result))
 (reverse result)))
 
 (defun mpdired-mode ()
@@ -120,7 +135,7 @@
 (put-text-property (line-beginning-position) (line-end-position) 'type 
'directory
 
 (defun mpdired--insert-song (song)
-  (insert (propertize (cdr song) 'face 'dired-ignored))
+  (insert (propertize (cadr song) 'face 'dired-ignored))
   (put-text-property (line-beginning-position) (line-end-position) 'id (car 
song)))
 
 (defun mpdired--present-listall (proc)
@@ -181,7 +196,8 @@
  (dolist (song (butlast content))
(mpdired--insert-song song)
(insert "\n"))
- (mpdired--insert-song (car (last content
+ (when content
+   (mpdired--insert-song (car (last content)
;; Set mode and memorize stuff
(mpdired-mode)
(setq mpdired--comm-buffer (process-buffer proc)
@@ -213,7 +229,6 @@
   (file-exists-p (expand-file-name host)))
 
 (defun mpdired--maybe-reconnect (comm-buffer)
-  (with-current-buffer comm-buffer)
   (let ((process (get-buffer-process comm-buffer)))
 (unless (and process (eq (process-status process) 'open))
   ;; Reconnect from saved parameters.
@@ -223,7 +238,6 @@
 
 (defun mpdired--maybe-init (host service localp)
   (with-current-buffer (get-buffer-create (mpdired--comm-name host service 
localp))
-(setq-local buffer-read-only nil)
 (erase-buffer)
 (let ((process (get-buffer-process (current-buffer
   (unless (and process (eq (process-status process) 'open))
@@ -241,10 +255,10 @@
 
 (defun mpdired-listall-internal (path &optional ascending-p buffer)
   (with-current-buffer (or buffer mpdired--comm-buffer)
+(erase-buffer)
 (mpdired--maybe-reconnect (current-buffer))
 (let ((process (get-buffer-process (current-buffer
   (when (process-live-p process)
-   (erase-buffer)
(setq mpdired--last-command 'listall
  mpdired--previous-directory mpdired--directory
  mpdired--ascending-p ascending-p)
@@ -255,16 +269,52 @@
 
 (defun mpdired-playlist-internal (&optional buffer)
   (with-current-buffer (or buffer mpdired--comm-buffer)
+(erase-buffer)
 (mpdired--maybe-reconnect (current-buffer))
 (let ((process (get-buffer-process (current-buffer
   (when (process-live-p process)
-   (erase-buffer)
(setq mpdired--last-command 'playlist)
-   (p

[elpa] externals/mpdired f44c2e1810 013/133: navigation

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit f44c2e1810552c4cf5419c4494b84d5c05be82c5
Author: Manuel Giraud 
Commit: Manuel Giraud 

navigation
---
 mpdired.el | 61 +
 1 file changed, 49 insertions(+), 12 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 068f64b7bc..2b5b8a58e6 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -6,9 +6,11 @@
 
 (defvar-keymap mpdired-browse-mode-map
   :doc "Local keymap for MPDired browser."
-  "n" 'next-line
-  "p" 'previous-line
-  "q" 'bury-buffer)
+  "n"   'mpdired-next-line
+  "p"   'mpdired-previous-line
+  "q"   'bury-buffer
+  "C-m" 'mpdired-listall-at-point
+  "^"   'mpdired-goto-parent)
 
 (defun mpdired--subdir-p (dir-a dir-b)
   (let ((pos (string-search dir-a dir-b)))
@@ -72,6 +74,8 @@
 (defun mpdired--browser-name (host service localp)
   (format "*MPDired Browser (%s)*" (mpdired--hostname host service localp)))
 
+(defvar mpdired--directory nil)
+
 (defun mpdired--present-listall (proc)
   ;; Called from *mpdired-work*
   (let* ((peer-info (process-contact proc t))
@@ -83,19 +87,21 @@
 (with-current-buffer (get-buffer-create buffer-name)
   (let ((inhibit-read-only t))
(erase-buffer)
-   (save-excursion
- ;; `content' is always of the form ("" rest...) so if there
- ;; is only one "rest" use it as content.
- (let* ((content (if (cddr content) content (cadr content)))
-(top (if (string= (car content) "")
- "*toplevel*"
-   (car content
+   ;; `content' is always of the form ("" rest...) so if there
+   ;; is only one "rest" use it as content.
+   (let* ((content (if (cddr content) content (cadr content)))
+  (top (if (string= (car content) "")
+   "*toplevel*"
+ (car content
+ (save-excursion
(insert (propertize top 'face 'bold) ":\n")
(dolist (e (cdr content))
  (cond ((stringp e) (insert e))
((consp e) (insert (propertize (car e) 'face 
'dired-directory
- (insert "\n")
-  (mpdired-browse-mode
+ (insert "\n")))
+ ;; Set mode and memorize directory
+ (mpdired-browse-mode)
+ (setq-local mpdired--directory top))
 
 (defun mpdired--filter (proc string)
   (when (buffer-live-p (process-buffer proc))
@@ -149,6 +155,37 @@
   (setq-local mpdired--last-command 'listall)
   (process-send-string (get-buffer-process (current-buffer)) (format 
"listall \"%s\"\n" path)
 
+(defun mpdired-next-line ()
+  (interactive)
+  (next-line))
+
+(defun mpdired-previous-line ()
+  (interactive)
+  (previous-line))
+
+(defun mpdired-listall-at-point ()
+  (interactive)
+  (re-search-forward "^\\(.*\\)$" (line-end-position) t)
+  (mpdired-listall (match-string 1)))
+
+(defun mpdired--unsplit (list separator)
+  (let (res)
+(dolist (e (butlast list))
+  (push e res)
+  (push separator res))
+(push (car (last list)) res)
+(apply 'concat (reverse res
+
+(defun mpdired--parent ()
+  (let ((split (split-string mpdired--directory "/")))
+(if (= 1 (length split))
+   ""
+  (mpdired--unsplit (butlast split) "/"
+
+(defun mpdired-goto-parent ()
+  (interactive)
+  (mpdired-listall (mpdired--parent)))
+
 (defun mpdired-test-me ()
   (interactive)
   (mpdired-listall "")



[elpa] externals/mpdired 55e5bffec8 017/133: fix line movement

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 55e5bffec85ad67f2f47960ed977618426bdd02f
Author: Manuel Giraud 
Commit: Manuel Giraud 

fix line movement
---
 mpdired.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 03f76fb7c9..df6f0d0d11 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -182,12 +182,12 @@
 
 (defun mpdired-next-line ()
   (interactive)
-  (next-line)
+  (forward-line)
   (goto-char (line-beginning-position)))
 
 (defun mpdired-previous-line ()
   (interactive)
-  (previous-line)
+  (forward-line -1)
   (goto-char (line-beginning-position)))
 
 (defun mpdired-listall-at-point ()



[elpa] externals/mpdired 9063b7c80a 004/133: better naming

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 9063b7c80a92ac6e7e7976badc9011f693072875
Author: Manuel Giraud 
Commit: Manuel Giraud 

better naming
---
 mpdired.el | 33 +
 1 file changed, 17 insertions(+), 16 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 4a8fc4ce6d..f6d511cf21 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -1,7 +1,7 @@
-(defcustom mpd-host (or (getenv "MPD_HOST") "localhost")
+(defcustom mpdired-host (or (getenv "MPD_HOST") "localhost")
   "Host for MPD.")
 
-(defcustom mpd-port (or (getenv "MPD_PORT") 6600)
+(defcustom mpdired-port (or (getenv "MPD_PORT") 6600)
   "Host for MPD.")
 
 (defun my-filter (proc string)
@@ -15,6 +15,7 @@
   (set-marker (process-mark proc) (point)))
 (if moving (goto-char (process-mark proc)))
(when (re-search-backward "^OK$" nil t)
+ (goto-char (point-min))
  (set-buffer-modified-p nil)
  (message "Fini"))
 
@@ -22,7 +23,7 @@
   (princ
(format "Process: %s had the event '%s'" process event)))
 
-(defvar *mpdired-process* nil)
+(defvar mpdired-process nil)
 
 (defun mpdired-local-p (host)
   ;; Hack: if the `expand-file-name' of host leads to an existing
@@ -32,22 +33,22 @@
 (defun mpc-connect ()
   (with-current-buffer (get-buffer-create "*mpc*")
 (erase-buffer)
-(let* ((localp (mpdired-local-p mpd-host))
-  (host (if localp (expand-file-name mpd-host) mpd-host)))
+(let* ((localp (mpdired-local-p mpdired-host))
+  (host (if localp (expand-file-name mpdired-host) mpdired-host)))
   ;; Create a new connection if needed
-  (unless (and *mpdired-process*
-  (eq (process-status *mpdired-process*) 'open))
-   (setq *mpdired-process* (make-network-process :name "mpdired"
- :buffer (current-buffer)
- :host host
- :service (if localp host 
mpd-port)
- :family (if localp 'local)
- :coding 'utf-8
- :filter 'my-filter
- :sentinel 'msg-me)))
+  (unless (and mpdired-process
+  (eq (process-status mpdired-process) 'open))
+   (setq mpdired-process (make-network-process :name "mpdired"
+   :buffer (current-buffer)
+   :host host
+   :service (if localp host 
mpdired-port)
+   :family (if localp 'local)
+   :coding 'utf-8
+   :filter 'my-filter
+   :sentinel 'msg-me)))
   ;;(process-send-string proc "list album\n")
   ;;(process-send-string proc "playlistinfo\n")
-  (process-send-string *mpdired-process* "listall \"\"\n")
+  (process-send-string mpdired-process "listall \"\"\n")
   ;;(process-send-string proc "close\n")
   ;;(buffer-string)
   )))



[elpa] externals/mpdired ad77853940 128/133: version 1 in preparation

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit ad77853940f8d9c12e692f69a4f4cf215476a21d
Author: Manuel Giraud 
Commit: Manuel Giraud 

version 1 in preparation
---
 mpdired.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mpdired.el b/mpdired.el
index a9d17c4651..d34b71bbb8 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -2,6 +2,7 @@
 
 ;; Copyright (C) 2024  Manuel Giraud
 
+;; Version: 1-pre
 ;; Package-Requires: ((emacs "29"))
 
 ;; Author: Manuel Giraud 



[elpa] externals/mpdired 687eec724a 048/133: start working on marks

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 687eec724a592d7c26b98083c88bce443cf5e712
Author: Manuel Giraud 
Commit: Manuel Giraud 

start working on marks
---
 mpdired.el | 44 +---
 1 file changed, 41 insertions(+), 3 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index d781c12378..66ca83d690 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -23,6 +23,9 @@
   "N"  'mpdired-next-internal
   "P"  'mpdired-previous-internal
   "a"  'mpdired-add-at-point
+  "m"  'mpdired-mark-at-point
+  "u"  'mpdired-unmark-at-point
+  ""  'mpdired-previous-unmark
   ;; Only for queue
   "D"  'mpdired-delete)
 
@@ -157,6 +160,7 @@
   (car (last (split-string string "/"
 
 (defun mpdired--insert-entry (entry)
+  (insert "  ")
   (let ((bol (line-beginning-position)))
 (cond ((stringp entry)
   (insert (mpdired--short-name entry))
@@ -171,7 +175,7 @@
 (defun mpdired--insert-song (song)
   (let ((id (car song))
(uri (cadr song)))
-(insert (propertize uri 'face 'dired-ignored))
+(insert "  " (propertize uri 'face 'dired-ignored))
 (let ((bol (line-beginning-position))
  (eol (line-end-position)))
   (put-text-property bol eol 'id id)
@@ -393,13 +397,13 @@
 (defun mpdired-next-line ()
   (interactive)
   (forward-line)
-  (goto-char (line-beginning-position))
+  (goto-char (+ 2 (line-beginning-position)))
   (mpdired--save-point))
 
 (defun mpdired-previous-line ()
   (interactive)
   (forward-line -1)
-  (goto-char (line-beginning-position))
+  (goto-char (+ 2 (line-beginning-position)))
   (mpdired--save-point))
 
 (defun mpdired-listall-at-point ()
@@ -459,6 +463,40 @@
  (mpdired-listall-internal "")))
   (t (mpdired-listall-internal ""))
 
+(defun mpdired-mark-at-point ()
+  (interactive)
+  (let ((bol (line-beginning-position))
+   (mark ?*)
+   (inhibit-read-only t))
+(put-text-property bol (line-end-position) 'mark mark)
+(save-excursion
+  (goto-char bol)
+  (delete-char 1)
+  (insert-char mark))
+(mpdired-next-line)))
+
+(defun mpdired-unmark-at-point ()
+  (interactive)
+  (let ((bol (line-beginning-position))
+   (inhibit-read-only t))
+(remove-text-properties bol (line-end-position) '(mark))
+(save-excursion
+  (goto-char bol)
+  (delete-char 1)
+  (insert-char ? ))
+(mpdired-next-line)))
+
+(defun mpdired-previous-unmark ()
+  (interactive)
+  (mpdired-previous-line)
+  (let ((bol (line-beginning-position))
+   (inhibit-read-only t))
+(remove-text-properties bol (line-end-position) '(mark))
+(save-excursion
+  (goto-char bol)
+  (delete-char 1)
+  (insert-char ? 
+
 (defun mpdired-add-at-point ()
   (interactive)
   (let* ((bol (line-beginning-position))



[elpa] externals/mpdired 0db3b5f4ee 113/133: add-at-point is built into add now

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 0db3b5f4ee78f5463d9fc78b27d728b8bd37b199
Author: Manuel Giraud 
Commit: Manuel Giraud 

add-at-point is built into add now
---
 mpdired.el | 36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 53af52e05f..79519f512b 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -954,10 +954,10 @@ In the queue view, start playing the song at point."
 
 (defun mpdired--collect-marked (want)
   "Collect entries marked with WANT."
-  (save-excursion
-(goto-char (point-min))
-(let ((max (point-max))
- result)
+  (let ((max (point-max))
+   result)
+(save-excursion
+  (goto-char (point-min))
   (while (< (point) max)
(let* ((bol (mpdired--bol))
   (mark (get-text-property bol 'mark))
@@ -966,8 +966,15 @@ In the queue view, start playing the song at point."
   (uri (get-text-property bol 'uri)))
  (when (and mark (char-equal mark want))
(push (cons id (cons type uri)) result)))
-   (forward-line))
-  (reverse result
+   (forward-line)))
+;; No marked, get the entry at point.
+(unless result
+  (let* ((bol (mpdired--bol))
+(id (get-text-property bol 'id))
+(type (get-text-property bol 'type))
+(uri (get-text-property bol 'uri)))
+   (setq result (list (cons id (cons type uri))
+(reverse result)))
 
 (defun mpdired-mark-files-regexp (regexp &optional mark)
   "Mark entries which matches a user provided REGEXP."
@@ -993,14 +1000,6 @@ In the queue view, start playing the song at point."
(setq mpdired--message (format "%s %s" mpdired--message message))
   (setq mpdired--message message
 
-(defun mpdired-add-at-point ()
-  (let* ((bol (mpdired--bol))
-(uri (get-text-property bol 'uri)))
-(when uri
-  (mpdired--append-message (format "Adding %s..." uri))
-  (mpdired-add-internal uri)
-  (mpdired-next-line
-
 (defun mpdired--build-add-message (typed-uris)
   (let* ((uris (mapcar 'cdr typed-uris))
 (n (length uris)))
@@ -1016,10 +1015,11 @@ In the queue view, start playing the song at point."
   (interactive)
   (let* ((marked (mpdired--collect-marked ?*))
 (typed-uris (mapcar 'cdr marked)))
-(cond (typed-uris
-  (mpdired--append-message (mpdired--build-add-message typed-uris))
-  (mpdired-add-internal typed-uris))
- (t (mpdired-add-at-point)
+(when typed-uris
+  (mpdired--append-message (mpdired--build-add-message typed-uris))
+  (mpdired-add-internal typed-uris)
+  (when (= 1 (length typed-uris))
+   (mpdired-next-line)
 
 (defun mpdired-deleteid-at-point ()
   (let ((id (get-text-property (mpdired--bol) 'id)))



[elpa] externals/mpdired f5e5350ac0 070/133: unmark all marks

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit f5e5350ac0fa85acfd8a312044cf4d35113790a8
Author: Manuel Giraud 
Commit: Manuel Giraud 

unmark all marks
---
 mpdired.el | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 9fc9668689..e7d72c07a2 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -79,6 +79,8 @@
   "d"  'mpdired-flag-at-point
   "u"  'mpdired-unmark-at-point
   ""  'mpdired-previous-unmark
+  "* !"'mpdired-unmark-all-marks
+  "U"  'mpdired-unmark-all-marks
   "t"  'mpdired-toggle-marks
   "* t"'mpdired-toggle-marks
   "* c"'mpdired-change-marks
@@ -669,13 +671,17 @@
 (defun mpdired-previous-unmark ()
   (interactive)
   (mpdired-previous-line)
+  (mpdired--clear-mark))
+
+(defun mpdired-unmark-all-marks ()
+  (interactive)
   (let ((inhibit-read-only t))
-(remove-text-properties (mpdired--bol) (line-end-position) '(mark))
-(mpdired--reset-face)
 (save-excursion
-  (goto-char (line-beginning-position))
-  (delete-char 1)
-  (insert-char ? 
+  (goto-char (point-min))
+  (let ((max (point-max)))
+   (while (< (point) max)
+ (mpdired--clear-mark)
+ (forward-line))
 
 (defun mpdired--collect-marked (want)
   "Collect entries marked with WANT."



[elpa] externals/mpdired 6da84bce76 023/133: functional playlist view

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 6da84bce768efb5a920c8b78bf99763aeb0f730f
Author: Manuel Giraud 
Commit: Manuel Giraud 

functional playlist view
---
 mpdired.el | 109 -
 1 file changed, 79 insertions(+), 30 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 7fb8a2a855..e6cd3aa6fa 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -1,8 +1,10 @@
 (defcustom mpdired-host (or (getenv "MPD_HOST") "localhost")
-  "Host for MPD.")
+  "Host for MPD."
+  :type 'string)
 
 (defcustom mpdired-port (or (getenv "MPD_PORT") 6600)
-  "Host for MPD.")
+  "Host for MPD."
+  :type 'integer)
 
 (defvar-keymap mpdired-mode-map
   :doc "Local keymap for MPDired."
@@ -12,7 +14,8 @@
   "p"   'mpdired-previous-line
   "q"   'bury-buffer
   "C-m" 'mpdired-listall-at-point
-  "^"   'mpdired-goto-parent)
+  "^"   'mpdired-goto-parent
+  "o"   'mpdired-toggle-view)
 
 (defun mpdired--subdir-p (dir-a dir-b)
   (let ((pos (string-search dir-a dir-b)))
@@ -56,13 +59,29 @@
   (reverse accum))
 
 (defun mpdired--parse-listall ()
-  ;; Called from *mpdired-work*
+  ;; Called from the communication buffer.
   (goto-char (point-min))
   (setq mpdired--parse-endp nil)
   ;; XXX Empty string is the directory name of the toplevel directory.
   ;; It have the good property of being a prefix of any string.
   (mpdired--parse-listall-1 "" (list "")))
 
+(defun mpdired--parse-playlist ()
+  ;; Called from the communication buffer.
+  (goto-char (point-min))
+  (setq mpdired--parse-endp nil)
+  (let (result)
+(while (not (or mpdired--parse-endp
+   (setq mpdired--parse-endp
+ (re-search-forward "^OK$" (line-end-position) t 1
+  ;; Look for file with id in the playlist
+  (when (re-search-forward "^\\([0-9]+\\):file: \\(.*\\)$" 
(line-end-position) t 1)
+   (let ((id (string-to-number (match-string 1)))
+ (name (match-string 2)))
+ (push (cons id name) result)))
+  (forward-line))
+(reverse result)))
+
 (defun mpdired-mode ()
   "Major mode for MPDired."
   (kill-all-local-variables)
@@ -88,6 +107,7 @@
   "Current directory of the browser view.")
 
 ;; State variables for the main buffer
+(defvar-local mpdired--view nil)
 (defvar-local mpdired--comm-buffer nil
   "Communication buffer associated to this MPDired buffer.")
 
@@ -99,8 +119,12 @@
 (insert (propertize (car entry) 'face 'dired-directory))
 (put-text-property (line-beginning-position) (line-end-position) 'type 
'directory
 
+(defun mpdired--insert-song (song)
+  (insert (propertize (cdr song) 'face 'dired-ignored))
+  (put-text-property (line-beginning-position) (line-end-position) 'id (car 
song)))
+
 (defun mpdired--present-listall (proc)
-  ;; Called from *mpdired-work*
+  ;; Called by filter of the communication buffer.
   (let* ((peer-info (process-contact proc t))
 (peer-host (plist-get peer-info :host))
 (peer-service (plist-get peer-info :service))
@@ -122,7 +146,7 @@
   (data (cdr content)))
  ;; Insert the content
  (save-excursion
-   (if top (insert (propertize top 'face 'bold) ":\n"))
+   (if top (insert (propertize top 'face 'dired-header) ":\n"))
(dolist (e (butlast data))
  (mpdired--insert-entry e)
  (insert "\n"))
@@ -135,13 +159,33 @@
(t
 (goto-char (point-min))
 (if top (mpdired-next-line
- ;; Set mode and memorize directory
+ ;; Set mode and memorize stuff
  (mpdired-mode)
  (setq mpdired--directory (when top top)
-   mpdired--comm-buffer (process-buffer proc)))
+   mpdired--comm-buffer (process-buffer proc)
+   mpdired--view 'browser))
 
-(defun mpdired--present-playlist ()
-  (message "I should do something"))
+(defun mpdired--present-playlist (proc)
+  ;; Called by filter of the communication buffer.
+  (let* ((peer-info (process-contact proc t))
+(peer-host (plist-get peer-info :host))
+(peer-service (plist-get peer-info :service))
+(peer-localp (eq (plist-get peer-info :family) 'local))
+(buffer-name (mpdired--main-name peer-host peer-service peer-localp))
+(content (mpdired--parse-playlist)))
+(with-current-buffer (get-buffer-create buffer-name)
+  (let ((inhibit-read-only t))
+   (erase-buffer)
+   ;; Insert the content
+   (save-excursion
+ (dolist (song (butlast content))
+   (mpdired--insert-song song)
+   (insert "\n"))
+ (mpdired--insert-song (car (last content
+   ;; Set mode and memorize stuff
+   (mpdired-mode)
+   (setq mpdired--comm-buffer (process-buffer proc)
+ mpdired--view 'playlist)
 
 (defun mpdired--filter (proc string)
   (when (buffer-live-p (process-buffer proc))
@@ -158,7 +202,7 @@
  (cond ((eq mpdired--last-command 'listall

[elpa] externals/mpdired 02febab49f 043/133: pause as an example of a general command

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 02febab49ff127dcce1d21dc148f61e92fe4020d
Author: Manuel Giraud 
Commit: Manuel Giraud 

pause as an example of a general command
---
 mpdired.el | 30 +-
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 5a13166bc2..3ac922cdd3 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -19,7 +19,7 @@
   "o"  'mpdired-toggle-view
   "g"  'mpdired-update
   "q"  'bury-buffer
-  ""  'mpdired-toggle-play/pause
+  ""  'mpdired-pause-internal
   "N"  'mpdired-next
   "P"  'mpdired-previous
   "a"  'mpdired-add-at-point
@@ -358,7 +358,8 @@
 (process-send-string process "playlistid\n")
 (process-send-string process "command_list_end\n")))
 
-(defun mpdired-toggle-play/pause-internal (&optional buffer)
+(defun mpdired-pause-internal (&optional buffer)
+  (interactive)
   (mpdired--with-comm-buffer process buffer
 (setq mpdired--last-command 'pause)
 (process-send-string process "pause\n")))
@@ -456,10 +457,6 @@
  (mpdired-listall-internal "")))
   (t (mpdired-listall-internal ""))
 
-(defun mpdired-toggle-play/pause ()
-  (interactive)
-  (mpdired-toggle-play/pause-internal))
-
 (defun mpdired-add-at-point ()
   (interactive)
   (let* ((bol (line-beginning-position))
@@ -507,16 +504,23 @@
 (comm-name (mpdired--comm-name host service localp))
 (main-name (mpdired--main-name host service localp)))
 (mpdired--maybe-init host service localp)
-(cons main-name comm-name)))
+(cons comm-name main-name)))
+
+
+;; General commands (i.e. usable outside of the MPDired buffer).
+(defun mpdired-pause ()
+  (interactive)
+  (let ((buffers (mpdired--prepare)))
+(mpdired-pause-internal (car buffers
 
-;; Main entry point
+;; Main entry point.
 (defun mpdired ()
   (interactive)
-  (let* ((names (mpdired--prepare))
-(main-name (car names))
-(comm-name (cdr names)))
+  (let* ((buffers (mpdired--prepare))
+(comm (car buffers))
+(main (cdr buffers)))
 ;; Defaults to queue view
-(mpdired-queue-internal comm-name)
-(pop-to-buffer main-name)))
+(mpdired-queue-internal comm)
+(pop-to-buffer main)))
 
 (provide 'mpdired)



[elpa] externals/mpdired 2be9c24398 075/133: use the function reader macro

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 2be9c24398e547e445a35a3bd2fb4b7298ec1684
Author: Manuel Giraud 
Commit: Manuel Giraud 

use the function reader macro
---
 mpdired.el | 50 +-
 1 file changed, 25 insertions(+), 25 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index f38b89fa79..127afbf1ba 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -60,33 +60,33 @@
   :doc "Local keymap for MPDired."
   :full t
   :parent special-mode-map
-  "C-n"'mpdired-next-line
-  "n"  'mpdired-next-line
-  "" 'mpdired-next-line
-  "C-p"'mpdired-previous-line
-  "p"  'mpdired-previous-line
-  ""   'mpdired-previous-line
-  "C-m"'mpdired-enter
-  "^"  'mpdired-goto-parent
-  "o"  'mpdired-toggle-view
-  "g"  'mpdired-update
-  ""  'mpdired-pause-internal
-  "N"  'mpdired-next-internal
-  "P"  'mpdired-previous-internal
-  "a"  'mpdired-add-at-point
+  "C-n"#'mpdired-next-line
+  "n"  #'mpdired-next-line
+  "" #'mpdired-next-line
+  "C-p"#'mpdired-previous-line
+  "p"  #'mpdired-previous-line
+  ""   #'mpdired-previous-line
+  "C-m"#'mpdired-enter
+  "^"  #'mpdired-goto-parent
+  "o"  #'mpdired-toggle-view
+  "g"  #'mpdired-update
+  ""  #'mpdired-pause-internal
+  "N"  #'mpdired-next-internal
+  "P"  #'mpdired-previous-internal
+  "a"  #'mpdired-add-at-point
   ;; Marks
-  "m"  'mpdired-mark-at-point
-  "d"  'mpdired-flag-at-point
-  "u"  'mpdired-unmark-at-point
-  ""  'mpdired-previous-unmark
-  "* !"'mpdired-unmark-all-marks
-  "U"  'mpdired-unmark-all-marks
-  "t"  'mpdired-toggle-marks
-  "* t"'mpdired-toggle-marks
-  "* c"'mpdired-change-marks
+  "m"  #'mpdired-mark-at-point
+  "d"  #'mpdired-flag-at-point
+  "u"  #'mpdired-unmark-at-point
+  ""  #'mpdired-previous-unmark
+  "* !"#'mpdired-unmark-all-marks
+  "U"  #'mpdired-unmark-all-marks
+  "t"  #'mpdired-toggle-marks
+  "* t"#'mpdired-toggle-marks
+  "* c"#'mpdired-change-marks
   ;; Only in the queue view
-  "x"  'mpdired-flagged-delete
-  "D"  'mpdired-delete)
+  "x"  #'mpdired-flagged-delete
+  "D"  #'mpdired-delete)
 
 (defface mpdired-song
   '((t :inherit dired-ignored))



[elpa] externals/mpdired 7fbb564613 041/133: fix position tracking

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 7fbb5646138853886f701f5ab953855bfe72448e
Author: Manuel Giraud 
Commit: Manuel Giraud 

fix position tracking
---
 mpdired.el | 40 
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index e29468544f..3faf01f8ac 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -203,23 +203,21 @@
  (mpdired--insert-entry e)
  (insert "\n"))
(mpdired--insert-entry (car (last data
- ;; Go to the previous directory line when ascending
- (cond (ascending-p
-(goto-char (point-min))
-(re-search-forward from-directory nil t)
-(goto-char (line-beginning-position)))
-   (t
-(goto-char (point-min))
-(when top
-  (forward-line)
-  (goto-char (line-beginning-position)
- ;; Set mode, restore point and memorize stuff
+ ;; Set mode and memorize stuff
  (mpdired-mode)
- (when mpdired--browser-point
-   (goto-char mpdired--browser-point))
  (setq mpdired--directory (when top top)
mpdired--comm-buffer (process-buffer proc)
-   mpdired--view 'browser))
+   mpdired--view 'browser)
+ ;; Finally move point to the correct place.
+ (cond (ascending-p
+(goto-char (point-min))
+(re-search-forward from-directory nil t)
+(goto-char (line-beginning-position))
+(setq mpdired--browser-point (point)))
+   (mpdired--browser-point
+(goto-char mpdired--browser-point))
+   (t (goto-char (point-min))
+  (when top (mpdired-next-line)
 
 (defun mpdired--present-queue (proc)
   ;; Called by filter of the communication buffer.
@@ -419,9 +417,10 @@
 
 (defun mpdired-enter ()
   (interactive)
-  (if (eq mpdired--view 'browser)
-  (mpdired-listall-at-point)
-(mpdired-playid-at-point)))
+  (cond ((eq mpdired--view 'browser)
+(setq mpdired--browser-point nil)
+(mpdired-listall-at-point))
+   (t (mpdired-playid-at-point
 
 (defun mpdired--unsplit (list separator)
   (let (res)
@@ -441,9 +440,10 @@
 (defun mpdired-goto-parent ()
   (interactive)
   (let ((parent (mpdired--parent)))
-(if parent
-   (mpdired-listall-internal parent t)
-  (message "You are at the toplevel."
+(cond (parent
+  (setq mpdired--browser-point nil)
+  (mpdired-listall-internal parent t))
+ (t (message "You are at the toplevel.")
 
 (defun mpdired-toggle-view ()
   (interactive)



[elpa] externals/mpdired 53544d970f 021/133: start putting things in place for playlist

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 53544d970fcb6831e7c822cc7e73301424916292
Author: Manuel Giraud 
Commit: Manuel Giraud 

start putting things in place for playlist
---
 mpdired.el | 32 +++-
 1 file changed, 27 insertions(+), 5 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index e3c8b25175..ceff6c7c3e 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -140,6 +140,9 @@
  (setq mpdired--directory (when top top)
mpdired--comm-buffer (process-buffer proc)))
 
+(defun mpdired--present-playlist ()
+  (message "I should do something"))
+
 (defun mpdired--filter (proc string)
   (when (buffer-live-p (process-buffer proc))
 (with-current-buffer (process-buffer proc)
@@ -152,13 +155,13 @@
(if moving (goto-char (process-mark proc)))
;; The server has done its work.
(when (re-search-backward "^OK$" nil t)
- (when (eq mpdired--last-command 'listall)
-   (mpdired--present-listall proc)))
+ (cond ((eq mpdired--last-command 'listall)
+(mpdired--present-listall proc))
+   ((eq mpdired--last-command 'playlist)
+(mpdired--present-playlist
 
 (defun mpdired--sentinel (process event)
-  ;; Do not signal a closed connection
-  (unless (string-search "connection broken" event)
-(message "Process: %s had the event '%s'" process event)))
+  (message "Process: %s had the event '%s'" process event))
 
 (defun mpdired--local-p (host)
   ;; Hack: if the `expand-file-name' of host leads to an existing
@@ -212,6 +215,25 @@
 (mpdired--maybe-init host service localp)
 (mpdired-listall-internal path nil comm-name)))
 
+(defun mpdired-playlist-internal (&optional buffer)
+  (with-current-buffer (or buffer mpdired--comm-buffer)
+(mpdired--maybe-reconnect (current-buffer))
+(let ((process (get-buffer-process (current-buffer
+  (when (process-live-p process)
+   (erase-buffer)
+   (setq mpdired--last-command 'playlist)
+   (process-send-string process "playlist\n")
+
+(defun mpdired-playlist ()
+  (interactive)
+  ;; Always reparse host should the user have changed it.
+  (let* ((localp (mpdired--local-p mpdired-host))
+(host (if localp (expand-file-name mpdired-host) mpdired-host))
+(service (if localp host mpdired-port))
+(comm-name (mpdired--comm-name host service localp)))
+(mpdired--maybe-init host service localp)
+(mpdired-playlist-internal comm-name)))
+
 (defun mpdired-next-line ()
   (interactive)
   (forward-line)



[elpa] externals/mpdired ea686b71c3 127/133: a docstring for unsplit

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit ea686b71c370e0846cbc9366e748688ed2d1057f
Author: Manuel Giraud 
Commit: Manuel Giraud 

a docstring for unsplit
---
 mpdired.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mpdired.el b/mpdired.el
index dc287d0618..a9d17c4651 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -839,6 +839,8 @@ In the queue view, starts playing the song at point."
 (mpdired-playid-at-point
 
 (defun mpdired--unsplit (list separator)
+  "Concatenates all elements of LIST (should be strings) separated by the
+SEPARATOR string."
   (let (res)
 (dolist (e (butlast list))
   (push e res)



[elpa] externals/mpdired 95f4162d42 101/133: add playlist to queue

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 95f4162d42ff4f697a4adedaef4852144f911c2e
Author: Manuel Giraud 
Commit: Manuel Giraud 

add playlist to queue
---
 mpdired.el | 33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 9cc7171d7f..74e44e1ddb 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -426,7 +426,7 @@
(erase-buffer)
;; Insert the content
(save-excursion
- (cond (top
+ (cond ((stringp top)
 (insert (propertize top 'face 'dired-header) ":\n"))
(mpdired--playlist
 (insert (propertize mpdired--playlist 'face 'dired-header) 
":\n")))
@@ -608,14 +608,19 @@ an optional communication buffer."
 (setq mpdired--last-command 'playid)
 (process-send-string process (format "playid %d\n" id
 
-(defun mpdired-add-internal (uri)
+(defun mpdired-add-internal (typed-uris)
   (mpdired--with-comm-buffer process nil
 (setq mpdired--last-command 'add)
 (process-send-string process "command_list_begin\n")
-(if (listp uri)
-   (dolist (u uri)
- (process-send-string process (format "add \"%s\"\n" u)))
-  (process-send-string process (format "add \"%s\"\n" uri)))
+(if (listp typed-uris)
+   (dolist (typed-uri typed-uris)
+ (let ((type (car typed-uri))
+   (uri (cdr typed-uri)))
+   ;; "add" is called "load" for playlists
+   (if (eq type 'playlist)
+   (process-send-string process (format "load \"%s\"\n" uri))
+ (process-send-string process (format "add \"%s\"\n" uri)
+  (process-send-string process (format "add \"%s\"\n" typed-uris)))
 (process-send-string process "command_list_end\n")))
 
 (defun mpdired-deleteid-internal (id)
@@ -915,9 +920,10 @@ In the queue view, start playing the song at point."
(let* ((bol (mpdired--bol))
   (mark (get-text-property bol 'mark))
   (id (get-text-property bol 'id))
+  (type (get-text-property bol 'type))
   (uri (get-text-property bol 'uri)))
  (when (and mark (char-equal mark want))
-   (push (cons id uri) result)))
+   (push (cons id (cons type uri)) result)))
(forward-line))
   (reverse result
 
@@ -953,8 +959,9 @@ In the queue view, start playing the song at point."
   (mpdired-add-internal uri)
   (mpdired-next-line
 
-(defun mpdired--build-add-message (uris)
-  (let ((n (length uris)))
+(defun mpdired--build-add-message (typed-uris)
+  (let* ((uris (mapcar 'cdr typed-uris))
+(n (length uris)))
 (cond ((= n 1) (format "Adding %s..." (car uris)))
  ((= n 2)
   (format "Adding %s and %s..." (car uris) (cadr uris)))
@@ -966,10 +973,10 @@ In the queue view, start playing the song at point."
   "Recursively add the entry at point at the end of the queue."
   (interactive)
   (let* ((marked (mpdired--collect-marked ?*))
-(uris (mapcar 'cdr marked)))
-(cond (uris
-  (mpdired--append-message (mpdired--build-add-message uris))
-  (mpdired-add-internal uris))
+(typed-uris (mapcar 'cdr marked)))
+(cond (typed-uris
+  (mpdired--append-message (mpdired--build-add-message typed-uris))
+  (mpdired-add-internal typed-uris))
  (t (mpdired-add-at-point)
 
 (defun mpdired-deleteid-at-point ()



[elpa] externals/mpdired 27258677fa 063/133: fix going up (again)

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 27258677fa123deb3751fde757c6be976d036d1f
Author: Manuel Giraud 
Commit: Manuel Giraud 

fix going up (again)
---
 mpdired.el | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 867b0ace99..7f1c93b869 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -286,7 +286,7 @@
 (peer-localp (eq (plist-get peer-info :family) 'local))
 (main-buffer (mpdired--main-name peer-host peer-service peer-localp))
 (content (mpdired--parse-listall))
-ascending-p previous-directory)
+ascending-p from)
 ;; Retrieve infos from this process buffer
 (with-current-buffer (process-buffer proc)
   (setq ascending-p mpdired--ascending-p))
@@ -306,14 +306,19 @@
(insert "\n")))
;; Set mode and memorize stuff
(mpdired-mode)
-   (if ascending-p (setq previous-directory mpdired--directory))
+   (if ascending-p (setq from mpdired--directory))
(setq mpdired--directory (when top top)
  mpdired--comm-buffer (process-buffer proc)
  mpdired--view 'browser)
;; Finally move point to the correct place.
-   (cond ((and ascending-p previous-directory)
+   (cond ((and ascending-p from)
   (goto-char (point-min))
-  (re-search-forward previous-directory nil t)
+  (let ((max (point-max)))
+(while (and (< (point) max)
+(let ((uri (get-text-property (mpdired--bol) 
'uri)))
+  (or (null uri)
+  (and uri (not (string= from uri))
+  (forward-line)))
   (goto-char (mpdired--bol))
   (setq mpdired--browser-point (point)))
  (mpdired--browser-point
@@ -348,7 +353,7 @@
(let ((max (point-max)))
  (while (and (< (point) max)
  (let ((id (get-text-property (mpdired--bol) 'id)))
-   (and  id (/= songid id
+   (and id (/= songid id
(forward-line)))
(let* ((bol (mpdired--bol))
   (eol (line-end-position))
@@ -379,7 +384,8 @@
 (eq mpdired--last-command 'deleteid))
 (mpdired--present-queue proc)))
  (when mpdired--message
-   (message (format "%s done." mpdired--message
+   (message (format "%s done." mpdired--message))
+   (setq mpdired--message nil)))
 
 (defun mpdired--sentinel (process event)
   (unless (string-search "connection broken" event)



[elpa] externals/mpdired bf93b1f892 049/133: some progress on marks

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit bf93b1f89273a4feeb7cd963af79fe4a19506069
Author: Manuel Giraud 
Commit: Manuel Giraud 

some progress on marks
---
 mpdired.el | 82 +-
 1 file changed, 54 insertions(+), 28 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 66ca83d690..6b17dcd007 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -26,6 +26,7 @@
   "m"  'mpdired-mark-at-point
   "u"  'mpdired-unmark-at-point
   ""  'mpdired-previous-unmark
+  "d"  'mpdired-mark-deletion-at-point
   ;; Only for queue
   "D"  'mpdired-delete)
 
@@ -156,12 +157,16 @@
 (defvar-local mpdired--queue-point nil
   "Saved point position in the queue view.")
 
+(defun mpdired--bol ()
+  "Correct beginning of line in a MPDired buffer."
+  (+ 2 (line-beginning-position)))
+
 (defun mpdired--short-name (string)
   (car (last (split-string string "/"
 
 (defun mpdired--insert-entry (entry)
   (insert "  ")
-  (let ((bol (line-beginning-position)))
+  (let ((bol (mpdired--bol)))
 (cond ((stringp entry)
   (insert (mpdired--short-name entry))
   (put-text-property bol (line-end-position) 'type 'file)
@@ -176,7 +181,7 @@
   (let ((id (car song))
(uri (cadr song)))
 (insert "  " (propertize uri 'face 'dired-ignored))
-(let ((bol (line-beginning-position))
+(let ((bol (mpdired--bol))
  (eol (line-end-position)))
   (put-text-property bol eol 'id id)
   (put-text-property bol eol 'uri uri
@@ -236,7 +241,8 @@
 (songid (car data))
 (elapsed (cadr data))
 (duration (caddr data))
-(songs (cdddr data)))
+(songs (cdddr data))
+(eob 0))
 (with-current-buffer (get-buffer-create main-buffer)
   (let ((inhibit-read-only t))
(erase-buffer)
@@ -251,10 +257,10 @@
;; on the URI.
(save-excursion
  (when songid
-   (while (let ((id (get-text-property (point) 'id)))
-(and id (/= songid id)))
- (forward-line))
-   (let* ((bol (line-beginning-position))
+   (while (let ((id (get-text-property (mpdired--bol) 'id)))
+(and (zerop eob) id (/= songid id)))
+ (setq eob (forward-line)))
+   (let* ((bol (mpdired--bol))
   (eol (line-end-position))
   (x (/ (* elapsed (- eol bol)) duration)))
  (put-text-property bol (+ bol x) 'face 'dired-special
@@ -397,17 +403,17 @@
 (defun mpdired-next-line ()
   (interactive)
   (forward-line)
-  (goto-char (+ 2 (line-beginning-position)))
+  (goto-char (mpdired--bol))
   (mpdired--save-point))
 
 (defun mpdired-previous-line ()
   (interactive)
   (forward-line -1)
-  (goto-char (+ 2 (line-beginning-position)))
+  (goto-char (mpdired--bol))
   (mpdired--save-point))
 
 (defun mpdired-listall-at-point ()
-  (let* ((bol (line-beginning-position))
+  (let* ((bol (mpdired--bol))
 (type (get-text-property bol 'type))
 (uri (get-text-property bol 'uri)))
 (if (eq type 'directory)
@@ -415,9 +421,8 @@
   (message "Cannot browse a file."
 
 (defun mpdired-playid-at-point ()
-  (let ((id (get-text-property (line-beginning-position) 'id)))
-(when id
-  (mpdired-playid-internal id
+  (let ((id (get-text-property (mpdired--bol) 'id)))
+(when id (mpdired-playid-internal id
 
 (defun mpdired-enter ()
   (interactive)
@@ -463,25 +468,31 @@
  (mpdired-listall-internal "")))
   (t (mpdired-listall-internal ""))
 
-(defun mpdired-mark-at-point ()
-  (interactive)
-  (let ((bol (line-beginning-position))
-   (mark ?*)
-   (inhibit-read-only t))
-(put-text-property bol (line-end-position) 'mark mark)
+(defun mpdired--mark (mark face)
+  (let ((inhibit-read-only t))
 (save-excursion
-  (goto-char bol)
+  (goto-char (line-beginning-position))
   (delete-char 1)
   (insert-char mark))
+(put-text-property (mpdired--bol) (line-end-position) 'mark mark)
+(put-text-property (mpdired--bol) (line-end-position) 'face face)
 (mpdired-next-line)))
 
+(defun mpdired-mark-at-point ()
+  (interactive)
+  (mpdired--mark ?* 'dired-marked))
+
+(defun mpdired-mark-deletion-at-point ()
+  (interactive)
+  (mpdired--mark ?d 'dired-flagged))
+
 (defun mpdired-unmark-at-point ()
   (interactive)
-  (let ((bol (line-beginning-position))
-   (inhibit-read-only t))
-(remove-text-properties bol (line-end-position) '(mark))
+  (let ((inhibit-read-only t))
+(remove-text-properties (mpdired--bol) (line-end-position) '(mark))
+(put-text-property (mpdired--bol) (line-end-position) 'face 'dired-ignored)
 (save-excursion
-  (goto-char bol)
+  (goto-char (line-beginning-position))
   (delete-char 1)
   (insert-char ? ))
 (mpdired-next-line)))
@@ -489,14 +500,29 @@
 (defun mpdired-previous-unmark ()
   (interactive)
   (mpdired-previous-line)
-  (let ((bol (li

[elpa] externals/mpdired 7c67d5d631 098/133: put newline inside insert functions

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 7c67d5d631114190ad08f2460dbc07aedbeceb87
Author: Manuel Giraud 
Commit: Manuel Giraud 

put newline inside insert functions
---
 mpdired.el | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 43b65745ba..83ff47b700 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -344,7 +344,8 @@
   (let ((dir (car entry)))
 (insert (propertize (mpdired--short-name dir) 'face 
'mpdired-directory))
 (put-text-property bol (line-end-position) 'type 'directory)
-(put-text-property bol (line-end-position) 'uri dir))
+(put-text-property bol (line-end-position) 'uri dir
+(insert "\n")))
 
 (defun mpdired--insert-status ()
   "Insert current status in MPDired queue view."
@@ -376,7 +377,8 @@
  (eol (line-end-position)))
   (put-text-property bol eol 'id id)
   (put-text-property bol eol 'type 'song)
-  (put-text-property bol eol 'uri uri
+  (put-text-property bol eol 'uri uri))
+(insert "\n")))
 
 (defun mpdired--goto-id (songid)
   (let ((max (point-max)))
@@ -409,9 +411,7 @@
;; Insert the content
(save-excursion
  (if top (insert (propertize top 'face 'dired-header) ":\n"))
- (dolist (e data)
-   (mpdired--insert-entry e)
-   (insert "\n")))
+ (dolist (e data) (mpdired--insert-entry e)))
;; Set mode and memorize stuff
(mpdired-mode)
(if ascending-p (setq from mpdired--directory))
@@ -458,9 +458,7 @@
  (goto-char (point-min))
  (mpdired--insert-status)
  ;; Songs
- (dolist (song songs)
-   (mpdired--insert-song song)
-   (insert "\n")))
+ (dolist (song songs) (mpdired--insert-song song)))
;; Go to the current song and display elasped time with a
;; different face on its URI.
(save-excursion



[elpa] externals/mpdired c7a25c8359 050/133: pause "connection broken" message

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit c7a25c8359af6f3ecba4cf5505d756628b46ffd9
Author: Manuel Giraud 
Commit: Manuel Giraud 

pause "connection broken" message
---
 mpdired.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mpdired.el b/mpdired.el
index 6b17dcd007..7daed127ac 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -290,7 +290,8 @@
 (mpdired--present-queue proc
 
 (defun mpdired--sentinel (process event)
-  (message "Process: %s had the event '%s'" process event))
+  (unless (string-search "connection broken" event)
+(message "Process: %s had the event '%s'" process event)))
 
 (defun mpdired--local-p (host)
   ;; Hack: if the `expand-file-name' of host leads to an existing



[elpa] externals/mpdired b74cb9b942 029/133: no more global var

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit b74cb9b94221e07dec357875a62cab00b0f12201
Author: Manuel Giraud 
Commit: Manuel Giraud 

no more global var
---
 mpdired.el | 29 +
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index dccbb61a63..e9c469d375 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -29,6 +29,8 @@
 (defvar-local mpdired--network-params nil)
 (defvar-local mpdired--parse-endp nil)
 (defvar-local mpdired--last-command nil)
+(defvar-local mpdired--main-buffer nil
+  "Link to the main MPDired buffer")
 (defvar-local mpdired--previous-directory nil
   "Previous directory used to pass to the MPDired buffer.")
 (defvar-local mpdired--ascending-p nil)
@@ -41,7 +43,7 @@
   (catch 'exit
 (while (not (or mpdired--parse-endp
(setq mpdired--parse-endp
- (re-search-forward "^OK$" (line-end-position) t 1
+ (re-search-forward "^\\(OK\\|ACK.*\\)$" 
(line-end-position) t 1
   ;; Look for file or directory line by line (I'm not interested
   ;; in playlist)
   (re-search-forward "^\\(file\\|directory\\): \\(.*\\)$" 
(line-end-position) t 1)
@@ -100,7 +102,6 @@
 
 (defun mpdired-mode ()
   "Major mode for MPDired."
-  (kill-all-local-variables)
   (use-local-map mpdired-mode-map)
   (set-buffer-modified-p nil)
   (setq major-mode 'mpdired-mode
@@ -118,11 +119,9 @@
 (defun mpdired--main-name (host service localp)
   (format "*MPDired (%s)*" (mpdired--hostname host service localp)))
 
-;; Global state variables.
-(defvar mpdired--directory nil
-  "Current directory of the browser view.")
-
 ;; State variables for the main buffer
+(defvar-local mpdired--directory nil
+  "Current directory of the browser view.")
 (defvar-local mpdired--view nil)
 (defvar-local mpdired--comm-buffer nil
   "Communication buffer associated to this MPDired buffer.")
@@ -215,7 +214,7 @@
  (set-marker (process-mark proc) (point)))
(if moving (goto-char (process-mark proc)))
;; The server has done its work.
-   (when (re-search-backward "^OK$" nil t)
+   (when (re-search-backward "^\\(OK\\|ACK.*\\)$" nil t)
  (cond ((eq mpdired--last-command 'listall)
 (mpdired--present-listall proc))
((eq mpdired--last-command 'queue)
@@ -250,7 +249,8 @@
:coding 'utf-8
:filter 'mpdired--filter
:sentinel 'mpdired--sentinel)))
- (setq mpdired--network-params params)
+ (setq mpdired--network-params params
+   mpdired--main-buffer (mpdired--main-name host service localp))
  (set-process-buffer (apply 'make-network-process params)
  (current-buffer)))
 
@@ -267,7 +267,7 @@
 (defun mpdired-listall-internal (path &optional ascending-p)
   (mpdired--with-comm-buffer process nil
 (setq mpdired--last-command 'listall
- mpdired--previous-directory mpdired--directory
+ mpdired--previous-directory (with-current-buffer mpdired--main-buffer 
mpdired--directory)
  mpdired--ascending-p ascending-p)
 (process-send-string process (format "listall \"%s\"\n" path
 
@@ -370,9 +370,14 @@
   (cond ((eq mpdired--view 'browser)
 (mpdired-queue-internal))
((eq mpdired--view 'queue)
-(if mpdired--directory
-(mpdired-listall-internal mpdired--directory)
-  (mpdired-listall-internal "")
+(cond (mpdired--directory
+   (mpdired-listall-internal mpdired--directory)
+   ;; Empty buffer? our current directory was probably
+   ;; bogus.
+   (when (= 0 (buffer-size))
+ (sit-for .2)
+ (mpdired-listall-internal "")))
+  (t (mpdired-listall-internal ""))
 
 (defun mpdired-toggle-play/pause ()
   (interactive)



[elpa] externals/mpdired def0f3a7ec 034/133: better variable name for the main buffer

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit def0f3a7ecbfd790de77b54cc1f813e2dbb8d491
Author: Manuel Giraud 
Commit: Manuel Giraud 

better variable name for the main buffer
---
 mpdired.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index bc60b0ea25..747e0111d3 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -165,14 +165,14 @@
 (peer-host (plist-get peer-info :host))
 (peer-service (plist-get peer-info :service))
 (peer-localp (eq (plist-get peer-info :family) 'local))
-(buffer-name (mpdired--main-name peer-host peer-service peer-localp))
+(main-buffer (mpdired--main-name peer-host peer-service peer-localp))
 (content (mpdired--parse-listall))
 from-directory ascending-p)
 ;; Retrieve infos from this process buffer
 (with-current-buffer (process-buffer proc)
   (setq from-directory mpdired--previous-directory
ascending-p mpdired--ascending-p))
-(with-current-buffer (get-buffer-create buffer-name)
+(with-current-buffer (get-buffer-create main-buffer)
   (let ((inhibit-read-only t))
(erase-buffer)
;; `content' is always of the form ("" rest...) so if there
@@ -207,13 +207,13 @@
 (peer-host (plist-get peer-info :host))
 (peer-service (plist-get peer-info :service))
 (peer-localp (eq (plist-get peer-info :family) 'local))
-(buffer-name (mpdired--main-name peer-host peer-service peer-localp))
+(main-buffer (mpdired--main-name peer-host peer-service peer-localp))
 (data (mpdired--parse-queue))
 (songid (car data))
 (elapsed (cadr data))
 (duration (caddr data))
 (songs (cdddr data)))
-(with-current-buffer (get-buffer-create buffer-name)
+(with-current-buffer (get-buffer-create main-buffer)
   (let ((inhibit-read-only t))
(erase-buffer)
;; Insert songs



[elpa] externals/mpdired 6242a3ab19 071/133: don't clear mark when there is none

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 6242a3ab19e37d94630cb4956262c0a03f8018cf
Author: Manuel Giraud 
Commit: Manuel Giraud 

don't clear mark when there is none

Fix a bug when trying to clear the browser view top line.
---
 mpdired.el | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index e7d72c07a2..3ccfad4c76 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -616,13 +616,15 @@
 (mpdired--reset-face)))
 
 (defun mpdired--clear-mark ()
-  (let ((inhibit-read-only t))
-(remove-text-properties (mpdired--bol) (line-end-position) '(mark face))
-(mpdired--reset-face)
-(save-excursion
-  (goto-char (line-beginning-position))
-  (delete-char 1)
-  (insert-char ? 
+  (let ((inhibit-read-only t)
+   (bol (mpdired--bol)))
+(when (get-text-property bol 'mark)
+  (remove-text-properties (mpdired--bol) (line-end-position) '(mark face))
+  (mpdired--reset-face)
+  (save-excursion
+   (goto-char (line-beginning-position))
+   (delete-char 1)
+   (insert-char ? )
 
 (defun mpdired-mark-at-point ()
   (interactive)



[elpa] externals/mpdired 0bead27006 065/133: fix bol positioning in some case

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 0bead27006c83394ec312106af04ac17aacb7f3d
Author: Manuel Giraud 
Commit: Manuel Giraud 

fix bol positioning in some case
---
 mpdired.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mpdired.el b/mpdired.el
index 6708debeb6..0dbb2f35a6 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -325,7 +325,9 @@
  (mpdired--browser-point
   (mpdired--reset-point mpdired--browser-point))
  (t (goto-char (point-min))
-(when top (mpdired-next-line
+(if top
+(mpdired-next-line)
+  (goto-char (mpdired--bol)
 
 (defun mpdired--present-queue (proc)
   ;; Called by filter of the communication buffer.
@@ -360,6 +362,8 @@
   (eol (line-end-position))
   (x (/ (* elapsed (- eol bol)) duration)))
  (put-text-property bol (+ bol x) 'face 'mpdired-progress
+   ;; Go to bol no matter what
+   (goto-char (mpdired--bol))
;; Set mode, restore point and memorize stuff
(mpdired-mode)
(when mpdired--songid-point



[elpa] externals/mpdired 8bf8e8f366 115/133: playlist deletion

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 8bf8e8f366b6c20e3d21922105cc10d04de3cdd4
Author: Manuel Giraud 
Commit: Manuel Giraud 

playlist deletion

Only one at a time for now.
---
 mpdired.el | 26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index c75ac8a749..3784a0f2eb 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -660,6 +660,16 @@ an optional communication buffer."
 (process-send-string process "playlistid\n")
 (process-send-string process "command_list_end\n")))
 
+(defun mpdired-remove-playlist-internal (uri)
+  (mpdired--with-comm-buffer process nil
+(setq mpdired--last-command 'remove-playlist)
+(process-send-string process "command_list_begin\n")
+(if (listp uri)
+   (dolist (u uri)
+ (process-send-string process (format "rm \"%s\"\n" u)))
+  (process-send-string process (format "rm \"%s\"\n" uri)))
+(process-send-string process "command_list_end\n")))
+
 (defun mpdired-pause-internal (&optional buffer)
   "Toggle pause."
   (interactive)
@@ -1034,11 +1044,23 @@ In the queue view, start playing the song at point."
  (get-text-property bol 'id)
   (mpdired-deleteid-internal id
 
+(defun mpdired-remove-playlist-at-point ()
+  (let* ((bol (mpdired--bol))
+(uri (get-text-property bol 'uri))
+(type (get-text-property bol 'type)))
+(when (and type uri
+  (eq type 'playlist))
+  (mpdired--append-message (format "Removing \"%s\"..." uri))
+  (mpdired-remove-playlist-internal uri
+
 (defun mpdired-delete ()
-  "Remove song at point from the queue."
+  "Remove song at point from the queue or playlist at point from the
+browser view."
   (interactive)
   (cond ((eq mpdired--view 'queue)
-(mpdired-deleteid-at-point
+(mpdired-deleteid-at-point))
+   ((eq mpdired--view 'browser)
+(mpdired-remove-playlist-at-point
 
 (defun mpdired--find-next-unmarked-id ()
   (save-excursion



[elpa] externals/mpdired 3462a23512 125/133: more idiomatic nreverse

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 3462a235126ebf2c86a40baf65d70cd8f73bda07
Author: Manuel Giraud 
Commit: Manuel Giraud 

more idiomatic nreverse
---
 mpdired.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mpdired.el b/mpdired.el
index b747d32517..bab013634e 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -208,7 +208,7 @@
   (t (forward-line -1)
  (throw 'exit t)))
   (forward-line)))
-  (reverse accum))
+  (nreverse accum))
 
 (defun mpdired--parse-listall ()
   ;; Called from the communication buffer.



[elpa] externals/mpdired fe835f4e0c 011/133: better naming

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit fe835f4e0cb003a15db314ca890df22ce0443a91
Author: Manuel Giraud 
Commit: Manuel Giraud 

better naming
---
 mpdired.el | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 0ef1de167d..bd446850d0 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -61,7 +61,7 @@
mode-name "MPDired Browse"
buffer-read-only t))
 
-(defun mpdired-present-listall (contact)
+(defun mpdired--present-listall (contact)
   ;; Called from *mpdired-work*
   (let ((out (get-buffer-create (format "*MPDired (%s:%d)*"
(car contact) (cadr contact
@@ -83,7 +83,7 @@
  (insert "\n")
   (mpdired-browse-mode
 
-(defun my-filter (proc string)
+(defun mpdired--filter (proc string)
   (when (buffer-live-p (process-buffer proc))
 (with-current-buffer (process-buffer proc)
   (let ((moving (= (point) (process-mark proc
@@ -95,9 +95,10 @@
(if moving (goto-char (process-mark proc)))
(when (re-search-backward "^OK$" nil t)
  (when (eq mpdired--last-command 'listall)
-   (mpdired-present-listall (process-contact proc
+   (mpdired--present-listall (process-contact proc
 
-(defun msg-me (process event)
+(defun mpdired--sentinel (process event)
+  ;; Do not signal a closed connection
   (unless (string-search "connection broken" event)
 (message "Process: %s had the event '%s'" process event)))
 
@@ -125,8 +126,8 @@
  :service service
  :family (if localp 'local)
  :coding 'utf-8
- :filter 'my-filter
- :sentinel 'msg-me)
+ :filter 'mpdired--filter
+ :sentinel 'mpdired--sentinel)
(current-buffer))
 
 (defun mpdired-listall (path)



[elpa] externals/mpdired 7ba0077315 129/133: avoid consing in `mpdired--short-name'

2024-03-10 Thread ELPA Syncer
branch: externals/mpdired
commit 7ba00773154f87df7ccd17ee9ac37e96e669c415
Author: Manuel Giraud 
Commit: Manuel Giraud 

avoid consing in `mpdired--short-name'
---
 mpdired.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mpdired.el b/mpdired.el
index d34b71bbb8..85b6bf944c 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -347,7 +347,9 @@ used for mark followed by a space."
   (+ 2 (line-beginning-position)))
 
 (defun mpdired--short-name (string)
-  (car (last (split-string string "/"
+  (or (and (string-match "/\\([^/]*\\)\\'" string)
+  (match-string 1 string))
+  string))
 
 (defun mpdired--reset-face ()
   (let* ((bol (mpdired--bol))



  1   2   >