[elpa] externals/consult f9930cbe82 1/2: consult--with-preview-1: Minor fix of minibuffer state capturing

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit f9930cbe82db784cf1950581d3f699b63d246e1d
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult--with-preview-1: Minor fix of minibuffer state capturing
---
 consult.el | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/consult.el b/consult.el
index 278082d5d2..2bc85e72e7 100644
--- a/consult.el
+++ b/consult.el
@@ -1548,7 +1548,7 @@ The result can be passed as :state argument to 
`consult--read'." type)
   "Add preview support for FUN.
 See `consult--with-preview' for the arguments
 PREVIEW-KEY, STATE, TRANSFORM and CANDIDATE."
-  (let ((input "") narrow selected timer last-preview)
+  (let ((mb-input "") mb-narrow selected timer last-preview)
 (consult--minibuffer-with-setup-hook
 (if (and state preview-key)
 (lambda ()
@@ -1575,8 +1575,9 @@ PREVIEW-KEY, STATE, TRANSFORM and CANDIDATE."
 (lambda ()
   (when-let ((cand (funcall candidate)))
 (with-selected-window (active-minibuffer-window)
-  (let ((input (minibuffer-contents-no-properties))
-(new-preview (cons input cand)))
+  (let* ((input (minibuffer-contents-no-properties))
+ (narrow consult--narrow)
+ (new-preview (list input narrow cand)))
 (with-selected-window (or 
(minibuffer-selected-window) (next-window))
   (when-let ((transformed (funcall transform 
narrow input cand))
  (debounce 
(consult--preview-key-debounce preview-key transformed)))
@@ -1600,17 +1601,18 @@ PREVIEW-KEY, STATE, TRANSFORM and CANDIDATE."
 (setq last-preview new-preview))
   (consult--append-local-post-command-hook
(lambda ()
- (setq input (minibuffer-contents-no-properties)
-   narrow consult--narrow)
+ (setq mb-input (minibuffer-contents-no-properties)
+   mb-narrow consult--narrow)
  (funcall consult--preview-function
   (lambda ()
 (consult--append-local-post-command-hook
- (lambda () (setq input (minibuffer-contents-no-properties)
-  narrow consult--narrow)
+ (lambda ()
+   (setq mb-input (minibuffer-contents-no-properties)
+ mb-narrow consult--narrow)
   (unwind-protect
   (cons (setq selected (when-let (result (funcall fun))
- (funcall transform narrow input result)))
-input)
+ (funcall transform mb-narrow mb-input 
result)))
+mb-input)
 (when state
   ;; STEP 5: The preview function should perform its final action
   (funcall state 'return selected))



[elpa] externals/consult 7989642a2b 2/2: consult--with-preview-1: Compare the transformed candidate instead of the input

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit 7989642a2bdc830e1b3de8cfeb479f329bc7d4c9
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult--with-preview-1: Compare the transformed candidate instead of the 
input

Add some comments since I get confused every time I read the preview code. 
The
code is messy.
---
 consult.el | 40 ++--
 1 file changed, 30 insertions(+), 10 deletions(-)

diff --git a/consult.el b/consult.el
index 2bc85e72e7..d2df6cd358 100644
--- a/consult.el
+++ b/consult.el
@@ -1548,7 +1548,7 @@ The result can be passed as :state argument to 
`consult--read'." type)
   "Add preview support for FUN.
 See `consult--with-preview' for the arguments
 PREVIEW-KEY, STATE, TRANSFORM and CANDIDATE."
-  (let ((mb-input "") mb-narrow selected timer last-preview)
+  (let ((mb-input "") mb-narrow selected timer previewed)
 (consult--minibuffer-with-setup-hook
 (if (and state preview-key)
 (lambda ()
@@ -1563,7 +1563,7 @@ PREVIEW-KEY, STATE, TRANSFORM and CANDIDATE."
 (setq timer nil))
   (with-selected-window (or 
(minibuffer-selected-window) (next-window))
 ;; STEP 3: Reset preview
-(when last-preview
+(when previewed
   (funcall state 'preview nil))
 ;; STEP 4: Notify the preview function of the 
minibuffer exit
 (funcall state 'exit nil)
@@ -1574,17 +1574,39 @@ PREVIEW-KEY, STATE, TRANSFORM and CANDIDATE."
   (setq consult--preview-function
 (lambda ()
   (when-let ((cand (funcall candidate)))
+;; Drop properties to prevent bugs regarding candidate
+;; lookup, which must handle candidates without
+;; properties.  Otherwise the arguments passed to the
+;; lookup function are confusing, since during preview
+;; the candidate has properties but for the final 
lookup
+;; after completion it does not.
+(setq cand (substring-no-properties cand))
 (with-selected-window (active-minibuffer-window)
-  (let* ((input (minibuffer-contents-no-properties))
- (narrow consult--narrow)
- (new-preview (list input narrow cand)))
+  (let ((input (minibuffer-contents-no-properties))
+(narrow consult--narrow))
 (with-selected-window (or 
(minibuffer-selected-window) (next-window))
   (when-let ((transformed (funcall transform 
narrow input cand))
  (debounce 
(consult--preview-key-debounce preview-key transformed)))
 (when timer
   (cancel-timer timer)
   (setq timer nil))
-(unless (equal-including-properties 
last-preview new-preview)
+;; The transformed candidate may have text
+;; properties, which change the preview 
display.
+;; This matters for example for `consult-grep',
+;; where the current candidate and input may
+;; stay equal, but the highlighting of the
+;; candidate changes while the candidates list
+;; is lagging a bit behind and updates
+;; asynchronously.
+;;
+;; NOTE: In older Consult versions the input 
was
+;; compared instead, since I was worried that
+;; comparing the transformed candidates could 
be
+;; potentially expensive or problematic. 
However
+;; comparing the transformed candidates is more
+;; correct, since the transformed candidate is
+;; the thing which is actually previewed.
+(unless (equal-including-properties previewed 
transformed)
   (if (> debounce 0)
   (let ((win (selected-window)))
 (setq timer
@@ -1594,11 +1616,9 @@ PREVIEW-KEY, STATE, TRANSFORM and CANDIDATE."
  (when (window-live-p win)
(with-selected-window win
 

[elpa] externals/consult updated (051f51811d -> 7989642a2b)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  051f51811d Revert "Shorter variable names"
   new  f9930cbe82 consult--with-preview-1: Minor fix of minibuffer state 
capturing
   new  7989642a2b consult--with-preview-1: Compare the transformed 
candidate instead of the input


Summary of changes:
 consult.el | 50 --
 1 file changed, 36 insertions(+), 14 deletions(-)



[elpa] externals/consult 3e000c852e 1/2: consult-info: Simplify and speed up

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit 3e000c852e95e06fdaf006317a1645171014acf4
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult-info: Simplify and speed up

Do not walk back to find node name.
---
 consult-info.el | 84 +++--
 1 file changed, 39 insertions(+), 45 deletions(-)

diff --git a/consult-info.el b/consult-info.el
index d0da9c67e3..871a65d7b1 100644
--- a/consult-info.el
+++ b/consult-info.el
@@ -32,57 +32,51 @@
 
 (defun consult-info--candidates (manuals input)
   "Dynamically find lines in MANUALS matching INPUT."
-  (pcase-let ((`(,regexps . ,hl)
-   (funcall consult--regexp-compiler input 'emacs t))
-  (candidates nil)
-  (cand-idx 0)
-  (last-node nil)
-  (full-node nil))
+  (pcase-let* ((`(,regexps . ,hl)
+(funcall consult--regexp-compiler input 'emacs t))
+   (re (concat "\\(\^_\n\\(?:.*Node:[ 
\t]*\\([^,\t\n]+\\)\\)?.*\n\\)\\|" (car regexps)))
+   (candidates nil)
+   (cand-idx 0)
+   (last-node nil)
+   (full-node nil))
 (pcase-dolist (`(,manual . ,buf) manuals)
   (with-current-buffer buf
 (setq last-node nil full-node nil)
 (widen)
 (goto-char (point-min))
 ;; TODO subfile support?!
-(while (and (not (eobp)) (re-search-forward (car regexps) nil t))
-  (let ((bol (pos-bol))
-(eol (pos-eol)))
-(goto-char bol)
-(when (and
-   ;; Information separator character
-   (>= (- (point) 2) (point-min))
-   (not (eq (char-after (- (point) 2)) ?\^_))
-   ;; Non-blank line, only printable characters on the line.
-   (not (looking-at-p "^\\s-*$"))
-   (looking-at-p "^[[:print:]]*$")
-   ;; Matches all regexps
-   (seq-every-p (lambda (r)
-  (goto-char bol)
-  (re-search-forward r eol t))
-(cdr regexps))
-   ;; Find node beginning
-   (goto-char bol)
-   (if (search-backward "\n\^_" nil 'move)
-   (forward-line 2)
- (when (looking-at-p "\^_")
-   (forward-line 1)))
-   ;; Node name
-   (re-search-forward "Node:[ \t]*" nil t))
-  (let ((node (buffer-substring-no-properties
-   (point)
-   (progn
- (skip-chars-forward "^,\t\n")
- (point
-(cand (concat
-   (funcall hl (buffer-substring-no-properties bol 
eol))
-   (consult--tofu-encode cand-idx
-(unless (equal node last-node)
-  (setq full-node (concat "(" manual ")" node)
-last-node node))
-(put-text-property 0 1 'consult--info (list full-node bol buf) 
cand)
-(cl-incf cand-idx)
-(push cand candidates)))
-(goto-char (1+ eol))
+(while (and (not (eobp)) (re-search-forward re nil t))
+  (if (match-end 1)
+  (progn
+(if-let ((node (match-string 2)))
+(unless (equal node last-node)
+  (setq full-node (concat "(" manual ")" node)
+last-node node))
+  (setq last-node nil full-node nil))
+(goto-char (1+ (pos-eol
+(let ((bol (pos-bol))
+  (eol (pos-eol)))
+  (goto-char bol)
+  (when (and
+ full-node
+ ;; Information separator character
+ (>= (- (point) 2) (point-min))
+ (not (eq (char-after (- (point) 2)) ?\^_))
+ ;; Non-blank line, only printable characters on the line.
+ (not (looking-at-p "^\\s-*$"))
+ (looking-at-p "^[[:print:]]*$")
+ ;; Matches all regexps
+ (seq-every-p (lambda (r)
+(goto-char bol)
+(re-search-forward r eol t))
+  (cdr regexps)))
+(let ((cand (concat
+ (funcall hl (buffer-substring-no-properties bol 
eol))
+ (consult--tofu-encode cand-idx
+  (put-text-property 0 1 'consult--info (list full-node bol 
buf) cand)
+  (cl-incf cand-idx)
+  (push cand candidates)))
+  (goto-char (1+ eol)))
 (nreverse candidates)))
 
 (defun consult-info--position (cand)



[elpa] externals/consult updated (7989642a2b -> 271269c5a1)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  7989642a2b consult--with-preview-1: Compare the transformed 
candidate instead of the input
   new  3e000c852e consult-info: Simplify and speed up
   new  271269c5a1 consult-info: Add todos


Summary of changes:
 consult-info.el | 92 -
 1 file changed, 46 insertions(+), 46 deletions(-)



[elpa] externals/consult 271269c5a1 2/2: consult-info: Add todos

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit 271269c5a1a93d9ed343793ba526cf7569b16edd
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult-info: Add todos
---
 consult-info.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/consult-info.el b/consult-info.el
index 871a65d7b1..ba1cd8aa6d 100644
--- a/consult-info.el
+++ b/consult-info.el
@@ -44,7 +44,13 @@
 (setq last-node nil full-node nil)
 (widen)
 (goto-char (point-min))
-;; TODO subfile support?!
+;; TODO Info seems to support subfiles?! Maybe not needed?
+;; TODO It would be nice to make section/subsection/subsubsection 
titles
+;; part of the candidate group titles. However the titles must also be
+;; searchable, so we cannot simply search for all titles and walk over
+;; them. But if we add sections to the group titles, the grouping may
+;; also get too fine grained for completion, such that this won't be
+;; convenient.
 (while (and (not (eobp)) (re-search-forward re nil t))
   (if (match-end 1)
   (progn



[nongnu] elpa/markdown-mode 0f7eae8113 3/3: Merge pull request #745 from kimim/clear-image-cache

2023-01-28 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 0f7eae811308f92b8681b5411f7a5035d1fcd5a7
Merge: b094ae0ac9 1eeb65dece
Author: Shohei YOSHIDA 
Commit: GitHub 

Merge pull request #745 from kimim/clear-image-cache

clear-image-cache when remove inline image
---
 CHANGES.md   | 1 +
 markdown-mode.el | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CHANGES.md b/CHANGES.md
index 7c62a7c0d0..d2fd6426a3 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -17,6 +17,7 @@
 - Don't spell-check against pandoc references. [GH-572][]
 - Support tree-sitter-based major modes used by Emacs 29.
 - Highlight "geo" URI scheme [GH-739][]
+- `clear-image-cache` to make toggle inline image update.
 
 *   Bug fixes:
 - Don't override table faces by link faces [GH-716][]
diff --git a/markdown-mode.el b/markdown-mode.el
index 0133e07d3c..7774a343c6 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -8605,7 +8605,8 @@ This can be toggled with `markdown-toggle-inline-images'
 or \\[markdown-toggle-inline-images]."
   (interactive)
   (mapc #'delete-overlay markdown-inline-image-overlays)
-  (setq markdown-inline-image-overlays nil))
+  (setq markdown-inline-image-overlays nil)
+  (when (fboundp 'clear-image-cache) (clear-image-cache)))
 
 (defcustom markdown-display-remote-images nil
   "If non-nil, download and display remote images.



[nongnu] elpa/markdown-mode updated (b094ae0ac9 -> 0f7eae8113)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch elpa/markdown-mode.

  from  b094ae0ac9 Merge pull request #744 from jrblevin/issue-739
   new  26425d6901 clear-image-cache when remove inline image
   new  1eeb65dece add updates to CHANGES.md
   new  0f7eae8113 Merge pull request #745 from kimim/clear-image-cache


Summary of changes:
 CHANGES.md   | 1 +
 markdown-mode.el | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)



[nongnu] elpa/markdown-mode 1eeb65dece 2/3: add updates to CHANGES.md

2023-01-28 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 1eeb65dece333747ae6ee004d91179ea6e3b2f91
Author: kimim 
Commit: kimim 

add updates to CHANGES.md
---
 CHANGES.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CHANGES.md b/CHANGES.md
index 7c62a7c0d0..d2fd6426a3 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -17,6 +17,7 @@
 - Don't spell-check against pandoc references. [GH-572][]
 - Support tree-sitter-based major modes used by Emacs 29.
 - Highlight "geo" URI scheme [GH-739][]
+- `clear-image-cache` to make toggle inline image update.
 
 *   Bug fixes:
 - Don't override table faces by link faces [GH-716][]



[nongnu] elpa/markdown-mode 26425d6901 1/3: clear-image-cache when remove inline image

2023-01-28 Thread ELPA Syncer
branch: elpa/markdown-mode
commit 26425d690168d1d67ee764bb4483421f4b379523
Author: kimim 
Commit: kimim 

clear-image-cache when remove inline image
---
 markdown-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/markdown-mode.el b/markdown-mode.el
index 0133e07d3c..7774a343c6 100644
--- a/markdown-mode.el
+++ b/markdown-mode.el
@@ -8605,7 +8605,8 @@ This can be toggled with `markdown-toggle-inline-images'
 or \\[markdown-toggle-inline-images]."
   (interactive)
   (mapc #'delete-overlay markdown-inline-image-overlays)
-  (setq markdown-inline-image-overlays nil))
+  (setq markdown-inline-image-overlays nil)
+  (when (fboundp 'clear-image-cache) (clear-image-cache)))
 
 (defcustom markdown-display-remote-images nil
   "If non-nil, download and display remote images.



[elpa] externals/corfu f03165f31d: corfu--move-to-front: Simplify

2023-01-28 Thread ELPA Syncer
branch: externals/corfu
commit f03165f31dcf597ead351fe99494c8c321b9875a
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu--move-to-front: Simplify
---
 corfu.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index 139743f001..efdac24378 100644
--- a/corfu.el
+++ b/corfu.el
@@ -531,8 +531,7 @@ A scroll bar is displayed from LO to LO+BAR."
 (defun corfu--move-to-front (elem list)
   "Move ELEM to front of LIST."
   (if-let (found (member elem list))
-  (let ((head (list (car found
-(nconc head (delq (setcar found nil) list)))
+  (nconc (list (car found)) (delq (setcar found nil) list))
 list))
 
 ;; bug#47711: Deferred highlighting for `completion-all-completions'



[elpa] externals/vertico a595b05ecc: vertico--move-to-front: Simplify

2023-01-28 Thread ELPA Syncer
branch: externals/vertico
commit a595b05ecc87ce0cd6663f01727159e6640b2d2e
Author: Daniel Mendler 
Commit: Daniel Mendler 

vertico--move-to-front: Simplify
---
 vertico.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/vertico.el b/vertico.el
index 912506262a..f676925d1a 100644
--- a/vertico.el
+++ b/vertico.el
@@ -265,8 +265,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
 (defun vertico--move-to-front (elem list)
   "Move ELEM to front of LIST."
   (if-let (found (member elem list))
-  (let ((head (list (car found
-(nconc head (delq (setcar found nil) list)))
+  (nconc (list (car found)) (delq (setcar found nil) list))
 list))
 
 ;; bug#47711: Deferred highlighting for `completion-all-completions'



[elpa] externals/consult 4aab49c745: Formatting

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit 4aab49c7454c5436298ba60e0ea39d5c9c4acb51
Author: Daniel Mendler 
Commit: Daniel Mendler 

Formatting
---
 consult.el | 99 ++
 1 file changed, 55 insertions(+), 44 deletions(-)

diff --git a/consult.el b/consult.el
index d2df6cd358..e53dddf899 100644
--- a/consult.el
+++ b/consult.el
@@ -298,7 +298,10 @@ Can be either a string, or a list of strings or 
expressions."
 (defcustom consult-preview-key 'any
   "Preview trigger keys, can be nil, `any', a single key or a list of keys."
   :type '(choice (const :tag "Any key" any)
- (list :tag "Debounced" (const :debounce) (float :tag 
"Seconds" 0.1) (const any))
+ (list :tag "Debounced"
+   (const :debounce)
+   (float :tag "Seconds" 0.1)
+   (const any))
  (const :tag "No preview" nil)
  (key-sequence :tag "Key")
  (repeat :tag "List of keys" key-sequence)))
@@ -442,7 +445,7 @@ Used by `consult-completion-in-region', `consult-yank' and 
`consult-history'.")
 
 (defface consult-line-number-wrapped
   '((t :inherit consult-line-number-prefix :inherit font-lock-warning-face))
-  "Face used to highlight line number prefixes, if the line number wrapped 
around.")
+  "Face used to highlight line number prefixes after wrap around.")
 
 (defface consult-separator
   'class color) (min-colors 88) (background light))
@@ -1163,8 +1166,9 @@ TOFU suffix for disambiguation."
 ;; and at the same time not enough (e.g., cursor-sensor-functions).
 (defconst consult--remove-text-properties
   '(category cursor cursor-intangible cursor-sensor-functions field follow-link
-fontified front-sticky help-echo insert-behind-hooks insert-in-front-hooks 
intangible keymap
-local-map modification-hooks mouse-face pointer read-only rear-nonsticky 
yank-handler)
+fontified front-sticky help-echo insert-behind-hooks insert-in-front-hooks
+intangible keymap local-map modification-hooks mouse-face pointer read-only
+rear-nonsticky yank-handler)
   "List of text properties to remove from buffer strings.")
 
 (defsubst consult--buffer-substring (beg end &optional fontify)
@@ -1175,8 +1179,11 @@ region has been fontified."
   (let (str)
 (when fontify (consult--fontify-region beg end))
 (setq str (buffer-substring beg end))
-;; TODO Propose the addition of a function 
`preserve-list-of-text-properties'
-(remove-list-of-text-properties 0 (- end beg) 
consult--remove-text-properties str)
+;; TODO Propose the upstream addition of a function
+;; `preserve-list-of-text-properties', which should be as efficient as
+;; `remove-list-of-text-properties'.
+(remove-list-of-text-properties
+ 0 (- end beg) consult--remove-text-properties str)
 str)
 (buffer-substring-no-properties beg end)))
 
@@ -1376,15 +1383,16 @@ See `isearch-open-necessary-overlays' and 
`isearch-open-overlay-temporary'."
:with-markers t :from (point-min) :to (point-max
   (when consult--org-fold-regions
 (let ((hook (make-symbol 
"consult--invisible-open-temporarily-cleanup")))
-  (fset hook (apply-partially #'run-at-time 0 nil
-  (lambda (buffer)
-(when (buffer-live-p buffer)
-  (with-current-buffer buffer
-(pcase-dolist (`(,beg ,end ,_) 
consult--org-fold-regions)
-  (when (markerp beg) 
(set-marker beg nil))
-  (when (markerp end) 
(set-marker end nil)))
-(kill-local-variable 
'consult--org-fold-regions
-  (current-buffer)))
+  (fset hook (apply-partially
+  #'run-at-time 0 nil
+  (lambda (buffer)
+(when (buffer-live-p buffer)
+  (with-current-buffer buffer
+(pcase-dolist (`(,beg ,end ,_) 
consult--org-fold-regions)
+  (when (markerp beg) (set-marker beg nil))
+  (when (markerp end) (set-marker end nil)))
+(kill-local-variable 
'consult--org-fold-regions
+  (current-buffer)))
   (when-let (win (active-minibuffer-window))
 (with-current-buffer (window-buffer win)
   (add-hook 'minibuffer-exit-hook hook nil 'local))
@@ -2294,10 +2302,11 @@ ASYNC must be non-nil for async completion functions."
 (ensure-list minibuffer-default)
 ;; then our custom items
   

[elpa] externals/marginalia 43e8f07a84: Formatting and minor cleanup

2023-01-28 Thread ELPA Syncer
branch: externals/marginalia
commit 43e8f07a84fb4ecd6afa17456c1d5b8dcd16228e
Author: Daniel Mendler 
Commit: Daniel Mendler 

Formatting and minor cleanup
---
 marginalia.el | 205 +++---
 1 file changed, 110 insertions(+), 95 deletions(-)

diff --git a/marginalia.el b/marginalia.el
index df5cbc6db0..a32207a32b 100644
--- a/marginalia.el
+++ b/marginalia.el
@@ -139,7 +139,9 @@ determine it."
 
 (defcustom marginalia-censor-variables
   '("pass\\|auth-source-netrc-cache\\|auth-source-.*-nonce")
-  "The values of variables matching any of these regular expressions is not 
shown."
+  "The value of variables matching any of these regular expressions is not 
shown.
+This configuration variable is useful to hide variables which may
+hold sensitive data, e.g., passwords."
   :type '(repeat (choice symbol regexp)))
 
 (defcustom marginalia-command-categories
@@ -283,6 +285,8 @@ determine it."
 
  Pre-declarations for external packages
 
+(declare-function project-current "project")
+
 (declare-function bookmark-get-handler "bookmark")
 (declare-function bookmark-get-filename "bookmark")
 (declare-function bookmark-get-front-context-string "bookmark")
@@ -295,7 +299,6 @@ determine it."
 (declare-function package-desc-summary "package")
 (declare-function package-desc-version "package")
 (declare-function package-version-join "package")
-(declare-function project-current "project")
 
 (declare-function color-rgb-to-hex "color")
 (declare-function color-rgb-to-hsl "color")
@@ -356,8 +359,11 @@ for performance profiling of the annotators.")
   (when (floatp width) (setq width (round (* width marginalia-field-width
   (when-let (pos (string-search "\n" str))
 (setq str (substring str 0 pos)))
-  (let* ((face (and (not (equal str "")) (get-text-property (1- (length str)) 
'face str)))
- (ell (if face (propertize (marginalia--ellipsis) 'face face) 
(marginalia--ellipsis
+  (let* ((face (and (not (equal str ""))
+(get-text-property (1- (length str)) 'face str)))
+ (ell (if face
+  (propertize (marginalia--ellipsis) 'face face)
+(marginalia--ellipsis
 (if (< width 0)
 (nreverse (truncate-string-to-width (reverse str) (- width) 0 ?\s ell))
   (truncate-string-to-width str width 0 ?\s ell
@@ -406,9 +412,9 @@ FACE is the name of the face, with which the field should 
be propertized."
(annotate (marginalia--annotator (car multi
   ;; Use the Marginalia annotator corresponding to the multi category.
   (funcall annotate (cdr multi))
-;; Apply the original annotation function on the original candidate, if 
there is one.
-;; NOTE: Use `alist-get' instead of `completion-metadata-get' to bypass our
-;; `marginalia--completion-metadata-get' advice!
+;; Apply the original annotation function on the original candidate, if
+;; there is one.  NOTE: Use `alist-get' instead of 
`completion-metadata-get'
+;; to bypass our `marginalia--completion-metadata-get' advice!
 (when-let (annotate (alist-get 'annotation-function marginalia--metadata))
   (funcall annotate cand
 
@@ -493,7 +499,7 @@ t cl-type"
(ignore-errors (and (not (eq (indirect-variable s) s)) "&"))
(and (get s 'byte-obsolete-variable) "-")))
 (and (facep s) "a")
-(and (fboundp 'cl-find-class) (cl-find-class s) "t"
+(and (get s 'cl--class) "t" ;; cl-find-class, cl--find-class
 
 (defun marginalia--function-doc (sym)
   "Documentation string of function SYM."
@@ -584,52 +590,54 @@ keybinding since CAND includes it."
 (eq r sym)
   (string-match-p r name)
 (propertize "*" 'face 'marginalia-null))
-   (t (let ((val (symbol-value sym)))
-(pcase val
-  ('nil (propertize "nil" 'face 'marginalia-null))
-  ('t (propertize "t" 'face 'marginalia-true))
-  ((pred keymapp) (propertize "#" 'face 'marginalia-value))
-  ((pred bool-vector-p) (propertize "#" 'face 
'marginalia-value))
-  ((pred hash-table-p) (propertize "#" 'face 
'marginalia-value))
-  ((pred syntax-table-p) (propertize "#" 'face 
'marginalia-value))
-  ;; Emacs bug#53988: abbrev-table-p throws an error
-  ((guard (ignore-errors (abbrev-table-p val))) (propertize 
"#" 'face 'marginalia-value))
-  ((pred char-table-p) (propertize "#" 'face 
'marginalia-value))
-  ;; Emacs 29 comes with callable objects or object closures 
(OClosures)
-  ((guard (and (fboundp 'oclosure-type) (oclosure-type val)))
-   (format (propertize "#" 'face 'marginalia-function) 
(oclosure-type val)))
-  ((pred byte-code-function-p) (propertize "#" 
'face 'marginalia-function))
-  ((and (pred functionp) (pred symbolp))
-   ;; NOTE: We are not consistent here, values are generally printed 
unquoted. But we
-

[elpa] externals/greader 29d7140dc6 1/4: Aggiunta del back-end "say" per mac-os.

2023-01-28 Thread ELPA Syncer
branch: externals/greader
commit 29d7140dc614f940e6e8585e7fe78a66f4b6aab8
Author: Michelangelo Rodriguez 
Commit: Michelangelo Rodriguez 

Aggiunta del back-end "say" per mac-os.
---
 greader-mac.el | 98 ++
 1 file changed, 98 insertions(+)

diff --git a/greader-mac.el b/greader-mac.el
new file mode 100644
index 00..9275d9fedc
--- /dev/null
+++ b/greader-mac.el
@@ -0,0 +1,98 @@
+(defgroup greader-mac
+  nil
+  "Back-end of mac for greader."
+  :group 'greader
+  )
+
+(defcustom greader-mac-voice nil
+  "Set the desired voice for the tts `say’.
+nil means to use the system voice."
+  :tag "mac tts voice"
+  :type '(choice (const :tag "system voice" nil)
+(string :tag "Specify")))
+
+(defcustom greader-mac-rate 200
+  "Rate of tts expressed in words per minute."
+  :tag "Mac tts speech rate"
+  :type 'integer)
+
+(defcustom greader-mac-executable-name "say"
+  "Name of the program that actually produces the voice."  
+  :tag "mac tts command"
+  :type 'string)
+
+(defun greader-mac-set-rate (&optional rate)
+  "Return a string suitable for setting mac RATE."
+  (if (not rate)
+  (concat "-r" (number-to-string greader-mac-rate))
+(progn
+  (setq-local greader-mac-rate rate)
+  (concat "-r" (number-to-string rate)
+
+(defun greader-mac-set-voice (voice)
+  "Set specified VOICE for `say'.
+When called interactively, this function reads a string from the minibuffer 
providing completion."
+  (interactive
+   (list (read-string "voice: " nil nil (greader--mac-get-voices
+  (let (result)
+(if (called-interactively-p 'any)
+   (progn
+ (if (string-equal "system" voice)
+ (setq-local greader-mac-voice nil)
+   (setq-local greader-mac-voice voice)))
+  (when voice
+   (if (string-equal voice "system")
+   (progn
+ (setq result nil)
+ (setq-local greader-mac-voice nil))
+ (setq result (concat "-v" voice))
+ (setq-local greader-mac-voice voice)))
+  (unless voice
+   (if greader-mac-voice
+   (setq result (concat "-v" greader-mac-voice))
+ (setq result nil)))
+  result)))
+
+;;;###autoload
+(defun greader-mac (command &optional arg &rest _)
+  "Back-end main function of greader-mac.
+COMMAND must be a string suitable for `make-process'."
+  (pcase command
+('executable
+ greader-mac-executable-name)
+('lang
+ (greader-mac-set-voice arg))
+('set-voice
+ (call-interactively 'greader-mac-set-voice))
+('rate
+ (cond
+  ((equal arg 'value)
+   greader-mac-rate)
+  (t
+   (greader-mac-set-rate arg
+('punctuation
+ nil)
+(_
+ 'not-implemented)))
+(put 'greader-mac 'greader-backend-name "greader-mac")
+
+(defun greader--mac-get-voices ()
+  "Return a list which contains all voices suitable for this backend."
+  (with-temp-buffer
+(call-process "say" nil t nil "-v" "?")
+(beginning-of-buffer)
+(let ((lines (list "system")))
+  (while (not (eobp))
+   (let ((mymarker (make-marker)))
+ (search-forward "_")
+ (backward-word)
+ (re-search-backward "[^ ]")
+ (forward-char)
+ (set-marker mymarker (point))
+ (end-of-line)
+ (delete-region mymarker (point)))   
+   (push (string-chop-newline (thing-at-point 'line)) lines)
+   (forward-line))
+  (reverse lines
+
+(provide 'greader-mac)



[elpa] externals/greader 002a247162 3/4: Better handling of chunks of text.

2023-01-28 Thread ELPA Syncer
branch: externals/greader
commit 002a24716290174cdf042dd531628d5613338dd5
Author: Michelangelo Rodriguez 
Commit: Michelangelo Rodriguez 

Better handling of chunks of text.
---
 greader.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/greader.el b/greader.el
index 4e525dcac8..f48c309438 100644
--- a/greader.el
+++ b/greader.el
@@ -503,7 +503,7 @@ if `GOTO-MARKER' is t and if you pass a prefix to this
   (when (not (eobp))
(forward-sentence))
   (if (> (point) sentence-start)
- (buffer-substring-no-properties sentence-start (point))
+ (string-trim (buffer-substring-no-properties sentence-start (point)) 
"[ \t\n\r]+")
nil
 
 (defun greader-sentence-at-point ()



[elpa] externals/greader 92b8b1e204 4/4: Merge branch 'experimental'

2023-01-28 Thread ELPA Syncer
branch: externals/greader
commit 92b8b1e20487b9b99f211a2c048d0966a4106caf
Merge: bc45d253f9 002a247162
Author: Michelangelo Rodriguez 
Commit: Michelangelo Rodriguez 

Merge branch 'experimental'
---
 greader-mac.el | 98 ++
 greader.el | 10 --
 2 files changed, 106 insertions(+), 2 deletions(-)

diff --git a/greader-mac.el b/greader-mac.el
new file mode 100644
index 00..9275d9fedc
--- /dev/null
+++ b/greader-mac.el
@@ -0,0 +1,98 @@
+(defgroup greader-mac
+  nil
+  "Back-end of mac for greader."
+  :group 'greader
+  )
+
+(defcustom greader-mac-voice nil
+  "Set the desired voice for the tts `say’.
+nil means to use the system voice."
+  :tag "mac tts voice"
+  :type '(choice (const :tag "system voice" nil)
+(string :tag "Specify")))
+
+(defcustom greader-mac-rate 200
+  "Rate of tts expressed in words per minute."
+  :tag "Mac tts speech rate"
+  :type 'integer)
+
+(defcustom greader-mac-executable-name "say"
+  "Name of the program that actually produces the voice."  
+  :tag "mac tts command"
+  :type 'string)
+
+(defun greader-mac-set-rate (&optional rate)
+  "Return a string suitable for setting mac RATE."
+  (if (not rate)
+  (concat "-r" (number-to-string greader-mac-rate))
+(progn
+  (setq-local greader-mac-rate rate)
+  (concat "-r" (number-to-string rate)
+
+(defun greader-mac-set-voice (voice)
+  "Set specified VOICE for `say'.
+When called interactively, this function reads a string from the minibuffer 
providing completion."
+  (interactive
+   (list (read-string "voice: " nil nil (greader--mac-get-voices
+  (let (result)
+(if (called-interactively-p 'any)
+   (progn
+ (if (string-equal "system" voice)
+ (setq-local greader-mac-voice nil)
+   (setq-local greader-mac-voice voice)))
+  (when voice
+   (if (string-equal voice "system")
+   (progn
+ (setq result nil)
+ (setq-local greader-mac-voice nil))
+ (setq result (concat "-v" voice))
+ (setq-local greader-mac-voice voice)))
+  (unless voice
+   (if greader-mac-voice
+   (setq result (concat "-v" greader-mac-voice))
+ (setq result nil)))
+  result)))
+
+;;;###autoload
+(defun greader-mac (command &optional arg &rest _)
+  "Back-end main function of greader-mac.
+COMMAND must be a string suitable for `make-process'."
+  (pcase command
+('executable
+ greader-mac-executable-name)
+('lang
+ (greader-mac-set-voice arg))
+('set-voice
+ (call-interactively 'greader-mac-set-voice))
+('rate
+ (cond
+  ((equal arg 'value)
+   greader-mac-rate)
+  (t
+   (greader-mac-set-rate arg
+('punctuation
+ nil)
+(_
+ 'not-implemented)))
+(put 'greader-mac 'greader-backend-name "greader-mac")
+
+(defun greader--mac-get-voices ()
+  "Return a list which contains all voices suitable for this backend."
+  (with-temp-buffer
+(call-process "say" nil t nil "-v" "?")
+(beginning-of-buffer)
+(let ((lines (list "system")))
+  (while (not (eobp))
+   (let ((mymarker (make-marker)))
+ (search-forward "_")
+ (backward-word)
+ (re-search-backward "[^ ]")
+ (forward-char)
+ (set-marker mymarker (point))
+ (end-of-line)
+ (delete-region mymarker (point)))   
+   (push (string-chop-newline (thing-at-point 'line)) lines)
+   (forward-line))
+  (reverse lines
+
+(provide 'greader-mac)
diff --git a/greader.el b/greader.el
index 49843cc8c2..f48c309438 100644
--- a/greader.el
+++ b/greader.el
@@ -503,7 +503,7 @@ if `GOTO-MARKER' is t and if you pass a prefix to this
   (when (not (eobp))
(forward-sentence))
   (if (> (point) sentence-start)
- (buffer-substring-no-properties sentence-start (point))
+ (string-trim (buffer-substring-no-properties sentence-start (point)) 
"[ \t\n\r]+")
nil
 
 (defun greader-sentence-at-point ()
@@ -523,7 +523,13 @@ LANG must be in ISO code, for example 'en' for english or 
'fr' for
 french.  This function set the language of tts local for current
 buffer, so if you want to set it globally, please use 'm-x
 `customize-option'  greader-language '."
-  (interactive "sset language to:")
+  (interactive
+   (list
+(let (result)
+  (setq result (greader-call-backend 'set-voice nil))
+  (when (equal result 'not-implemented)
+   (setq result (read-string "Set language to: ")))
+  result)))
   (greader-call-backend 'lang lang))
 (defun greader-set-punctuation (flag)
   "Set punctuation to FLAG."



[elpa] externals/greader f3ace60c5f 2/4: Back-end command `set-voice' added.

2023-01-28 Thread ELPA Syncer
branch: externals/greader
commit f3ace60c5f7d514b3fa31c4cbcf6f57a194656a7
Author: Michelangelo Rodriguez 
Commit: Michelangelo Rodriguez 

Back-end command `set-voice' added.
---
 greader.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/greader.el b/greader.el
index 49843cc8c2..4e525dcac8 100644
--- a/greader.el
+++ b/greader.el
@@ -523,7 +523,13 @@ LANG must be in ISO code, for example 'en' for english or 
'fr' for
 french.  This function set the language of tts local for current
 buffer, so if you want to set it globally, please use 'm-x
 `customize-option'  greader-language '."
-  (interactive "sset language to:")
+  (interactive
+   (list
+(let (result)
+  (setq result (greader-call-backend 'set-voice nil))
+  (when (equal result 'not-implemented)
+   (setq result (read-string "Set language to: ")))
+  result)))
   (greader-call-backend 'lang lang))
 (defun greader-set-punctuation (flag)
   "Set punctuation to FLAG."



[elpa] externals/greader updated (bc45d253f9 -> 92b8b1e204)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch externals/greader.

  from  bc45d253f9 Cleanup
   new  29d7140dc6 Aggiunta del back-end "say" per mac-os.
   new  f3ace60c5f Back-end command `set-voice' added.
   new  002a247162 Better handling of chunks of text.
   new  92b8b1e204 Merge branch 'experimental'


Summary of changes:
 greader-mac.el | 98 ++
 greader.el | 10 --
 2 files changed, 106 insertions(+), 2 deletions(-)
 create mode 100644 greader-mac.el



[elpa] externals/consult 778074acfb: Add docstring

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit 778074acfbacb1f39b497dc5b2a212b83d0f3497
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add docstring
---
 consult-xref.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/consult-xref.el b/consult-xref.el
index d3b9084b41..44017dc99a 100644
--- a/consult-xref.el
+++ b/consult-xref.el
@@ -29,7 +29,11 @@
 (require 'xref)
 
 (defvar consult-xref--history nil)
-(defvar consult-xref--fetcher nil)
+
+(defvar consult-xref--fetcher nil
+  "The current xref fetcher.
+The fetch is stored globally such that it can be accessed by
+ Embark for `embark-export'.")
 
 (defun consult-xref--candidates ()
   "Return xref candidate list."



[nongnu] elpa/sweeprolog 447c530c26 2/3: ENHANCED: use docs from the SWI-Prolog manual to guess hole names

2023-01-28 Thread ELPA Syncer
branch: elpa/sweeprolog
commit 447c530c26b52d7678fed4a7b123249fda40e3c2
Author: Eshel Yaron 
Commit: Eshel Yaron 

ENHANCED: use docs from the SWI-Prolog manual to guess hole names

* sweep.pl (predicate_argument_names/2): also consult the SWI-Prolog
manual via pldoc_man:load_man_object/4 to find argument names for
built-in predicates.
---
 README.org  |  6 +++---
 sweep.pl| 28 +++-
 sweeprolog-tests.el |  2 +-
 3 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 67d436cec0..784c417570 100644
--- a/README.org
+++ b/README.org
@@ -1455,9 +1455,9 @@ prefix argument (~C-u C-c C-e~).
 ~sweeprolog-mode~ empowers Emacs's standard ~completion-at-point~ command,
 bound by default to ~C-M-i~ and ~M-TAB~, with context-aware completion for
 Prolog terms.  For background about completion-at-point in Emacs, see 
[[info:emacs#Symbol
-Completion][Symbol Completion in the Emacs manual]].
+Completion][Symbol Completion]] in the Emacs manual.
 
-In ~sweeprolog-mode~ buffers, the following enhancements are provided:
+Sweep provides the following Prolog-specific completion facilities:
 
 - Variable name completion :: If the text before point can be
   completed to one or more variable names that appear elsewhere in the
@@ -1468,7 +1468,7 @@ In ~sweeprolog-mode~ buffers, the following enhancements 
are provided:
   candidates.  Predicate calls are inserted as complete term.  If the
   chosen predicate takes arguments, holes are inserted in their places
   (see [[#holes][Holes]]).
-- Atom completion :: If point is at a non-callable,
+- Atom completion :: If point is at a non-callable position,
   ~completion-at-point~ suggests matching atoms as completion
   candidates.
 
diff --git a/sweep.pl b/sweep.pl
index 302f9fea0b..0a02caf452 100644
--- a/sweep.pl
+++ b/sweep.pl
@@ -959,13 +959,39 @@ sweep_file_path_in_library(Path, Spec) :-
 ;   term_string(Spec1, Spec)
 ).
 
+predicate_argument_names(M:F/A, Args) :-
+(   M == system
+->  true
+;   sub_atom(M, 0, 1, _, '$')
+),
+pldoc_man:load_man_object(F/A, _, _, DOM0),
+memberchk(element(dt, _, DOM1), DOM0),
+memberchk(element(a, _, DOM2), DOM1),
+catch(findall(Arg,
+  (   member(element(var, _, Vars), DOM2),
+  member(ArgsSpec, Vars),
+  term_string(CommaSeparatedArgs,
+  ArgsSpec,
+  [module(pldoc_modes),
+   variable_names(VN)]),
+  maplist(call, VN),
+  comma_list(CommaSeparatedArgs, ArgsList),
+  member(Arg, ArgsList)
+  ),
+  Args0),
+  error(syntax_error(_),_),
+  fail),
+predicate_argument_names_(A, Args0, Args).
 predicate_argument_names(M:F/A, Args) :-
 doc_comment(M:F/A, _, _, C),
 comment_modes(C, ModeAndDets),
 member(ModeAndDet, ModeAndDets),
 strip_det(ModeAndDet, Head),
 Head =.. [_|Args0],
-length(Args0, A),
+predicate_argument_names_(A, Args0, Args).
+
+predicate_argument_names_(Arity, Args0, Args) :-
+length(Args0, Arity),
 maplist(strip_mode_and_type, Args0, Args).
 
 strip_mode_and_type(S, N), compound(S) => arg(1, S, N0), strip_type(N0, N).
diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el
index c4e3b1fc8f..c1551c38a6 100644
--- a/sweeprolog-tests.el
+++ b/sweeprolog-tests.el
@@ -443,7 +443,7 @@ baz(Baz) :- findall(X, b_g
 (call-interactively #'completion-at-point)
 (should (string= (buffer-string)
  "
-baz(Baz) :- findall(X, b_getval(_, _)
+baz(Baz) :- findall(X, b_getval(Name, Value)
 "
  
 



[nongnu] elpa/sweeprolog 2be17c1f31 3/3: Announce recent changes in NEWS.org and bump version to 0.14.1

2023-01-28 Thread ELPA Syncer
branch: elpa/sweeprolog
commit 2be17c1f3191dd64cf7792c2ebdc8c3d58c0743b
Author: Eshel Yaron 
Commit: Eshel Yaron 

Announce recent changes in NEWS.org and bump version to 0.14.1
---
 NEWS.org  | 23 +++
 sweeprolog.el |  2 +-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/NEWS.org b/NEWS.org
index b8ad74422e..a18fcc969f 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -11,6 +11,29 @@ SWI-Prolog in Emacs.
 For further details, please consult the manual:
 [[https://eshelyaron.com/sweep.html][https://eshelyaron.com/sweep.html]].
 
+* Version 0.14.1 on 2023-01-28
+
+** New command ~sweeprolog-count-holes~
+
+This command displays the number of holes in the current
+~sweeprolog-mode~ buffer.
+
+** New numeric argument to ~sweeprolog-forward-hole~
+
+You can now call ~sweeprolog-forward-hole~ with a numeric prefix
+argument (e.g. ~C-3 C-c TAB~) to move forward over that many holes. As a
+special case, if you call it with a zero numeric argument (e.g. by
+typing ~C-0 C-c TAB~), it invokes ~sweeprolog-count-holes~ instead.
+
+This change applies to ~sweeprolog-backward-predicate~ as well.
+
+** Predicate completion now consults the manual for argument names
+
+Completing predicate calls to built-in predicates with ~C-M-i~
+(~completion-at-point~) now uses the argument names from the
+documentation of the predicate in the SWI-Prolog manual to name the
+holes it inserts as placeholder arguments.
+
 * Version 0.14.0 on 2023-01-23
 
 ** New command ~sweeprolog-async-goal~
diff --git a/sweeprolog.el b/sweeprolog.el
index 0cec3c681f..cddbb4f70c 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Eshel Yaron <~eshel/d...@lists.sr.ht>
 ;; Keywords: prolog languages extensions
 ;; URL: https://git.sr.ht/~eshel/sweep
-;; Package-Version: 0.14.0
+;; Package-Version: 0.14.1
 ;; Package-Requires: ((emacs "28.1"))
 
 ;; This file is NOT part of GNU Emacs.



[nongnu] elpa/sweeprolog updated (24afc5474e -> 2be17c1f31)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch elpa/sweeprolog.

  from  24afc5474e DOC: improve documentation for holes
   new  9bc4ba18b7 ADDED: numeric argument for 
sweeprolog-forward/backward-hole
   new  447c530c26 ENHANCED: use docs from the SWI-Prolog manual to guess 
hole names
   new  2be17c1f31 Announce recent changes in NEWS.org and bump version to 
0.14.1


Summary of changes:
 NEWS.org| 23 ++
 README.org  | 26 +++
 sweep.pl| 28 +++-
 sweeprolog-tests.el | 25 ++-
 sweeprolog.el   | 92 +++--
 5 files changed, 148 insertions(+), 46 deletions(-)



[nongnu] elpa/sweeprolog 9bc4ba18b7 1/3: ADDED: numeric argument for sweeprolog-forward/backward-hole

2023-01-28 Thread ELPA Syncer
branch: elpa/sweeprolog
commit 9bc4ba18b7e6da524a63917fba55e5e55291fb49
Author: Eshel Yaron 
Commit: Eshel Yaron 

ADDED: numeric argument for sweeprolog-forward/backward-hole

* sweeprolog.el (sweeprolog-count-holes): new command, counts holes
in the current buffer.
(sweeprolog-forward-hole, sweeprolog-backward-hole): new numeric
argument, corresponding to the prefix argument when called
interactively.  With positive/negative numeric argument, move over
that many holes.  With zero numeric argument, call
sweeprolog-count-holes instead.
---
 README.org  | 20 ++--
 sweeprolog-tests.el | 23 ++
 sweeprolog.el   | 90 +++--
 3 files changed, 93 insertions(+), 40 deletions(-)

diff --git a/README.org b/README.org
index d306ddb0bf..67d436cec0 100644
--- a/README.org
+++ b/README.org
@@ -998,10 +998,15 @@ Use these commands to move between holes in the current 
Prolog buffer:
 
 #+KINDEX: C-c C-i
 - Key: C-c TAB (sweeprolog-forward-hole) :: Move point to the next
-  hole in the buffer.
+  hole in the buffer and select it as the region.  With numeric prefix
+  argument /n/, move forward over /n/ - 1 holes and select the next one.
 #+KINDEX: C-c C-S-i
 - Key: C-c S-TAB (sweeprolog-backward-hole) :: Move point to the
-  previous hole in the buffer.
+  previous hole in the buffer and select it as the region.  With
+  numeric prefix argument /n/, move backward over /n/ - 1 holes and select
+  the next one.
+- Key: C-0 C-c TAB (sweeprolog-count-holes) :: Display the number of
+  holes that are present in the buffer.
 - Command: sweeprolog-forward-hole-on-tab-mode :: Toggle moving to the
   next hole in the buffer with ~TAB~ if the current line is already
   properly indented.
@@ -1010,9 +1015,18 @@ To jump to the next hole in a ~sweeprolog-mode~ buffer, 
use the command
 ~M-x sweeprolog-forward-hole~, bound by default to ~C-c TAB~ (or ~C-c C-i~).
 This command sets up the region to cover the next hole after point
 leaving the cursor at right after the hole.  To jump to the previous
-hole instead, use ~sweeprolog-backward-hole~ or call
+hole use ~C-c S-TAB~ (~sweeprolog-backward-hole~), or call
 ~sweeprolog-forward-hole~ with a negative prefix argument (~C-- C-c TAB~).
 
+You can also call ~sweeprolog-forward-hole~ and ~sweeprolog-backward-hole~
+with a numeric prefix argument to jump over the specified number of
+holes.  For example, typing ~C-3 C-c TAB~ skips the next two holes in
+the buffer and selects the third as the region.  As a special case, if
+you call these commands with a zero prefix argument (~C-0 C-c TAB~),
+they invoke the command ~sweeprolog-count-holes~ instead of jumping.
+This command counts how many holes are left in the current buffer and
+reports its finding via a message in the echo area.
+
 When the minor mode ~sweeprolog-forward-hole-on-tab-mode~ is enabled,
 the ~TAB~ key is bound to a command moves to the next hole when called
 in a properly indented line (otherwise it indents the line).  This
diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el
index e44ccca150..c4e3b1fc8f 100644
--- a/sweeprolog-tests.el
+++ b/sweeprolog-tests.el
@@ -287,6 +287,29 @@ foo(Foo) :- bar.
 (should (string= (buffer-string)
  "foo(bar, (_->_;_), _):-_."
 
+(ert-deftest forward-many-holes ()
+  "Tests jumping over holes with `sweeprolog-forward-hole'."
+  (let ((temp (make-temp-file "sweeprolog-test"
+  nil
+  ".pl"
+  "\n"
+  )))
+(find-file-literally temp)
+(sweeprolog-mode)
+(goto-char (point-min))
+(sweeprolog-insert-term-with-holes ":-" 2)
+(deactivate-mark)
+(goto-char (point-max))
+(sweeprolog-insert-term-with-holes ":-" 2)
+(goto-char (point-min))
+(should (= (sweeprolog-count-holes) 4))
+(sweeprolog-forward-hole 2)
+(should (= (point) 5))
+(sweeprolog-forward-hole -1)
+(should (= (point) 2))
+(sweeprolog-forward-hole -2)
+(should (= (point) 8
+
 (ert-deftest plunit-testset-skeleton ()
   "Tests inserting PlUnit test-set blocks."
   (let ((temp (make-temp-file "sweeprolog-test"
diff --git a/sweeprolog.el b/sweeprolog.el
index 893a77b51b..0cec3c681f 100644
--- a/sweeprolog.el
+++ b/sweeprolog.el
@@ -506,6 +506,8 @@ token via its `help-echo' text property."
   (eq major-mode 'sweeprolog-mode) ]
 [ "Search Term" sweeprolog-term-search
   (derived-mode-p 'sweeprolog-mode)]
+[ "Count Holes" sweeprolog-count-holes
+  (derived-mode-p 'sweeprolog-mode)]
 "--"
 [ "Set Prolog Flag" sweeprolog-set-prolog-flag t ]
 [ "Install Prolog Package" sweeprolog-pack-install t ]
@@ -3094,6 +3096,25 @@ is the prefix argument."
 (setq end (1+ end)))
   (1+ end
 
+
+(defun sweeprolog-count-holes (&optional interactive)
+  "Count holes in the current buffer and return the

[elpa] externals/gpr-query updated (da47f81da1 -> ada0d0afce)

2023-01-28 Thread Stephen Leake
stephen_leake pushed a change to branch externals/gpr-query.

  from  da47f81da1 * alire.toml: Fix gnat version
   new  2f02308eda Don't include alire.toml in ELPA package
   new  ada0d0afce Release 1.0.3


Summary of changes:
 .elpaignore  |  1 +
 NEWS |  5 
 gpr-query.el |  4 +--
 notes.text   | 82 +++-
 4 files changed, 12 insertions(+), 80 deletions(-)
 create mode 100644 .elpaignore



[elpa] externals-release/gpr-query 2f02308eda 1/2: Don't include alire.toml in ELPA package

2023-01-28 Thread Stephen Leake
branch: externals-release/gpr-query
commit 2f02308eda53b95886b94734b44725f3b7ccefeb
Author: Stephen Leake 
Commit: Stephen Leake 

Don't include alire.toml in ELPA package

* NEWS: Version 1.0.3.

* .elpaignore: New file.
---
 .elpaignore | 1 +
 NEWS| 5 +
 2 files changed, 6 insertions(+)

diff --git a/.elpaignore b/.elpaignore
new file mode 100644
index 00..ce56bc2095
--- /dev/null
+++ b/.elpaignore
@@ -0,0 +1 @@
+alire.toml
diff --git a/NEWS b/NEWS
index 89682110e7..ffbe0eb981 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,11 @@ Please send gpr-query bug reports to bug-gnu-em...@gnu.org, 
with
 'gpr-query' in the subject. If possible, use M-x report-emacs-bug.
 
 
+* gpr-query 1.0.3
+28 Jan 2023
+
+** Fix Alire build
+
 * gpr-query 1.0.2
 5 Jan 2023
 



[elpa] externals-release/gpr-query ada0d0afce 2/2: Release 1.0.3

2023-01-28 Thread Stephen Leake
branch: externals-release/gpr-query
commit ada0d0afcefe88b66b9cc53de5d76db661bfb2d7
Author: Stephen Leake 
Commit: Stephen Leake 

Release 1.0.3

* gpr-query.el: Bump version.
---
 gpr-query.el |  4 +--
 notes.text   | 82 +++-
 2 files changed, 6 insertions(+), 80 deletions(-)

diff --git a/gpr-query.el b/gpr-query.el
index abb3dc29a2..3d02a15c5c 100644
--- a/gpr-query.el
+++ b/gpr-query.el
@@ -7,8 +7,8 @@
 
 ;; Author: Stephen Leake 
 ;; Maintainer: Stephen Leake 
-;; Version: 1.0.2
-;; package-requires: ((emacs "25.3") (wisi "4.2.0") (gnat-compiler "1.0.1"))
+;; Version: 1.0.3
+;; package-requires: ((emacs "25.3") (wisi "4.2.2") (gnat-compiler "1.0.2"))
 
 ;; This file is part of GNU Emacs.
 
diff --git a/notes.text b/notes.text
index 5f6cabb8bf..da08dd3230 100644
--- a/notes.text
+++ b/notes.text
@@ -90,83 +90,9 @@ On Debian (alr publish --tar broken on Windows (alr version 
1.2.1))
 cd ~/Downloads; wget 
https://download.savannah.nongnu.org/releases/ada-mode/emacs_gpr_query-1.0.0.tgz
 # link is 
https://download.savannah.nongnu.org/releases/ada-mode/emacs_gpr_query-i.j.k.tgz
 
-update elpa:
-(gpr-query-kill-all-sessions)
-ELPA.make pub
-
-# sometimes this is useful
-# (ediff-directories "/Projects/org.emacs.gpr-query" 
"/Projects/elpa/packages/gpr-query" nil)
-
-(dvc-state-multiple "/Projects/elpa/packages" t)
-(dvc-push "/Projects/elpa")
-
-ask for beta testers
-edit notice below
-ada-mode mailing list
-comp.lang.ada
-
-# 24 hrs for web repository to update
-
-after Gnu ELPA updated, test install from GNU ELPA
-first install current version, to be sure upgrade requires new versions
-ada-mode 7.1.5 should have required wisi 3.1.5
-
-(list-packages)
-5.1.8 crashed emacs for me
-see 'build.sh; install.sh' above for compiling
-
-also wisitoken-grammar-mode
-
-(dvc-state-one ".")
-ELPA.make tag zip
-
-in cygwin console for gpg prompts:
-cd /Projects/org.emacs.gpr-query/build/
-ls *.tar*
-rm .tar*
-gpg -b *.tar.*
-
-scp *.tar.* stephen_le...@dl.sv.nongnu.org:/releases/gpr-query/
-
-publish on Alire
-https://alire.ada.dev/
-
-create release branch
-
-post on:
-emacs-ada-mode mailing list
-c.l.a newsgroup
-https://savannah.nongnu.org/news/submit.php?group_id=11631:
-

-Gnu Emacs gpr-query 1.0 released.

-
-Gnu Emacs gpr-query 1.0 is now available in GNU ELPA.
-
-See the NEWS files in ~/.emacs.d/elpa/gpr-query-7.1.6 and wisi-3.1.3,
-or at https://www.nongnu.org/gpr-query/, for more details.
-
-The required Ada code requires a manual compile step, after the normal
-list-packages installation ('install.sh' is new in this release):
-
-cd ~/.emacs.d/elpa/gpr-query-7.1.6
-./build.sh
-./install.sh
-
-If you are not using Alire, this requires AdaCore gnatcoll packages
-which you may not have installed; see gpr-query.info Installation for
-help in installing them.

-
-mark fixed bugs
-https://debbugs.gnu.org/cgi/pkgreport.cgi?package=ada-mode
-https://debbugs.gnu.org/cgi/pkgreport.cgi?package=gpr-query
-https://debbugs.gnu.org/Developer.html
-email to nnn-cl...@debbugs.gnu.org
-subject: copy from bug report
-body: closed by ada-mode version 7.2.1
-don't include Version: header; that's an Emacs version
-debbugs updates summary page within half an hour; no emails
+test install from GNU ELPA
+(add-to-list 'package-archives (cons "test" 
"/Projects/elpa/archive-devel"))
+(package-refresh-contents)
+(package-install 'gpr-query)
 
 -- end of file



[elpa] externals-release/gpr-query updated (da47f81da1 -> ada0d0afce)

2023-01-28 Thread Stephen Leake
stephen_leake pushed a change to branch externals-release/gpr-query.

  from  da47f81da1 * alire.toml: Fix gnat version
   new  2f02308eda Don't include alire.toml in ELPA package
   new  ada0d0afce Release 1.0.3


Summary of changes:
 .elpaignore  |  1 +
 NEWS |  5 
 gpr-query.el |  4 +--
 notes.text   | 82 +++-
 4 files changed, 12 insertions(+), 80 deletions(-)
 create mode 100644 .elpaignore



[elpa] externals/embark 3978c66c05: Don't clobber keybindings in export buffer's local map!

2023-01-28 Thread ELPA Syncer
branch: externals/embark
commit 3978c66c055632430d8351a32f84e72c9c3d9357
Author: Omar Antolín Camarena 
Commit: Omar Antolín Camarena 

Don't clobber keybindings in export buffer's local map!

I was binding g to rerun the embark export command in the major mode map
of the export buffer! :(
---
 embark.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/embark.el b/embark.el
index 7baafa47c3..dd8dc3df37 100644
--- a/embark.el
+++ b/embark.el
@@ -3196,8 +3196,12 @@ buffer."
  (pop-to-buffer buffer)
  (rename-buffer name t)
  (setq embark--rerun-function rerun)
- (local-set-key [remap revert-buffer]
-#'embark-rerun-collect-or-export)
+ (use-local-map
+  (make-composed-keymap
+   '(keymap
+ (remap keymap
+(revert-buffer . embark-rerun-collect-or-export)))
+   (current-local-map)))
  (let ((embark-after-export-hook after)
(embark--command cmd))
(run-hooks 'embark-after-export-hook)



[elpa] externals/embark-consult updated (213ced2c5d -> 3978c66c05)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark-consult.

  from  213ced2c5d Merge pull request #527 from OkamiW/embark-export-dired
  adds  3978c66c05 Don't clobber keybindings in export buffer's local map!

No new revisions were added by this update.

Summary of changes:
 embark.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)



[elpa] externals/emms f008e996d4 2/2: * AUTHORS: add leo to authors

2023-01-28 Thread ELPA Syncer
branch: externals/emms
commit f008e996d41c8052fd23d34cc81bf6ddd26e76ff
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* AUTHORS: add leo to authors
---
 AUTHORS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/AUTHORS b/AUTHORS
index 94d4d1e7f5..943cef67cc 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -54,6 +54,7 @@ Maxim Cournoyer
 Ian Dunn
 Pavel Korytov
 Ryan Van Wagoner
+Leo Okawa Ericson
 
 
 ;; Local variables:



[elpa] externals/emms c83157d970 1/2: * emms-source-playlist.el: add native playlist to cache

2023-01-28 Thread ELPA Syncer
branch: externals/emms
commit c83157d9707cc84fc9bbbd8b330484850044a4f5
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms-source-playlist.el: add native playlist to cache

The function for parsing native playlists doesn't use the emms-track
constructor because the data is already in the correct format.  However
this means that it misses the call to `emms-cache-set-function`, meaning
that the playlist doesn't get added to the cache and the emms-browser.

Patch by Leo Okawa Ericson.
---
 emms-source-playlist.el | 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/emms-source-playlist.el b/emms-source-playlist.el
index aca63b798f..e23f1b8d74 100644
--- a/emms-source-playlist.el
+++ b/emms-source-playlist.el
@@ -209,9 +209,16 @@ See `emms-source-playlist-formats' for a list of supported 
formats."
 (defun emms-source-playlist-parse-native (file)
   "Parse the native EMMS playlist in the current buffer."
   (ignore file)
-  (save-excursion
-(goto-char (point-min))
-(read (current-buffer
+  (let ((tracks (save-excursion
+ (goto-char (point-min))
+ (read (current-buffer)
+(mapc (lambda (track)
+(funcall emms-cache-set-function
+ (emms-track-type track)
+ (emms-track-name track)
+ track))
+  tracks)
+tracks))
 
 (defun emms-source-playlist-unparse-native (in out)
   "Unparse a native playlist from IN to OUT.



[elpa] externals/emms updated (05fe0a83c9 -> f008e996d4)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch externals/emms.

  from  05fe0a83c9 * emms.el: release version 14
   new  c83157d970 * emms-source-playlist.el: add native playlist to cache
   new  f008e996d4 * AUTHORS: add leo to authors


Summary of changes:
 AUTHORS |  1 +
 emms-source-playlist.el | 13 ++---
 2 files changed, 11 insertions(+), 3 deletions(-)



[nongnu] elpa/evil 81b813e7ac: Specialize evil-sort for case of two arguments

2023-01-28 Thread ELPA Syncer
branch: elpa/evil
commit 81b813e7ac229b0eb82d0a9adcf6e3950773b558
Author: Axel Forsman 
Commit: Axel Forsman 

Specialize evil-sort for case of two arguments

All current uses of evil-sort only pass two arguments, for which a
conditional swap suffices.

Also replace the implementation of evil-swap with cl-rotatef, since that
is built-in and produces marginally better code for three or more
variables.
---
 evil-commands.el |  8 +++
 evil-common.el   | 70 +++-
 evil-core.el |  4 ++--
 evil-tests.el| 22 --
 4 files changed, 43 insertions(+), 61 deletions(-)

diff --git a/evil-commands.el b/evil-commands.el
index eec7038604..6e35689e6c 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -4590,25 +4590,25 @@ and open a new buffer name or edit a certain FILE."
   "Increase current window height by COUNT."
   :repeat nil
   (interactive "p")
-  (evil-resize-window (+ (window-height) count)))
+  (enlarge-window count))
 
 (evil-define-command evil-window-decrease-height (count)
   "Decrease current window height by COUNT."
   :repeat nil
   (interactive "p")
-  (evil-resize-window (- (window-height) count)))
+  (enlarge-window (- count)))
 
 (evil-define-command evil-window-increase-width (count)
   "Increase current window width by COUNT."
   :repeat nil
   (interactive "p")
-  (evil-resize-window (+ (window-width) count) t))
+  (enlarge-window count t))
 
 (evil-define-command evil-window-decrease-width (count)
   "Decrease current window width by COUNT."
   :repeat nil
   (interactive "p")
-  (evil-resize-window (- (window-width) count) t))
+  (enlarge-window (- count) t))
 
 (evil-define-command evil-window-set-height (count)
   "Set the height of the current window to COUNT."
diff --git a/evil-common.el b/evil-common.el
index b991b8697f..f8c3bbbaa6 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -286,36 +286,23 @@ return the value of that variable."
 (symbol-value val)
   val)))
 
-(defmacro evil-swap (this that &rest vars)
-  "Swap the values of variables THIS and THAT.
-If three or more arguments are given, the values are rotated.
-E.g., (evil-swap A B C) sets A to B, B to C, and C to A."
-  `(progn
- (setq ,this (prog1 ,that
-   (setq ,that ,this)))
- ,@(when vars
- `((evil-swap ,that ,@vars)
-
-(defmacro evil-sort (min max &rest vars)
-  "Place the smallest value in MIN and the largest in MAX.
-If three or more arguments are given, place the smallest
-value in the first argument and the largest in the last,
-sorting in between."
-  (let ((sorted (make-symbol "sortvar")))
-`(let ((,sorted (sort (list ,min ,max ,@vars) '<)))
-   (setq ,min (pop ,sorted)
- ,max (pop ,sorted)
- ,@(apply #'append
-  (mapcar #'(lambda (var)
-  (list var `(pop ,sorted)))
-  vars))
+(eval-and-compile (defalias 'evil-swap #'cl-rotatef))
+
+(defmacro evil-sort (&rest vars)
+  "Sort the symbol values of VARS.
+Place the smallest value in the first argument and the largest in the
+last, sorting in between."
+  (if (= (length vars) 2)
+  `(when (> ,@vars) (evil-swap ,@vars))
+(let ((sorted (make-symbol "sortvar")))
+  `(let ((,sorted (sort (list ,@vars) #'<)))
+ (setq ,@(apply #'nconc
+(mapcar (lambda (var) (list var `(pop ,sorted)))
+vars)))
 
 (defun evil-vector-to-string (vector)
-  "Turn vector into a string, changing  to '\\e'"
-  (mapconcat (lambda (c)
-   (if (equal c 'escape)
-   "\e"
- (make-string 1 c)))
+  "Turn VECTOR into a string, changing  to \"\\e\"."
+  (mapconcat (lambda (c) (if (eq c 'escape) "\e" (list c)))
  vector
  ""))
 
@@ -2932,10 +2919,10 @@ a property list."
   (let ((beg (evil-normalize-position beg))
 (end (evil-normalize-position end)))
 (when (and (numberp beg) (numberp end))
-  (append (list (min beg end) (max beg end))
-  (when (evil-type-p type)
-(list type))
-  properties
+  (evil-sort beg end)
+  (nconc (list beg end)
+ (when (evil-type-p type) (list type))
+ properties
 
 (defun evil-range-p (object)
   "Whether OBJECT is a range."
@@ -4024,18 +4011,17 @@ should be left-aligned for left justification."
 (define-key evil-list-view-mode-map [return] #'evil-list-view-goto-entry)
 
 (defmacro evil-with-view-list (&rest properties)
-  "Open new list view buffer.
-
+  "Open a new list view buffer.
 PROPERTIES is a property-list which supports the following properties:
 
-:name   (required)   The name of the buffer.
-:mode-name  (required)   The name for the mode line.
-:format (required)   The value for `tabulated-list-format'.
-:entries(required)   The valu

[elpa] elpa-admin f892e154d4: * elpa-admin.el (elpaa--supported-keywords): Add `:maintainer`

2023-01-28 Thread Stefan Monnier via
branch: elpa-admin
commit f892e154d475926bef55a5a651158d9d36a197dd
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-admin.el (elpaa--supported-keywords): Add `:maintainer`
---
 elpa-admin.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index ad31a7fcc2..e1b7834009 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -978,7 +978,8 @@ SPECS is the list of package specifications."
 (defconst elpaa--supported-keywords
   '(:url :core :auto-sync :ignored-files :release-branch :release
 :readme :news :doc :renames :version-map :make :shell-command
-:branch :lisp-dir :main-file :merge :excludes :rolling-release)
+:branch :lisp-dir :main-file :merge :excludes :rolling-release
+:maintainer)
   "List of keywords that can appear in a spec.")
 
 (defun elpaa--publish-package-spec (spec)



[elpa] externals/consult updated (778074acfb -> 835921c022)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch externals/consult.

  from  778074acfb Add docstring
   new  21bad2841e Shorten issue links
   new  ccad378b46 consult--multi: Improve docstring
   new  835921c022 consult--read: Improve docstring


Summary of changes:
 consult.el | 72 ++
 1 file changed, 44 insertions(+), 28 deletions(-)



[elpa] externals/consult ccad378b46 2/3: consult--multi: Improve docstring

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit ccad378b46098eb623ac79405050450d62d518c1
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult--multi: Improve docstring
---
 consult.el | 22 +++---
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/consult.el b/consult.el
index a3d7dfcfa5..bfcef0e744 100644
--- a/consult.el
+++ b/consult.el
@@ -2682,21 +2682,25 @@ OPTIONS is the plist of options passed to 
`consult--read'.  The following
 options are supported: :require-match, :history, :keymap, :initial,
 :add-history, :sort and :inherit-input-method.  The other options of
 `consult--read' are used by the implementation of `consult--multi' and
-should be overwritten only in special scenarios.
+should not be overwritten, except in in special scenarios.
 
 The function returns the selected candidate in the form (cons candidate
 source-plist).  The plist has the key :match with a value nil if the
 candidate does not exist, t if the candidate exists and `new' if the
 candidate has been created.  The sources of the source list can either be
 symbols of source variables or source values.  Source values must be
-plists with the following fields:
+plists with fields from the following list.
 
 Required source fields:
-* :category - Completion category.
-* :items - List of strings to select from or function returning list of 
strings.
+* :category - Completion category symbol.
+* :items - List of strings to select from or function returning
+  list of strings.  Note that the strings can use text properties
+  to carry mtadata, which is then available to the :annotate,
+  :action and :state functions.
 
 Optional source fields:
-* :name - Name of the source, used for narrowing, group titles and annotations.
+* :name - Name of the source as a string, used for narrowing,
+  group titles and annotations.
 * :narrow - Narrowing character or (character . string) pair.
 * :enabled - Function which must return t if the source is enabled.
 * :hidden - When t candidates of this source are hidden by default.
@@ -2706,8 +2710,12 @@ Optional source fields:
 * :default - Must be t if the first item of the source is the default value.
 * :action - Function called with the selected candidate.
 * :new - Function called with new candidate name, only if :require-match is 
nil.
-* :state - State constructor for the source, must return the state function.
-* Other source fields can be added specifically to the use case."
+* :state - State constructor for the source, must return the
+  state function.  The state function is informed about state
+  changes of the UI and can be used to implement preview.
+* Other custom source fields can be added depending on the use
+  case.  Note that the source is returned by `consult--multi'
+  together with the selected candidate."
   (let* ((sources (consult--multi-enabled-sources sources))
  (candidates (consult--with-increased-gc
   (consult--multi-candidates sources)))



[elpa] externals/consult 835921c022 3/3: consult--read: Improve docstring

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit 835921c022cc14eecad10060e3aa89936e5ee85c
Author: Daniel Mendler 
Commit: Daniel Mendler 

consult--read: Improve docstring
---
 consult.el | 21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/consult.el b/consult.el
index bfcef0e744..ab5dcb4b11 100644
--- a/consult.el
+++ b/consult.el
@@ -2476,22 +2476,26 @@ Large numbers are encoded as multiple tofu characters."
 prompt predicate require-match history 
default
 keymap category initial narrow add-history 
annotate
 state preview-key sort lookup group 
inherit-input-method)
-  "Enhanced completing read function selecting from CANDIDATES.
+  "Enhanced completing read function to select from CANDIDATES.
 
-The function is a thin wrapper around `completing-read'.  On top
-of `completing-read' it additionally supports asynchronous
-completion list computations, candidate preview and narrowing.
+The function is a thin wrapper around `completing-read'.  Keyword
+arguments are used instead of positional arguments for code
+clarity.  On top of `completing-read' it additionally supports
+computing the candidate list asynchronously, candidate preview
+and narrowing.
 
 Keyword OPTIONS:
 
-PROMPT is the string which is shown as prompt message in the minibuffer.
-PREDICATE is a filter function called for each candidate, returns nil or t.
+PROMPT is the string which is shown as prompt in the minibuffer.
+PREDICATE is a filter function called for each candidate, returns
+nil or t.
 REQUIRE-MATCH equals t means that an exact match is required.
 HISTORY is the symbol of the history variable.
 DEFAULT is the default selected value.
 ADD-HISTORY is a list of items to add to the history.
-CATEGORY is the completion category.
+CATEGORY is the completion category symbol.
 SORT should be set to nil if the candidates are already sorted.
+This will disable sorting in the completion UI.
 LOOKUP is a lookup function passed the selected candidate string,
 the list of candidates, the current input string and the current
 narrowing value.
@@ -2506,7 +2510,8 @@ PREVIEW-KEY are the preview keys.  Can be nil, `any', a 
single
 key or a list of keys.
 NARROW is an alist of narrowing prefix strings and description.
 KEYMAP is a command-specific keymap.
-INHERIT-INPUT-METHOD, if non-nil the minibuffer inherits the input method."
+INHERIT-INPUT-METHOD, if non-nil the minibuffer inherits the
+input method."
   ;; supported types
   (cl-assert (or (functionp candidates) ;; async table
  (obarrayp candidates)  ;; obarray



[elpa] externals/consult 21bad2841e 1/3: Shorten issue links

2023-01-28 Thread ELPA Syncer
branch: externals/consult
commit 21bad2841e062d0b4eb0ceeae90dd3f35eca08f1
Author: Daniel Mendler 
Commit: Daniel Mendler 

Shorten issue links
---
 consult.el | 29 -
 1 file changed, 16 insertions(+), 13 deletions(-)

diff --git a/consult.el b/consult.el
index e53dddf899..a3d7dfcfa5 100644
--- a/consult.el
+++ b/consult.el
@@ -803,7 +803,7 @@ ESC is the escaping string for choice and groups."
(setq ,list (cdr ,head))
nil)))
 
-;; Upstream bug#46326, Consult issue 
https://github.com/minad/consult/issues/193
+;; Upstream bug#46326, Consult issue gh:minad/consult#193.
 (defmacro consult--minibuffer-with-setup-hook (fun &rest body)
   "Variant of `minibuffer-with-setup-hook' using a symbol and `fset'.
 
@@ -1927,7 +1927,7 @@ string   Update with the current user input string.  
Return nil."
(run-hooks 'consult--completion-refresh-hook)
;; Interaction between asynchronous completion tables and
;; preview: We have to trigger preview immediately when
-   ;; candidates arrive (Issue #436).
+   ;; candidates arrive (gh:minad/consult#436).
(when (and consult--preview-function candidates)
  (funcall consult--preview-function)
  nil)
@@ -2278,10 +2278,10 @@ highlighting function."
 
 (defvar-keymap consult-async-map
   :doc "Keymap added for commands with asynchronous candidates."
-  ;; Async keys overwriting some unusable defaults for the default completion
+  ;; Overwriting some unusable defaults of default minibuffer completion.
   " " #'self-insert-command
-  ;; Remap Emacs 29 history and default completion for now.
-  ;; See https://github.com/minad/consult/issues/613
+  ;; Remap Emacs 29 history and default completion for now
+  ;; (gh:minad/consult#613).
   " " #'ignore
   " " #'consult-history)
 
@@ -2789,11 +2789,12 @@ The candidates are previewed in the region from START 
to END.  This function is
 used as the `:state' argument for `consult--read' in the `consult-yank' family
 of functions and in `consult-completion-in-region'."
   (unless (or (minibufferp)
-  ;; XXX Disable preview if anything odd is going on with the 
markers. Otherwise we get
-  ;; "Marker points into wrong buffer errors".  See
-  ;; https://github.com/minad/consult/issues/375, where Org mode 
source blocks are
-  ;; completed in a different buffer than the original buffer.  
This completion is
-  ;; probably also problematic in my Corfu completion package.
+  ;; XXX Disable preview if anything odd is going on with the
+  ;; markers. Otherwise we get "Marker points into wrong buffer
+  ;; errors".  See gh:minad/consult#375, where Org mode source
+  ;; blocks are completed in a different buffer than the original
+  ;; buffer.  This completion is probably also problematic in my
+  ;; Corfu completion package.
   (not (eq (window-buffer) (current-buffer)))
   (and (markerp start) (not (eq (marker-buffer start) 
(current-buffer
   (and (markerp end) (not (eq (marker-buffer end) 
(current-buffer)
@@ -2892,7 +2893,8 @@ These configuration options are supported:
 ((file-name-absolute-p initial)
  (lambda (_narrow _inp cand)
(substitute-in-file-name cand)))
-;; Ensure that ./ prefix is kept for the shell 
(#356)
+;; Ensure that ./ prefix is kept for the shell
+;; (gh:minad/consult#356).
 ((string-match-p "\\`\\.\\.?/" initial)
  (lambda (_narrow _inp cand)
(setq cand (file-relative-name 
(substitute-in-file-name cand)))
@@ -2919,7 +2921,7 @@ These configuration options are supported:
  ;; 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 https://github.com/minad/vertico/issues/61.
+ ;; See gh:minad/vertico#61.
  (completing-read prompt
   (consult--completion-table-in-buffer 
collection)
   predicate require-match 
initial)
@@ -3710,7 +3712,8 @@ If no MODES are specified, use currently active major and 
minor modes."
 
 (defun consult--read-from-kill-ring ()
   "Open kill ring menu and return selected string."
-  ;; `current-kill' updates `kill-ring' with a possible interprogram-paste 
(#443)
+  ;; `current-kill' updates `kill-ring' with interprogram paste, see
+  ;; gh:minad/consult#443.
   (current-kill 0)
   ;;

[elpa] externals/xeft updated (3efd465876 -> 936d116413)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch externals/xeft.

  from  3efd465876 ; * xeft.el: Remove incorrect comment.
   new  20f4d0d36f Add xeft-file-filter
   new  a2de16c207 Add xeft-directory-filter
   new  c19fea3921 ; * README.md: Add notice.
   new  936d116413 ; Minor docstring change


Summary of changes:
 README.md |  2 ++
 xeft.el   | 56 +---
 2 files changed, 47 insertions(+), 11 deletions(-)



[elpa] externals/xeft 936d116413 4/4: ; Minor docstring change

2023-01-28 Thread ELPA Syncer
branch: externals/xeft
commit 936d116413f05225d7d17985fd2ac3b0033e85ad
Author: Yuan Fu 
Commit: Yuan Fu 

; Minor docstring change

* xeft.el (xeft-ignore-extension):
(xeft-recursive): Update docstring
---
 xeft.el | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/xeft.el b/xeft.el
index 06b6e2c0d7..65684eb8ea 100644
--- a/xeft.el
+++ b/xeft.el
@@ -135,7 +135,10 @@
 
 To remove the files that you want to ignore but are already
 indexed in the database, simply delete the database and start
-xeft again."
+xeft again.
+
+If this is not flexible enough, take a look at
+‘xeft-file-filter’."
   :type '(list string))
 
 (defcustom xeft-file-filter #'xeft-default-file-filter
@@ -157,7 +160,10 @@ from indexing."
 
 (defcustom xeft-recursive nil
   "If non-nil, xeft searches for file recursively.
-Xeft doesn’t follow symlinks and ignores inaccessible directories."
+
+Xeft doesn’t follow symlinks and ignores inaccessible
+directories. Customize ‘xeft-directory-filter’ to exclude
+subdirectories."
   :type 'boolean)
 
 (defcustom xeft-file-list-function #'xeft--file-list



[elpa] externals/xeft 20f4d0d36f 1/4: Add xeft-file-filter

2023-01-28 Thread ELPA Syncer
branch: externals/xeft
commit 20f4d0d36fbf1345c1c59f828b43fc13be8c3925
Author: Yuan Fu 
Commit: Yuan Fu 

Add xeft-file-filter

xeft-file-filter allow more flexible file filtering in case when
xeft-ignore-extension is not flexible enough and
xeft-file-list-function is too verbose.

* xeft.el (xeft-file-filter): New variable.
(xeft-default-file-filter): New function.
(xeft--file-list): Use xeft-file-filter to filter files.
---
 xeft.el | 28 ++--
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/xeft.el b/xeft.el
index 29fc11580f..5cd3e952cb 100644
--- a/xeft.el
+++ b/xeft.el
@@ -138,6 +138,15 @@ indexed in the database, simply delete the database and 
start
 xeft again."
   :type '(list string))
 
+(defcustom xeft-file-filter #'xeft-default-file-filter
+  "A filter function that excludes files from indexing.
+
+If ‘xeft-ignore-extension’ is not flexible enough, customize this
+function to filter out unwanted files. This function should take
+the absolute path of a file and return t/nil indicating
+keeping/excluding the file from indexing."
+  :type 'function)
+
 (defcustom xeft-recursive nil
   "If non-nil, xeft searches for file recursively.
 Xeft doesn’t follow symlinks and ignores inaccessible directories."
@@ -538,17 +547,24 @@ search phrase the user typed."
   (interactive)
   (xeft-refresh t))
 
+(defun xeft-default-file-filter (file)
+  "Return nil if FILE should be ignored.
+
+FILE is an absolute path. This default implementation ignores
+directories, dot files, and files matched by
+‘xeft-ignore-extension’."
+  (and (file-regular-p file)
+   (not (string-prefix-p
+ "." (file-name-base file)))
+   (not (member (file-name-extension file)
+xeft-ignore-extension
+
 (defun xeft--file-list ()
   "Default function for ‘xeft-file-list-function’.
 Return a list of all files in ‘xeft-directory’, ignoring dot
 files and directories and check for ‘xeft-ignore-extension’."
   (cl-remove-if-not
-   (lambda (file)
- (and (file-regular-p file)
-  (not (string-prefix-p
-"." (file-name-base file)))
-  (not (member (file-name-extension file)
-   xeft-ignore-extension
+   xeft-file-filter
(if xeft-recursive
(directory-files-recursively
 xeft-directory "" nil (lambda (dir)



[elpa] externals/xeft c19fea3921 3/4: ; * README.md: Add notice.

2023-01-28 Thread ELPA Syncer
branch: externals/xeft
commit c19fea39215c1d0072f7786659428e7ddb7b7a17
Author: Yuan Fu 
Commit: Yuan Fu 

; * README.md: Add notice.
---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index f58fd2007e..7e38910203 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
+NOTE The primary repository is now at 
[SourceHut](https://git.sr.ht/~casouri/xeft).
+
 ![Demo gif](./demo.gif)
 
 # Usage



[elpa] externals/xeft a2de16c207 2/4: Add xeft-directory-filter

2023-01-28 Thread ELPA Syncer
branch: externals/xeft
commit a2de16c207671f73f02e938fe72bf6e45b34d94b
Author: Yuan Fu 
Commit: Yuan Fu 

Add xeft-directory-filter

Since we added xeft-file-filter, might as well add xeft-directory-filter.

* xeft.el (xeft-directory-filter): New variable.
(xeft-default-directory-filter): New function.
(xeft--file-list): Use xeft-directory-filter.
---
 xeft.el | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/xeft.el b/xeft.el
index 5cd3e952cb..06b6e2c0d7 100644
--- a/xeft.el
+++ b/xeft.el
@@ -147,6 +147,14 @@ the absolute path of a file and return t/nil indicating
 keeping/excluding the file from indexing."
   :type 'function)
 
+(defcustom xeft-directory-filter #'xeft-default-directory-filter
+  "A filter function that excludes directories from indexing.
+
+This function is useful when ‘xeft-recursive’ is non-nil, and you
+want to exclude certain directories (and its enclosing files)
+from indexing."
+  :type 'function)
+
 (defcustom xeft-recursive nil
   "If non-nil, xeft searches for file recursively.
 Xeft doesn’t follow symlinks and ignores inaccessible directories."
@@ -559,6 +567,12 @@ directories, dot files, and files matched by
(not (member (file-name-extension file)
 xeft-ignore-extension
 
+(defun xeft-default-directory-filter (dir)
+  "Return nil if DIR shouldn’t be indexed.
+DIR is an absolute path. This default implementation excludes dot
+directories."
+  (not (string-prefix-p "." (file-name-base dir
+
 (defun xeft--file-list ()
   "Default function for ‘xeft-file-list-function’.
 Return a list of all files in ‘xeft-directory’, ignoring dot
@@ -567,9 +581,7 @@ files and directories and check for 
‘xeft-ignore-extension’."
xeft-file-filter
(if xeft-recursive
(directory-files-recursively
-xeft-directory "" nil (lambda (dir)
-(not (string-prefix-p
-  "." (file-name-base dir)
+xeft-directory "" nil xeft-directory-filter)
  (directory-files
   xeft-directory t nil t
 



[nongnu] elpa/git-commit 76fe394953: magit-log-merged: Fix incorrect calculation of distance from tip

2023-01-28 Thread ELPA Syncer
branch: elpa/git-commit
commit 76fe394953281fd9a9b68b2cfd0873bfa20ff269
Author: Brennan Vincent 
Commit: Jonas Bernoulli 

magit-log-merged: Fix incorrect calculation of distance from tip

When calculating the distance of a commit that is actually on a branch
from the tip of that branch (i.e., the  such that branch~
identifies that commit), we should only count the path along first
parents, as that is how the syntax branch~ is defined. Before this
commit, we were counting _all_ commits between the commit and the tip
of the branch, which is more than the correct number, in the case that
the history between commit and branch is non-linear. Thus, the point
around which we log was chosen incorrectly, and an incorrect set of
commits was shown in the resulting log.
---
 lisp/magit-git.el | 7 +--
 lisp/magit-log.el | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 0d30b83eef..5a19f74cef 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -2154,12 +2154,15 @@ exists in the current repository is considered its main 
branch."
  (cons (magit-get "init.defaultBranch")
magit-main-branch-names))
 
-(defun magit-rev-diff-count (a b)
+(defun magit-rev-diff-count (a b &optional first-parent)
   "Return the commits in A but not B and vice versa.
-Return a list of two integers: (A>B B>A)."
+Return a list of two integers: (A>B B>A).
+
+If `first-parent' is set, traverse only first parents."
   (mapcar #'string-to-number
   (split-string (magit-git-string "rev-list"
   "--count" "--left-right"
+  (and first-parent "--first-parent")
   (concat a "..." b))
 "\t")))
 
diff --git a/lisp/magit-log.el b/lisp/magit-log.el
index ad62cbabd1..4d55ae1069 100644
--- a/lisp/magit-log.el
+++ b/lisp/magit-log.el
@@ -845,7 +845,7 @@ https://github.com/mhagger/git-when-merged.";
   (if (equal m "Commit is directly on this branch.")
   (let* ((from (format "%s~%d" commit
(/ magit-log-merged-commit-count 2)))
- (to (- (car (magit-rev-diff-count branch commit))
+ (to (- (car (magit-rev-diff-count branch commit t))
 (/ magit-log-merged-commit-count 2)))
  (to (if (<= to 0)
  branch



[nongnu] elpa/magit-section updated (c883fabe28 -> 76fe394953)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  c883fabe28 manual: Extend macOS performance notes
  adds  76fe394953 magit-log-merged: Fix incorrect calculation of distance 
from tip

No new revisions were added by this update.

Summary of changes:
 lisp/magit-git.el | 7 +--
 lisp/magit-log.el | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)



[nongnu] elpa/magit updated (c883fabe28 -> 76fe394953)

2023-01-28 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  c883fabe28 manual: Extend macOS performance notes
  adds  76fe394953 magit-log-merged: Fix incorrect calculation of distance 
from tip

No new revisions were added by this update.

Summary of changes:
 lisp/magit-git.el | 7 +--
 lisp/magit-log.el | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)



[nongnu] elpa/scroll-on-jump 6a9b9ecc0d: Fix error from testing logic that moved the point while scrolling

2023-01-28 Thread ELPA Syncer
branch: elpa/scroll-on-jump
commit 6a9b9ecc0dcfabb9ca560393bfe5aa21c6063c16
Author: Campbell Barton 
Commit: Campbell Barton 

Fix error from testing logic that moved the point while scrolling
---
 scroll-on-jump.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scroll-on-jump.el b/scroll-on-jump.el
index 3820dbc987..b697914d2c 100644
--- a/scroll-on-jump.el
+++ b/scroll-on-jump.el
@@ -346,7 +346,6 @@ Argument ALSO-MOVE-POINT moves the point while scrolling."
 ;; the caller moves the point to the final location.
 (when (< px-done-abs px-scroll-abs)
   ;; Force `redisplay', without this redrawing can be a little 
choppy.
-  (goto-char (1+ (point)))
   (redisplay t)
   ;; FIXME: for some reason a short sleep is needed to prevent 
choppy scrolling.
   (sit-for 0.01)))