[elpa] externals/devdocs ebdd3b39be: Version 0.6.1

2024-03-29 Thread ELPA Syncer
branch: externals/devdocs
commit ebdd3b39bef1a928c069373337d0f8e4f2d8b8d2
Author: Augusto Stoffel 
Commit: Augusto Stoffel 

Version 0.6.1
---
 devdocs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devdocs.el b/devdocs.el
index 30b6f96ac3..6922ff00ee 100644
--- a/devdocs.el
+++ b/devdocs.el
@@ -6,7 +6,7 @@
 ;; Keywords: help
 ;; URL: https://github.com/astoff/devdocs.el
 ;; Package-Requires: ((emacs "27.1"))
-;; Version: 0.6
+;; Version: 0.6.1
 
 ;; 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



[elpa] externals/cape 934cb157dd: cape-wrap-super: Add comment

2024-03-29 Thread ELPA Syncer
branch: externals/cape
commit 934cb157dd6ddfee657801d409c289e12af3d8ad
Author: Daniel Mendler 
Commit: Daniel Mendler 

cape-wrap-super: Add comment
---
 cape.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/cape.el b/cape.el
index c24420299b..d2cfb93378 100644
--- a/cape.el
+++ b/cape.el
@@ -914,6 +914,11 @@ experimental."
  (tables nil)
  (prefix-len nil))
   (cl-loop for (beg2 end2 . rest) in results do
+   ;; TODO `cape-capf-super' currently cannot merge Capfs which
+   ;; trigger at different beginning positions.  In order to 
support
+   ;; this, take the smallest BEG value and then normalize all
+   ;; candidates by prefixing them such that they all start at the
+   ;; smallest BEG position.
(when (= beg beg2)
  (push rest tables)
  (setq end (max end end2))



[elpa] externals/corfu 81f5de7abb 1/4: corfu-expand: Return nil if NEWSTR=STR

2024-03-29 Thread ELPA Syncer
branch: externals/corfu
commit 81f5de7abbd82ae870eeb86386a6abc1e380d1dd
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-expand: Return nil if NEWSTR=STR
---
 corfu.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/corfu.el b/corfu.el
index e9d607e46c..caf58c6b30 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1311,7 +1311,7 @@ input has been expanded."
  (goto-char end)
  (corfu--done str 'finished corfu--candidates)
  t)
-(`(,newstr . ,newpt)
+((and `(,newstr . ,newpt) (guard (not (and (= pt newpt) (equal newstr 
str)
  (corfu--replace beg end newstr)
  (goto-char (+ beg newpt))
  ;; Exit with status 'finished if input is a valid match



[elpa] externals/corfu fa7d51a5bc 2/4: Extract corfu--preview-current-p

2024-03-29 Thread ELPA Syncer
branch: externals/corfu
commit fa7d51a5bce417e482629dd01a82dc1225ee3db5
Author: Daniel Mendler 
Commit: Daniel Mendler 

Extract corfu--preview-current-p
---
 corfu.el | 17 ++---
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/corfu.el b/corfu.el
index caf58c6b30..d6ac0742a5 100644
--- a/corfu.el
+++ b/corfu.el
@@ -787,16 +787,20 @@ FRAME is the existing frame."
 (corfu--popup-show pos pw width fcands (- corfu--index corfu--scroll)
(and (> corfu--total corfu-count) lo) bar)))
 
+(defun corfu--preview-current-p (&optional insert)
+  "Return t if the selected candidate is previewed, with auto INSERT."
+  (and (if insert (eq 'insert corfu-preview-current) corfu-preview-current)
+   (>= corfu--index 0) (/= corfu--index corfu--preselect)))
+
 (defun corfu--preview-current (beg end)
   "Show current candidate as overlay given BEG and END."
-  (when-let ((cand (and corfu-preview-current (>= corfu--index 0)
-(/= corfu--index corfu--preselect)
-(nth corfu--index corfu--candidates
+  (when (corfu--preview-current-p)
 (setq beg (+ beg (length corfu--base))
   corfu--preview-ov (make-overlay beg end nil))
 (overlay-put corfu--preview-ov 'priority 1000)
 (overlay-put corfu--preview-ov 'window (selected-window))
-(overlay-put corfu--preview-ov (if (= beg end) 'after-string 'display) 
cand)))
+(overlay-put corfu--preview-ov (if (= beg end) 'after-string 'display)
+ (nth corfu--index corfu--candidates
 
 (defun corfu--range-valid-p ()
   "Check the completion range, return non-nil if valid."
@@ -1124,8 +1128,7 @@ A scroll bar is displayed from LO to LO+BAR."
   ;; currently selected candidate and bail out of completion. This way you can
   ;; continue typing after selecting a candidate. The candidate will be 
inserted
   ;; and your new input will be appended.
-  (and (eq corfu-preview-current 'insert)
-   (/= corfu--index corfu--preselect)
+  (and (corfu--preview-current-p 'insert)
;; See the comment about `overriding-local-map' in 
`corfu--post-command'.
(not (or overriding-terminal-local-map
 (corfu--match-symbol-p corfu-continue-commands this-command)))
@@ -1300,7 +1303,7 @@ If the currently selected candidate is previewed, invoke
 styles via `completion-try-completion'.  Return non-nil if the
 input has been expanded."
   (interactive)
-  (if (and (>= corfu--index 0) corfu-preview-current (/= corfu--index 
corfu--preselect))
+  (if (corfu--preview-current-p)
   (corfu-complete)
 (pcase-let* ((`(,beg ,end ,table ,pred . ,_) completion-in-region--data)
  (pt (max 0 (- (point) beg)))



[elpa] externals/corfu updated (afc8895934 -> 8ea189de9a)

2024-03-29 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  afc8895934 corfu-expand: Call corfu-complete if candidate is 
previewed
   new  81f5de7abb corfu-expand: Return nil if NEWSTR=STR
   new  fa7d51a5bc Extract corfu--preview-current-p
   new  e0b188b713 Move corfu--preview-current* functions
   new  8ea189de9a corfu--preview-current-p: Simplify


Summary of changes:
 corfu.el | 39 +++
 1 file changed, 19 insertions(+), 20 deletions(-)



[elpa] externals/corfu e0b188b713 3/4: Move corfu--preview-current* functions

2024-03-29 Thread ELPA Syncer
branch: externals/corfu
commit e0b188b713777a7324a0151c242bf9ae0d94c310
Author: Daniel Mendler 
Commit: Daniel Mendler 

Move corfu--preview-current* functions
---
 corfu.el | 37 +
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/corfu.el b/corfu.el
index d6ac0742a5..e64bc478c4 100644
--- a/corfu.el
+++ b/corfu.el
@@ -787,33 +787,15 @@ FRAME is the existing frame."
 (corfu--popup-show pos pw width fcands (- corfu--index corfu--scroll)
(and (> corfu--total corfu-count) lo) bar)))
 
-(defun corfu--preview-current-p (&optional insert)
-  "Return t if the selected candidate is previewed, with auto INSERT."
-  (and (if insert (eq 'insert corfu-preview-current) corfu-preview-current)
-   (>= corfu--index 0) (/= corfu--index corfu--preselect)))
-
-(defun corfu--preview-current (beg end)
-  "Show current candidate as overlay given BEG and END."
-  (when (corfu--preview-current-p)
-(setq beg (+ beg (length corfu--base))
-  corfu--preview-ov (make-overlay beg end nil))
-(overlay-put corfu--preview-ov 'priority 1000)
-(overlay-put corfu--preview-ov 'window (selected-window))
-(overlay-put corfu--preview-ov (if (= beg end) 'after-string 'display)
- (nth corfu--index corfu--candidates
-
 (defun corfu--range-valid-p ()
   "Check the completion range, return non-nil if valid."
   (pcase-let ((buf (current-buffer))
   (pt (point))
   (`(,beg ,end . ,_) completion-in-region--data))
 (and beg end
- (eq buf (marker-buffer beg))
- (eq buf (window-buffer))
+ (eq buf (marker-buffer beg)) (eq buf (window-buffer))
  (<= beg pt end)
- (save-excursion
-   (goto-char beg)
-   (<= (pos-bol) pt (pos-eol))
+ (save-excursion (goto-char beg) (<= (pos-bol) pt (pos-eol))
 
 (defun corfu--continue-p ()
   "Check if completion should continue after a command.
@@ -839,6 +821,21 @@ the last command must be listed in 
`corfu-continue-commands'."
(seq-contains-p (car corfu--input) 
corfu-separator)))
   (funcall completion-in-region-mode--predicate)))
 
+(defun corfu--preview-current-p (&optional insert)
+  "Return t if the selected candidate is previewed, with auto INSERT."
+  (and (if insert (eq 'insert corfu-preview-current) corfu-preview-current)
+   (>= corfu--index 0) (/= corfu--index corfu--preselect)))
+
+(defun corfu--preview-current (beg end)
+  "Show current candidate as overlay given BEG and END."
+  (when (corfu--preview-current-p)
+(setq beg (+ beg (length corfu--base))
+  corfu--preview-ov (make-overlay beg end nil))
+(overlay-put corfu--preview-ov 'priority 1000)
+(overlay-put corfu--preview-ov 'window (selected-window))
+(overlay-put corfu--preview-ov (if (= beg end) 'after-string 'display)
+ (nth corfu--index corfu--candidates
+
 (defun corfu--window-change (_)
   "Window and buffer change hook which quits Corfu."
   (unless (corfu--range-valid-p)



[elpa] externals/corfu 8ea189de9a 4/4: corfu--preview-current-p: Simplify

2024-03-29 Thread ELPA Syncer
branch: externals/corfu
commit 8ea189de9a791dfe6c0b2c72ddd434b45ebbbfe3
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu--preview-current-p: Simplify
---
 corfu.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/corfu.el b/corfu.el
index e64bc478c4..1fa8f611ac 100644
--- a/corfu.el
+++ b/corfu.el
@@ -821,10 +821,9 @@ the last command must be listed in 
`corfu-continue-commands'."
(seq-contains-p (car corfu--input) 
corfu-separator)))
   (funcall completion-in-region-mode--predicate)))
 
-(defun corfu--preview-current-p (&optional insert)
-  "Return t if the selected candidate is previewed, with auto INSERT."
-  (and (if insert (eq 'insert corfu-preview-current) corfu-preview-current)
-   (>= corfu--index 0) (/= corfu--index corfu--preselect)))
+(defun corfu--preview-current-p ()
+  "Return t if the selected candidate is previewed."
+  (and corfu-preview-current (>= corfu--index 0) (/= corfu--index 
corfu--preselect)))
 
 (defun corfu--preview-current (beg end)
   "Show current candidate as overlay given BEG and END."
@@ -1125,7 +1124,7 @@ A scroll bar is displayed from LO to LO+BAR."
   ;; currently selected candidate and bail out of completion. This way you can
   ;; continue typing after selecting a candidate. The candidate will be 
inserted
   ;; and your new input will be appended.
-  (and (corfu--preview-current-p 'insert)
+  (and (corfu--preview-current-p) (eq corfu-preview-current 'insert)
;; See the comment about `overriding-local-map' in 
`corfu--post-command'.
(not (or overriding-terminal-local-map
 (corfu--match-symbol-p corfu-continue-commands this-command)))



[elpa] externals/mpdired f9b4f91517: re-add progress bar when resetting face

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

re-add progress bar when resetting face
---
 mpdired.el | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/mpdired.el b/mpdired.el
index 48587f9450..7735ac1ac9 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -372,7 +372,16 @@ used for mark followed by a space."
  ((eq type 'playlist)
   (put-text-property bol eol 'face 'mpdired-playlist))
  ((eq type 'song)
-  (put-text-property bol eol 'face 'mpdired-song)
+  (put-text-property bol eol 'face 'mpdired-song)
+  ;; Add "progress bar" back
+  (when mpdired--song
+(let* ((currid (get-text-property bol 'id))
+   (songid (car mpdired--song))
+   (elapsed (cadr mpdired--song))
+   (duration (caddr mpdired--song))
+   (x (/ (* elapsed (- eol bol)) duration)))
+  (when (and (= currid songid) (> eol (+ bol x)))
+(put-text-property (+ bol x) eol 'face 
'mpdired-progress
 
 (defun mpdired--insert-entry (entry)
   "Insert ENTRY in MPDired browser view."



[nongnu] elpa/helm 5632e1eb9a: Improve editing bookmark annotations

2024-03-29 Thread ELPA Syncer
branch: elpa/helm
commit 5632e1eb9a11e9df149dee23b2fe469dd7413739
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Improve editing bookmark annotations

Allow editing bookmark annotation from the show annotation buffer.

Without this we have to quit the show annotation
buffer, restart helm bookmarks and use the edit annotation action.
Also make the show annotaion quittable with "q" instead of having to
kill it.
---
 helm-bookmark.el | 58 +++-
 helm-types.el|  2 +-
 2 files changed, 58 insertions(+), 2 deletions(-)

diff --git a/helm-bookmark.el b/helm-bookmark.el
index 290a35f955..e9a9b5e749 100644
--- a/helm-bookmark.el
+++ b/helm-bookmark.el
@@ -818,7 +818,63 @@ E.g. prepended with *."
   (dolist (i (helm-marked-candidates))
 (bookmark-delete (helm-bookmark-get-bookmark-from-name i)
  'batch)))
+
+;;; bookmark annotations
+;;
+(defun helm-bookmark-show-annotation (bookmark-name-or-record)
+  "Display the annotation for BOOKMARK-NAME-OR-RECORD in a buffer."
+  (let ((annotation (bookmark-get-annotation bookmark-name-or-record)))
+(when (and annotation (not (string-equal annotation "")))
+  (let ((buf (get-buffer-create "*Bookmark Annotation*")))
+(with-current-buffer buf
+  (let ((inhibit-read-only t))
+(erase-buffer)
+(insert annotation)
+(goto-char (point-min))
+(set-buffer-modified-p nil)
+(helm-bookmark-annotation-mode)
+(insert (substitute-command-keys
+ "# Edit this buffer with 
\\[helm-bookmark-edit-annotation]")
+(substitute-command-keys
+ "\n# Quit this buffer with 
\\[helm-bookmark-quit-annotation]\n"))
+(set (make-local-variable 'bookmark-annotation-name)
+ bookmark-name-or-record)
+(put 'bookmark-annotation-name 'permanent-local t)))
+(pop-to-buffer buf)
+
+(defun helm-bookmark-edit-annotation ()
+  "Edit bookmark annotation from the show annotation buffer."
+  (interactive)
+  (setq buffer-read-only nil)
+  (bookmark-edit-annotation-mode)
+  (save-excursion
+(goto-char (point-min))
+(delete-region
+ (point) (save-excursion (forward-line 2) (point)))
+(insert (funcall bookmark-edit-annotation-text-func
+ bookmark-annotation-name
+
+(defun helm-bookmark-quit-annotation ()
+  "Quit bookmark annotation buffer."
+  (interactive)
+  (quit-window t))
+
+(defvar helm-bookmark-annotation-mode-map
+  (let ((map (make-sparse-keymap)))
+(set-keymap-parent map text-mode-map)
+(define-key map (kbd "q") #'helm-bookmark-quit-annotation)
+(define-key map (kbd "e") #'helm-bookmark-edit-annotation)
+map)
+  "Map used in show annotation bookmark buffer.")
+
+(define-derived-mode helm-bookmark-annotation-mode
+text-mode "helm-annotation-mode"
+"Mode to display bookmark annotations.
 
+Special commands:
+\\{helm-bookmark-annotation-mode-map}"
+:interactive nil
+(setq-local buffer-read-only t))
 
 ;;;###autoload
 (defun helm-bookmarks ()
@@ -828,7 +884,7 @@ E.g. prepended with *."
helm-source-bookmark-set)
 :buffer "*helm bookmarks*"
 :default (buffer-name helm-current-buffer)))
-
+
 ;;;###autoload
 (defun helm-filtered-bookmarks ()
   "Preconfigured `helm' for bookmarks (filtered by category).
diff --git a/helm-types.el b/helm-types.el
index 6f129b22e5..510246e105 100644
--- a/helm-types.el
+++ b/helm-types.el
@@ -136,8 +136,8 @@
"Jump to BM other window" 'helm-bookmark-jump-other-window
"Jump to BM other frame" 'helm-bookmark-jump-other-frame
"Jump to BM other tab" 'helm-bookmark-jump-other-tab
+   "Show bookmark annotation" 'helm-bookmark-show-annotation
"Bookmark edit annotation" 'bookmark-edit-annotation
-   "Bookmark show annotation" 'bookmark-show-annotation
"Delete bookmark(s)" 'helm-delete-marked-bookmarks
"Edit Bookmark" 'helm-bookmark-edit-bookmark
"Rename bookmark" 'helm-bookmark-rename



[nongnu] elpa/helm-core updated (35ff5cbe94 -> 5632e1eb9a)

2024-03-29 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  35ff5cbe94 Allow entering backslash in minibuffer from 
helm-comp-read
  adds  5632e1eb9a Improve editing bookmark annotations

No new revisions were added by this update.

Summary of changes:
 helm-bookmark.el | 58 +++-
 helm-types.el|  2 +-
 2 files changed, 58 insertions(+), 2 deletions(-)



[nongnu] elpa/highlight-parentheses a2f2c5f564: Fix a typo and one slight improvement

2024-03-29 Thread ELPA Syncer
branch: elpa/highlight-parentheses
commit a2f2c5f564ab0cd24171563a133b3266fda41560
Author: Tassilo Horn 
Commit: Tassilo Horn 

Fix a typo and one slight improvement
---
 highlight-parentheses.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/highlight-parentheses.el b/highlight-parentheses.el
index 50fb3ee2d1..7d6e9f564e 100644
--- a/highlight-parentheses.el
+++ b/highlight-parentheses.el
@@ -177,7 +177,7 @@ overlays in it instead."
   (mapc #'delete-overlay overlays))
 
 (defun highlight-parentheses--highlight-needed-p ()
-  "Return non-nil when if re-highlighting is needed."
+  "Return non-nil if re-highlighting is needed."
   (let ((point (point))
 (last-point highlight-parentheses--last-point))
 (or
@@ -186,8 +186,8 @@ overlays in it instead."
  ;; Check if point has moved and during the move, it crossed some paren.
  (and (/= (point) last-point)
   (catch 'highlight-needed
-(let ((start (if (< point last-point) point last-point))
-  (end (if (< point last-point) last-point point)))
+(let ((start (min point last-point))
+  (end   (max point last-point)))
   ;; If the move was large, checking if we crossed some paren
   ;; becomes too expensive, so give up.
   (when (> (- end start) 5000)



[nongnu] elpa/rust-mode 7c5de035fa 2/3: Fix dependencies between rust-mode implementations

2024-03-29 Thread ELPA Syncer
branch: elpa/rust-mode
commit 7c5de035fab1b46926964b0defebef26357a5209
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

Fix dependencies between rust-mode implementations

"rust-prog-mode.el" and "rust-mode-treesitter.el" provide competing
implementations of `rust-mode'.  Both implementations depend on code
in "rust-mode.el", and thus must require that.

Doing that is complicated by the fact that "rust-mode.el" loads one
of these libraries, depending on `rust-mode-treesitter-derive's value.

Address this conflict by:

1. Requiring feature `rust-mode' in the two libraries that implement the
   `rust-mode' major-mode and that use things defined in "rust-mode.el".

2. Moving the require forms for these two libraries in "rust-mode.el",
   below the `provide' form for `rust-mode'.
---
 rust-mode-treesitter.el |  7 ---
 rust-mode.el| 10 ++
 rust-prog-mode.el   |  3 ++-
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/rust-mode-treesitter.el b/rust-mode-treesitter.el
index 89c7cd43f5..21eab59f91 100644
--- a/rust-mode-treesitter.el
+++ b/rust-mode-treesitter.el
@@ -5,12 +5,13 @@
 
 ;;; Code:
 
+(require 'rust-mode)
+
+;; Do not compile or load on Emacs releases that don't support
+;; this.  See https://github.com/rust-lang/rust-mode/issues/520.
 (when (version<= "29.1" emacs-version)
-  ;; We have the when macro because of
-  ;; https://github.com/rust-lang/rust-mode/issues/520
   (require 'treesit)
   (require 'rust-ts-mode)
-  (require 'rust-common)
 
   (define-derived-mode rust-mode rust-ts-mode "Rust"
 "Major mode for Rust code.
diff --git a/rust-mode.el b/rust-mode.el
index a0f6542753..8d38295b04 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -71,10 +71,6 @@ instead of `prog-mode'. This option requires emacs29+."
 map)
   "Keymap for Rust major mode.")
 
-(if (and (version<= "29.1" emacs-version) rust-mode-treesitter-derive)
-(require 'rust-mode-treesitter)
-  (require 'rust-prog-mode))
-
 ;;;###autoload
 (autoload 'rust-mode "rust-mode" "Major mode for Rust code." t)
 
@@ -82,6 +78,12 @@ instead of `prog-mode'. This option requires emacs29+."
 (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
 
 (provide 'rust-mode)
+
+(if (and rust-mode-treesitter-derive
+ (version<= "29.1" emacs-version))
+(require 'rust-mode-treesitter)
+  (require 'rust-prog-mode))
+
 (require 'rust-utils)
 
 ;;; rust-mode.el ends here
diff --git a/rust-prog-mode.el b/rust-prog-mode.el
index 51e802ddcb..05bc5e0daf 100644
--- a/rust-prog-mode.el
+++ b/rust-prog-mode.el
@@ -4,7 +4,8 @@
 ;; rust-mode code deriving from prog-mode instead of rust-ts-mode
 
 ;;; Code:
-(require 'rust-common)
+
+(require 'rust-mode)
 
 (defvar electric-pair-inhibit-predicate)
 (defvar electric-pair-skip-self)



[nongnu] elpa/rust-mode updated (150b61f7ed -> b2b18aa6c1)

2024-03-29 Thread ELPA Syncer
elpasync pushed a change to branch elpa/rust-mode.

  from  150b61f7ed Merge pull request #536 from rust-lang/emacs-29.3
   new  1ce4f8e266 rust--format-call: Delete file in case of error
   new  7c5de035fa Fix dependencies between rust-mode implementations
   new  b2b18aa6c1 Merge pull request #534 from tarsiiformes/fixup


Summary of changes:
 rust-mode-treesitter.el |  7 ---
 rust-mode.el| 10 ++
 rust-prog-mode.el   |  3 ++-
 rust-rustfmt.el |  4 ++--
 4 files changed, 14 insertions(+), 10 deletions(-)



[nongnu] elpa/rust-mode b2b18aa6c1 3/3: Merge pull request #534 from tarsiiformes/fixup

2024-03-29 Thread ELPA Syncer
branch: elpa/rust-mode
commit b2b18aa6c135d9b06242b3d081d94fe0c0cb8e86
Merge: 150b61f7ed 7c5de035fa
Author: Sibi Prabakaran 
Commit: GitHub 

Merge pull request #534 from tarsiiformes/fixup

Fix ancient defect and dependency complications related to having two 
rust-mode implementations
---
 rust-mode-treesitter.el |  7 ---
 rust-mode.el| 10 ++
 rust-prog-mode.el   |  3 ++-
 rust-rustfmt.el |  4 ++--
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/rust-mode-treesitter.el b/rust-mode-treesitter.el
index 89c7cd43f5..21eab59f91 100644
--- a/rust-mode-treesitter.el
+++ b/rust-mode-treesitter.el
@@ -5,12 +5,13 @@
 
 ;;; Code:
 
+(require 'rust-mode)
+
+;; Do not compile or load on Emacs releases that don't support
+;; this.  See https://github.com/rust-lang/rust-mode/issues/520.
 (when (version<= "29.1" emacs-version)
-  ;; We have the when macro because of
-  ;; https://github.com/rust-lang/rust-mode/issues/520
   (require 'treesit)
   (require 'rust-ts-mode)
-  (require 'rust-common)
 
   (define-derived-mode rust-mode rust-ts-mode "Rust"
 "Major mode for Rust code.
diff --git a/rust-mode.el b/rust-mode.el
index a0f6542753..8d38295b04 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -71,10 +71,6 @@ instead of `prog-mode'. This option requires emacs29+."
 map)
   "Keymap for Rust major mode.")
 
-(if (and (version<= "29.1" emacs-version) rust-mode-treesitter-derive)
-(require 'rust-mode-treesitter)
-  (require 'rust-prog-mode))
-
 ;;;###autoload
 (autoload 'rust-mode "rust-mode" "Major mode for Rust code." t)
 
@@ -82,6 +78,12 @@ instead of `prog-mode'. This option requires emacs29+."
 (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
 
 (provide 'rust-mode)
+
+(if (and rust-mode-treesitter-derive
+ (version<= "29.1" emacs-version))
+(require 'rust-mode-treesitter)
+  (require 'rust-prog-mode))
+
 (require 'rust-utils)
 
 ;;; rust-mode.el ends here
diff --git a/rust-prog-mode.el b/rust-prog-mode.el
index 51e802ddcb..05bc5e0daf 100644
--- a/rust-prog-mode.el
+++ b/rust-prog-mode.el
@@ -4,7 +4,8 @@
 ;; rust-mode code deriving from prog-mode instead of rust-ts-mode
 
 ;;; Code:
-(require 'rust-common)
+
+(require 'rust-mode)
 
 (defvar electric-pair-inhibit-predicate)
 (defvar electric-pair-skip-self)
diff --git a/rust-rustfmt.el b/rust-rustfmt.el
index f609980382..cab183c598 100644
--- a/rust-rustfmt.el
+++ b/rust-rustfmt.el
@@ -87,8 +87,8 @@
 (insert-file-contents tmpf)
 (rust--format-fix-rustfmt-buffer (buffer-name buf))
 (error "Rustfmt failed, see %s buffer for details"
-   rust-rustfmt-buffername
-  (delete-file tmpf))
+   rust-rustfmt-buffername)))
+(delete-file tmpf)))
 
 ;; Since we run rustfmt through stdin we get  markers in the
 ;; output. This replaces them with the buffer name instead.



[nongnu] elpa/rust-mode 1ce4f8e266 1/3: rust--format-call: Delete file in case of error

2024-03-29 Thread ELPA Syncer
branch: elpa/rust-mode
commit 1ce4f8e26606462d73dc0895983d733580469124
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

rust--format-call: Delete file in case of error

That was always the intention, but the cleanup code was always
placed outside the unwind forms.

  lib/rust-mode/rust-rustfmt.el:60:12: Warning: ‘unwind-protect’
without unwind forms
---
 rust-rustfmt.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust-rustfmt.el b/rust-rustfmt.el
index f609980382..cab183c598 100644
--- a/rust-rustfmt.el
+++ b/rust-rustfmt.el
@@ -87,8 +87,8 @@
 (insert-file-contents tmpf)
 (rust--format-fix-rustfmt-buffer (buffer-name buf))
 (error "Rustfmt failed, see %s buffer for details"
-   rust-rustfmt-buffername
-  (delete-file tmpf))
+   rust-rustfmt-buffername)))
+(delete-file tmpf)))
 
 ;; Since we run rustfmt through stdin we get  markers in the
 ;; output. This replaces them with the buffer name instead.



[elpa] externals/org 820a99b171 1/7: testing/lisp/test-ob-comint.el: Make test for prompt filter

2024-03-29 Thread ELPA Syncer
branch: externals/org
commit 820a99b171a2bb3b7c8b521ae4d565606a146de7
Author: Matthew Trzcinski 
Commit: Matthew Trzcinski 

testing/lisp/test-ob-comint.el: Make test for prompt filter

* test-ob-comint.el:  Make new file for comint tests.
(test-org-babel-comint/prompt-filter-removes-prompt): Test that the
prompt is removed from process buffer output.
---
 testing/lisp/test-ob-comint.el | 55 ++
 1 file changed, 55 insertions(+)

diff --git a/testing/lisp/test-ob-comint.el b/testing/lisp/test-ob-comint.el
new file mode 100644
index 00..9193ef8f37
--- /dev/null
+++ b/testing/lisp/test-ob-comint.el
@@ -0,0 +1,55 @@
+;;; test-ob-comint.el  -*- lexical-binding: t; -*-
+
+;; Copyright (c) 2024 Matthew Trzcinski
+;; Authors: Matthew Trzcinski
+
+;; 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 .
+
+
+;;; Comment:
+
+;; See testing/README for how to run tests.
+
+
+;;; Requirements:
+
+
+;;; Code:
+(ert-deftest test-org-babel-comint/prompt-filter-removes-prompt ()
+  "Test that prompt is actually removed."
+  (let* ((prompt "org_babel_sh_prompt> ")
+ (results "org_babel_sh_prompt> echo 
'ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59'
+# print message
+echo \"hello world\"
+echo 'ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59'
+ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59
+org_babel_sh_prompt> org_babel_sh_prompt> \"hello world\"
+org_babel_sh_prompt> 
ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59
+org_babel_sh_prompt> "))
+(should (string=
+ (org-trim (string-join (mapcar #'org-trim 
(org-babel-comint--prompt-filter results prompt)) "\n") "\n")
+ "echo 
'ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59'
+# print message
+echo \"hello world\"
+echo 'ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59'
+ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59
+\"hello world\"
+ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59"
+
+
+(provide 'test-ob-comint)
+
+;;; test-ob-comint.el ends here



[elpa] externals/org 227cbb5359 2/7: lisp/ob-comint.el: Create comint prompt filter

2024-03-29 Thread ELPA Syncer
branch: externals/org
commit 227cbb53592e853133ada4a429b8cceedc837f89
Author: Matthew Trzcinski 
Commit: Matthew Trzcinski 

lisp/ob-comint.el: Create comint prompt filter

* lisp/ob-comint.el (org-babel-comint--prompt-filter): Extract prompt
filtering logic from `org-babel-comint-with-output' into a new
function.
---
 lisp/ob-comint.el | 13 +
 1 file changed, 13 insertions(+)

diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index 1ec84e8652..882e192894 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -74,6 +74,19 @@ This is useful when prompt unexpectedly changes."
   (setq comint-prompt-regexp org-babel-comint-prompt-regexp-old
 org-babel-comint-prompt-regexp-old tmp
 
+(defun org-babel-comint--prompt-filter (string &optional prompt-regexp)
+  "Remove PROMPT-REGEXP from STRING.
+
+PROMPT-REGEXP defaults to `comint-prompt-regexp'."
+  (let* ((prompt-regexp (or prompt-regexp comint-prompt-regexp))
+ (separator "org-babel-comint--prompt-filter-separator\n"))
+(while (string-match-p prompt-regexp string)
+  (setq string
+(replace-regexp-in-string
+ (format "\\(?:%s\\)?\\(?:%s\\)[ \t]*" separator prompt-regexp)
+ separator string)))
+(delete "" (split-string string separator
+
 (defmacro org-babel-comint-with-output (meta &rest body)
   "Evaluate BODY in BUFFER and return process output.
 Will wait until EOE-INDICATOR appears in the output, then return



[elpa] externals/org e9c288dfac 7/7: lisp/ob-comint.el: Fix prompt appearing in async shell results

2024-03-29 Thread ELPA Syncer
branch: externals/org
commit e9c288dfaccc2960e5b6889e6aabea700ad4e05a
Author: Matthew Trzcinski 
Commit: Matthew Trzcinski 

lisp/ob-comint.el: Fix prompt appearing in async shell results

* lisp/ob-comint.el (org-babel-comint-async-filter): Call prompt
`org-babel-comint--prompt-filter'

Reported-by: "Matthew Trzcinski" 
Link: 
https://list.orgmode.org/18d753c1e8a.cfb3e1921191837.5665565128507976...@excalamus.com/
---
 lisp/ob-comint.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index d13aa1..f2251892a3 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -325,9 +325,10 @@ STRING contains the output originally inserted into the 
comint buffer."
  until (and (equal (match-string 1) "start")
 (equal (match-string 2) uuid))
  finally return (+ 1 (match-end 0)
-  ;; Apply callback to clean up the result
-  (res-str (funcall org-babel-comint-async-chunk-callback
- res-str-raw)))
+   ;; Remove prompt
+   (res-promptless (org-trim (string-join (mapcar #'org-trim 
(org-babel-comint--prompt-filter res-str-raw)) "\n") "\n"))
+  ;; Apply user callback
+  (res-str (funcall org-babel-comint-async-chunk-callback 
res-promptless)))
  ;; Search for uuid in associated org-buffers to insert results
  (cl-loop for buf in org-buffers
   until (with-current-buffer buf



[elpa] externals/org 3776eba2f7 4/7: lisp/ob-comint.el: Create comint echo filter

2024-03-29 Thread ELPA Syncer
branch: externals/org
commit 3776eba2f774af24bd26598fd6da5e754ff05a7d
Author: Matthew Trzcinski 
Commit: Matthew Trzcinski 

lisp/ob-comint.el: Create comint echo filter

* lisp/ob-comint.el (org-babel-comint--echo-filter): Extract echo
filtering logic from `org-babel-comint-with-output' into a new
function.
---
 lisp/ob-comint.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index 882e192894..e8d8e76094 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -87,6 +87,15 @@ PROMPT-REGEXP defaults to `comint-prompt-regexp'."
  separator string)))
 (delete "" (split-string string separator
 
+(defun org-babel-comint--echo-filter (string &optional echo)
+  "Remove ECHO from STRING."
+  (and echo string
+   (string-match
+(replace-regexp-in-string "\n" "[\r\n]+" (regexp-quote echo))
+string)
+   (setq string (substring string (match-end 0
+  string)
+
 (defmacro org-babel-comint-with-output (meta &rest body)
   "Evaluate BODY in BUFFER and return process output.
 Will wait until EOE-INDICATOR appears in the output, then return



[elpa] externals/org c2b763dd14 3/7: testing/lisp/test-ob-comint.el: Make test for echo filter

2024-03-29 Thread ELPA Syncer
branch: externals/org
commit c2b763dd141524b52c323c78a6eb5ad31fdec95a
Author: Matthew Trzcinski 
Commit: Matthew Trzcinski 

testing/lisp/test-ob-comint.el: Make test for echo filter

* test-ob-comint.el:
(test-org-babel-comint/echo-filter-removes-echo): Test that echoed
input is removed from process buffer output.
---
 testing/lisp/test-ob-comint.el | 20 
 1 file changed, 20 insertions(+)

diff --git a/testing/lisp/test-ob-comint.el b/testing/lisp/test-ob-comint.el
index 9193ef8f37..8f6def8cad 100644
--- a/testing/lisp/test-ob-comint.el
+++ b/testing/lisp/test-ob-comint.el
@@ -49,6 +49,26 @@ 
ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59
 \"hello world\"
 ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59"
 
+(ert-deftest test-org-babel-comint/echo-filter-removes-echo ()
+  "Test that echo is actually removed."
+  (let* ((echo "echo 
'ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59'
+# print message
+echo \"hello world\"
+echo 'ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59'")
+ (result "org_babel_sh_prompt> echo 
'ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59'
+# print message
+echo \"hello world\"
+echo 'ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59'
+ob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59
+org_babel_sh_prompt> org_babel_sh_prompt> \"hello world\"
+org_babel_sh_prompt> 
ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59
+org_babel_sh_prompt> "))
+(should (string=
+ (org-babel-comint--echo-filter result echo)
+ 
"\nob_comint_async_shell_start_d78ac49f-dc8a-4c39-827c-c93225484d59
+org_babel_sh_prompt> org_babel_sh_prompt> \"hello world\"
+org_babel_sh_prompt> 
ob_comint_async_shell_end_d78ac49f-dc8a-4c39-827c-c93225484d59
+org_babel_sh_prompt> "
 
 (provide 'test-ob-comint)
 



[elpa] externals/org 574e04d119 5/7: lisp/ob-comint.el: Refactor `org-babel-comint-with-output'

2024-03-29 Thread ELPA Syncer
branch: externals/org
commit 574e04d11992b2850d55b82a5e4af4fad35a6fc6
Author: Matthew Trzcinski 
Commit: Matthew Trzcinski 

lisp/ob-comint.el: Refactor `org-babel-comint-with-output'

* lisp/ob-comint.el (org-babel-comint-with-output): Replace logic for
prompt and echo filtering with `org-babel-comint--prompt-filter' and
`org-babel-comint--echo-filter'.  Delete
`org-babel-comint-prompt-separator' variable and move related comment
to `org-babel-comint--prompt-filter'.
---
 lisp/ob-comint.el | 39 +--
 1 file changed, 9 insertions(+), 30 deletions(-)

diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el
index e8d8e76094..d13aa1 100644
--- a/lisp/ob-comint.el
+++ b/lisp/ob-comint.el
@@ -79,6 +79,9 @@ This is useful when prompt unexpectedly changes."
 
 PROMPT-REGEXP defaults to `comint-prompt-regexp'."
   (let* ((prompt-regexp (or prompt-regexp comint-prompt-regexp))
+ ;; We need newline in case if we do progressive replacement
+ ;; of agglomerated comint prompts with `comint-prompt-regexp'
+ ;; containing ^.
  (separator "org-babel-comint--prompt-filter-separator\n"))
 (while (string-match-p prompt-regexp string)
   (setq string
@@ -112,12 +115,7 @@ or user `keyboard-quit' during execution of body."
   (let ((buffer (nth 0 meta))
(eoe-indicator (nth 1 meta))
(remove-echo (nth 2 meta))
-   (full-body (nth 3 meta))
-(org-babel-comint-prompt-separator
- ;; We need newline in case if we do progressive replacement
- ;; of agglomerated comint prompts with `comint-prompt-regexp'
- ;; containing ^.
- "org-babel-comint-prompt-separator\n"))
+   (full-body (nth 3 meta)))
 `(org-babel-comint-in-buffer ,buffer
(let* ((string-buffer "")
  (comint-output-filter-functions
@@ -161,31 +159,12 @@ or user `keyboard-quit' during execution of body."
 (goto-char (process-mark (get-buffer-process (current-buffer
 (insert dangling-text)
 
+ ;; remove echo'd FULL-BODY from input
+ (and ,remove-echo ,full-body
+  (setq string-buffer (org-babel-comint--echo-filter string-buffer 
,full-body)))
+
  ;; Filter out prompts.
- (while (string-match-p comint-prompt-regexp string-buffer)
-   (setq string-buffer
- (replace-regexp-in-string
-  ;; Sometimes, we get multiple agglomerated
-  ;; prompts together in a single output:
-  ;; "prompt prompt prompt output"
-  ;; Or even "promptprompt ...>.
-  ;; Remove them progressively, so that
-  ;; possible "^" in the prompt regexp gets to
-  ;; work as we remove the heading prompt
-  ;; instance.
-  (format "\\(?:%s\\)?\\(?:%s\\)[ \t]*" 
,org-babel-comint-prompt-separator comint-prompt-regexp)
-  ,org-babel-comint-prompt-separator
-  string-buffer)))
-;; remove echo'd FULL-BODY from input
-(when (and ,remove-echo ,full-body
-   (string-match
-(replace-regexp-in-string
- "\n" "[\r\n]+" (regexp-quote (or ,full-body "")))
-string-buffer))
-  (setq string-buffer (substring string-buffer (match-end 0
- (delete "" (split-string
- string-buffer
- ,org-babel-comint-prompt-separator))
+ (org-babel-comint--prompt-filter string-buffer)
 
 (defun org-babel-comint-input-command (buffer cmd)
   "Pass CMD to BUFFER.



[elpa] externals/org 0102988afb 6/7: testing/lisp/test-ob-shell.el: Test async prompt removal

2024-03-29 Thread ELPA Syncer
branch: externals/org
commit 0102988afbcd6694ed26035316449d808873bb42
Author: Matthew Trzcinski 
Commit: Matthew Trzcinski 

testing/lisp/test-ob-shell.el: Test async prompt removal

* testing/lisp/test-ob-shell.el (test-ob-shell/session-async-results):
Create test verifying bug report that shell prompt appears in async
results.
---
 testing/lisp/test-ob-shell.el | 24 
 1 file changed, 24 insertions(+)

diff --git a/testing/lisp/test-ob-shell.el b/testing/lisp/test-ob-shell.el
index 879555af0a..8cebd8467a 100644
--- a/testing/lisp/test-ob-shell.el
+++ b/testing/lisp/test-ob-shell.el
@@ -129,6 +129,30 @@ echo 2
 (if (should (string= ": 1\n: 2\n" (buffer-substring-no-properties (point) 
(point-max
   (kill-buffer session-name)
 
+(ert-deftest test-ob-shell/session-async-results ()
+  "Test that async evaluation removes prompt from results."
+  (let* ((session-name "test-ob-shell/session-async-results")
+ (kill-buffer-query-functions nil)
+ (start-time (current-time))
+ (wait-time (time-add start-time 3))
+ uuid-placeholder)
+(org-test-with-temp-text
+ (concat "#+begin_src sh :session " session-name " :async t
+# print message
+echo \"hello world\"
+#+end_src")
+ (setq uuid-placeholder (org-trim (org-babel-execute-src-block)))
+ (catch 'too-long
+   (while (string-match uuid-placeholder (buffer-string))
+ (progn
+   (sleep-for 0.01)
+   (when (time-less-p wait-time (current-time))
+ (throw 'too-long (ert-fail "Took too long to get result from 
callback"))
+ (search-forward "#+results")
+ (beginning-of-line 2)
+ (if (should (string= ": hello world\n" (buffer-substring-no-properties 
(point) (point-max
+ (kill-buffer session-name)
+
 (ert-deftest test-ob-shell/generic-uses-no-arrays ()
   "Test generic serialization of array into a single string."
   (org-test-with-temp-text



[elpa] externals/org updated (1be2f96931 -> e9c288dfac)

2024-03-29 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  1be2f96931 lisp/ox-html.el: Add avif support for html export inline 
images
   new  820a99b171 testing/lisp/test-ob-comint.el: Make test for prompt 
filter
   new  227cbb5359 lisp/ob-comint.el: Create comint prompt filter
   new  c2b763dd14 testing/lisp/test-ob-comint.el: Make test for echo filter
   new  3776eba2f7 lisp/ob-comint.el: Create comint echo filter
   new  574e04d119 lisp/ob-comint.el: Refactor 
`org-babel-comint-with-output'
   new  0102988afb testing/lisp/test-ob-shell.el: Test async prompt removal
   new  e9c288dfac lisp/ob-comint.el: Fix prompt appearing in async shell 
results


Summary of changes:
 lisp/ob-comint.el  | 68 +++---
 testing/lisp/test-ob-comint.el | 75 ++
 testing/lisp/test-ob-shell.el  | 24 ++
 3 files changed, 134 insertions(+), 33 deletions(-)
 create mode 100644 testing/lisp/test-ob-comint.el



[nongnu] elpa/highlight-parentheses 712b8375fe: Release highlight-parentheses.el version 2.2.0

2024-03-29 Thread ELPA Syncer
branch: elpa/highlight-parentheses
commit 712b8375fe484d414372f25b09dc4595fbebd64f
Author: Tassilo Horn 
Commit: Tassilo Horn 

Release highlight-parentheses.el version 2.2.0
---
 highlight-parentheses.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/highlight-parentheses.el b/highlight-parentheses.el
index 7d6e9f564e..ccff799a34 100644
--- a/highlight-parentheses.el
+++ b/highlight-parentheses.el
@@ -2,15 +2,15 @@
 ;;
 ;; Copyright (C) 2007, 2009, 2013 Nikolaj Schumacher
 ;; Copyright (C) 2018 Tim Perkins
-;; Copyright (C) 2018-2022 Tassilo Horn
+;; Copyright (C) 2018-2022, 2024 Tassilo Horn
 ;;
 ;; Author: Nikolaj Schumacher 
 ;; Maintainer: Tassilo Horn 
-;; Version: 2.1.1
+;; Version: 2.2.0
 ;; Keywords: faces, matching
 ;; URL: https://sr.ht/~tsdh/highlight-parentheses.el/
 ;; Package-Requires: ((emacs "24.3"))
-;; Compatibility: GNU Emacs 24.3, 25.x, 26.x, 27.x
+;; Compatibility: GNU Emacs 24.3, 25.x, 26.x, 27.x, 28.x, 29.x
 ;;
 ;; This file is NOT part of GNU Emacs.
 ;;



[elpa] externals/mpdired updated (f9b4f91517 -> 73356d115d)

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

  from  f9b4f91517 re-add progress bar when resetting face
   new  ec9cb7643d do not get the entry at point for delete execution
   new  73356d115d first attempt at queue ordering


Summary of changes:
 mpdired.el | 76 --
 1 file changed, 64 insertions(+), 12 deletions(-)



[elpa] externals/mpdired ec9cb7643d 1/2: do not get the entry at point for delete execution

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

do not get the entry at point for delete execution
---
 mpdired.el | 9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 7735ac1ac9..7afb84d593 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -57,8 +57,8 @@
 ;;
 ;; 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 action.
+;; There is also no timers set by MPDired, so updating anything always
+;; comes from a user's action.
 ;;
 ;; The browser view is built from the MPD's "listall" and
 ;; "listplaylists" commands.  The MPD's documentation does *not*
@@ -1016,8 +1016,9 @@ SEPARATOR string."
  (when (and mark (char-equal mark want))
(push (cons id (cons type uri)) result)))
(forward-line)))
-;; No marked, get the entry at point.
-(unless result
+;; No marked, get the entry at point except for the deletion flag.
+(unless (or result
+   (char-equal want ?D))
   (let* ((bol (mpdired--bol))
 (id (get-text-property bol 'id))
 (type (get-text-property bol 'type))



[elpa] externals/mpdired 73356d115d 2/2: first attempt at queue ordering

2024-03-29 Thread ELPA Syncer
branch: externals/mpdired
commit 73356d115d5dfc33e71ba0eaa90391afbe29b1d0
Author: Manuel Giraud 
Commit: Manuel Giraud 

first attempt at queue ordering

I'm not satisfied yet.
---
 mpdired.el | 67 ++
 1 file changed, 59 insertions(+), 8 deletions(-)

diff --git a/mpdired.el b/mpdired.el
index 7afb84d593..5b2894da74 100644
--- a/mpdired.el
+++ b/mpdired.el
@@ -116,7 +116,7 @@
   "N"   #'mpdired-next-internal
   "P"   #'mpdired-previous-internal
   "a"   #'mpdired-add
-  "x"   #'mpdired-flagged-delete
+  "x"   #'mpdired-execute
   "D"   #'mpdired-delete
   ;; Status settings and toggles
   ""   #'mpdired-pause-internal
@@ -141,7 +141,10 @@
   "* t" #'mpdired-toggle-marks
   "* c" #'mpdired-change-marks
   "% d" #'mpdired-flag-files-regexp
-  "% m" #'mpdired-mark-files-regexp)
+  "% m" #'mpdired-mark-files-regexp
+  ;; Ordering
+  "i"   #'mpdired-put-order-at-point
+  "r"   #'mpdired-reset-order-index)
 
 (defface mpdired-currdir
   '((t :inherit dired-header))
@@ -339,6 +342,7 @@
   "Local copy of the current song state.  It is a list of form '(songid
 elapsed duration).")
 (defvar-local mpdired--error nil)
+(defvar-local mpdired--order-index 0)
 
 ;; I have tried to use markers here but since I often erase the
 ;; buffer's content, these markers are reset to 1.
@@ -569,7 +573,8 @@ used for mark followed by a space."
  (eq mpdired--last-command 'listplaylist))
  (mpdired--present-list proc))
 ((or (eq mpdired--last-command 'queue)
- (eq mpdired--last-command 'deleteid))
+ (eq mpdired--last-command 'deleteid)
+ (eq mpdired--last-command 'moveid))
  (mpdired--present-queue proc)))
   ;; Display and reset information message.
   (when mpdired--message
@@ -688,6 +693,21 @@ an optional communication buffer that would be used 
instead of
 (process-send-string process "playlistid\n")
 (process-send-string process "command_list_end\n")))
 
+(defun mpdired-moveid-internal (id)
+  (mpdired--with-comm-buffer process nil
+(setq mpdired--last-command 'moveid)
+(process-send-string process "command_list_begin\n")
+(if (listp id)
+   (let ((place 0))
+ (dolist (i id)
+   (process-send-string process (format "moveid %d +%d\n" i place))
+   (setq place (1+ place
+  (process-send-string process (format "moveid %d 0\n" id)))
+;; XXX A playlistid should always be preceded by a status
+(process-send-string process "status\n")
+(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)
@@ -952,6 +972,17 @@ SEPARATOR string."
   (mpdired--mark ?D)
   (mpdired-next-line))
 
+(defun mpdired-put-order-at-point ()
+  (interactive)
+  (when (eq mpdired--view 'queue)
+(mpdired--mark (elt (number-to-string mpdired--order-index) 0))
+(setq mpdired--order-index (mod (+ mpdired--order-index 1) 10))
+(mpdired-next-line)))
+
+(defun mpdired-reset-order-index ()
+  (interactive)
+  (setq mpdired--order-index 0))
+
 (defun mpdired-toggle-marks ()
   "Toggles marks."
   (interactive)
@@ -1026,6 +1057,22 @@ SEPARATOR string."
(setq result (list (cons id (cons type uri))
 (reverse result)))
 
+(defun mpdired--collect-ordered ()
+  "Collects songs id in their ordering marks."
+  (let (result)
+(save-excursion
+  (goto-char (point-min))
+  (while (not (eobp))
+   (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 (seq-position "0123456789" mark))
+   (push (cons mark id) result)))
+   (forward-line)))
+(seq-sort #'(lambda (a b) (< (car a) (car b))) result)))
+
 (defun mpdired-mark-files-regexp (regexp &optional mark)
   "Marks entries which matches a user provided REGEXP."
   (interactive (list (read-regexp "Mark (regexp): ")))
@@ -1107,15 +1154,19 @@ browser view."
 (unless (eobp)
   (get-text-property (mpdired--bol) 'id
 
-(defun mpdired-flagged-delete ()
-  "Removes flagged songs from the queue."
+(defun mpdired-execute ()
+  "Removes flagged songs from the queue and sort songs in the queue."
   (interactive)
   (when (eq mpdired--view 'queue)
-(let* ((flagged (mpdired--collect-marked ?D))
-  (

[elpa] externals/ement 570318221b: Fix: (defface ement-room-list-direct) Weight

2024-03-29 Thread ELPA Syncer
branch: externals/ement
commit 570318221b65b4ef37402cf7ac0023a3fffa0cfa
Author: Adam Porter 
Commit: Adam Porter 

Fix: (defface ement-room-list-direct) Weight
---
 README.org |  1 +
 ement-room-list.el | 13 ++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/README.org b/README.org
index 54869dce5d..470ff28e89 100644
--- a/README.org
+++ b/README.org
@@ -349,6 +349,7 @@ Ement.el doesn't support encrypted rooms natively, but it 
can be used transparen
 + Toggling images to fill the window body no longer triggers unintended 
scrolling.  (Thanks to [[https://github.com/phil-s][Phil Sainty]].)
 + Recognition of mentions after a newline.  
([[https://github.com/alphapapa/ement.el/issues/267][#267]].  Thanks to 
[[https://github.com/phil-s][Phil Sainty]].)
 + Newlines in ~ement-room-message-format-spec~ are considered when calculating 
the wrap-prefix.  (Thanks to [[https://github.com/phil-s][Phil Sainty]].)
++ Weight of face ~ement-room-list-direct~ (now correctly bold in room list 
heading).
 
 ** 0.14
 
diff --git a/ement-room-list.el b/ement-room-list.el
index a5d4069065..603803660c 100644
--- a/ement-room-list.el
+++ b/ement-room-list.el
@@ -141,9 +141,16 @@ Set automatically when `ement-room-list-mode' is 
activated.")
 ; Faces
 
 (defface ement-room-list-direct
-  ;; In case `font-lock-constant-face' is bold, we set the weight to normal, 
so it can be
-  ;; made bold for unread rooms only.
-  '((t (:weight normal :inherit (font-lock-constant-face 
ement-room-list-name
+  ;; We want to use `font-lock-constant-face' as the base face (because it 
seems to look
+  ;; nice with most themes), but that face sometimes is defined as bold, which 
interferes
+  ;; with our ability to use boldness to indicate unread rooms.  But if we 
override the
+  ;; weight to be normal, even the "People" heading in the room list will not 
be bold,
+  ;; which group headings should be.  So we make a copy of the face, unset its 
weight, and
+  ;; inherit from that.
+  (progn
+(copy-face 'font-lock-constant-face 'ement--font-lock-constant-face)
+(set-face-attribute 'ement--font-lock-constant-face nil :weight 
'unspecified)
+'((t (:inherit (ement--font-lock-constant-face ement-room-list-name)
   "Direct rooms.")
 
 (defface ement-room-list-favourite '((t (:inherit (font-lock-doc-face 
ement-room-list-name