[elpa] externals/transient eda434d21f 3/4: transient--load-command-if-autoload: New helper function

2025-03-07 Thread Jonas Bernoulli via
branch: externals/transient
commit eda434d21feed40ea26dd4b7655cc1559d4905ed
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

transient--load-command-if-autoload: New helper function
---
 lisp/transient.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 68545ddb78..cdab343f6d 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2361,11 +2361,7 @@ value.  Otherwise return CHILDREN as is.")
   level
   (and proto (oref proto level))
   transient--default-child-level)))
-(let ((fn (and (symbolp cmd)
-   (symbol-function cmd
-  (when (autoloadp fn)
-(transient--debug "   autoload %s" cmd)
-(autoload-do-load fn)))
+(transient--load-command-if-autoload cmd)
 (when (transient--use-level-p level)
   (let ((obj (if (child-of-class-p class 'transient-information)
  (apply class :parent parent :level level args)
@@ -2483,6 +2479,13 @@ value.  Otherwise return CHILDREN as is.")
  :inapt-if-mode :inapt-if-not-mode
  :inapt-if-derived :inapt-if-not-derived
 
+(defun transient--load-command-if-autoload (cmd)
+  (when-let* (((symbolp cmd))
+  (fn (symbol-function cmd))
+  ((autoloadp fn)))
+(transient--debug "   autoload %s" cmd)
+(autoload-do-load fn)))
+
 ;;; Flow-Control
 
 (defun transient--setup-transient ()



[nongnu] elpa/org-journal df608c1138 1/2: Allow any alpha character in date format

2025-03-07 Thread ELPA Syncer
branch: elpa/org-journal
commit df608c1138a1dd7abc3ad8a04d6da76e49a82b29
Author: Patrick M. Niedzielski 
Commit: GitHub 

Allow any alpha character in date format

Some locales have day names with accents, such as Esperanto.  When
using org-journal in such a locale and customizing
`org-journal-created-property-timestamp-format` to support org
inactive timestamps, as `[%Y-%m-%d %a]` org-journal will fail with an
error on many operations:

org-journal--entry-date->calendar-date: Created property timestamp 
format "[%Y-%m-%d %a]" doesn’t match CREATED property value ([2021-12-02 ĵaŭ]) 
from entry at line: Line 29

This is because the `%a` format specifier in org-journal only accepts
unaccented day names.  This patch allows `%a` to accept any character
Emacs classifies as alpha.
---
 org-journal.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-journal.el b/org-journal.el
index f7008fde47..ca41aac6ae 100644
--- a/org-journal.el
+++ b/org-journal.el
@@ -438,7 +438,7 @@ This runs once per date, before 
`org-journal-after-entry-create-hook'.")
 buffer not open already, otherwise `nil'.")
 
 (defvar org-journal--format-rx-alist
-  '(("%[aAbB]" . "(?4:[a-zA-Z]{3,})")
+  '(("%[aAbB]" . "(?4:[[:alpha:]]{3,})")
 ("%d" . "(?3:[0-9]{2})")
 ("%m" . "(?2:[0-9]{2})")
 ("%Y" . "(?1:[0-9]{4})")



[elpa] externals/consult updated (332c172999 -> 8ea14ed546)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  332c172999 Update changelog
   new  64650f10a9 consult-completion-in-region: Improve handling of single 
candidates (Fix #1193)
   new  8ea14ed546 Update changelog


Summary of changes:
 CHANGELOG.org |   1 +
 consult.el| 114 +++---
 2 files changed, 54 insertions(+), 61 deletions(-)



[elpa] externals/cape c854d98373 2/2: Update changelog

2025-03-07 Thread ELPA Syncer
branch: externals/cape
commit c854d98373fb6eec3e1ed5a2611c0089aa565e1b
Author: Daniel Mendler 
Commit: Daniel Mendler 

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

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 0446ede109..79a0cbdc63 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -2,6 +2,13 @@
 #+author: Daniel Mendler
 #+language: en
 
+* Development
+
+- ~cape-file~: Improve handling of environment variables as part of the path,
+  e.g., $HOME.
+- ~cape-company-to-capf~: Handle updated return value convention of the 
~prefix~
+  action of Company backends.
+
 * Version 1.9 (2025-01-28)
 
 - ~cape-capf-super~: Use extra metadata instead of completion table metadata.



[elpa] externals/llm de66dbade2: Fix instances of plist-put not in a setq (#167)

2025-03-07 Thread ELPA Syncer
branch: externals/llm
commit de66dbade203a5e8631a85c13fd205885497923d
Author: Andrew Hyatt 
Commit: GitHub 

Fix instances of plist-put not in a setq (#167)
---
 llm-claude.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/llm-claude.el b/llm-claude.el
index d4d3334305..eda858a103 100644
--- a/llm-claude.el
+++ b/llm-claude.el
@@ -82,13 +82,14 @@
  (llm-chat-prompt-interactions prompt)
 (system (llm-provider-utils-get-system-prompt prompt)))
 (when (llm-chat-prompt-tools prompt)
-  (plist-put request :tools
- (vconcat (mapcar (lambda (f) (llm-claude--tool-call f))
-  (llm-chat-prompt-tools prompt)
+  (setq request (plist-put request :tools
+   (vconcat
+(mapcar (lambda (f) (llm-claude--tool-call f))
+(llm-chat-prompt-tools prompt))
 (when (> (length system) 0)
-  (plist-put request :system system))
+  (setq request (plist-put request :system system)))
 (when (llm-chat-prompt-temperature prompt)
-  (plist-put request :temperature (llm-chat-prompt-temperature prompt)))
+  (setq request (plist-put request :temperature 
(llm-chat-prompt-temperature prompt
 (append request (llm-provider-utils-non-standard-params-plist prompt
 
 (defun llm-claude--multipart-content (content)



[elpa] externals/debbugs 89fe82ac28 2/3: Improve keep-subject handling

2025-03-07 Thread Michael Albinus via
branch: externals/debbugs
commit 89fe82ac283685f8f8a478accb5f35a1f6c5f304
Author: Michael Albinus 
Commit: Michael Albinus 

Improve keep-subject handling

* debbugs-gnu.el (message-simplify-subject, gnus-article-copy)
(gnus-summary-buffer): Declare.
(debbugs-gnu-keep-subject): New function.
(debbugs-gnu-summary-mode): Use it.
(debbugs-gnu-make-control-message): Fix decstring.
---
 debbugs-gnu.el | 28 +++-
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 75003a092c..b0f20e14c6 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -221,15 +221,19 @@
 (declare-function log-view-current-tag "log-view" (&optional pos))
 (declare-function magit-status-setup-buffer "magit" (&optional directory))
 (declare-function magit-refresh "magit" ())
+(declare-function
+ message-simplify-subject "message" (subject &optional functions))
 (declare-function current-thread "thread.c" ())
 (declare-function make-thread "thread.c" (function &optional NAME))
 
 (defvar compilation-in-progress)
 (defvar diff-file-header-re)
 (defvar gnus-article-buffer)
+(defvar gnus-article-copy)
 (defvar gnus-bug-group-download-format-alist)
 (defvar gnus-posting-styles)
 (defvar gnus-save-duplicate-list)
+(defvar gnus-summary-buffer)
 (defvar gnus-suppress-duplicates)
 (defvar mail-extr-ignore-realname-equals-mailbox-name)
 (defvar mail-extr-ignore-single-names)
@@ -1942,6 +1946,20 @@ MERGED is the list of bugs merged with this one."
 (define-key map [(meta m)] #'debbugs-gnu-apply-patch)
 map))
 
+(defun debbugs-gnu-keep-subject ()
+  "Keep original subject in replies.
+This is checked against `debbugs-gnu-summary-keep-subject'."
+  (concat
+   "Re: "
+   (message-simplify-subject
+(if-let* (((stringp debbugs-gnu-summary-keep-subject))
+  (orig-subject
+   (with-current-buffer gnus-article-copy
+ (or (message-fetch-field "subject") "none")))
+  ((string-match-p debbugs-gnu-summary-keep-subject orig-subject)))
+orig-subject
+  (buffer-local-value 'debbugs-gnu-subject gnus-summary-buffer)
+
 (define-minor-mode debbugs-gnu-summary-mode
   "Minor mode for providing a debbugs interface in Gnus summary buffers.
 
@@ -1969,10 +1987,8 @@ MERGED is the list of bugs merged with this one."
 (match-string 1 (car address)
(cons new new))
address))
- ,@(and debbugs-gnu-subject
- (not (string-match-p debbugs-gnu-summary-keep-subject
-  debbugs-gnu-subject))
-`((subject ,debbugs-gnu-subject)))
+ ,@(and (stringp debbugs-gnu-subject)
+'((subject debbugs-gnu-keep-subject)))
 
 (defun debbugs-gnu-guess-current-id ()
   "Guess the ID based on \"#23\".
@@ -2112,7 +2128,7 @@ removed instead."
 (defun debbugs-gnu-make-control-message
 (message bugid &optional reverse buffer noversion)
   "Make a control message for the current bug report.
-The message is inserted into BUFFER, and mail headers are adjust
+The message is inserted into BUFFER, and mail headers are adjusted
 so that it will be sent to cont...@debbugs.gnu.org (via Bcc if
 there is already a To address).  If BUFFER omitted, create and
 display a new buffer.  If optional NOVERSION is non-nil, suppress
@@ -3061,6 +3077,8 @@ If SELECTIVELY, query the user before applying the patch."
 
 ;;; TODO:
 
+;; * Unarchive archived bugs prior an action.
+
 ;; * Extend SOAP interface to get all bugs modified in a given timeframe.
 
 ;; * Extend SOAP interface to get existing package names on the



[elpa] externals/bicep-ts-mode 9d0eb44122 1/2: Make fontification less shouty, and more precise

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit 9d0eb44122773725c18ee416642fb6cc16d45047
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Make fontification less shouty, and more precise

- do NOT highlight all object-properties as variable-name-face
  (it makes the entire file variable-name-face...)
- ensure all *actual* identifier references are highlighted using
  variable-name-face.

In short: Make it easy to see where variables are used (and not used).
---
 bicep-ts-mode.el | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 2da6ef6aa6..4d272aac35 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -116,8 +116,21 @@ If found, added to eglot."
  (output_declaration
   (identifier) @font-lock-variable-name-face)
  (object_property
+  (identifier)
+  ":"
+  (identifier) @font-lock-variable-name-face
+  )
+ (interpolation
   (identifier) @font-lock-variable-name-face)
- )
+ (arguments
+  (identifier) @font-lock-variable-name-face)
+ (member_expression
+  object: (identifier) @font-lock-variable-name-face)
+ (if_statement
+  (parenthesized_expression
+   (identifier) @font-lock-variable-name-face))
+ (array
+  (identifier) @font-lock-variable-name-face))
 
:language 'bicep
:feature 'number



[elpa] externals/bicep-ts-mode updated (e02c304ac7 -> ad56def223)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/bicep-ts-mode.

  from  e02c304ac7 Add fontification of the 'if' keyword
   new  9d0eb44122 Make fontification less shouty, and more precise
   new  ad56def223 Going opiniated: Make type-strings highlighted as types!


Summary of changes:
 bicep-ts-mode.el | 18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)



[elpa] externals/bicep-ts-mode ad56def223 2/2: Going opiniated: Make type-strings highlighted as types!

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit ad56def223555686a83d5002ce33e0d7a32b172a
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Going opiniated: Make type-strings highlighted as types!
---
 bicep-ts-mode.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 4d272aac35..12636fae5c 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -99,6 +99,9 @@ If found, added to eglot."
:language 'bicep
:feature 'definition
'((type) @font-lock-type-face
+ (resource_declaration
+  (string
+   (string_content) @font-lock-type-face))
  (parameter_declaration
   (identifier) @font-lock-variable-name-face)
  (variable_declaration



[nongnu] elpa/llama 4c49e410b1: Use advice on all-completions

2025-03-07 Thread ELPA Syncer
branch: elpa/llama
commit 4c49e410b1c7050674bcfdabba1006fe375b32d5
Author: Daniel Mendler 
Commit: Jonas Bernoulli 

Use advice on all-completions

Right now the completing-read advice does not cover other places where
the empty symbol appears, e.g., `completion-at-point'.  Therefore
address the problem on a slightly lower level, by using an advice on
`all-completions', directly where the completion candidates are
generated.  This advice is simpler since it removes the empty string
from the candidates instead of mutating the obarray.
---
 llama.el | 27 +--
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/llama.el b/llama.el
index 080de9380d..6476dc5ec3 100644
--- a/llama.el
+++ b/llama.el
@@ -290,8 +290,8 @@ explicitly specified `_%3'."
 (string-to-syntax "'")
  start end)))
 
-(define-advice completing-read (:around (fn &rest args) llama)
-  "Unintern the symbol with the empty name during completion.
+(define-advice all-completions (:around (fn str table &rest rest) llama)
+  "Remove empty symbol from completion results if originating from `llama'.
 
 `##' is the notation for the symbol whose name is the empty string.
   (intern \"\") => ##
@@ -303,22 +303,13 @@ it to be used akin to syntax, without actually being new 
syntax.
 alias for `llama', you can access the documentation under that name.)
 
 This advice prevents the empty string from being offered as a completion
-candidate when `obarray' (or a completion table that internally uses
-that) is used as COLLECTION, by `unintern'ing that symbol temporarily."
-  (let ((plist (symbol-plist '##))
-(value nil)
-(bound nil))
-(with-no-warnings
-  (when (boundp '##)
-(setq bound t)
-(setq value ##)))
-(unwind-protect
-(progn (unintern "" obarray)
-   (apply fn args))
-  (defalias (intern "") 'llama)
-  (setplist (intern "") plist)
-  (when bound
-(set (intern "") value)
+candidate when `obarray' or a completion table that internally uses
+that is used as TABLE."
+  (let ((result (apply fn str table rest)))
+(if (and (obarrayp table)
+ (eq (symbol-function (intern-soft "" table)) 'llama))
+(delete "" result)
+  result)))
 
 (defvar llama-fontify-mode)
 



[elpa] externals/bicep-ts-mode 1aee55a6db 7/7: Make ternary-expressions work too (by not precondition IF for binary expressions)

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit 1aee55a6db5f263325ba4ee1a606346d011331b7
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Make ternary-expressions work too (by not precondition IF for binary 
expressions)
---
 bicep-ts-mode.el | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 8b57d4a341..f7f89b9efe 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -123,8 +123,7 @@ If found, added to eglot."
  (object_property
   (identifier) @font-lock-property-name-face
   ":"
-  (identifier) @font-lock-variable-use-face
-  )
+  (identifier) @font-lock-variable-use-face)
  (object_property
   (identifier) @font-lock-property-name-face
   ":"
@@ -139,10 +138,8 @@ If found, added to eglot."
  (if_statement
   (parenthesized_expression
(identifier) @font-lock-variable-use-face))
- (if_statement
-  (parenthesized_expression
-   (binary_expression
-(identifier) @font-lock-variable-use-face)))
+ (binary_expression
+  (identifier) @font-lock-variable-use-face)
  (array
   (identifier) @font-lock-variable-use-face))
 



[elpa] externals/bicep-ts-mode 174caffc3b 3/7: Embrace the (new?) font-lock-variable-use-face

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit 174caffc3b3d3fbc9f1c28d3b6a96049be850950
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Embrace the (new?) font-lock-variable-use-face
---
 bicep-ts-mode.el | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 23e0b12532..eb01f77b3e 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -115,25 +115,27 @@ If found, added to eglot."
  (module_declaration
   (identifier) @font-lock-variable-name-face)
  (for_statement
-  (identifier) @font-lock-variable-name-face)
+  initializer: (identifier) @font-lock-variable-name-face)
+ (for_statement
+  (identifier) @font-lock-variable-use-face)
  (output_declaration
   (identifier) @font-lock-variable-name-face)
  (object_property
   (identifier)
   ":"
-  (identifier) @font-lock-variable-name-face
+  (identifier) @font-lock-variable-use-face
   )
  (interpolation
-  (identifier) @font-lock-variable-name-face)
+  (identifier) @font-lock-variable-use-face)
  (arguments
-  (identifier) @font-lock-variable-name-face)
+  (identifier) @font-lock-variable-use-face)
  (member_expression
-  object: (identifier) @font-lock-variable-name-face)
+  object: (identifier) @font-lock-variable-use-face)
  (if_statement
   (parenthesized_expression
-   (identifier) @font-lock-variable-name-face))
+   (identifier) @font-lock-variable-use-face))
  (array
-  (identifier) @font-lock-variable-name-face))
+  (identifier) @font-lock-variable-use-face))
 
:language 'bicep
:feature 'number



[elpa] externals/bicep-ts-mode c2e3055cdd 6/7: Even more rules.

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit c2e3055cdd14848812e74cca8868b1128a0b730e
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Even more rules.
---
 bicep-ts-mode.el | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 9e895f3b0b..8b57d4a341 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -121,10 +121,15 @@ If found, added to eglot."
  (output_declaration
   (identifier) @font-lock-variable-name-face)
  (object_property
-  (identifier)
+  (identifier) @font-lock-property-name-face
   ":"
   (identifier) @font-lock-variable-use-face
   )
+ (object_property
+  (identifier) @font-lock-property-name-face
+  ":"
+  [(array) (string) (object) (member_expression)]
+  )
  (interpolation
   (identifier) @font-lock-variable-use-face)
  (arguments
@@ -149,6 +154,8 @@ If found, added to eglot."
:language 'bicep
:feature 'string
'((string_content) @font-lock-string-face
+ (interpolation
+  ["${" "}"] @font-lock-misc-punctuation-face)
  (escape_sequence) @font-lock-escape-face)
 
:language 'bicep



[elpa] externals/bicep-ts-mode 0d33d1dfae 4/7: Support escape-sequences too.

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit 0d33d1dfae51e915454438c7ba634b4d8a3221d1
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Support escape-sequences too.
---
 bicep-ts-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index eb01f77b3e..af10102208 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -144,7 +144,8 @@ If found, added to eglot."
 
:language 'bicep
:feature 'string
-   '((string_content) @font-lock-string-face)
+   '((string_content) @font-lock-string-face
+ (escape_sequence) @font-lock-escape-face)
 
:language 'bicep
:feature 'boolean



[elpa] externals/bicep-ts-mode 35137d9212 1/7: Highlight nested function-calls too!

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit 35137d9212532e554a4a262a3f84b76056d641f2
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Highlight nested function-calls too!
---
 bicep-ts-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 12636fae5c..970169694e 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -154,6 +154,8 @@ If found, added to eglot."
   function: (identifier) @font-lock-function-call-face)
  (call_expression
   function: (member_expression (identifier)) @font-lock-function-name-face)
+ (call_expression
+  function: (member_expression (property_identifier) 
@font-lock-function-name-face))
  )
 
:language 'bicep



[elpa] externals/bicep-ts-mode 39f364f807 2/7: Correctly use function-call-face instead of function-name-face.

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit 39f364f8077453f0dbc56e0b5bb9a6c6b7f9e95a
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Correctly use function-call-face instead of function-name-face.
---
 bicep-ts-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index 970169694e..23e0b12532 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -153,9 +153,9 @@ If found, added to eglot."
'((call_expression
   function: (identifier) @font-lock-function-call-face)
  (call_expression
-  function: (member_expression (identifier)) @font-lock-function-name-face)
+  function: (member_expression (identifier)) @font-lock-function-call-face)
  (call_expression
-  function: (member_expression (property_identifier) 
@font-lock-function-name-face))
+  function: (member_expression (property_identifier) 
@font-lock-function-call-face))
  )
 
:language 'bicep



[elpa] externals/bicep-ts-mode e2cf82d147 5/7: Support variable-highlighting in more types of if-statements.

2025-03-07 Thread ELPA Syncer
branch: externals/bicep-ts-mode
commit e2cf82d14757c3f58a3e0e622c2919c1e4bb1a46
Author: Jostein Kjønigsen 
Commit: Jostein Kjønigsen 

Support variable-highlighting in more types of if-statements.
---
 bicep-ts-mode.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/bicep-ts-mode.el b/bicep-ts-mode.el
index af10102208..9e895f3b0b 100644
--- a/bicep-ts-mode.el
+++ b/bicep-ts-mode.el
@@ -134,6 +134,10 @@ If found, added to eglot."
  (if_statement
   (parenthesized_expression
(identifier) @font-lock-variable-use-face))
+ (if_statement
+  (parenthesized_expression
+   (binary_expression
+(identifier) @font-lock-variable-use-face)))
  (array
   (identifier) @font-lock-variable-use-face))
 



[elpa] externals/bicep-ts-mode updated (ad56def223 -> 1aee55a6db)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/bicep-ts-mode.

  from  ad56def223 Going opiniated: Make type-strings highlighted as types!
   new  35137d9212 Highlight nested function-calls too!
   new  39f364f807 Correctly use function-call-face instead of 
function-name-face.
   new  174caffc3b Embrace the (new?) font-lock-variable-use-face
   new  0d33d1dfae Support escape-sequences too.
   new  e2cf82d147 Support variable-highlighting in more types of 
if-statements.
   new  c2e3055cdd Even more rules.
   new  1aee55a6db Make ternary-expressions work too (by not precondition 
IF for binary expressions)


Summary of changes:
 bicep-ts-mode.el | 33 +++--
 1 file changed, 23 insertions(+), 10 deletions(-)



[nongnu] elpa/dirvish updated (77b15ee18e -> 34640ec047)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch elpa/dirvish.

  from  77b15ee18e feat(core): add `dirvish-mode-line-bar-image-width` 
option (#252)
   new  16f9651054 refactor: use md5 for thumbnail file names
   new  d0569dd886 chore: bump to 2.2.0 🎉
   new  34640ec047 chore: update CHANGELOG for 2.2.0


Summary of changes:
 dirvish-extras.el  |  2 +-
 dirvish-tramp.el   |  2 +-
 dirvish-widgets.el | 46 +++---
 dirvish.el |  2 +-
 docs/CHANGELOG.org | 31 +
 docs/CUSTOMIZING.org   | 10 ++---
 extensions/dirvish-collapse.el |  2 +-
 extensions/dirvish-emerge.el   |  2 +-
 extensions/dirvish-fd.el   |  2 +-
 extensions/dirvish-history.el  |  2 +-
 extensions/dirvish-icons.el|  2 +-
 extensions/dirvish-ls.el   |  2 +-
 extensions/dirvish-narrow.el   |  2 +-
 extensions/dirvish-peek.el |  2 +-
 extensions/dirvish-quick-access.el |  2 +-
 extensions/dirvish-rsync.el|  2 +-
 extensions/dirvish-side.el |  2 +-
 extensions/dirvish-subtree.el  |  2 +-
 extensions/dirvish-vc.el   |  2 +-
 extensions/dirvish-yank.el |  2 +-
 20 files changed, 78 insertions(+), 43 deletions(-)



[nongnu] elpa/clojure-ts-mode e0703fff14 3/3: Add a "Caveats" section the to the README

2025-03-07 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit e0703fff14de7cdf923093b727b80c465d2c1343
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Add a "Caveats" section the to the README
---
 README.md | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/README.md b/README.md
index d583059fa8..03e00e4fe9 100644
--- a/README.md
+++ b/README.md
@@ -223,8 +223,22 @@ After installing the package do the following.
   (cider-clojure-cli-aliases . ":test:repl")))
 ```
 
+## Caveats
+
+As the TreeSitter Emacs APIs are new and keep evolving there are some
+differences in the behavior of `clojure-ts-mode` on different Emacs versions.
+Here are some notable examples:
+
+- On Emacs 29 the parent mode is `prog-mode`, but on Emacs 30+ it's both 
`prog-mode`
+and `clojure-mode` (this is very helpful when dealing with `derived-mode-p` 
checks)
+
 ## Frequently Asked Questions
 
+### What `clojure-mode` features are currently missing?
+
+As of version 0.2.x, the most obvious missing feature are the various
+refactoring commands in `clojure-mode`.
+
 ### Does `clojure-ts-mode` work with CIDER?
 
 Yes! Preliminary support for `clojure-ts-mode` was released in [CIDER



[nongnu] elpa/dirvish 34640ec047 3/3: chore: update CHANGELOG for 2.2.0

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit 34640ec0470f196246aa1c9f78b53e6e2d544376
Author: Alex Lu 
Commit: Alex Lu 

chore: update CHANGELOG for 2.2.0
---
 docs/CHANGELOG.org | 31 +++
 1 file changed, 31 insertions(+)

diff --git a/docs/CHANGELOG.org b/docs/CHANGELOG.org
index d24dd97bf7..1cb58bc10c 100644
--- a/docs/CHANGELOG.org
+++ b/docs/CHANGELOG.org
@@ -1,3 +1,34 @@
+* 2.2.0
+
+** BREAKING Changes
+
++ preview text files using proxy buffer (#184 #195 #270 #295)
++ replace magick with libvips for faster image preview (#218)
++ use 7-zip for archive preview
++ support font preview
+
+** Other changes
+
++ ~dirvish-reuse-session~ now accepts new value =quit= and =open=
++ allow setting ~dirvish-default-layout~ to =nil=
++ add ~dirvish-subtree-icon-scale-factor~ user option (#185)
++ fetch =vc-info= attribute asynchronously
++ add ~dirvish-inactive~ face
++ add ~dirvish-collapse-separator~ user option (#263)
++ support session|buffer locally attributes and mode-line-format (#286)
++ add ~dirvish-special-preview-mode~ and ~dirvish-misc-mode~
++ support ~dired-find-alternate-file~ (#186)
++ sort history entries with access time (#265)
++ add ~dirvish-mode-line-bar-image-width~ option (#252)
+
+** Screenshots
+
+[[https://github.com/user-attachments/assets/ef44bf63-ff49-4d62-8126-36a5bc21ff57][https://github.com/user-attachments/assets/ef44bf63-ff49-4d62-8126-36a5bc21ff57]]
+
+** Full Changelog
+
+https://github.com/alexluigit/dirvish/compare/2.1.0...2.2.0
+
 * 2.1.0
 
 ** What's changed



[nongnu] elpa/dirvish d0569dd886 2/3: chore: bump to 2.2.0 🎉

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit d0569dd886e544617eceac4a80dbea1f257a0f17
Author: Alex Lu 
Commit: Alex Lu 

chore: bump to 2.2.0 🎉
---
 dirvish-extras.el  |  2 +-
 dirvish-tramp.el   |  2 +-
 dirvish-widgets.el |  2 +-
 dirvish.el |  2 +-
 docs/CUSTOMIZING.org   | 10 +++---
 extensions/dirvish-collapse.el |  2 +-
 extensions/dirvish-emerge.el   |  2 +-
 extensions/dirvish-fd.el   |  2 +-
 extensions/dirvish-history.el  |  2 +-
 extensions/dirvish-icons.el|  2 +-
 extensions/dirvish-ls.el   |  2 +-
 extensions/dirvish-narrow.el   |  2 +-
 extensions/dirvish-peek.el |  2 +-
 extensions/dirvish-quick-access.el |  2 +-
 extensions/dirvish-rsync.el|  2 +-
 extensions/dirvish-side.el |  2 +-
 extensions/dirvish-subtree.el  |  2 +-
 extensions/dirvish-vc.el   |  2 +-
 extensions/dirvish-yank.el |  2 +-
 19 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/dirvish-extras.el b/dirvish-extras.el
index 34296197ab..4ea39329d8 100644
--- a/dirvish-extras.el
+++ b/dirvish-extras.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2021-2025 Alex Lu
 ;; Author : Alex Lu 
-;; Version: 2.1.0
+;; Version: 2.2.0
 ;; Keywords: files, convenience
 ;; Homepage: https://github.com/alexluigit/dirvish
 ;; SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/dirvish-tramp.el b/dirvish-tramp.el
index 69b5400737..b0878f3606 100644
--- a/dirvish-tramp.el
+++ b/dirvish-tramp.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2021-2025 Alex Lu
 ;; Author : Alex Lu 
-;; Version: 2.1.0
+;; Version: 2.2.0
 ;; Keywords: files, convenience
 ;; Homepage: https://github.com/alexluigit/dirvish
 ;; SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/dirvish-widgets.el b/dirvish-widgets.el
index 71fe5b1583..4c723e3585 100644
--- a/dirvish-widgets.el
+++ b/dirvish-widgets.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2021-2025 Alex Lu
 ;; Author : Alex Lu 
-;; Version: 2.1.0
+;; Version: 2.2.0
 ;; Keywords: files, convenience
 ;; Homepage: https://github.com/alexluigit/dirvish
 ;; SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/dirvish.el b/dirvish.el
index 3bb52d57b0..1aad4514fc 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -2,7 +2,7 @@
 ;; Copyright (C) 2021-2025 Alex Lu
 
 ;; Author : Alex Lu 
-;; Version: 2.1.0
+;; Version: 2.2.0
 ;; Keywords: files, convenience
 ;; Homepage: https://github.com/alexluigit/dirvish
 ;; SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/docs/CUSTOMIZING.org b/docs/CUSTOMIZING.org
index d9940d3a90..da4460bea7 100644
--- a/docs/CUSTOMIZING.org
+++ b/docs/CUSTOMIZING.org
@@ -166,6 +166,9 @@ The mode line only span the directory panes by default, to 
make them span all
 panes, just set ~dirvish-use-mode-line~ to ~global~.  Setting the same option 
to /nil/
 hides the mode line in dirvish buffers.
 
+To hide the leading bar image in mode-line and header-line, set
+~dirvish-mode-line-bar-image-width~ to 0.
+
 To configure the content in the mode line, put the segments you wanted into
 ~dirvish-mode-line-format~.  There is also ~dirvish-mode-line-height~ for you 
to set
 the height of the mode line.
@@ -177,9 +180,10 @@ The ~dired-switches-in-mode-line~ option is ignored in 
Dirvish.
 
 #+begin_src emacs-lisp
 ;; Placement
-;; (setq dirvish-use-header-line nil) ; hide header line (show the classic 
dired header)
-;; (setq dirvish-use-mode-line nil)   ; hide mode line
-(setq dirvish-use-header-line 'global); make header line span all panes
+;; (setq dirvish-use-header-line nil)  ; hide header line (show the 
classic dired header)
+;; (setq dirvish-use-mode-line nil); hide mode line
+(setq dirvish-use-header-line 'global) ; make header line span all panes
+(setq dirvish-mode-line-bar-image-width 0) ; hide the leading bar image
 
 ;; Height
 ;;; '(25 . 35) means
diff --git a/extensions/dirvish-collapse.el b/extensions/dirvish-collapse.el
index c0bc12482c..fce1b2f865 100644
--- a/extensions/dirvish-collapse.el
+++ b/extensions/dirvish-collapse.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2021-2025 Alex Lu
 ;; Author : Alex Lu 
-;; Version: 2.1.0
+;; Version: 2.2.0
 ;; Keywords: files, convenience
 ;; Homepage: https://github.com/alexluigit/dirvish
 ;; SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/extensions/dirvish-emerge.el b/extensions/dirvish-emerge.el
index b849273786..cf734bad73 100644
--- a/extensions/dirvish-emerge.el
+++ b/extensions/dirvish-emerge.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2021-2025 Alex Lu
 ;; Author : Alex Lu 
-;; Version: 2.1.0
+;; Version: 2.2.0
 ;; Keywords: files, convenience
 ;; Homepage: https://github.com/alexluigit/dirvish
 ;; SPDX-License-Identifier: GPL-3.0-or-later
diff --git a/extensions/dirvish-fd.el b/extension

[nongnu] elpa/clojure-ts-mode 592f708d5d 2/3: Extend the font-locking documentation

2025-03-07 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit 592f708d5d30d69b0a25d8a6625d1ae0d05c0cba
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Extend the font-locking documentation
---
 README.md | 8 
 1 file changed, 8 insertions(+)

diff --git a/README.md b/README.md
index c4fe2eee95..d583059fa8 100644
--- a/README.md
+++ b/README.md
@@ -163,6 +163,14 @@ To highlight entire rich `comment` expression with the 
comment font face, set
 By default this is `nil`, so that anything within a `comment` expression is
 highlighted like regular clojure code.
 
+> [!TIP]
+>
+> You can customize the exact level of font-locking via the variables
+> `treesit-font-lock-level` (the default value is 3) and
+> `treesit-font-lock-features-list`. Check [this
+> 
section](https://www.gnu.org/software/emacs/manual/html_node/emacs/Parser_002dbased-Font-Lock.html)
+> of the Emacs manual for more details.
+
 ### Highlight markdown syntax in docstrings
 
 By default markdown syntax is highlighted in the docstrings using



[nongnu] elpa/dirvish 16f9651054 1/3: refactor: use md5 for thumbnail file names

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit 16f9651054f1e3b1ae4a1f0010dbed60fb3bb0a4
Author: Alex Lu 
Commit: Alex Lu 

refactor: use md5 for thumbnail file names
---
 dirvish-widgets.el | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/dirvish-widgets.el b/dirvish-widgets.el
index c118c3f799..71fe5b1583 100644
--- a/dirvish-widgets.el
+++ b/dirvish-widgets.el
@@ -110,7 +110,9 @@ This is used to generate metadata for font files."
   :group 'dirvish :type 'boolean)
 
 (defcustom dirvish-font-preview-sample-text
-  "\nABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\nThe quick brown 
fox jumps over the lazy dog\n\n 枕上轻寒窗外雨 眼前春色梦中人 
\n1234567890\n!@$\%(){}[]\nالسلام عليكم"
+  "\nABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\nThe quick
+brown fox jumps over the lazy dog\n\n 枕上轻寒窗外雨 眼前春色梦中人
+\n1234567890\n!@$%^&*-_+=|<>(){}[]\nالسلام عليكم"
   "Sample text for font preview."
   :group 'dirvish :type 'string)
 
@@ -250,17 +252,16 @@ Use optional SUFFIX or NAME to intern the face symbol."
   (attr (and attrs (funcall attr-getter attrs
 (cons attr face)))
 
-(defun dirvish-media--cache-path (file &optional base ext no-mkdir)
-  "Get FILE's cache path.
-BASE is a string indicating the subdir of `dirvish-cache-dir' to
-use.  EXT is a suffix such as \".jpg\" that is attached to FILE.
-A new directory is created unless NO-MKDIR."
-  (let* ((file (if (memq system-type '(windows-nt ms-dos))
-   (concat "/" (replace-regexp-in-string ":" "" file)) file))
- (cache (concat dirvish-cache-dir base file)))
-(and (not no-mkdir) (not (file-exists-p cache))
- (make-directory (file-name-directory cache) t))
-(concat cache ext)))
+;; TODO: support Thumbnail Managing Standard (#269)
+(defun dirvish--img-thumb-name (file prefix &optional ext)
+  "Get FILE's image cache path.
+PREFIX is a string indicating the subdir of `dirvish-cache-dir' to use.
+EXT is a suffix such as \".jpg\" that is attached to FILE's md5 hash."
+  (let* ((md5 (secure-hash 'md5 (concat "file://" file)))
+ (dir (expand-file-name
+   (format "thumbnails/%s" prefix) dirvish-cache-dir)))
+(unless (file-exists-p dir) (make-directory dir t))
+(expand-file-name (concat md5 ext) dir)))
 
 (defun dirvish-media--cache-sentinel (proc _exitcode)
   "Sentinel for image cache process PROC."
@@ -489,10 +490,9 @@ GROUP-TITLES is a list of group titles."
 (clear-image-cache)
 (setq size (dirvish-media--img-size win))
 (dolist (file (dired-get-marked-files))
-  (mapc #'delete-file (file-expand-wildcards
-   (dirvish-media--cache-path
-file (format "images/%s" size) ".*" t)
-   t)
+  (mapc #'delete-file
+(file-expand-wildcards
+ (dirvish--img-thumb-name file size ".*") t )
 
 (cl-defgeneric dirvish-media-metadata (file)
   "Get media file FILE's metadata.")
@@ -614,7 +614,7 @@ Require: `vipsthumbnail'"
   (when (member ext dirvish-image-exts)
 (let* ((w (dirvish-media--img-size preview-window))
(h (dirvish-media--img-size preview-window 'height))
-   (cache (dirvish-media--cache-path file (format "images/%s" w) 
".jpg")))
+   (cache (dirvish--img-thumb-name file w ".jpg")))
   (cond
((file-exists-p cache)
 `(img . ,(create-image cache nil nil :max-width w :max-height h)))
@@ -631,7 +631,7 @@ Require: `magick' (from `imagemagick' suite)"
   (when (member ext dirvish-font-exts)
 (let* ((w (dirvish-media--img-size preview-window))
(h (dirvish-media--img-size preview-window 'height))
-   (cache (dirvish-media--cache-path file (format "images/%s" w) 
".jpg")))
+   (cache (dirvish--img-thumb-name file w ".jpg")))
   (if (file-exists-p cache)
   `(img . ,(create-image cache nil nil :max-width w :max-height h))
 `(cache . (,dirvish-magick-program
@@ -657,7 +657,7 @@ Require: `ffmpegthumbnailer' (executable)"
   (when (member ext dirvish-video-exts)
 (let* ((width (dirvish-media--img-size preview-window))
(height (dirvish-media--img-size preview-window 'height))
-   (cache (dirvish-media--cache-path file (format "images/%s" width) 
".jpg")))
+   (cache (dirvish--img-thumb-name file width ".jpg")))
   (if (file-exists-p cache)
   `(img . ,(create-image cache nil nil :max-width width :max-height 
height))
 `(cache . (,dirvish-ffmpegthumbnailer-program "-i" ,file "-o" ,cache 
"-s"
@@ -670,7 +670,7 @@ Require: `mtn' (executable)"
   (when (member ext dirvish-video-exts)
 (let* ((width (dirvish-media--img-size preview-window))
(height (dirvish-media--img-size preview-window 'height))
-   (cache (dirvish-media--cache-path file (format "images/%s" width) 
".jpg"))
+   (cache (dirvish--img-thumb-name file width ".jpg"))
  

[nongnu] elpa/dirvish 77b15ee18e 3/3: feat(core): add `dirvish-mode-line-bar-image-width` option (#252)

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit 77b15ee18ed2eb4d3454bb9c779b75a296c42911
Author: Alex Lu 
Commit: Alex Lu 

feat(core): add `dirvish-mode-line-bar-image-width` option (#252)

Closes #252
---
 dirvish.el | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/dirvish.el b/dirvish.el
index bb3ab4bb6b..3bb52d57b0 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -171,6 +171,11 @@ Set it to nil to use the default `mode-line-format'."
   "Like `dirvish-mode-line-format', but for header line ."
   :group 'dirvish :type 'plist)
 
+(defcustom dirvish-mode-line-bar-image-width 2
+  "Pixel width of the leading bar image in both mode-line and header-line.
+If the value is 0, the bar image is hidden."
+  :group 'dirvish :type 'integer)
+
 (defcustom dirvish-hide-details t
   "Whether to enable `dired-hide-details-mode' in Dirvish buffers.
 When sets to t, it is enabled for all Dirvish buffers.
@@ -1105,14 +1110,17 @@ If HEADER, the format is used for `header-line-format'."
   "Create a bar image with height of `dirvish-mode-line-height'.
 If FULLFRAME-P, use the `cdr' of the value as height, otherwise
 use `car'.  If HEADER, use `dirvish-header-line-height' instead."
-  (when (and (display-graphic-p) (image-type-available-p 'pbm))
+  (when (and (display-graphic-p) (image-type-available-p 'pbm)
+ (numberp dirvish-mode-line-bar-image-width))
 (let* ((hv (if header dirvish-header-line-height dirvish-mode-line-height))
-   (ht (cond ((numberp hv) hv) (fullframe-p (cdr hv)) (t (car hv)
+   (ht (cond ((numberp hv) hv) (fullframe-p (cdr hv)) (t (car hv
+   (wd dirvish-mode-line-bar-image-width))
   (propertize
" " 'display
(ignore-errors
  (create-image
-  (concat (format "P1\n%i %i\n" 2 ht) (make-string (* 2 ht) ?1) "\n")
+  (concat (format "P1\n%i %i\n" (if (eq wd 0) 1 wd) ht)
+  (make-string (* wd ht) (if (> wd 0) ?1 ?0)) "\n")
   'pbm t :foreground "None" :ascent 'center))
 
 (defun dirvish--setup-mode-line (dv)



[nongnu] elpa/dirvish c28654d29c 2/3: feat: support font preview

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit c28654d29c4091a8fae1f41572c95480250e07c4
Author: Alex Lu 
Commit: Alex Lu 

feat: support font preview
---
 dirvish-widgets.el   | 57 
 dirvish.el   |  7 +--
 docs/CUSTOMIZING.org | 11 +-
 3 files changed, 68 insertions(+), 7 deletions(-)

diff --git a/dirvish-widgets.el b/dirvish-widgets.el
index 839808502d..c118c3f799 100644
--- a/dirvish-widgets.el
+++ b/dirvish-widgets.el
@@ -30,6 +30,7 @@
 ;;- requires `mtn' on Windows (special thanks to @samb233!)
 ;; - `audio':   preview audio files with metadata, requires `mediainfo'
 ;; - `epub':preview epub documents, requires `epub-thumbnail'
+;; - `font':preview font files, requires `magick'
 ;; - `pdf': preview pdf documents via `pdf-tools'
 ;; - `archive': preview archive files, requires `tar' and `unzip'
 ;; - `dired':   preview directories using `dired' (asynchronously)
@@ -78,6 +79,11 @@ This is used to generate thumbnail for epub files."
 This is used to retrieve metadata for multiple types of media files."
   :group 'dirvish :type 'string)
 
+(defcustom dirvish-magick-program "magick"
+  "Absolute or reletive name of the `magick' program.
+This is used to generate thumbnail for font files."
+  :group 'dirvish :type 'string)
+
 (defcustom dirvish-pdfinfo-program "pdfinfo"
   "Absolute or reletive name of the `pdfinfo' program.
 This is used to retrieve pdf metadata."
@@ -93,11 +99,21 @@ This is used to generate thumbnails for pdf files."
 This is used to list files and their attributes for .zip archives."
   :group 'dirvish :type 'string)
 
+(defcustom dirvish-fc-query-program "fc-query"
+  "Absolute or reletive name of the `fc-query' program.
+This is used to generate metadata for font files."
+  :group 'dirvish :type 'string)
+
 (defcustom dirvish-show-media-properties
   (and (executable-find dirvish-mediainfo-program) t)
   "Show media properties automatically in preview window."
   :group 'dirvish :type 'boolean)
 
+(defcustom dirvish-font-preview-sample-text
+  "\nABCDEFGHIJKLMNOPQRSTUVWXYZ\nabcdefghijklmnopqrstuvwxyz\nThe quick brown 
fox jumps over the lazy dog\n\n 枕上轻寒窗外雨 眼前春色梦中人 
\n1234567890\n!@$\%(){}[]\nالسلام عليكم"
+  "Sample text for font preview."
+  :group 'dirvish :type 'string)
+
 (defconst dirvish-media--img-max-width 2400)
 (defconst dirvish-media--img-scale-h 0.75)
 (defconst dirvish-media--img-scale-w 0.92)
@@ -106,6 +122,10 @@ This is used to list files and their attributes for .zip 
archives."
 Image;(Width . \"\"%Width/String%\"\")(Height . 
\"\"%Height/String%\"\")(Bit-depth . \"\"%BitDepth/String%\"\")(Color-space . 
\"\"%ColorSpace%\"\")(Chroma-subsampling . 
\"\"%ChromaSubsampling%\"\")(Compression-mode . 
\"\"%Compression_Mode/String%\"\")
 Video;(Resolution . \"\"%Width% x %Height%\"\")(Video-codec . 
\"\"%CodecID%\"\")(Framerate . \"\"%FrameRate%\"\")(Video-bitrate . 
\"\"%BitRate/String%\"\")
 Audio;(Audio-codec . \"\"%CodecID%\"\")(Audio-bitrate . 
\"\"%BitRate/String%\"\")(Audio-sampling-rate . 
\"\"%SamplingRate/String%\"\")(Audio-channels . \"\"%ChannelLayout%\"\")")
+(defconst dirvish--fc-query-format
+  "(Family . \"%{family}\")(Family-lang . \"%{familylang}\")(Style . 
\"%{style}\")(Style-lang . \"%{stylelang}\")(Full-name . \"%{fullname}\")
+(Slant . \"%{slant}\")(Weight . \"%{weight}\")(Width . \"%{width}\")(Spacing . 
\"%{spacing}\")
+(Foundry . \"%{foundry}\")(Capability . \"%{capability}\")(Font-format . 
\"%{fontformat}\")(Decorative . \"%{decorative}\")")
 
 (defface dirvish-free-space
   '((t (:inherit font-lock-constant-face)))
@@ -506,6 +526,25 @@ GROUP-TITLES is a list of group titles."
   (format "%s%s" (dirvish-media--group-heading '("PDF info"))
   (dirvish-media--metadata-from-pdfinfo (cdr file
 
+(cl-defmethod dirvish-media-metadata ((file (head font)))
+  "Get metadata for font FILE."
+  (let ((finfo
+ (read (format "(%s)" (shell-command-to-string
+   (format "%s -f '%s' %s"
+   dirvish-fc-query-program
+   dirvish--fc-query-format
+   (shell-quote-argument (cdr file
+(format "%s%s\n%s%s\n%s%s"
+(dirvish-media--group-heading '("Family" "Style"))
+(dirvish-media--format-metadata
+ finfo '(Family Family-lang Style Style-lang Full-name))
+(dirvish-media--group-heading '("Characteristics"))
+(dirvish-media--format-metadata
+ finfo '(Slant Weight Width Spacing))
+(dirvish-media--group-heading '("Others"))
+(dirvish-media--format-metadata
+ finfo '(Foundry Capability Font-format Decorative)
+
 (cl-defmethod dirvish-preview-dispatch ((recipe (head img)) dv)
   "Insert RECIPE as an image at preview window of DV."
   (with-current-buffer (dirvish--special-buffer 'preview dv 

[elpa] externals/cus-abbrev ce1479cf73: ; Ignore some more files

2025-03-07 Thread ELPA Syncer
branch: externals/cus-abbrev
commit ce1479cf73412646b340d2a0078b3fcb36e2050d
Author: Mauro Aranda 
Commit: Mauro Aranda 

; Ignore some more files
---
 .elpaignore | 4 +++-
 .gitignore  | 3 +++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.elpaignore b/.elpaignore
index d90b9b96c0..2881a67db3 100644
--- a/.elpaignore
+++ b/.elpaignore
@@ -1,2 +1,4 @@
-.elpaignore
+.gitignore
 Makefile
+/cus-abbrev-pkg.el
+/cus-abbrev-autoloads.el
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 1c689bc6e5..63f9cf2b8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,6 @@
 # Compiled ELisp
 *.elc
 
+# Package stuff
+/cus-abbrev-pkg.el
+/cus-abbrev-autoloads.el
\ No newline at end of file



[nongnu] elpa/dirvish updated (b17faded2d -> 77b15ee18e)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch elpa/dirvish.

  from  b17faded2d refactor(peek): handle 'library not found' exception 
explicitly
   new  04a501732f feat(history): sort history entries with access time 
(#265)
   new  c28654d29c feat: support font preview
   new  77b15ee18e feat(core): add `dirvish-mode-line-bar-image-width` 
option (#252)


Summary of changes:
 dirvish-widgets.el | 57 
 dirvish.el | 67 +-
 docs/CUSTOMIZING.org   | 33 ++-
 docs/EXTENSIONS.org| 53 +-
 extensions/dirvish-emerge.el   | 16 -
 extensions/dirvish-fd.el   | 12 ++-
 extensions/dirvish-history.el  | 29 +++--
 extensions/dirvish-quick-access.el |  1 -
 8 files changed, 199 insertions(+), 69 deletions(-)



[nongnu] elpa/package-lint 6170c1e5b7: Bump version to 0.25

2025-03-07 Thread ELPA Syncer
branch: elpa/package-lint
commit 6170c1e5b79f9b9f606ab17ab4d9ffb9bce3ebde
Author: Steve Purcell 
Commit: Steve Purcell 

Bump version to 0.25
---
 package-lint.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package-lint.el b/package-lint.el
index fae42b9947..980a9e7e0b 100644
--- a/package-lint.el
+++ b/package-lint.el
@@ -6,7 +6,7 @@
 ;; Fanael Linithien 
 ;; URL: https://github.com/purcell/package-lint
 ;; Keywords: lisp
-;; Version: 0.24
+;; Version: 0.25
 ;; Package-Requires: ((emacs "24.4") (let-alist "1.0.6"))
 
 ;; This program is free software; you can redistribute it and/or modify



[nongnu] elpa/dirvish 04a501732f 1/3: feat(history): sort history entries with access time (#265)

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit 04a501732fdd32e1fc9424865006b70e330af539
Author: Alex Lu 
Commit: Alex Lu 

feat(history): sort history entries with access time (#265)
---
 dirvish.el | 46 +++--
 docs/CUSTOMIZING.org   | 32 ---
 docs/EXTENSIONS.org| 53 --
 extensions/dirvish-emerge.el   | 16 ++--
 extensions/dirvish-fd.el   | 12 ++---
 extensions/dirvish-history.el  | 29 ++---
 extensions/dirvish-quick-access.el |  1 -
 7 files changed, 125 insertions(+), 64 deletions(-)

diff --git a/dirvish.el b/dirvish.el
index d123396a8a..e0c714dccb 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -25,8 +25,6 @@
 (require 'cl-lib)
 (eval-when-compile (require 'project))
 (declare-function ansi-color-apply-on-region "ansi-color")
-(declare-function dirvish-fd-find "dirvish-fd")
-(declare-function dirvish-tramp-noselect "dirvish-tramp")
 
  User Options
 
@@ -264,7 +262,7 @@ input for `dirvish-redisplay-debounce' seconds."
   "Functions called when directory data for the root buffer is ready."
   :group 'dirvish :type 'hook)
 
-(defcustom dirvish-find-entry-hook '(dirvish-insert-entry-h)
+(defcustom dirvish-find-entry-hook nil
   "Functions called before a Dired buffer is displayed."
   :group 'dirvish :type 'hook)
 
@@ -466,15 +464,12 @@ ALIST is window arguments passed to 
`window--display-buffer'."
   "Get parent directory of PATH."
   (file-name-directory (directory-file-name (expand-file-name path
 
-(defun dirvish--append-metadata (metadata completions)
-  "Append METADATA for minibuffer COMPLETIONS."
-  (let ((entry (if (functionp metadata)
-   `(metadata (annotation-function . ,metadata))
- `(metadata (category . ,metadata)
-(lambda (string pred action)
-  (if (eq action 'metadata)
-  entry
-(complete-with-action action completions string pred)
+(defun dirvish--completion-table-with-metadata (table metadata)
+  "Return new completion TABLE with METADATA, see `completion-metadata'."
+  (lambda (string pred action)
+(if (eq action 'metadata)
+`(metadata . ,metadata)
+  (complete-with-action action table string pred
 
 (defun dirvish--change-selected (&rest _)
   "Record `dirvish--selected-window'."
@@ -647,10 +642,15 @@ FIND-FN can be one of `find-file', `find-alternate-file',
 `find-file-other-window' or `find-file-other-frame'.  ENTRY can be a
 filename or a string with format of `dirvish-fd-bufname'."
   (let ((switch-to-buffer-preserve-window-point (null 
dired-auto-revert-buffer))
-(find-file-run-dired t) dv process-connection-type directory?)
+(find-file-run-dired t) (dv (dirvish-curr))
+process-connection-type directory? buf)
+(when (setq buf (and dv (alist-get entry (dv-roots dv) nil nil #'equal)))
+  (cl-return-from dirvish--find-entry
+(dirvish-save-dedication (switch-to-buffer buf
 (when (string-prefix-p "🔍" entry)
-  (dirvish-save-dedication (switch-to-buffer (dirvish-fd-find entry)))
-  (cl-return-from dirvish--find-entry))
+  (setq find-fn (prog1 'dirvish-fd (require 'dirvish-fd nil t)))
+  (pcase-let ((`(,re ,dir ,_) (split-string (substring entry 1) "📁")))
+(cl-return-from dirvish--find-entry (funcall find-fn dir re
 (unless (setq directory? (file-directory-p entry))
   (cl-loop with e = (downcase (or (file-name-extension entry) ""))
for (es . (c . a)) in dirvish-open-with-programs
@@ -659,8 +659,8 @@ filename or a string with format of `dirvish-fd-bufname'."
  (let ((a (cl-substitute entry "%f" a :test #'string=)))
(when (eq find-fn 'find-alternate-file) 
(kill-current-buffer))
(apply #'start-process "" nil "nohup" (append (list c) 
a))
-(unless (setq dv (dirvish-curr)) ; for `find-dired', just forward it
-  (cl-return-from dirvish--find-entry (funcall find-fn entry)))
+;; forward requests from `find-dired'
+(unless dv (cl-return-from dirvish--find-entry (funcall find-fn entry)))
 (when (and (dv-curr-layout dv) (eq find-fn 'find-file-other-window))
   (user-error "Can not find a suitable other-window here"))
 (if directory? (dirvish-save-dedication (funcall find-fn entry))
@@ -702,8 +702,8 @@ filename or a string with format of `dirvish-fd-bufname'."
 (when reuse? (setf (dv-reuse dv) t))
 (when new-buffer-p
   (if (not remote) (setq buffer (apply fn (list dir-or-list flags)))
-(require 'dirvish-tramp)
-(setq buffer (dirvish-tramp-noselect fn dir-or-list flags remote)))
+(setq fn (prog1 'dirvish-tramp-noselect (require 'dirvish-tramp))
+  buffer (apply fn (list dir-or-list flags remote
   (with-current-buffer buffer (dirvish--setup-dired))
   (push (cons key buffer) (dv-roots dv)))
 (with-c

[nongnu] elpa/clojure-ts-mode 9bca1c360a 3/4: Expand the README a bit

2025-03-07 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit 9bca1c360a113031dbc57fb9038e5773bce31eb8
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Expand the README a bit
---
 README.md | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 1302da3564..72fe315774 100644
--- a/README.md
+++ b/README.md
@@ -18,8 +18,15 @@ highlighting), indentation, and navigation support for the
 for a very long time, but it suffers from a few [long-standing
 problems](https://github.com/clojure-emacs/clojure-mode#caveats), related to
 Emacs limitations baked into its design. The introduction of built-in support
-for Tree-sitter in Emacs 29 provides a natural opportunity to address many of
-them. Enter `clojure-ts-mode`.
+for Tree-sitter in Emacs 29 presents a natural opportunity to address many of
+them. Enter `clojure-ts-mode`, which makes use of TreeSitter to provide:
+
+- fast, accurate and more granular font-locking
+- fast indentation
+- common Emacs functionality like structured navigation, `imenu` (an outline 
of a source buffer), current form inference (used internally by various Emacs 
modes and utilities), etc
+
+Working with TreeSitter is significantly easier than the legacy Emacs APIs for 
font-locking and
+indentation, which makes it easier to contribute to `clojure-ts-mode`, and to 
improve it in general.
 
 Keep in mind that the transition to `clojure-ts-mode` won't happen overnight 
for several reasons:
 
@@ -37,6 +44,11 @@ You can read more about the vision for `clojure-ts-mode` 
[here](https://metaredu
 
 **This library is still under active development. Breaking changes should be 
expected.**
 
+The currently provided functionality should cover the needs of most Clojure 
programmers, but you
+can expect to encounter some bugs and missing functionality here and there.
+
+Those will be addressed over the time, as more and more people use 
`clojure-ts-mode`.
+
 ## Installation
 
 ### Emacs 29



[nongnu] elpa/clojure-ts-mode 1fa9ced658 4/4: Improve the installation instructions

2025-03-07 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit 1fa9ced658acbd8b715787983b7aaaf44d165ee0
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Improve the installation instructions
---
 README.md | 27 +++
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index 72fe315774..56b2194e75 100644
--- a/README.md
+++ b/README.md
@@ -51,23 +51,29 @@ Those will be addressed over the time, as more and more 
people use `clojure-ts-m
 
 ## Installation
 
-### Emacs 29
-
-This package requires Emacs 29 built with tree-sitter support from the 
[emacs-29 branch](https://git.savannah.gnu.org/cgit/emacs.git/log/?h=emacs-29).
-
-If you decide to build Emacs from source there's some useful information on 
this in the Emacs repository:
-
-- [Emacs tree-sitter 
starter-guide](https://git.savannah.gnu.org/cgit/emacs.git/tree/admin/notes/tree-sitter/starter-guide?h=emacs-29)
-- [Emacs install 
instructions](https://git.savannah.gnu.org/cgit/emacs.git/tree/INSTALL.REPO).
+### Requirements
 
+For `clojure-ts-mode` to work, you need Emacs 29+ built with TreeSitter 
support.
 To check if your Emacs supports tree sitter run the following (e.g. by using 
`M-:`):
 
 ``` emacs-lisp
 (treesit-available-p)
 ```
 
+Additionally, you'll need to have Git and some C compiler (`cc`) installed and 
available
+in your `$PATH` (or Emacs's `exec-path`), for `clojure-ts-mode` to be able to 
install the required
+TreeSitter grammars automatically.
+
 ### Install clojure-ts-mode
 
+> [!NOTE]
+>
+> That's the recommended way to install `clojure-ts-mode`.
+
+If you have `git` and a C compiler (`cc`) available on your system's `PATH`,
+`clojure-ts-mode` will install the
+grammars
+
 clojure-ts-mode is available on [MElPA](https://melpa.org/#/clojure-ts-mode) 
and
 [NonGNU ELPA](https://elpa.nongnu.org/nongnu/clojure-ts-mode.html).
 It can be installed with
@@ -102,6 +108,11 @@ Once installed, evaluate clojure-ts-mode.el and you should 
be ready to go.
 
 ### Install tree-sitter grammars
 
+> [!NOTE]
+>
+> `clojure-ts-mode` install the required grammars automatically, so for most
+> people no manual actions will be required.
+
 `clojure-ts-mode` makes use of two TreeSitter grammars to work properly:
 
 - The Clojure grammar, mentioned earlier



[nongnu] elpa/clojure-ts-mode updated (9662b6caa8 -> 1fa9ced658)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch elpa/clojure-ts-mode.

  from  9662b6caa8 Release 0.2.3
   new  187e51253d [Fix #29] Remove the manual grammar installation 
instructions
   new  72b0a606f5 Move the configuration instructions after the 
installation ones
   new  9bca1c360a Expand the README a bit
   new  1fa9ced658 Improve the installation instructions


Summary of changes:
 README.md | 189 +++---
 1 file changed, 83 insertions(+), 106 deletions(-)



[nongnu] elpa/gptel 1a3b393a4b 10/14: gptel-anthropic: Parse tool results from buffer

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 1a3b393a4b676c89e7d675c7d1b395c73d238755
Author: Karthik Chikmagalur 
Commit: Karthik Chikmagalur 

gptel-anthropic: Parse tool results from buffer

* gptel-anthropic.el (gptel--anthropic-format-tool-id,
gptel--anthropic-unformat-tool-id, gptel-curl--parse-stream,
gptel--parse-response, gptel--parse-tool-results,
gptel--parse-buffer):
- Unformat and format tool ids for storage, store only the UUID
  part of the ID, such as abcd in toolu_abcd.
- Match the gptel text property values for (tool . id)
- Create tool call and result messages from each recorded call

Parse tool messages in the buffer.  This commit covers the
Anthropic backend.  The strategy is to pcase on the gptel
property.  Since tool insertions have one distinct gptel text
property, the call and response message are recovered at the same
time.

Introduce support for the `ignore' property in the Anthropic
prompt creator.  Users can make use of it to have non-conversation
content intermingled with chat.
---
 gptel-anthropic.el | 45 +
 1 file changed, 41 insertions(+), 4 deletions(-)

diff --git a/gptel-anthropic.el b/gptel-anthropic.el
index c97cbf5bc2..7965d4ae81 100644
--- a/gptel-anthropic.el
+++ b/gptel-anthropic.el
@@ -126,7 +126,9 @@ information if the stream contains it.  Not my best work, I 
know."
 ;; Then shape the tool-use block by adding args so we can call 
the functions
 (mapc (lambda (tool-call)
 (plist-put tool-call :args (plist-get tool-call 
:input))
-(plist-put tool-call :input nil))
+(plist-put tool-call :input nil)
+(plist-put tool-call :id 
(gptel--anthropic-unformat-tool-id
+  (plist-get tool-call :id
   tool-use)))
 (when-let* ((response (gptel--json-read)))
   (plist-put info :output-tokens
@@ -170,6 +172,8 @@ Mutate state INFO with response metadata."
   for call = (copy-sequence call-raw) do
   (plist-put call :args (plist-get call :input))
   (plist-put call :input nil)
+  (plist-put call :id (gptel--anthropic-unformat-tool-id
+   (plist-get call :id)))
   collect call into calls
   finally do (plist-put info :tool-use calls)))
finally return
@@ -250,7 +254,8 @@ TOOL-USE is a list of plists containing tool names, 
arguments and call results."
(let* ((result (plist-get tool-call :result))
   (formatted
(list :type "tool_result"
- :tool_use_id (plist-get tool-call :id)
+ :tool_use_id (gptel--anthropic-format-tool-id
+   (plist-get tool-call :id))
  :content (if (stringp result) result
 (prin1-to-string result)
  (prog1 formatted
@@ -261,6 +266,18 @@ TOOL-USE is a list of plists containing tool names, 
arguments and call results."
 ;; NOTE: No `gptel--inject-prompt' method required for gptel-anthropic, since
 ;; this is handled by its defgeneric implementation
 
+(defun gptel--anthropic-format-tool-id (tool-id)
+  (if (string-prefix-p "toolu_" tool-id)
+  tool-id
+(format "toolu_%s" tool-id)))
+
+(defun gptel--anthropic-unformat-tool-id (tool-id)
+  (or (and (string-match "toolu_\\(.+\\)" tool-id)
+   (match-string 1 tool-id))
+  (progn
+(message "Unexpected tool_call_id format: %s" tool-id)
+tool-id)))
+
 (cl-defmethod gptel--parse-list ((_backend gptel-anthropic) prompt-list)
   (cl-loop for text in prompt-list
for role = t then (not role)
@@ -268,7 +285,7 @@ TOOL-USE is a list of plists containing tool names, 
arguments and call results."
(list :role (if role "user" "assistant")
  :content `[(:type "text" :text ,text)])))
 
-(cl-defmethod gptel--parse-buffer ((_backend gptel-anthropic) &optional 
max-entries)
+(cl-defmethod gptel--parse-buffer ((backend gptel-anthropic) &optional 
max-entries)
   (let ((prompts) (prev-pt (point))
 (include-media (and gptel-track-media (or (gptel--model-capable-p 
'media)
   (gptel--model-capable-p 
'url)
@@ -283,7 +300,6 @@ TOOL-USE is a list of plists containing tool names, 
arguments and call results."
   ;; We check for blank prompts by skipping whitespace and comparing
   ;; point against the previous.
   (unless (save-excursion (skip-syntax-forward " ") (>= (point) 
prev-pt))
-;; XXX update for tools
 (pcase (get-char-property (point) 'gptel)
   ('response
(when-let* ((content
@@ -291,6 +307,27 @@ TOOL-USE is a list of plists containing tool names, 
arguments and call results."

[nongnu] elpa/gptel e96ca2aa46 07/14: gptel-openai: Parse tool results from buffer

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit e96ca2aa46978e8165c110f0264d5113ac64154b
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel-openai: Parse tool results from buffer

* gptel-openai.el: (gptel-curl--parse-stream,
gptel--parse-response, gptel--parse-tool-results,
gptel--openai-unformat-tool-id, gptel--openai-format-tool-id,
gptel--parse-buffer):
- Unformat and format tool ids for storage, store only the UUID
  part of the ID, such as abcd in call_abcd.
- Match the gptel text property values for (tool . id)
- Create tool call and result messages from each recorded call

Parse tool messages in the buffer.  This commit covers the OpenAI
backend.  The strategy is to pcase on the gptel property.  Since
tool insertions have one distinct gptel text property, the call
and response message are recovered at the same time.

Introduce support for the `ignore' property.  Users can make use
of it to have non-conversation content intermingled with chat.

* gptel-anthropic.el (gptel--parse-buffer): Add todo about tool
support.
---
 gptel-anthropic.el |  1 +
 gptel-openai.el| 81 +-
 2 files changed, 57 insertions(+), 25 deletions(-)

diff --git a/gptel-anthropic.el b/gptel-anthropic.el
index 53dead1a55..60a07cbe81 100644
--- a/gptel-anthropic.el
+++ b/gptel-anthropic.el
@@ -283,6 +283,7 @@ TOOL-USE is a list of plists containing tool names, 
arguments and call results."
   ;; We check for blank prompts by skipping whitespace and comparing
   ;; point against the previous.
   (unless (save-excursion (skip-syntax-forward " ") (>= (point) 
prev-pt))
+;; XXX update for tools
 (pcase (get-char-property (point) 'gptel)
   ('response
(push (list :role "assistant"
diff --git a/gptel-openai.el b/gptel-openai.el
index c584359605..bb9311c894 100644
--- a/gptel-openai.el
+++ b/gptel-openai.el
@@ -201,7 +201,7 @@ information if the stream contains it."
   (cl-loop
for tool-call in tool-use ; Construct the call specs for 
running the function calls
for spec = (plist-get tool-call :function)
-   collect (list :id (plist-get tool-call :id)
+   collect (list :id (gptel--openai-unformat-tool-id 
(plist-get tool-call :id))
  :name (plist-get spec :name)
  :args (ignore-errors (gptel--json-read-string
(plist-get spec 
:arguments
@@ -257,7 +257,7 @@ Mutate state INFO with response metadata."
 (gptel--json-read-string
  (plist-get call-spec :arguments
(plist-put call-spec :arguments nil)
-   (plist-put call-spec :id (plist-get tool-call :id))
+   (plist-put call-spec :id (gptel--openai-unformat-tool-id (plist-get 
tool-call :id)))
collect call-spec into tool-use
finally (plist-put info :tool-use tool-use)))
 
@@ -305,10 +305,21 @@ Mutate state INFO with response metadata."
(lambda (tool-call)
  (list
   :role "tool"
-  :content (plist-get tool-call :result)
-  :tool_call_id (plist-get tool-call :id)))
+  :tool_call_id (gptel--openai-format-tool-id
+ (plist-get tool-call :id))
+  :content (plist-get tool-call :result)))
tool-use))
 
+(defun gptel--openai-format-tool-id (tool-id)
+  (format "call_%s" tool-id))
+
+(defun gptel--openai-unformat-tool-id (tool-id)
+  (or (and (string-match "call_\\(.+\\)" tool-id)
+   (match-string 1 tool-id))
+  (progn
+(message "Unexpected tool_call_id format: %s" tool-id)
+tool-id)))
+
 ;; NOTE: No `gptel--inject-prompt' method required for gptel-openai, since this
 ;; is handled by its defgeneric implementation
 
@@ -318,7 +329,7 @@ Mutate state INFO with response metadata."
if text collect
(list :role (if role "user" "assistant") :content text)))
 
-(cl-defmethod gptel--parse-buffer ((_backend gptel-openai) &optional 
max-entries)
+(cl-defmethod gptel--parse-buffer ((backend gptel-openai) &optional 
max-entries)
   (let ((prompts) (prev-pt (point))
 (include-media (and gptel-track-media
 (or (gptel--model-capable-p 'media)
@@ -330,28 +341,48 @@ Mutate state INFO with response metadata."
 (point) 'gptel nil (point-min
   (pcase (get-char-property (point) 'gptel)
 ('response
- (push (list :role "assistant"
- :content (buffer-substring-no-properties (point) 
prev-pt))
-   prompts))
+ (when-let* ((content (gptel--trim-prefixes
+   (bu

[nongnu] elpa/gptel 08014b5667 02/14: gptel: Separate tool confirmation and result insertion

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 08014b56671b58f8ed0d6b7a0eedb830406750c2
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel: Separate tool confirmation and result insertion

* gptel.el (gptel--insert-response, gptel--display-tool-calls,
gptel--display-tool-results): Separate `gptel--display-tool-calls'
into two functions, one for handling tool confirmations and one
for results.  This is in preparation for the breaking API change
to `gptel-request'.

NOTE: Tool result insertion into buffers is broken as of this
commit.

Adjust the predicates for handling tools in
`gptel--insert-response'.

* gptel-curl.el (gptel-curl--stream-insert-response): Ditto.
---
 gptel-curl.el  |   4 +-
 gptel-transient.el |   2 +
 gptel.el   | 222 +++--
 3 files changed, 120 insertions(+), 108 deletions(-)

diff --git a/gptel-curl.el b/gptel-curl.el
index eae18229a6..7972e6e68e 100644
--- a/gptel-curl.el
+++ b/gptel-curl.el
@@ -258,7 +258,9 @@ See `gptel--url-get-response' for details."
(insert response)
(run-hooks 'gptel-post-stream-hook)
 ((pred consp)
- (gptel--display-tool-calls response info
+ (gptel--display-tool-calls response info))
+(_  ; placeholder for later condition
+ (gptel--display-tool-results response info
 
 (defun gptel-curl--stream-filter (process output)
   (let* ((fsm (alist-get process gptel--request-alist))
diff --git a/gptel-transient.el b/gptel-transient.el
index 8c455d807e..db89c86abe 100644
--- a/gptel-transient.el
+++ b/gptel-transient.el
@@ -1230,6 +1230,7 @@ This sets the variable `gptel-include-tool-results', 
which see."
 (lambda (resp info)
   (cond
((stringp resp) (message "%s response: %s" backend-name resp))
+   ;; XXX Check types
((consp resp) (gptel--display-tool-calls resp info 'minibuffer))
((and (null resp) (plist-get info :error))
 (message "%s response error: %s"
@@ -1242,6 +1243,7 @@ This sets the variable `gptel-include-tool-results', 
which see."
((stringp resp) (kill-new resp)
 (message "%s response: \"%s\" copied to kill-ring." 
backend-name
  (truncate-string-to-width resp 30)))
+   ;; XXX Check types
((consp resp) (gptel--display-tool-calls resp info 'minibuffer))
((and (null resp) (plist-get info :error))
 (message "%s response error: %s" backend-name
diff --git a/gptel.el b/gptel.el
index ed2828e2e7..f76a8cd810 100644
--- a/gptel.el
+++ b/gptel.el
@@ -2359,8 +2359,10 @@ See `gptel--url-get-response' for details."
  (plist-put info :tracking-marker (setq tracking-marker 
(point-marker)))
  ;; for uniformity with streaming responses
  (set-marker-insertion-type tracking-marker t)
-  ((pred consp)  ;tool call or tool result?
-   (gptel--display-tool-calls response info)
+  ((pred consp)
+   (gptel--display-tool-calls response info))
+  (_
+   (gptel--display-tool-results response info)
 
 (defun gptel--create-prompt (&optional prompt-end)
   "Return a full conversation prompt from the contents of this buffer.
@@ -2722,111 +2724,117 @@ RESPONSE is
 for tool call results.  INFO contains the state of the request."
   (let* ((start-marker (plist-get info :position))
  (tracking-marker (plist-get info :tracking-marker)))
-(if (cl-typep (caar response) 'gptel-tool) ;tool calls
-;; pending tool calls look like ((tool callback args) ...)
-(with-current-buffer (plist-get info :buffer)
-  (if use-minibuffer;prompt for confirmation from the 
minibuffer
-  (let* ((minibuffer-allow-text-properties t)
- (backend-name (gptel-backend-name (plist-get info 
:backend)))
- (prompt (format "%s wants to run " backend-name)))
-(map-y-or-n-p
- (lambda (tool-call-spec)
-   (concat prompt (propertize (gptel-tool-name (car 
tool-call-spec))
-  'face 'font-lock-keyword-face)
-   ": "))
- (lambda (tcs) (gptel--accept-tool-calls (list tcs) nil))
- response '("tool call" "tool calls" "run")
- `((?i ,(lambda (_) (save-window-excursion
- (with-selected-window
- (gptel--inspect-fsm gptel--fsm-last)
-   (goto-char (point-min))
-   (when (search-forward-regexp "^:tool-use" 
nil t)
-(forward-line 0) (hl-line-highlight))
-  

[nongnu] elpa/gptel updated (2bcf06d7d4 -> 2a6f714d30)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch elpa/gptel.

  from  2bcf06d7d4 gptel: rename gptel--get-bounds
   new  98d4360592 gptel: Switch to pcase in insert callbacks
   new  08014b5667 gptel: Separate tool confirmation and result insertion
   new  cb420b6928 gptel: Breaking change to gptel-request API
   new  aded7787d6 gptel: Make tool call records in buffer recoverable
   new  d222ed823a gptel-org: Always create prompt in a temp buffer
   new  56623b9889 gptel-org: Tool result handling for Org
   new  e96ca2aa46 gptel-openai: Parse tool results from buffer
   new  00f39ea179 gptel: Ignore blank/whitespace messages
   new  13757388ca gptel-gemini: Parse tool results from buffer
   new  1a3b393a4b gptel-anthropic: Parse tool results from buffer
   new  1d0b3d112b gptel-ollama: Parse tool results from buffer
   new  e53076f43e test: Update submodule
   new  8e0de5dd25 gptel: overhaul bounds, support more text property types
   new  2a6f714d30 README: Fix typo (#676)


Summary of changes:
 README.org |   2 +-
 gptel-anthropic.el |  82 +++---
 gptel-curl.el  |  69 
 gptel-gemini.el|  55 ---
 gptel-ollama.el|  52 +++---
 gptel-openai.el|  84 ++
 gptel-org.el   |  82 --
 gptel-transient.el |  34 ++--
 gptel.el   | 462 +
 test   |   2 +-
 10 files changed, 597 insertions(+), 327 deletions(-)



[nongnu] elpa/gptel 00f39ea179 08/14: gptel: Ignore blank/whitespace messages

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 00f39ea179630cd9a15430d0edc2d584a139ed31
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel: Ignore blank/whitespace messages

- Support across APIs for blank messages in the messages array
varies.  Uniformly enforce a policy of not including
blank/whitespace messages in the messages array.

- When response tracking is off, All models trim the whole buffer
using simple string-trim.

- Zero-length multi-part vectors are also skipped.

- Whitespace inside a prefix is respected.  That is, a prefix
containing whitespace at either end will not be recognized as one
if this whitespace is missing in the buffer.

* gptel.el (gptel--trim-prefixes): `gptel--trim-prefixes' now
returns nil whenever a string is empty after trimming (this will
occur for blank strings or prompt-only strings).

* gptel-anthropic.el: (gptel--parse-buffer,
gptel--anthropic-parse-multipart): Omit empty strings when
constructing the messages array.
* gptel-gemini.el (gptel--parse-buffer,
gptel--gemini-parse-multipart): Ditto.
* gptel-ollama.el (gptel--parse-buffer,
gptel--ollama-parse-multipart): Ditto.
* gptel-openai.el (gptel--parse-buffer,
gptel--openai-parse-multipart): Ditto.
---
 gptel-anthropic.el | 38 +++---
 gptel-gemini.el| 33 +++--
 gptel-ollama.el| 31 ++-
 gptel-openai.el| 25 -
 gptel.el   | 19 +--
 5 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/gptel-anthropic.el b/gptel-anthropic.el
index 60a07cbe81..c97cbf5bc2 100644
--- a/gptel-anthropic.el
+++ b/gptel-anthropic.el
@@ -286,27 +286,27 @@ TOOL-USE is a list of plists containing tool names, 
arguments and call results."
 ;; XXX update for tools
 (pcase (get-char-property (point) 'gptel)
   ('response
-   (push (list :role "assistant"
-   :content (buffer-substring-no-properties (point) 
prev-pt))
- prompts))
+   (when-let* ((content
+(gptel--trim-prefixes
+ (buffer-substring-no-properties (point) 
prev-pt
+ (when (not (string-blank-p content))
+   (push (list :role "assistant" :content content) prompts
   ('nil ; user role: possibly with media
-   (if include-media   
-   (push (list :role "user"
-   :content
-   (gptel--anthropic-parse-multipart
-(gptel--parse-media-links major-mode (point) 
prev-pt)))
- prompts)
- (push (list :role "user"
- :content
- (gptel--trim-prefixes
-  (buffer-substring-no-properties (point) 
prev-pt)))
-   prompts)
+   (if include-media
+   (when-let* ((content (gptel--anthropic-parse-multipart
+ (gptel--parse-media-links major-mode 
(point) prev-pt
+ (when (> (length content) 0)
+   (push (list :role "user" :content content) prompts)))
+ (when-let* ((content (gptel--trim-prefixes
+   (buffer-substring-no-properties (point) 
prev-pt
+   (push (list :role "user" :content content) prompts))
   (setq prev-pt (point))
   (and max-entries (cl-decf max-entries)))
-  (push (list :role "user"
-  :content
-  (string-trim (buffer-substring-no-properties (point-min) 
(point-max
-prompts))
+  (when-let* ((content (string-trim (buffer-substring-no-properties
+ (point-min) (point-max)
+;; XXX fails if content is empty.  The correct error behavior is left 
to
+;; a future discussion.
+(push (list :role "user" :content content) prompts)))
 prompts))
 
 (defun gptel--anthropic-parse-multipart (parts)
@@ -329,7 +329,7 @@ format."
for media = (plist-get part :media)
if text do
(and (or (= n 1) (= n last)) (setq text (gptel--trim-prefixes text))) and
-   unless (string-empty-p text)
+   if text
collect `(:type "text" :text ,text) into parts-array end
else if media
do
diff --git a/gptel-gemini.el b/gptel-gemini.el
index 4018b3f021..e6311b6662 100644
--- a/gptel-gemini.el
+++ b/gptel-gemini.el
@@ -236,27 +236,24 @@ See generic implementation for full documentation."
 (not (= (point) prev-pt)))
   (pcase (get-char-property (point) 'gptel)
 ('response
-

[nongnu] elpa/gptel 13757388ca 09/14: gptel-gemini: Parse tool results from buffer

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 13757388ca1f41bf5556201f96ab18b97ad63872
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel-gemini: Parse tool results from buffer

* gptel-gemini.el (gptel--parse-buffer):
Create tool call and result messages from each recorded call.

Parse tool messages in the buffer.  This commit covers the Gemini
backend.  The strategy is to pcase on the gptel property.  Since
tool insertions have one distinct gptel text property, the call
and response message are recovered at the same time.

Introduce support for the `ignore' property in the Gemini prompt
creator.  Users can make use of it to have non-conversation
content intermingled with chat.

NOTE: Gemini does not use tool-call ids, so no ids are stored in
the gptel text property.  This can cause problems if the user
switches from Gemini to a backend that does use ids.
---
 gptel-gemini.el | 22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gptel-gemini.el b/gptel-gemini.el
index e6311b6662..4f474bb2dd 100644
--- a/gptel-gemini.el
+++ b/gptel-gemini.el
@@ -225,7 +225,7 @@ See generic implementation for full documentation."
else collect (list :role "model" :parts `(:text ,text)) into prompts
finally return prompts))
 
-(cl-defmethod gptel--parse-buffer ((_backend gptel-gemini) &optional 
max-entries)
+(cl-defmethod gptel--parse-buffer ((backend gptel-gemini) &optional 
max-entries)
   (let ((prompts) (prev-pt (point))
 (include-media (and gptel-track-media (or (gptel--model-capable-p 
'media)
   (gptel--model-capable-p 
'url)
@@ -239,6 +239,26 @@ See generic implementation for full documentation."
  (when-let* ((content (gptel--trim-prefixes
(buffer-substring-no-properties (point) 
prev-pt
(push (list :role "model" :parts (list :text content)) 
prompts)))
+(`(tool . ,_id)
+ (save-excursion
+   (condition-case nil
+   (let* ((tool-call (read (current-buffer)))
+  (name (plist-get tool-call :name))
+  (arguments  (plist-get tool-call :args)))
+ (plist-put tool-call :result
+(string-trim (buffer-substring-no-properties
+  (point) prev-pt)))
+ (push (gptel--parse-tool-results backend (list tool-call))
+   prompts)
+ (push (list :role "model"
+ :parts
+ (vector `(:functionCall ( :name ,name
+   :args ,arguments
+   prompts))
+ ((end-of-file invalid-read-syntax)
+  (message (format "Could not parse tool-call on line %s"
+   (line-number-at-pos (point
+('ignore)
 ('nil
  (if include-media
  (when-let* ((content (gptel--gemini-parse-multipart



[nongnu] elpa/gptel aded7787d6 04/14: gptel: Make tool call records in buffer recoverable

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit aded7787d623f663623493382bfa97d1040a3bc8
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel: Make tool call records in buffer recoverable

Include tool calls and results as explicitly recoverable messages
within message log buffers (like chat).  The recovery of tool
messages enables reuse of tool results in several rounds of
messages, making RAG-like use cases feasible.  The :include
feature of tools tends to confuse LLMs, resulting in auto-mimicry
and other undesireable behaviors.  These changes correct this
behavior.

To mark tool messages explicitly, the gptel text property has been
given new unique values, including (tool . id).  The persistence
and rehydration of these properties is handled in the next commit.

Modify the default callback insertion functions to support a RAW
argument to indicate that they should not propertize the
insertion.  See See `gptel-curl--stream-insert-response' and
`gptel--insert-response' for details.

To avoid gptel-separator insertion between consecutive tool
results, introduce a marker to track tool insertion, stored in
:info as usual.  Using an indpendent tool marker, we can infer if
tool-insertion caused the last update to the buffer or if another
state-path has done an insertion, meaning we need to re-insert a
regular gptel-separator instead of just a newline or nothing.

To facilitate creation of a tool message on the backend, the tool
call form is written literally to the beginning of tool messages.
The backend recovers it by calling read.  After the first read
form, the rest of the message is treated like the tool result.
The result has been coerced to a string through `gptel--to-string'
before buffer insertion, so the literal buffer string is treated
as the result.  This can erase some type information for backends
which support JSON types besides string (including OpenAI and
Gemini).  Further work may be needed to allow tools to return
non-string results to backends which support them.

Tool results in Org mode: Use an org block to insert tool
results. Because the org block display in packages like org-modern
keeps parameters visible when folded, the block was chosen.  The
truncated call data is rendered as block parameters to easily see
which calls were performed while blocks are folded.

Tool results in text/markdown: To aid in the recognition of tool
messages in text/Markdown, append call data to the tool message
fence.  The fences use the `ignore' gptel property even though
removing these fences can employ a similar strategy as Org mode.

To prevent org block escape by its tool result contents, escape
tool results before insertion for display.

Functionality for
- respecting the `ignore' value,
- parsing tool messages in the buffer
- and unescaping the tool result before sending
will be addressed in the following commits.

* gptel.el: (gptel--format-tool-call, gptel--display-tool-results,
gptel--display-tool-calls, gptel--insert-response,
gptel-response-separator): Update tool-result insertion with the
above changes and general insertion callback with the RAW
argument.

* gptel-curl.el (gptel-curl--stream-insert-response): Update with
RAW argument.
---
 gptel-curl.el |  19 -
 gptel.el  | 124 --
 2 files changed, 97 insertions(+), 46 deletions(-)

diff --git a/gptel-curl.el b/gptel-curl.el
index 61c3173eba..424f5f8dd3 100644
--- a/gptel-curl.el
+++ b/gptel-curl.el
@@ -223,11 +223,13 @@ PROCESS and _STATUS are process parameters."
 (setf (alist-get process gptel--request-alist nil 'remove) nil)
 (kill-buffer proc-buf)))
 
-(defun gptel-curl--stream-insert-response (response info)
+(defun gptel-curl--stream-insert-response (response info &optional raw)
   "Insert streaming RESPONSE from an LLM into the gptel buffer.
 
 INFO is a mutable plist containing information relevant to this buffer.
-See `gptel--url-get-response' for details."
+See `gptel--url-get-response' for details.
+
+Optional RAW disables text properties and transformation."
   (pcase response
 ((pred stringp)
  (let ((start-marker (plist-get info :position))
@@ -246,14 +248,13 @@ See `gptel--url-get-response' for details."
  (setq tracking-marker (set-marker (make-marker) (point)))
  (set-marker-insertion-type tracking-marker t)
  (plist-put info :tracking-marker tracking-marker))
-
-   (when transformer
- (setq response (funcall transformer response)))
-
-   (add-text-properties
-0 (length response) '(gptel response front-sticky (gptel))
-response)
(goto-char tracking-marker)
+   (

[nongnu] elpa/gptel 1d0b3d112b 11/14: gptel-ollama: Parse tool results from buffer

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 1d0b3d112bd74ecd9f0789b5ce2526d0e9992fb6
Author: Karthik Chikmagalur 
Commit: Karthik Chikmagalur 

gptel-ollama: Parse tool results from buffer

* gptel-ollama.el (gptel--parse-buffer):
- Create tool call and result messages from each recorded call

Parse tool messages in the buffer.  This commit covers the
Ollama backend.  The strategy is to pcase on the gptel
property.  Since tool insertions have one distinct gptel text
property, the call and response message are recovered at the same
time.

Introduce support for the `ignore' property in the Ollama
prompt creator.  Users can make use of it to have non-conversation
content intermingled with chat.

NOTE: Ollama does not use tool-call ids, so no ids are stored in
the gptel text property.  This can cause problems if the user
switches from Ollama to a backend that does use ids.
---
 gptel-ollama.el | 21 -
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/gptel-ollama.el b/gptel-ollama.el
index cb62108b12..1b530ed0a7 100644
--- a/gptel-ollama.el
+++ b/gptel-ollama.el
@@ -141,7 +141,7 @@ Store response metadata in state INFO."
if text collect
(list :role (if role "user" "assistant") :content text)))
 
-(cl-defmethod gptel--parse-buffer ((_backend gptel-ollama) &optional 
max-entries)
+(cl-defmethod gptel--parse-buffer ((backend gptel-ollama) &optional 
max-entries)
   (let ((prompts) (prev-pt (point))
 (include-media (and gptel-track-media (or (gptel--model-capable-p 
'media)
   (gptel--model-capable-p 
'url)
@@ -155,6 +155,25 @@ Store response metadata in state INFO."
  (when-let* ((content (gptel--trim-prefixes
(buffer-substring-no-properties (point) 
prev-pt
(push (list :role "assistant" :content content) prompts)))
+(`(tool . ,_id)
+ (save-excursion
+   (condition-case nil
+   (let* ((tool-call (read (current-buffer)))
+  (name (plist-get tool-call :name))
+  (arguments (plist-get tool-call :args)))
+ (plist-put tool-call :result
+(string-trim (buffer-substring-no-properties
+  (point) prev-pt)))
+ (push (car (gptel--parse-tool-results backend (list 
tool-call)))
+   prompts)
+ (push (list :role "assistant"
+ :content ""
+ :tool_calls `[(:function (:name ,name 
:arguments ,arguments))])
+   prompts))
+ ((end-of-file invalid-read-syntax)
+  (message (format "Could not parse tool-call on line %s"
+   (line-number-at-pos (point
+('ignore)
 ('nil
  (if include-media
  (when-let* ((content (gptel--ollama-parse-multipart



[nongnu] elpa/gptel e53076f43e 12/14: test: Update submodule

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit e53076f43e9a8865e951383037b5f1ba520f9470
Author: Karthik Chikmagalur 
Commit: Karthik Chikmagalur 

test: Update submodule

* test: Add tests for new features, including tool result parsing
from buffers.
---
 test | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test b/test
index 6ca41954b9..8090f095dd 16
--- a/test
+++ b/test
@@ -1 +1 @@
-Subproject commit 6ca41954b94ee6c795974756ae8e870628ab71be
+Subproject commit 8090f095ddc23e7a9eb26d83c593c46d7924e623



[nongnu] elpa/gptel 8e0de5dd25 13/14: gptel: overhaul bounds, support more text property types

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 8e0de5dd25b85122e35da9e2e3a7d09e2e46ece8
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel: overhaul bounds, support more text property types

Store the chat buffer's gptel bounds in an alist for compactness.
Each entry maps a text designation type (`response', `tool',
`ignore' etc) to a list of bounds.  Each bound is a
list (previously a cons) of the form (BEG END) or (BEG END VAL).
VAL is used for text properties like tool calls that can store an
ID.

The previous variant of gptel's bounds (as a list of conses)
will continue to be supported.

* gptel-org.el (gptel-org--restore-state, gptel-org--save-state):
Update for new bounds data type.

* gptel.el (gptel--in-response-p, gptel--restore-props,
gptel--restore-state): New function 'gptel--restore-props' to
restore the gptel text-property from either of the supported
bounds types.  Other modifications are to handle the fact that
the `gptel' text-property can have many valid values now.
---
 gptel-org.el |  9 -
 gptel.el | 58 +++---
 2 files changed, 51 insertions(+), 16 deletions(-)

diff --git a/gptel-org.el b/gptel-org.el
index 6550425310..ace590e5cd 100644
--- a/gptel-org.el
+++ b/gptel-org.el
@@ -50,6 +50,7 @@
 (declare-function gptel-backend-name "gptel")
 (declare-function gptel--parse-buffer "gptel")
 (declare-function gptel--parse-directive "gptel")
+(declare-function gptel--restore-props "gptel")
 (declare-function org-entry-get "org")
 (declare-function org-entry-put "org")
 (declare-function org-with-wide-buffer "org-macs")
@@ -408,10 +409,7 @@ ARGS are the original function call arguments."
 (condition-case status
 (progn
   (when-let* ((bounds (org-entry-get (point-min) "GPTEL_BOUNDS")))
-(mapc (pcase-lambda (`(,beg . ,end))
-(add-text-properties
- beg end '(gptel response front-sticky (gptel
-  (read bounds)))
+(gptel--restore-props (read bounds)))
   (pcase-let ((`(,system ,backend ,model ,temperature ,tokens ,num)
(gptel-org--entry-properties (point-min
 (when system (setq-local gptel--system-message system))
@@ -470,7 +468,8 @@ non-nil (default), display a message afterwards."
(letrec ((write-bounds
  (lambda (attempts)
(let* ((bounds (gptel--get-buffer-bounds))
-  (offset (caar bounds))
+  ;; first value of ((prop . ((beg end val)...))...)
+  (offset (caadar bounds))
   (offset-marker (set-marker (make-marker) offset)))
  (org-entry-put (point-min) "GPTEL_BOUNDS"
 (prin1-to-string (gptel--get-buffer-bounds)))
diff --git a/gptel.el b/gptel.el
index bf90a0f91c..52810fd9ff 100644
--- a/gptel.el
+++ b/gptel.el
@@ -998,12 +998,18 @@ FILE is assumed to exist and be a regular file."
 (save-restriction
   (widen)
   (goto-char (point-max))
-  (let ((prop) (bounds))
-(while (setq prop (text-property-search-backward
-   'gptel 'response t))
-  (push (cons (prop-match-beginning prop)
-  (prop-match-end prop))
-bounds))
+  (let ((bounds) (prev-pt (point)))
+(while (and (/= prev-pt (point-min))
+(goto-char (previous-single-property-change
+(point) 'gptel nil (point-min
+  (when-let* ((prop (get-char-property (point) 'gptel)))
+(let* ((prop-name (if (symbolp prop) prop (car prop)))
+   (val (when (consp prop) (cdr prop)))
+   (bound (if val
+  (list (point) prev-pt val)
+(list (point) prev-pt
+  (push bound (alist-get prop-name bounds
+  (setq prev-pt (point)))
 bounds
 
 (define-obsolete-function-alias
@@ -1022,7 +1028,7 @@ FILE is assumed to exist and be a regular file."
 
 (defun gptel--in-response-p (&optional pt)
   "Check if position PT is inside a gptel response."
-  (get-char-property (or pt (point)) 'gptel))
+  (eq (get-char-property (or pt (point)) 'gptel) 'response))
 
 (defun gptel--at-response-history-p (&optional pt)
   "Check if gptel response at position PT has variants."
@@ -1139,6 +1145,39 @@ Valid JSON unless NO-JSON is t."
 
 ;;; Saving and restoring state
 
+(defun gptel--restore-props (bounds-alist)
+  "Restore text properties from BOUNDS-ALIST.
+BOUNDS-ALIST is (PROP . BOUNDS).  BOUNDS is a list of BOUND.  Each BOUND
+is either (BEG END VAL) or (BEG END).
+
+For (BEG END VAL) forms, even if VAL is nil, the gptel property will be
+set to (PROP . VAL).  For (BEG END) forms, except when PROP is response,
+t

[nongnu] elpa/gptel 2a6f714d30 14/14: README: Fix typo (#676)

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 2a6f714d307c403684e81a1c4c0e521d7c4d12d8
Author: Markus Hauck 
Commit: GitHub 

README: Fix typo (#676)
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index f0b518df5e..2e5c3a6908 100644
--- a/README.org
+++ b/README.org
@@ -1333,7 +1333,7 @@ Other Emacs clients for LLMs prescribe the format of the 
interaction (a comint s
 | =gptel-track-response=| Distinguish between user messages and LLM 
responses?   |
 | =gptel-track-media=   | Send images or other media from links?   
  |
 | =gptel-confirm-tool-calls=| Confirm all tool calls?  
  |
-| =gptel-include-tool-results=  | Include tool results should in the LLM 
response?   |
+| =gptel-include-tool-results=  | Include tool results in the LLM response?
  |
 | =gptel-use-header-line=   | Display status messages in header-line 
(default) or minibuffer |
 | =gptel-display-buffer-action= | Placement of the gptel chat buffer.  
  |
 
|---+|



[nongnu] elpa/gptel 56623b9889 06/14: gptel-org: Tool result handling for Org

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 56623b9889e5b8849ea648110fd5fe0d6db726ac
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel-org: Tool result handling for Org

* gptel-org.el: (gptel-org--create-prompt,
gptel--org-strip-tool-headers, gptel--org-unescape-tool-results):
- Unescape tool results before sending to the backend.  Unescape
takes place in a buffer containing a clone of the data.
- Strip tool headers from the prompt before sending to the
backend.
---
 gptel-org.el | 46 ++
 1 file changed, 46 insertions(+)

diff --git a/gptel-org.el b/gptel-org.el
index 706da1ee8a..6550425310 100644
--- a/gptel-org.el
+++ b/gptel-org.el
@@ -227,6 +227,8 @@ value of `gptel-org-branching-context', which see."
do (insert-buffer-substring org-buf start end)
(goto-char (point-min)))
   (goto-char (point-max))
+  (gptel--org-unescape-tool-results)
+  (gptel--org-strip-tool-headers)
   (let ((major-mode 'org-mode))
 (gptel--parse-buffer gptel-backend max-entries)
   ;; Create prompt the usual way
@@ -240,9 +242,53 @@ value of `gptel-org-branching-context', which see."
 (set (make-local-variable sym)
  (buffer-local-value sym org-buf)))
   (insert-buffer-substring org-buf beg end)
+  (gptel--org-unescape-tool-results)
+  (gptel--org-strip-tool-headers)
   (let ((major-mode 'org-mode))
 (gptel--parse-buffer gptel-backend max-entries)))
 
+(defun gptel--org-strip-tool-headers ()
+  "Remove all tool_call block headers and footers.
+Every line that matches will be removed entirely."
+  (save-excursion
+(goto-char (point-min))
+(while (re-search-forward (rx line-start (literal "#+")
+  (or (literal "begin") (literal "end"))
+  (literal "_tool"))
+  nil t)
+  (delete-region (match-beginning 0)
+ (min (point-max) (1+ (line-end-position)))
+
+(defun gptel--org-unescape-tool-results ()
+  "Undo escapes done to keep results from escaping blocks.
+Scans backward for gptel tool text property, reads the arguments, then
+unescapes the remainder."
+  (save-excursion
+(goto-char (point-max))
+(let ((prev-pt (point)))
+  (while (> prev-pt (point-min))
+(goto-char
+ (previous-single-char-property-change (point) 'gptel))
+(let ((prop (get-text-property (point) 'gptel))
+  (backward-progress (point)))
+  (when (eq (car-safe prop) 'tool)
+;; User edits to clean up can potentially insert a tool-call header
+;; that is propertized.  Tool call headers should not be
+;; propertized.
+(when (looking-at-p "[[:space:]]*#\\+begin_tool")
+  (goto-char (match-end 0)))
+(condition-case nil
+(read (current-buffer))
+  ((end-of-file invalid-read-syntax)
+   (message "Could not read tool arguments")))
+;; TODO this code is able to put the point behind prev-pt, which
+;; makes the region inverted.  The `max' catches this, but really
+;; `read' and `looking-at' are the culprits.  Badly formed tool
+;; blocks can lead to this being necessary.
+(org-unescape-code-in-region
+ (min prev-pt (point)) prev-pt))
+  (goto-char (setq prev-pt backward-progress)))
+
 ;; Handle media links in the buffer
 (cl-defmethod gptel--parse-media-links ((_mode (eql 'org-mode)) beg end)
   "Parse text and actionable links between BEG and END.



[nongnu] elpa/gptel cb420b6928 03/14: gptel: Breaking change to gptel-request API

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit cb420b69287c0df69672ea916e318685b4a312ce
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel: Breaking change to gptel-request API

* gptel.el (gptel-request, gptel--handle-tool-use,
gptel--insert-response): Change gptel-request's API for handling
tool use again.  When there are pending tool calls or tool
results, the callback is now called cons cells of the form

 (tool-call   . ((tool args callback) ...))
 (tool-result . ((tool args result) ...))

respectively.  The idea is to support dispatching on more types of
responses (like "reasoning" text blocks) by disambiguating between
them explicitly via symbols like `tool-call' and `tool-result'.
The gptel-request callback can then match against the type of
symbol to define custom behavior.

 (pcase response
   ((pred stringp) ...)  ;regular response
   (`(,tool-call . call-specs) ...)
   (`(,tool-result . result-specs) ...))

The case of a regular response string remains simple.  See
`gptel--insert-response' for an example of this kind of dispatch.

Update tool handling (in the fsm) for the new API.

* gptel-transient.el (gptel--suffix-send): Update custom callbacks
to the new API.

* gptel-curl.el (gptel-curl--stream-insert-response): Update
`gptel-curl--stream-insert-response' to the new API.
---
 gptel-curl.el  |  8 
 gptel-transient.el | 36 ++--
 gptel.el   | 49 ++---
 3 files changed, 52 insertions(+), 41 deletions(-)

diff --git a/gptel-curl.el b/gptel-curl.el
index 7972e6e68e..61c3173eba 100644
--- a/gptel-curl.el
+++ b/gptel-curl.el
@@ -257,10 +257,10 @@ See `gptel--url-get-response' for details."
;; (run-hooks 'gptel-pre-stream-hook)
(insert response)
(run-hooks 'gptel-post-stream-hook)
-((pred consp)
- (gptel--display-tool-calls response info))
-(_  ; placeholder for later condition
- (gptel--display-tool-results response info
+(`(tool-call . ,tool-calls)
+ (gptel--display-tool-calls tool-calls info))
+(`(tool-result . ,tool-results)
+ (gptel--display-tool-results tool-results info
 
 (defun gptel-curl--stream-filter (process output)
   (let* ((fsm (alist-get process gptel--request-alist))
diff --git a/gptel-transient.el b/gptel-transient.el
index db89c86abe..aecda6f6af 100644
--- a/gptel-transient.el
+++ b/gptel-transient.el
@@ -1227,27 +1227,27 @@ This sets the variable `gptel-include-tool-results', 
which see."
  ((member "e" args)
   (setq stream nil)
   (setq callback
-(lambda (resp info)
-  (cond
-   ((stringp resp) (message "%s response: %s" backend-name resp))
-   ;; XXX Check types
-   ((consp resp) (gptel--display-tool-calls resp info 'minibuffer))
-   ((and (null resp) (plist-get info :error))
-(message "%s response error: %s"
- backend-name (plist-get info :status)))
+(lambda (resp info &optional _raw)
+  (pcase resp
+((pred stringp) (message "%s response: %s" backend-name resp))
+(`(tool-call . ,tool-calls) (gptel--display-tool-calls 
tool-calls info 'minibuffer))
+(`(tool-result . ,tool-results) (gptel--display-tool-results 
tool-results info))
+(_ (when (and (null resp) (plist-get info :error))
+ (message "%s response error: %s"
+  backend-name (plist-get info :status
  ((member "k" args)
   (setq stream nil)
   (setq callback
-(lambda (resp info)
-  (cond
-   ((stringp resp) (kill-new resp)
-(message "%s response: \"%s\" copied to kill-ring." 
backend-name
- (truncate-string-to-width resp 30)))
-   ;; XXX Check types
-   ((consp resp) (gptel--display-tool-calls resp info 'minibuffer))
-   ((and (null resp) (plist-get info :error))
-(message "%s response error: %s" backend-name
- (plist-get info :status)))
+(lambda (resp info &optional _raw)
+  (pcase resp
+((pred stringp) (kill-new resp)
+ (message "%s response: \"%s\" copied to kill-ring." 
backend-name
+  (truncate-string-to-width resp 30)))
+(`(tool-call . ,tool-calls) (gptel--display-tool-calls 
tool-calls info 'minibuffer))
+(`(tool-result . ,tool-results) (gptel--display-tool-results 
tool-results info))
+(_ (when (and (null resp) (plist-get info :error))
+ (message "%s response error: 

[nongnu] elpa/gptel d222ed823a 05/14: gptel-org: Always create prompt in a temp buffer

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit d222ed823afe2648a37fef4368e4414b90205b72
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel-org: Always create prompt in a temp buffer

* gptel-org.el (gptel-org--create-prompt): Clone the chat buffer
for both branching context and non-branching context uses and
construct the prompt in the temporary buffer.  This is required
for preprocessing/filtering the prompt -- which includes tasks
such as stripping PROPERTIES blocks and tool call result headers.
---
 gptel-org.el | 27 +--
 1 file changed, 17 insertions(+), 10 deletions(-)

diff --git a/gptel-org.el b/gptel-org.el
index 2ee8578849..706da1ee8a 100644
--- a/gptel-org.el
+++ b/gptel-org.el
@@ -217,15 +217,11 @@ value of `gptel-org-branching-context', which see."
collect (point) into ends
finally return (cons prompt-end ends
 (with-temp-buffer
-  (setq-local gptel-backend (buffer-local-value 'gptel-backend 
org-buf)
-  gptel--system-message
-  (buffer-local-value 'gptel--system-message org-buf)
-  gptel-model (buffer-local-value 'gptel-model org-buf)
-  gptel-mode (buffer-local-value 'gptel-mode org-buf)
-  gptel-track-response
-  (buffer-local-value 'gptel-track-response org-buf)
-  gptel-track-media
-  (buffer-local-value 'gptel-track-media org-buf))
+  ;; TODO(org) duplicated below
+  (dolist (sym '( gptel-backend gptel--system-message gptel-model
+  gptel-mode gptel-track-response 
gptel-track-media))
+(set (make-local-variable sym)
+ (buffer-local-value sym org-buf)))
   (cl-loop for start in start-bounds
for end   in end-bounds
do (insert-buffer-substring org-buf start end)
@@ -234,7 +230,18 @@ value of `gptel-org-branching-context', which see."
   (let ((major-mode 'org-mode))
 (gptel--parse-buffer gptel-backend max-entries)
   ;; Create prompt the usual way
-  (gptel--parse-buffer gptel-backend max-entries
+  (let ((org-buf (current-buffer))
+(beg (point-min))
+(end (point-max)))
+(with-temp-buffer
+  ;; TODO(org) duplicated above
+  (dolist (sym '( gptel-backend gptel--system-message gptel-model
+  gptel-mode gptel-track-response gptel-track-media))
+(set (make-local-variable sym)
+ (buffer-local-value sym org-buf)))
+  (insert-buffer-substring org-buf beg end)
+  (let ((major-mode 'org-mode))
+(gptel--parse-buffer gptel-backend max-entries)))
 
 ;; Handle media links in the buffer
 (cl-defmethod gptel--parse-media-links ((_mode (eql 'org-mode)) beg end)



[nongnu] elpa/clojure-ts-mode 187e51253d 1/4: [Fix #29] Remove the manual grammar installation instructions

2025-03-07 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit 187e51253d6b5af375805d034fae7fbb1994a0b7
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

[Fix #29] Remove the manual grammar installation instructions

Very few people will have to do this, so it doesn't really make sense
to go into so much details.
---
 README.md | 68 +++
 1 file changed, 11 insertions(+), 57 deletions(-)

diff --git a/README.md b/README.md
index d420b2fc3d..30ed5ddb72 100644
--- a/README.md
+++ b/README.md
@@ -95,7 +95,7 @@ You can read more about the vision for `clojure-ts-mode` 
[here](https://metaredu
 
 ## Current Status
 
-**This library is still under development. Breaking changes should be 
expected.**
+**This library is still under active development. Breaking changes should be 
expected.**
 
 ## Installation
 
@@ -150,67 +150,21 @@ Once installed, evaluate clojure-ts-mode.el and you 
should be ready to go.
 
 ### Install tree-sitter grammars
 
-The compile tree-sitter clojure shared library must be available to Emacs.
-Additionally, the tree-sitter
-[markdown_inline](https://github.com/MDeiml/tree-sitter-markdown) shared 
library
-will also be used for docstrings if available.
+`clojure-ts-mode` makes use of two TreeSitter grammars to work properly:
+
+- The Clojure grammar, mentioned earlier
+- [markdown_inline](https://github.com/MDeiml/tree-sitter-markdown), which
+will be used for docstrings if available and if 
`clojure-ts-use-markdown-inline` is enabled.
 
 If you have `git` and a C compiler (`cc`) available on your system's `PATH`,
-**then these steps should not be necessary**.  clojure-ts-mode will install the
+`clojure-ts-mode` will install the
 grammars when you first open a Clojure file and `clojure-ts-ensure-grammars` is
 set to `t` (the default).
 
-If clojure-ts-mode fails to automatically install the grammar, you have the 
option to install it manually.
-
- From your OS
-
-Some distributions may package the tree-sitter-clojure grammar in their 
package repositories.
-If yours does you may be able to install tree-sitter-clojure with your system 
package manager.
-
-If the version packaged by your OS is out of date, you may see errors in the 
`*Messages*` buffer or your clojure buffers will not have any syntax 
highlighting.
-
-If this happens you should install the grammar manually with `M-x 
treesit-install-language-grammar  clojure` and follow the prompts.
-Recommended values for these prompts can be seen in 
`clojure-ts-grammar-recipes`.
-
- Compile From Source
-
-If all else fails, you can attempt to download and compile manually.
-All you need is `git` and a C compiler (GCC works well).
-
-To start, clone 
[tree-sitter-clojure](https://github.com/sogaiu/tree-sitter-clojure).
-
-Then run the following code (depending on your OS) from the 
tree-sitter-clojure repository on your machine.
-
- Linux
-
-```bash
-mkdir -p dist
-cc -c -I./src src/parser.c -o "parser.o"
-cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.so"
-```
-
- macOS
-
-```bash
-mkdir -p dist
-cc -c -I./src src/parser.c -o "parser.o"
-cc -fPIC -shared src/parser.o -o "dist/libtree-sitter-clojure.dylib"
-```
-
- Windows
-
-I don't know how to do this on Windows. Patches welcome!
-
- Finally, in emacs
-
-Then tell Emacs where to find the shared library by adding something like this 
to your init file:
-
-```emacs-lisp
-(setq treesit-extra-load-path '( "~/path/to/tree-sitter-clojure/dist"))
-```
-
-OR you can move the `libtree-sitter-clojure.so`/`libtree-sitter-clojure.dylib` 
to a directory named `tree-sitter`
-under your `user-emacs-directory` (typically `~/.emacs.d` on Unix systems).
+If `clojure-ts-mode` fails to automatically install the grammar, you have the
+option to install it manually, Please, refer to the installation instructions 
of
+each required grammar and make sure you're install the versions expected. (see
+`clojure-ts-grammar-recipes` for details)
 
 ## Migrating to clojure-ts-mode
 



[nongnu] elpa/gptel 98d4360592 01/14: gptel: Switch to pcase in insert callbacks

2025-03-07 Thread ELPA Syncer
branch: elpa/gptel
commit 98d4360592bb7c9cc392d5fcda7dc6c23b26572f
Author: Psionik K <73710933+psioni...@users.noreply.github.com>
Commit: Karthik Chikmagalur 

gptel: Switch to pcase in insert callbacks

Structural, non-behavioral.

* gptel.el (gptel--insert-response): Switch to pcase-based
dispatch in advance of a breaking change to the `gptel-request'
API.
* gptel-curl.el (gptel-curl--stream-insert-response): Ditto.
---
 gptel-curl.el | 62 +--
 gptel.el  | 50 +++
 2 files changed, 56 insertions(+), 56 deletions(-)

diff --git a/gptel-curl.el b/gptel-curl.el
index 34d86fb273..eae18229a6 100644
--- a/gptel-curl.el
+++ b/gptel-curl.el
@@ -228,37 +228,37 @@ PROCESS and _STATUS are process parameters."
 
 INFO is a mutable plist containing information relevant to this buffer.
 See `gptel--url-get-response' for details."
-  (cond
-   ((stringp response)
-(let ((start-marker (plist-get info :position))
-  (tracking-marker (plist-get info :tracking-marker))
-  (transformer (plist-get info :transformer)))
-  (with-current-buffer (marker-buffer start-marker)
-(save-excursion
-  (unless tracking-marker
-(goto-char start-marker)
-(unless (or (bobp) (plist-get info :in-place))
-  (insert gptel-response-separator)
-  (when gptel-mode
-;; Put prefix before AI response.
-(insert (gptel-response-prefix-string)))
-  (move-marker start-marker (point)))
-(setq tracking-marker (set-marker (make-marker) (point)))
-(set-marker-insertion-type tracking-marker t)
-(plist-put info :tracking-marker tracking-marker))
-
-  (when transformer
-(setq response (funcall transformer response)))
-
-  (add-text-properties
-   0 (length response) '(gptel response front-sticky (gptel))
-   response)
-  (goto-char tracking-marker)
-  ;; (run-hooks 'gptel-pre-stream-hook)
-  (insert response)
-  (run-hooks 'gptel-post-stream-hook)
-   ((consp response)
-(gptel--display-tool-calls response info
+  (pcase response
+((pred stringp)
+ (let ((start-marker (plist-get info :position))
+   (tracking-marker (plist-get info :tracking-marker))
+   (transformer (plist-get info :transformer)))
+   (with-current-buffer (marker-buffer start-marker)
+ (save-excursion
+   (unless tracking-marker
+ (goto-char start-marker)
+ (unless (or (bobp) (plist-get info :in-place))
+   (insert gptel-response-separator)
+   (when gptel-mode
+ ;; Put prefix before AI response.
+ (insert (gptel-response-prefix-string)))
+   (move-marker start-marker (point)))
+ (setq tracking-marker (set-marker (make-marker) (point)))
+ (set-marker-insertion-type tracking-marker t)
+ (plist-put info :tracking-marker tracking-marker))
+
+   (when transformer
+ (setq response (funcall transformer response)))
+
+   (add-text-properties
+0 (length response) '(gptel response front-sticky (gptel))
+response)
+   (goto-char tracking-marker)
+   ;; (run-hooks 'gptel-pre-stream-hook)
+   (insert response)
+   (run-hooks 'gptel-post-stream-hook)
+((pred consp)
+ (gptel--display-tool-calls response info
 
 (defun gptel-curl--stream-filter (process output)
   (let* ((fsm (alist-get process gptel--request-alist))
diff --git a/gptel.el b/gptel.el
index 2bc5a419bb..ed2828e2e7 100644
--- a/gptel.el
+++ b/gptel.el
@@ -2336,31 +2336,31 @@ See `gptel--url-get-response' for details."
   (let* ((gptel-buffer (plist-get info :buffer))
  (start-marker (plist-get info :position))
  (tracking-marker (plist-get info :tracking-marker)))
-(cond
- ((stringp response);Response text
-  (with-current-buffer gptel-buffer
-(when-let* ((transformer (plist-get info :transformer)))
-  (setq response (funcall transformer response)))
-(when tracking-marker   ;separate from previous response
-  (setq response (concat gptel-response-separator response)))
-(save-excursion
-  (add-text-properties
-   0 (length response) '(gptel response front-sticky (gptel)) response)
-  (with-current-buffer (marker-buffer start-marker)
-(goto-char (or tracking-marker start-marker))
-;; (run-hooks 'gptel-pre-response-hook)
-(unless (or (bobp) (plist-get info :in-place)
-tracking-marker)
-  (insert gptel-response-separator)
-  (when gptel-mode
-(insert (gptel-response-prefix-string)))
-   

[elpa] externals/debbugs 4fde9fbcbd 3/3: Release debbugs 0.44

2025-03-07 Thread Michael Albinus via
branch: externals/debbugs
commit 4fde9fbcbd872b8c30f2e95c8c6513ae7578bdea
Author: Michael Albinus 
Commit: Michael Albinus 

Release debbugs 0.44

* Makefile (TESTS): List of *-tests.el files.
(SELECTOR): New variable.
(check): Depend on $(TESTS).
(%-tests): New target, running a test per file.  Use $(SELECTOR).

* debbugs.el: Bump version to 0.44.
---
 Makefile   | 57 +++--
 debbugs.el |  2 +-
 2 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index da0764ea36..258d553ae1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,48 @@
+# Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+# Author: Morgan Smith 
+# Package: debbugs
+# Keywords: comm, hypermedia, maint
+
+# This file 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 file 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 GNU Emacs.  If not, see .
+
+### Commentary:
+
+## Some  test targets:
+##
+## check: re-run all tests.
+## filename-tests: re-run tests from test/filename-tests.el(c).
+
+## SELECTOR discrimination (see ERT manual for more possibilities):
+##
+## SELECTOR='"regexp"': Run all tests which name match "regexp"
+## SELECTOR='test-name': Run test with name test-name
+
+### Code:
+
 EMACS ?= emacs
 MAKEINFO ?= makeinfo
 
-# regex of tests to run
-TESTS=.*
+SOURCE = $(wildcard *.el)
+TESTSOURCE = $(wildcard test/*.el)
+TARGET = $(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
+TESTTARGET = $(patsubst %.el,%.elc,$(TESTSOURCE))
 
-SOURCE=$(wildcard *.el)
-TESTSOURCE=$(wildcard test/*.el)
-TARGET=$(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
-TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
+TESTS = $(patsubst test/%.el,%,$(wildcard test/*-tests.el))
+SELECTOR ?= (not (tag :unstable))
 
-INFOMANUALS=debbugs.info debbugs-ug.info
+INFOMANUALS = debbugs.info debbugs-ug.info
 
 .PHONY: all build check clean checkdoc
 .PRECIOUS: %.elc
@@ -30,10 +63,14 @@ doc: $(INFOMANUALS)
 build: $(TARGET)
 
 checkdoc: $(SOURCE) $(TESTSOURCE)
-   @$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el $(foreach 
file,$^,"--eval=(checkdoc-file \"$(file)\")")
+   @$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el \
+ $(foreach file,$^,"--eval=(checkdoc-file \"$(file)\")")
+
+check: $(TESTS)
 
-check: build $(TESTTARGET)
-   @$(EMACS) -Q --batch -L . -L ./test $(foreach file,$(TESTSOURCE), -l 
$(file)) --eval '(ert-run-tests-batch-and-exit "$(TESTS)")'
+%-tests: build $(TESTTARGET)
+   @$(EMACS) -Q --batch -L . -L ./test -l $@ \
+ --eval '(ert-run-tests-batch-and-exit (quote ${SELECTOR}))'
 
 clean:
-rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS)
diff --git a/debbugs.el b/debbugs.el
index 510465a467..eaffe6d715 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -5,7 +5,7 @@
 ;; Author: Michael Albinus 
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.43
+;; Version: 0.44
 ;; Package-Requires: ((emacs "26.1") (soap-client "3.1.5"))
 
 ;; This file is not part of GNU Emacs.



[elpa] externals/debbugs updated (0f5c925024 -> 4fde9fbcbd)

2025-03-07 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  0f5c925024 * dir: Adapt entries to new name.  (Bug#76530)
   new  4d62aac48b Add comment in *.texi
   new  89fe82ac28 Improve keep-subject handling
   new  4fde9fbcbd Release debbugs 0.44


Summary of changes:
 Makefile| 57 +++--
 debbugs-gnu.el  | 28 +++-
 debbugs-ug.texi |  1 +
 debbugs.el  |  2 +-
 debbugs.texi|  1 +
 5 files changed, 73 insertions(+), 16 deletions(-)



[elpa] externals/debbugs 4d62aac48b 1/3: Add comment in *.texi

2025-03-07 Thread Michael Albinus via
branch: externals/debbugs
commit 4d62aac48b34bcb625d05e01b76e3354d194a6c0
Author: Michael Albinus 
Commit: Michael Albinus 

Add comment in *.texi
---
 debbugs-ug.texi | 1 +
 debbugs.texi| 1 +
 2 files changed, 2 insertions(+)

diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index ef2f20b081..506d48ef02 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -4,6 +4,7 @@
 
 @dircategory Emacs
 @direntry
+@c If you change this, you must also change file "dir" in this directory.
 * Debbugs User Guide: (debbugs-ug).  Debbugs User Interface in Emacs.
 @end direntry
 
diff --git a/debbugs.texi b/debbugs.texi
index f5024c5c36..7a1de829d1 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -4,6 +4,7 @@
 
 @dircategory Emacs
 @direntry
+@c If you change this, you must also change file "dir" in this directory.
 * Debbugs Library: (debbugs).  A library for communication with Debbugs.
 @end direntry
 



[elpa] externals/json-mode 09775d0d18: ; Fix byte-compilation warnings

2025-03-07 Thread Stefan Kangas
branch: externals/json-mode
commit 09775d0d18062742a1a87a9c862fd54115032d2a
Author: Stefan Kangas 
Commit: Stefan Kangas 

; Fix byte-compilation warnings
---
 json-mode.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/json-mode.el b/json-mode.el
index a7a78a058c..d9395cd8ae 100644
--- a/json-mode.el
+++ b/json-mode.el
@@ -101,11 +101,11 @@
 Object names receive the face `json-mode-object-name-face' to
 distinguish them from other strings."
   (cond
-   ((nth 4 state) font-lock-comment-face)
+   ((nth 4 state) 'font-lock-comment-face)
((and (nth 3 state)
  (json-mode--string-is-object-name-p (nth 8 state)))
 'json-mode-object-name-face)
-   (t font-lock-string-face)))
+   (t 'font-lock-string-face)))
 
 (defconst json-mode--smie-grammar
   (smie-prec2->grammar



[nongnu] elpa/dirvish bfb3826a8a 2/2: fix(side): mismatched variables

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit bfb3826a8abc724e8bae430f847bb46ec31a71ef
Author: Alex Lu 
Commit: Alex Lu 

fix(side): mismatched variables
---
 dirvish.el | 12 
 extensions/dirvish-side.el |  3 ---
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/dirvish.el b/dirvish.el
index 1aad4514fc..c31b4ce019 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -594,7 +594,6 @@ FROM-QUIT is used to signify the calling command."
 (mapc #'dirvish--kill-buffer (dv-special-buffers dv))
 (setf (dv-preview-hash dv) (dirvish--ht) (dv-parent-hash dv) (dirvish--ht)
   (dv-preview-buffers dv) nil (dv-winconf dv) nil)
-(dirvish--check-dependencies dv) ; update configs
 (when (or (null dirvish-reuse-session)
   (eq dirvish-reuse-session (if from-quit 'open 'quit)))
   (mapc (pcase-lambda (`(,_ . ,b)) (kill-buffer b)) (dv-roots dv)
@@ -631,11 +630,15 @@ FROM-QUIT is used to signify the calling command."
 (defun dirvish--check-dependencies (dv)
   "Require necessary extensions for DV, raise warnings for missing 
executables."
   (cl-loop
-   with (dps . attrs) = (cons dirvish-preview-dispatchers dirvish-attributes)
-   with (m . h) = (cons dirvish-mode-line-format dirvish-header-line-format)
+   with tp = (dv-type dv) with dft = (eq tp 'default)
+   with fn = (lambda (f) (eval `(bound-and-true-p
+,(intern (format "dirvish-%s-%s" tp f)
+   with attrs = (if dft dirvish-attributes (funcall fn 'attributes))
+   with m = (if dft dirvish-mode-line-format (funcall fn 'mode-line-format))
+   with h = (if dft dirvish-header-line-format (funcall fn 
'header-line-format))
with (ml . mr) = (cons (plist-get m :left) (plist-get m :right))
with (hl . hr) = (cons (plist-get h :left) (plist-get h :right))
-   with feat-reqs = (append dps attrs ml mr hl hr)
+   with feat-reqs = (append dirvish-preview-dispatchers attrs ml mr hl hr)
when feat-reqs do (require 'dirvish-widgets)
for (lib . feat) in dirvish--libraries do
(when (cl-intersection feat feat-reqs) (require lib))
@@ -1455,6 +1458,7 @@ are killed and the Dired buffer(s) in the selected window 
are buried."
   (interactive)
   (let ((dv (dirvish-curr)) (ct 0) (lst (window-list))
 (win (selected-window)) (frame (selected-frame)))
+(dirvish--check-dependencies dv) ; update configs
 (dirvish--clear-session dv t)
 (while (and (dirvish-curr) (eq (selected-window) win)
 (<= (cl-incf ct) (length lst)))
diff --git a/extensions/dirvish-side.el b/extensions/dirvish-side.el
index 85d24022d7..af1bbd68c7 100644
--- a/extensions/dirvish-side.el
+++ b/extensions/dirvish-side.el
@@ -140,9 +140,6 @@ filename until the project root when opening a side 
session."
 (defun dirvish-side--new (path)
   "Open a side session in PATH."
   (let* ((bname buffer-file-name)
- (dirvish-mode-line-format dirvish-side-mode-line-format)
- (dirvish-header-line-format dirvish-side-header-line-format)
- (dirvish-attributes dirvish-side-attributes)
  (dv (or (dirvish--get-session 'type 'side)
  (dirvish--new
   :type 'side



[nongnu] elpa/clojure-ts-mode updated (1fa9ced658 -> e0703fff14)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch elpa/clojure-ts-mode.

  from  1fa9ced658 Improve the installation instructions
   new  88fc10f247 Convert a note to an admonition
   new  592f708d5d Extend the font-locking documentation
   new  e0703fff14 Add a "Caveats" section the to the README


Summary of changes:
 README.md | 26 +-
 1 file changed, 25 insertions(+), 1 deletion(-)



[nongnu] elpa/dirvish 29b9f811c0 2/2: BREAKING: use 7-zip for archive preview

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit 29b9f811c06b68a5daabdd24cdfb6c9f2b2d412d
Author: Alex Lu 
Commit: Alex Lu 

BREAKING: use 7-zip for archive preview
---
 README.org   | 42 --
 dirvish-widgets.el   | 22 +---
 dirvish.el   |  9 ---
 docs/CUSTOMIZING.org | 68 ++--
 docs/EXTENSIONS.org  |  4 +--
 extensions/dirvish-vc.el |  4 +--
 6 files changed, 76 insertions(+), 73 deletions(-)

diff --git a/README.org b/README.org
index 41e891cd7f..7cfff94b1d 100644
--- a/README.org
+++ b/README.org
@@ -30,48 +30,6 @@ being dired at its core.
 
 
[[https://user-images.githubusercontent.com/16313743/189978802-f6fb09ea-13a2-4dc9-828b-992523d51dd5.png][https://user-images.githubusercontent.com/16313743/189978802-f6fb09ea-13a2-4dc9-828b-992523d51dd5.png]]
 
-* Prerequisites
-
-This package requires =GNU ls= (~gls~ on macOS), and /optionally/:
-
-+ [[https://github.com/sharkdp/fd][fd]] as a faster alternative to =find=
-+ [[https://github.com/libvips][vipsthumbnail]] for image preview
-+ [[https://poppler.freedesktop.org/][poppler]] | 
[[https://github.com/vedang/pdf-tools][pdf-tools]] for pdf preview
-+ [[https://github.com/dirkvdb/ffmpegthumbnailer][ffmpegthumbnailer]] 
(Linux/macOS) | [[https://gitlab.com/movie_thumbnailer/mtn][mtn]] (Windows) for 
video preview
-+ [[https://github.com/MediaArea/MediaInfo][mediainfo]] for audio/video 
metadata generation
-+ [[https://www.gnu.org/software/tar/][tar]] and 
[[https://infozip.sourceforge.net/UnZip.html][unzip]] for archive files preview
-
-@@html:@@
-@@html:@@ @@html:@@Toggle install instructions@@html:@@ 
@@html:@@
-
-@@html:@@macOS@@html:@@
-#+begin_src bash
-  brew install coreutils fd poppler ffmpegthumbnailer mediainfo vips
-#+end_src
-
-@@html:@@Debian-based@@html:@@
-#+begin_src bash
-  apt install fd-find poppler-utils ffmpegthumbnailer mediainfo libvips-tools 
tar unzip
-#+end_src
-
-@@html:@@Arch-based@@html:@@
-#+begin_src bash
-  pacman -S fd poppler ffmpegthumbnailer mediainfo libvips tar unzip
-#+end_src
-
-@@html:@@FreeBSD@@html:@@
-#+begin_src bash
-  pkg install gnuls fd-find poppler ffmpegthumbnailer vips gtar
-#+end_src
-
-@@html:@@Windows@@html:@@
-#+begin_src bash
-  # install via Scoop: https://scoop.sh/
-  scoop install coreutils fd poppler mtn libvips unzip
-#+end_src
-
-@@html:@@
-
 * Installation
 
 Dirvish is available from 
[[https://elpa.nongnu.org/nongnu/dirvish.html][Nongnu-Elpa]] and 
[[https://melpa.org/#/dirvish][Melpa]].  You can install it directly
diff --git a/dirvish-widgets.el b/dirvish-widgets.el
index 1bf28c4145..839808502d 100644
--- a/dirvish-widgets.el
+++ b/dirvish-widgets.el
@@ -88,16 +88,11 @@ This is used to retrieve pdf metadata."
 This is used to generate thumbnails for pdf files."
   :group 'dirvish :type 'string)
 
-(defcustom dirvish-zipinfo-program "zipinfo"
-  "Absolute or reletive name of the `zipinfo' program.
+(defcustom dirvish-7z-program (or (executable-find "7zz") (executable-find 
"7z"))
+  "Absolute or reletive name of the `7z' | `7zz' (7-zip) program.
 This is used to list files and their attributes for .zip archives."
   :group 'dirvish :type 'string)
 
-(defcustom dirvish-tar-program "tar"
-  "Absolute or reletive name of the `tar' program.
-This is used to list files and their attributes for .tar, .gz etc. archives."
-  :group 'dirvish :type 'string)
-
 (defcustom dirvish-show-media-properties
   (and (executable-find dirvish-mediainfo-program) t)
   "Show media properties automatically in preview window."
@@ -662,14 +657,11 @@ Require: `pdf-tools' (Emacs package)"
 
 (dirvish-define-preview archive (file ext)
   "Preview archive files.
-Require: `zipinfo' (executable)
-Require: `tar' (executable)"
-  :require (dirvish-zipinfo-program dirvish-tar-program)
-  (cond ((equal ext "zip") `(shell . (,dirvish-zipinfo-program ,file)))
-;; Emacs source code files, let `fallback' handles it
-((string-suffix-p ".el.gz" file) nil)
-((member ext '("tar" "zst" "bz2" "bz" "gz" "xz" "tgz"))
- `(shell . (,dirvish-tar-program "-tvf" ,file)
+Require: `7z' executable (`7zz' on macOS)"
+  :require (dirvish-7z-program)
+  (when (member ext dirvish-archive-exts)
+;; TODO: parse output from (dirvish-7z-program "l" "-ba" "-slt" 
"-sccUTF-8")
+`(shell . (,dirvish-7z-program "l" "-ba" ,file
 
 (provide 'dirvish-widgets)
 ;;; dirvish-widgets.el ends here
diff --git a/dirvish.el b/dirvish.el
index 3db14bb8e0..23332ee557 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -61,11 +61,11 @@ The default value contains:
 - audio: preview audio files with metadata, requires `mediainfo'.
 - epub: preview epub documents, requires `epub-thumbnailer'.
 - pdf: preview pdf documents via `pdf-tools'.
-- archive: preview archive files such as .tar, .zip, requires `tar' / `unzip'.
+- archive: preview archives such as .tar, .zip, requires `7z' (`7zz' on macOS).
 - dired: preview directories using 

[elpa] externals/compat f0f35b6a43: compat.texi: Use correct path for subr-x.el

2025-03-07 Thread ELPA Syncer
branch: externals/compat
commit f0f35b6a432398487d286e4fc058edb3fc2344ee
Author: Daniel Mendler 
Commit: Daniel Mendler 

compat.texi: Use correct path for subr-x.el
---
 compat.texi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/compat.texi b/compat.texi
index f06af8527c..c9ed82e322 100644
--- a/compat.texi
+++ b/compat.texi
@@ -454,12 +454,12 @@ As with @code{when}, if one is only interested in the 
case where all
 just as they are by @code{if-let*}.
 @end defmac
 
-@c based on lisp/subr-x.el
+@c based on lisp/emacs-lisp/subr-x.el
 @defun hash-table-empty hash-table
 Check whether @var{hash-table} is empty (has 0 elements).
 @end defun
 
-@c based on lisp/subr-x.el
+@c based on lisp/emacs-lisp/subr-x.el
 @defmac thread-first &rest forms
 Combine @var{forms} into a single expression by ``threading'' each
 element as the @emph{first} argument of their successor.  Elements of
@@ -2505,7 +2505,7 @@ Properties,Examining
 Properties,,elisp,}).
 @end defun
 
-@c copied from lisp/subr-x.el
+@c copied from lisp/emacs-lisp/subr-x.el
 @defun add-display-text-property start end prop value &optional object
 Add display property @var{prop} with @var{value} to the text from
 @var{start} to @var{end}.  If any text in the region has a non-nil
@@ -2683,7 +2683,7 @@ you can say:
 @xref{Size of Displayed Text,,,elisp}.
 @end defun
 
-@c based on lisp/subr-x.el
+@c based on lisp/emacs-lisp/subr-x.el
 @defmac with-buffer-unmodified-if-unchanged &rest body@dots{}
 Evaluate @var{body} like @code{progn}, but change buffer-modified
 status only if buffer text changes.  If the buffer was unmodified



[nongnu] elpa/llama 580ad210e0: all-completions advice: Check for equality with global obarray and empty str as optimization

2025-03-07 Thread ELPA Syncer
branch: elpa/llama
commit 580ad210e01cb54511aa399614e26feceeb17aaa
Author: Daniel Mendler 
Commit: Daniel Mendler 

all-completions advice: Check for equality with global obarray and empty 
str as optimization
---
 llama.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/llama.el b/llama.el
index 6476dc5ec3..6d366c7f44 100644
--- a/llama.el
+++ b/llama.el
@@ -306,8 +306,7 @@ This advice prevents the empty string from being offered as 
a completion
 candidate when `obarray' or a completion table that internally uses
 that is used as TABLE."
   (let ((result (apply fn str table rest)))
-(if (and (obarrayp table)
- (eq (symbol-function (intern-soft "" table)) 'llama))
+(if (and (eq obarray table) (equal str ""))
 (delete "" result)
   result)))
 



[elpa] externals/consult updated (ce38dd0377 -> 332c172999)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  ce38dd0377 consult-completion-in-region: Auto-detect completion UI.
   new  3aa436bd2c consult-yank-pop, consult-history: Respect display 
properties during preview
   new  332c172999 Update changelog


Summary of changes:
 CHANGELOG.org | 2 ++
 consult.el| 2 ++
 2 files changed, 4 insertions(+)



[elpa] externals/consult 3aa436bd2c 1/2: consult-yank-pop, consult-history: Respect display properties during preview

2025-03-07 Thread ELPA Syncer
branch: externals/consult
commit 3aa436bd2c9c058f0537fe83d5cb5f9d558b0222
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult-yank-pop, consult-history: Respect display properties during preview

Avoid leaking passwords stored in the kill-ring during preview. The 
password in
the kill-ring is obfuscated with asterisks as display properties. Fix #1196.
---
 consult.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/consult.el b/consult.el
index f5ae6b0d90..b75b6ffb58 100644
--- a/consult.el
+++ b/consult.el
@@ -4164,6 +4164,7 @@ If no MODES are specified, use currently active major and 
minor modes."
 :sort nil
 :category 'kill-ring
 :require-match t
+:lookup #'consult--lookup-member
 :state
 (consult--insertion-preview
  (point)
@@ -4396,6 +4397,7 @@ of the prompt.  See also `cape-history' from the Cape 
package."
   ('file-name-history 'file)))
:sort nil
:initial (buffer-substring-no-properties beg end)
+   :lookup #'consult--lookup-member
:state (consult--insertion-preview beg end)
 (delete-region beg end)
 (when index



[nongnu] elpa/clojure-ts-mode 51ee8a4673: [#62] Define list thing to improve navigation in Emacs 31

2025-03-07 Thread ELPA Syncer
branch: elpa/clojure-ts-mode
commit 51ee8a46737798dbe99613624024958ebe2ce296
Author: Roman Rudakov 
Commit: Bozhidar Batsov 

[#62] Define list thing to improve navigation in Emacs 31

If list thing is defined, Emacs 31 will set a few options automatically to
improve navigation by lists/sexp etc.

Big thanks for the patch to Juri Linkov .
---
 CHANGELOG.md   |  2 ++
 README.md  |  3 +++
 clojure-ts-mode.el | 13 ++---
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index b4989298fe..9c6bc7b5cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
 
 ## main (unreleased)
 
+- [[#62](https://github.com/clojure-emacs/clojure-ts-mode/issues/62)]: Define 
`list` "thing" to improve navigation in Emacs 31.
+
 ## 0.2.3 (2025-03-04)
 
 - [#38]: Add support for `in-ns` forms in `clojure-ts-find-ns`.
diff --git a/README.md b/README.md
index 03e00e4fe9..a5b010512d 100644
--- a/README.md
+++ b/README.md
@@ -231,6 +231,9 @@ Here are some notable examples:
 
 - On Emacs 29 the parent mode is `prog-mode`, but on Emacs 30+ it's both 
`prog-mode`
 and `clojure-mode` (this is very helpful when dealing with `derived-mode-p` 
checks)
+- Navigation by sexp/lists might work differently on Emacs versions lower
+  than 31. Starting with version 31, Emacs uses TreeSitter 'things' settings, 
if
+  available, to rebind some commands.
 
 ## Frequently Asked Questions
 
diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
index d07d75b810..7480cb9656 100644
--- a/clojure-ts-mode.el
+++ b/clojure-ts-mode.el
@@ -918,10 +918,16 @@ If JUSTIFY is non-nil, justify as well as fill the 
paragraph."
 "unquote_splicing_lit" "unquoting_lit")
   "A regular expression that matches nodes that can be treated as 
s-expressions.")
 
+(defconst clojure-ts--list-nodes
+  '("list_lit" "anon_fn_lit" "read_cond_lit" "splicing_read_cond_lit"
+"map_lit" "ns_map_lit" "vec_lit" "set_lit")
+  "A regular expression that matches nodes that can be treated as lists.")
+
 (defconst clojure-ts--thing-settings
   `((clojure
- (sexp ,(regexp-opt clojure-ts--sexp-nodes)
-   text ,(regexp-opt '("comment"))
+ (sexp ,(regexp-opt clojure-ts--sexp-nodes))
+ (list ,(regexp-opt clojure-ts--list-nodes))
+ (text ,(regexp-opt '("comment"))
 
 (defvar clojure-ts-mode-map
   (let ((map (make-sparse-keymap)))
@@ -1043,7 +1049,8 @@ See `clojure-ts--font-lock-settings' for usage of 
MARKDOWN-AVAILABLE."
   ;; Workaround for treesit-transpose-sexps not correctly working with
   ;; treesit-thing-settings on Emacs 30.
   ;; Once treesit-transpose-sexps it working again this can be removed
-  (when (fboundp 'transpose-sexps-default-function)
+  (when (and (fboundp 'transpose-sexps-default-function)
+ (< emacs-major-version 31))
 (setq-local transpose-sexps-function 
#'transpose-sexps-default-function)
 
 ;; For Emacs 30+, so that `clojure-ts-mode' is treated as deriving from



[elpa] externals/consult 332c172999 2/2: Update changelog

2025-03-07 Thread ELPA Syncer
branch: externals/consult
commit 332c17299913af7d6eb14c6d2a1d0f91f048b07c
Author: Daniel Mendler 
Commit: Daniel Mendler 

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

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 0e082ec430..5df7902406 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -7,6 +7,8 @@
 - Remove obsolete ~consult--async-*~ APIs.
 - File preview: Ensure that remote files do not slow down preview.
 - File preview: Do not preview gpg files.
+- ~consult-yank-pop~, ~consult-history~: Respect display properties when 
previewing
+  to avoid leaking hidden data.
 - ~consult-completion-in-region~: Auto-detect completion UI.
 
 * Version 2.0 (2025-01-28)



[elpa] externals/cus-abbrev 796a1da64f: Don't ignore package files in .elpaignore

2025-03-07 Thread ELPA Syncer
branch: externals/cus-abbrev
commit 796a1da64feb649281e6d065c4e5b90cb5b0d22c
Author: Mauro Aranda 
Commit: Mauro Aranda 

Don't ignore package files in .elpaignore

Last commit was just a confusion.  The package files should be ignored
only in Git.

https://lists.gnu.org/archive/html/emacs-devel/2025-03/msg00349.html

.elpaignore: Don't ignore *-pkg.el and *-autoloads.el here.
---
 .elpaignore | 2 --
 .gitignore  | 2 +-
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/.elpaignore b/.elpaignore
index 2881a67db3..7a1d75daa7 100644
--- a/.elpaignore
+++ b/.elpaignore
@@ -1,4 +1,2 @@
 .gitignore
 Makefile
-/cus-abbrev-pkg.el
-/cus-abbrev-autoloads.el
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 63f9cf2b8d..954a803f98 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,4 +34,4 @@
 
 # Package stuff
 /cus-abbrev-pkg.el
-/cus-abbrev-autoloads.el
\ No newline at end of file
+/cus-abbrev-autoloads.el



[elpa] externals/consult 64650f10a9 1/2: consult-completion-in-region: Improve handling of single candidates (Fix #1193)

2025-03-07 Thread ELPA Syncer
branch: externals/consult
commit 64650f10a97334559a74ec7c2b6bf41071577431
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult-completion-in-region: Improve handling of single candidates (Fix 
#1193)
---
 consult.el | 114 -
 1 file changed, 53 insertions(+), 61 deletions(-)

diff --git a/consult.el b/consult.el
index b75b6ffb58..2d42c5 100644
--- a/consult.el
+++ b/consult.el
@@ -3289,71 +3289,63 @@ expected return value are as specified for 
`completion-in-region'."
   (barf-if-buffer-read-only)
   (let* ((initial (buffer-substring-no-properties start end))
  (metadata (completion-metadata initial collection predicate))
- ;; bug#75910: category instead of `minibuffer-completing-file-name'
- (minibuffer-completing-file-name
-  (eq 'file (completion-metadata-get metadata 'category)))
  (threshold (completion--cycle-threshold metadata))
- (all (completion-all-completions initial collection predicate (length 
initial)))
- ;; Wrap all annotation functions to ensure that they are executed
- ;; in the original buffer.
- (exit-fun (plist-get completion-extra-properties :exit-function))
- (ann-fun (plist-get completion-extra-properties :annotation-function))
- (aff-fun (plist-get completion-extra-properties :affixation-function))
- (docsig-fun (plist-get completion-extra-properties :company-docsig))
- (completion-extra-properties
-  `(,@(and ann-fun (list :annotation-function (consult--in-buffer 
ann-fun)))
-,@(and aff-fun (list :affixation-function (consult--in-buffer 
aff-fun)))
-;; Provide `:annotation-function' if `:company-docsig' is 
specified.
-,@(and docsig-fun (not ann-fun) (not aff-fun)
-   (list :annotation-function
- (consult--in-buffer
-  (lambda (cand)
-(concat (propertize " " 'display '(space :align-to 
center))
-(funcall docsig-fun cand)
-;; error if `threshold' is t or the improper list `all' is too short
-(if (and threshold
- (or (not (consp (ignore-errors (nthcdr threshold all
- (and completion-cycling completion-all-sorted-completions)))
+ (all (completion-all-completions initial collection predicate (length 
initial
+;; Normalize improper list
+(when-let ((last (last all)))
+  (setcdr last nil))
+(if (or (eq threshold t) (length< all (1+ (or threshold 1)))
+(and completion-cycling completion-all-sorted-completions))
 (completion--in-region start end collection predicate)
   (let* ((this-command #'consult-completion-in-region)
+ ;; bug#75910: category instead of 
`minibuffer-completing-file-name'
+ (minibuffer-completing-file-name
+  (eq 'file (completion-metadata-get metadata 'category)))
+ ;; Wrap all annotation functions to ensure that they are executed
+ ;; in the original buffer.
+ (exit-fun (plist-get completion-extra-properties :exit-function))
+ (ann-fun (plist-get completion-extra-properties 
:annotation-function))
+ (aff-fun (plist-get completion-extra-properties 
:affixation-function))
+ (docsig-fun (plist-get completion-extra-properties 
:company-docsig))
+ (completion-extra-properties
+  `(,@(and ann-fun (list :annotation-function (consult--in-buffer 
ann-fun)))
+,@(and aff-fun (list :affixation-function (consult--in-buffer 
aff-fun)))
+;; Provide `:annotation-function' if `:company-docsig' is 
specified.
+,@(and docsig-fun (not ann-fun) (not aff-fun)
+   (list :annotation-function
+ (consult--in-buffer
+  (lambda (cand)
+(concat (propertize " " 'display '(space 
:align-to center))
+(funcall docsig-fun cand
  (completion
-  (cond
-   ((atom all) nil)
-   ((and (consp all) (atom (cdr all)))
-(concat (substring initial 0 (cdr all)) (car all)))
-   (t
-(consult--local-let ((enable-recursive-minibuffers t))
-  ;; Evaluate completion table in the original buffer.
-  ;; This is a reasonable thing to do and required by
-  ;; some completion tables in particular by lsp-mode.
-  ;; See gh:minad/vertico#61.
-  (consult--read
-   (consult--completion-table-in-buffer collection)
-   :prompt (if (minibufferp)
-   ;; Use existing minibuffer prompt and input
-   (let ((pro

[elpa] externals/cape 5c198df876 1/2: cape-company-to-capf: Handle updated 'prefix return value convention (Fix #146)

2025-03-07 Thread ELPA Syncer
branch: externals/cape
commit 5c198df8767cf9bbc4c4272142ae36c0b7681888
Author: Daniel Mendler 
Commit: Daniel Mendler 

cape-company-to-capf: Handle updated 'prefix return value convention (Fix 
#146)
---
 cape.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/cape.el b/cape.el
index 1554be1995..1142e7202c 100644
--- a/cape.el
+++ b/cape.el
@@ -811,10 +811,11 @@ again if the input prefix changed."
   (funcall backend 'init)
   (put backend 'company-init t)
   (setf (alist-get backend cape--company-init) t))
-(when-let ((prefix (cape--company-call backend 'prefix))
-   (initial-input (if (stringp prefix) prefix (car-safe prefix
-  (let* ((end (point)) (beg (- end (length initial-input)))
- (valid (if (cape--company-call backend 'no-cache initial-input)
+(when-let ((pre (pcase (cape--company-call backend 'prefix)
+  ((or `(,p ,_s) (and (pred stringp) p)) (cons p (length 
p)))
+  ((or `(,p ,_s ,l) `(,p . ,l)) (cons p l)
+  (let* ((end (point)) (beg (- end (length (car pre
+ (valid (if (cape--company-call backend 'no-cache (car pre))
 #'equal (or valid #'string-prefix-p)))
  (sort-fun (and (cape--company-call backend 'sorted) #'identity))
  restore-props)
@@ -835,7 +836,7 @@ again if the input prefix changed."
 (cons (apply-partially valid input) cands)
   :category backend
   :exclusive 'no
-  :company-prefix-length (cdr-safe prefix)
+  :company-prefix-length (cdr pre)
   :company-doc-buffer (lambda (x) (cape--company-call backend 
'doc-buffer x))
   :company-location (lambda (x) (cape--company-call backend 
'location x))
   :company-docsig (lambda (x) (cape--company-call backend 'meta x))



[elpa] externals/cape updated (50fdb70807 -> c854d98373)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/cape.

  from  50fdb70807 cape-file: Use substitute-in-file-name when checking for 
existing directory
   new  5c198df876 cape-company-to-capf: Handle updated 'prefix return 
value convention (Fix #146)
   new  c854d98373 Update changelog


Summary of changes:
 CHANGELOG.org |  7 +++
 cape.el   | 11 ++-
 2 files changed, 13 insertions(+), 5 deletions(-)



[elpa] externals/consult 8ea14ed546 2/2: Update changelog

2025-03-07 Thread ELPA Syncer
branch: externals/consult
commit 8ea14ed54647c29dfa48af03c6466b4fe0119756
Author: Daniel Mendler 
Commit: Daniel Mendler 

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

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 5df7902406..63b27a4658 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -10,6 +10,7 @@
 - ~consult-yank-pop~, ~consult-history~: Respect display properties when 
previewing
   to avoid leaking hidden data.
 - ~consult-completion-in-region~: Auto-detect completion UI.
+- ~consult-completion-in-region~: Improve handling of single candidates.
 
 * Version 2.0 (2025-01-28)
 



[nongnu] elpa/dirvish updated (34640ec047 -> bfb3826a8a)

2025-03-07 Thread ELPA Syncer
elpasync pushed a change to branch elpa/dirvish.

  from  34640ec047 chore: update CHANGELOG for 2.2.0
   new  7c808c3139 fix(subtree): incorrect vc backend
   new  bfb3826a8a fix(side): mismatched variables


Summary of changes:
 dirvish.el| 12 
 extensions/dirvish-side.el|  3 ---
 extensions/dirvish-subtree.el |  2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)



[nongnu] elpa/dirvish 7c808c3139 1/2: fix(subtree): incorrect vc backend

2025-03-07 Thread ELPA Syncer
branch: elpa/dirvish
commit 7c808c3139e84c9829cfbf0a87f0043bdab7b8e9
Author: Alex Lu 
Commit: Alex Lu 

fix(subtree): incorrect vc backend
---
 extensions/dirvish-subtree.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/dirvish-subtree.el b/extensions/dirvish-subtree.el
index 483b4019cb..d52608f128 100644
--- a/extensions/dirvish-subtree.el
+++ b/extensions/dirvish-subtree.el
@@ -228,7 +228,7 @@ creation even the entry is in nested subtree nodes."
   (let* ((dir (dired-get-filename))
  (listing (dirvish-subtree--readin dir))
  buffer-read-only beg end)
-(dirvish--dir-data-async dir (current-buffer) t)
+(dirvish-data-for-dir dir (current-buffer) t)
 (with-silent-modifications
   (save-excursion
 (setq beg (progn (move-end-of-line 1) (insert "\n") (point)))



[nongnu] elpa/xah-fly-keys be07d739cc: minor tweak for emacs version 30

2025-03-07 Thread ELPA Syncer
branch: elpa/xah-fly-keys
commit be07d739cc9f95de3508a1fd0eaa4c5b0da363f8
Author: Xah Lee 
Commit: Xah Lee 

minor tweak for emacs version 30
---
 xah-fly-keys.el | 15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index 3050120ce2..bc0af9480a 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee 
-;; Version: 26.9.20250301145516
+;; Version: 26.9.20250307132754
 ;; Created: 2013-09-10
 ;; Package-Requires: ((emacs "27"))
 ;; Keywords: convenience, vi, vim, ergoemacs, keybinding
@@ -243,9 +243,7 @@ Version: 2024-10-30"
   (if visual-line-mode
   (beginning-of-visual-line)
 (if (eq major-mode 'eshell-mode)
-(progn
-  (declare-function eshell-bol "esh-mode.el" ())
-  (eshell-bol))
+(beginning-of-line)
   (back-to-indentation)
   (when (eq xp (point))
 (beginning-of-line)))
@@ -1715,7 +1713,7 @@ If there is selection, delete it first.
 
 URL `http://xahlee.info/emacs/emacs/elisp_insert-date-time.html'
 Created: 2013-05-10
-Version: 2023-10-01"
+Version: 2025-03-07"
   (interactive)
   (let (xmenu xstyle)
 (setq
@@ -1726,12 +1724,13 @@ Version: 2023-10-01"
("ISO datetime full • 2018-04-12T22:46:11-07:00" .
 (concat
  (format-time-string "%Y-%m-%dT%T")
- ((lambda (xx) (format "%s:%s" (substring xx 0 3) (substring xx 3 5)))
-  (format-time-string "%z"
+ (funcall (lambda (xx) (format "%s:%s" (substring xx 0 3) (substring 
xx 3 5)))
+  (format-time-string "%z"
("ISO datetime w space • 2018-04-12 22:46:11-07:00" .
 (concat
  (format-time-string "%Y-%m-%d %T")
- ((lambda (xx) (format "%s:%s" (substring xx 0 3) (substring xx 3 5)))
+ (funcall
+  (lambda (xx) (format "%s:%s" (substring xx 0 3) (substring xx 3 5)))
   (format-time-string "%z"
("ISO date + weekday • 2018-04-12 Thursday" . (format-time-string 
"%Y-%m-%d %A"))
("USA date + weekday • Thursday, April 12, 2018" . (format-time-string 
"%A, %B %d, %Y"))