[nongnu] elpa/helm 39a638c80c 1/2: Add action to remove candidates from file-name-history

2022-04-13 Thread ELPA Syncer
branch: elpa/helm
commit 39a638c80c11695d3affb9844a08b2b04b584d7b
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Add action to remove candidates from file-name-history
---
 helm-files.el | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/helm-files.el b/helm-files.el
index 6dff0286c5..f8d520ecd9 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -6081,6 +6081,16 @@ list."
   (with-helm-alive-p
 (helm-exit-and-execute-action 'helm-ff-file-name-history-ff)))
 
+(defun helm-ff-file-name-history-delete-item (_candidate)
+  (let ((files (helm-marked-candidates)))
+(with-helm-display-marked-candidates
+  helm-marked-buffer-name
+  (helm-ff--count-and-collect-dups files)
+  (when (y-or-n-p "Delete file(s) from history? ")
+(cl-loop for f in files do
+ (setq file-name-history (delete f file-name-history
+  (message nil
+
 (defun helm-ff-file-name-history ()
   "Switch to `file-name-history' without quitting `helm-find-files'."
   (interactive)
@@ -6105,7 +6115,8 @@ list."
   (helm-set-pattern
(expand-file-name candidate))
   (with-helm-after-update-hook 
(helm-exit-minibuffer)))
-"Find file in helm" 'helm-ff-file-name-history-ff)
+"Find file in helm" 'helm-ff-file-name-history-ff
+"Delete candidate(s)" 
'helm-ff-file-name-history-delete-item)
:keymap helm-file-name-history-map)))
 (with-helm-alive-p
   (helm :sources src



[nongnu] elpa/helm-core updated (90841263c9 -> 5546efa7d1)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  90841263c9 New HFF action to list files in file
  adds  39a638c80c Add action to remove candidates from file-name-history
  adds  5546efa7d1 Prevent saving new directories to file-name-history

No new revisions were added by this update.

Summary of changes:
 helm-files.el | 47 +--
 1 file changed, 33 insertions(+), 14 deletions(-)



[nongnu] elpa/helm 5546efa7d1 2/2: Prevent saving new directories to file-name-history

2022-04-13 Thread ELPA Syncer
branch: elpa/helm
commit 5546efa7d177068c4f28fe41a02927cf19a7b018
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Prevent saving new directories to file-name-history
---
 helm-files.el | 34 +-
 1 file changed, 21 insertions(+), 13 deletions(-)

diff --git a/helm-files.el b/helm-files.el
index f8d520ecd9..1342d662bf 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -3680,19 +3680,24 @@ Note that only existing directories are saved here."
   (let ((mkd (helm-marked-candidates :with-wildcard t))
 (history-delete-duplicates t))
 (cl-loop for sel in mkd
-  when (and sel
-(stringp sel)
-;; If file was one of HFF candidates assume it
-;; is an existing file, so no need to call
-;; file-exists-p which is costly on remote candidates.
-;; (file-exists-p sel)
-(not (helm-ff--file-directory-p sel)))
-  do
-  ;; we use `abbreviate-file-name' here because
-  ;; other parts of Emacs seems to,
-  ;; and we don't want to introduce duplicates.
-  (add-to-history 'file-name-history
-  (abbreviate-file-name sel)))
+ when (and sel
+   (stringp sel)
+   ;; If file was one of HFF candidates assume it
+   ;; is an existing file, so no need to call
+   ;; file-exists-p which is costly on remote 
candidates.
+   ;; (file-exists-p sel)
+   (not (helm-ff--file-directory-p sel))
+   ;; When creating a new directory previous test
+   ;; check for file-directory-p BEFORE its
+   ;; creation, so check for ending slash as
+   ;; well to know if it is a future directory.
+   (not (string-match "/\\'" sel)))
+ do
+ ;; we use `abbreviate-file-name' here because
+ ;; other parts of Emacs seems to,
+ ;; and we don't want to introduce duplicates.
+ (add-to-history 'file-name-history
+ (abbreviate-file-name sel)))
 (add-hook 'helm-exit-minibuffer-hook 'helm-files-save-file-name-history)
 
 (defun helm-ff-valid-symlink-p (file &optional link)
@@ -3952,6 +3957,9 @@ If SKIP-BORING-CHECK is non nil don't filter boring 
files."
 (if (or reverse urlp) file basename
  (len (length disp))
  (backup (backup-file-name-p disp)))
+(when (string-match "/\\'" file)
+  (setq disp (concat disp "/")
+len (1+ len)))
 ;; We want to filter boring files only on the files coming
 ;; from the output of helm-ff-directory-files not on single
 ;; candidate (Bug#2330).



[nongnu] elpa/helm updated (90841263c9 -> 5546efa7d1)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  90841263c9 New HFF action to list files in file
   new  39a638c80c Add action to remove candidates from file-name-history
   new  5546efa7d1 Prevent saving new directories to file-name-history


Summary of changes:
 helm-files.el | 47 +--
 1 file changed, 33 insertions(+), 14 deletions(-)



[elpa] externals/corfu d14c3fad68: corfu--preview-current: Remove STR argument

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit d14c3fad68e2c233be77382beef74877d538581a
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu--preview-current: Remove STR argument
---
 corfu.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/corfu.el b/corfu.el
index 91963e491d..403efa44e6 100644
--- a/corfu.el
+++ b/corfu.el
@@ -771,8 +771,8 @@ there hasn't been any input, then quit."
 (corfu--popup-show (+ pos (length corfu--base)) pw width fcands (- 
corfu--index corfu--scroll)
(and (> corfu--total corfu-count) lo) bar)))
 
-(defun corfu--preview-current (beg end str)
-  "Show current candidate as overlay given BEG, END and STR."
+(defun corfu--preview-current (beg end)
+  "Show current candidate as overlay given BEG and END."
   (when-let (cand (and corfu-preview-current (>= corfu--index 0)
(/= corfu--index corfu--preselect)
(nth corfu--index corfu--candidates)))
@@ -852,7 +852,7 @@ there hasn't been any input, then quit."
  ;; 3) There exist candidates => Show candidates popup.
  (corfu--candidates
   (corfu--candidates-popup beg)
-  (corfu--preview-current beg end str)
+  (corfu--preview-current beg end)
   (corfu--echo-documentation)
   (redisplay 'force)) ;; XXX HACK Ensure that popup is redisplayed
  ;; 4) There are no candidates & corfu-quit-no-match => Confirmation popup.



[nongnu] elpa/evil 7e87b82660: Ex yank doesn't move point

2022-04-13 Thread ELPA Syncer
branch: elpa/evil
commit 7e87b82660668cb10f1f9838ddd622abab1f7a62
Author: Tom Dalziel 
Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>

Ex yank doesn't move point

In visual state, it restores point to beginning of visual range
Fixes #1593
---
 evil-commands.el |  1 +
 evil-ex.el   |  5 -
 evil-macros.el   |  2 ++
 evil-tests.el| 11 ++-
 4 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/evil-commands.el b/evil-commands.el
index 6e7a11bf68..24e4953091 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -1653,6 +1653,7 @@ given."
 (evil-define-operator evil-ex-yank (beg end type register count yank-handler)
   "The Ex yank command.
 \[BEG,END]yank [REGISTER] [COUNT]"
+  :restore-point t
   (interactive "")
   (evil-ex-delete-or-yank nil beg end type register count yank-handler))
 
diff --git a/evil-ex.el b/evil-ex.el
index af04f7076f..b375a74455 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -703,6 +703,8 @@ This function interprets special file names like # and %."
  (evil-ex-range
   (or range (and count (evil-ex-range count count
  (evil-ex-command (evil-ex-completed-binding command))
+ (restore-point (when (evil-get-command-property evil-ex-command 
:restore-point)
+  (min (point) (or (mark) most-positive-fixnum
  (evil-ex-bang (and bang t))
  (evil-ex-argument (copy-sequence argument))
  (evil-this-type (evil-type evil-ex-range))
@@ -734,7 +736,8 @@ This function interprets special file names like # and %."
   (goto-char beg)
   (activate-mark)
   (call-interactively evil-ex-command)
-  (run-hooks 'post-command-hook
+  (run-hooks 'post-command-hook)
+  (when restore-point (goto-char restore-point)
 (when (buffer-live-p buf)
   (with-current-buffer buf
 (deactivate-mark)))
diff --git a/evil-macros.el b/evil-macros.el
index 329f54c3aa..fe26723232 100644
--- a/evil-macros.el
+++ b/evil-macros.el
@@ -480,6 +480,8 @@ Optional keyword arguments are:
 - `:keep-visual' - if non-nil, the selection is not disabled when the
   operator is executed in visual state.  By default, visual state is
   exited automatically.
+- `:restore-point' - if non-nil, point is restored when the
+  operator is executed from ex.
 
 \(fn OPERATOR (BEG END ARGS...) DOC [[KEY VALUE]...] BODY...)"
   (declare (indent defun)
diff --git a/evil-tests.el b/evil-tests.el
index b38be76f4e..2836f22751 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -1935,7 +1935,16 @@ New Tex[t]
   "a\n[b]\nc\nd\ne\nf\n"
   (":yank r 3")
   "a\nb\nc\nd\ne\nf\n"
-  (should (string= (substring-no-properties (evil-get-register ?r)) 
"b\nc\nd\n")
+  (should (string= (substring-no-properties (evil-get-register ?r)) 
"b\nc\nd\n"
+  (ert-info (":yank with range yanks without moving point")
+(evil-test-buffer
+  "[a]\nb\nc\nd\ne\n"
+  (":4y" [return] "p")
+  "a\n[d]\nb\nc\nd\ne\n")
+(evil-test-buffer
+  "[a]\nb\nc\nd\ne\n"
+  (":+4y" [return] "p")
+  "a\n[e]\nb\nc\nd\ne\n")))
 
 (ert-deftest evil-test-delete ()
   "Test `evil-delete'"



[elpa] externals/corfu 611acfec50 2/4: Rework corfu-indexed

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 611acfec50c537deb7b1c7002e24465a49523405
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rework corfu-indexed
---
 extensions/corfu-indexed.el | 53 +
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el
index 05e4cb8f1b..c88c23486d 100644
--- a/extensions/corfu-indexed.el
+++ b/extensions/corfu-indexed.el
@@ -1,11 +1,11 @@
-;;; corfu.el --- Completion Overlay Region FUnction -*- lexical-binding: t -*-
+;;; corfu-indexed.el --- Select indexed candidates -*- lexical-binding: t -*-
 
 ;; Copyright (C) 2021  Free Software Foundation, Inc.
 
-;; Author: Luis Henriquez-Perez 
+;; Author: Luis Henriquez-Perez , Daniel Mendler 

 ;; Maintainer: Daniel Mendler 
 ;; Created: 2022
-;; Version: 0.19
+;; Version: 0.1
 ;; Package-Requires: ((emacs "27.1"))
 ;; Homepage: https://github.com/minad/corfu
 
@@ -43,29 +43,36 @@
   '(corfu-insert corfu-complete)
   "Commands that should be indexed.")
 
-(defvar corfu-indexed--max 0)
-
-(defun corfu-indexed--format-candidate (orig cands)
-  "Advice for `corfu--format-candidates' that add an index to candidates.
-See `corfu--format-candidates'."
-  (let ((updated-cands nil)
-   (index 0)
-   (index-string nil))
-(pcase-dolist (`(,prefix ,suffix ,cand) cands)
-  (cl-incf index)
-  (setq index-string (format (format "%%%ds " (if (> corfu-count 10) 2 1)) 
index))
-  (setq prefix (concat (propertize index-string 'face 'corfu-indexed) 
prefix))
-  (push (list prefix suffix cand) updated-cands))
-(setq corfu-indexed--max index)
-(funcall orig (reverse updated-cands
+(defun corfu-indexed--affixate (cands)
+  "Advice for `corfu--affixate' which prefixes the CANDS with an index."
+  (setq cands (cdr cands))
+  (let* ((index 0)
+ (space #(" " 0 1 (face (:height 0.5 :inherit corfu-indexed
+ (fmt
+  (concat space
+  (propertize
+   (format "%%%ds" (if (> (length cands) 10) 2 1))
+   'face 'corfu-indexed)
+  space))
+ (align
+  (propertize "  " 'display
+  `(space :align-to (+ left ,(if (> (length cands) 10) 3 
2))
+(dolist (cand cands)
+  (setf (cadr cand)
+(concat
+ (propertize " " 'display (format fmt index))
+ align
+ (cadr cand)))
+  (cl-incf index))
+(cons t cands)))
 
 (defun corfu-indexed--handle-prefix (orig &rest args)
   "Handle prefix argument before calling ORIG function with ARGS."
   (if (and current-prefix-arg (called-interactively-p t))
-  (let ((corfu--index (+ 0 (prefix-numeric-value current-prefix-arg
+  (let ((corfu--index (+ corfu--scroll (prefix-numeric-value 
current-prefix-arg
 (if (or (< corfu--index 0)
-(> corfu--index corfu-indexed--max)
-(= corfu--total 0))
+(>= corfu--index corfu--total)
+(>= corfu--index (+ corfu--scroll corfu-count)))
 (message "Out of range")
   (funcall orig)))
 (apply orig args)))
@@ -76,11 +83,11 @@ See `corfu--format-candidates'."
   :global t :group 'corfu
   (cond
(corfu-indexed-mode
-(advice-add #'corfu--format-candidates :around 
#'corfu-indexed--format-candidate)
+(advice-add #'corfu--affixate :filter-return #'corfu-indexed--affixate)
 (dolist (cmd corfu-indexed--commands)
   (advice-add cmd :around #'corfu-indexed--handle-prefix)))
(t
-(advice-remove #'corfu--format-candidates 
#'corfu-indexed--format-candidate)
+(advice-remove #'corfu--affixate #'corfu-indexed--affixate)
 (dolist (cmd corfu-indexed--commands)
   (advice-remove cmd #'corfu-indexed--handle-prefix)
 



[elpa] externals/corfu cff3ca580e 1/4: Add corfu indexed and corfu-quick. (#127)

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit cff3ca580e5fca1234699e5ab13a064af109f173
Author: Luis 
Commit: GitHub 

Add corfu indexed and corfu-quick. (#127)
---
 extensions/corfu-indexed.el |  88 +
 extensions/corfu-quick.el   | 132 
 2 files changed, 220 insertions(+)

diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el
new file mode 100644
index 00..05e4cb8f1b
--- /dev/null
+++ b/extensions/corfu-indexed.el
@@ -0,0 +1,88 @@
+;;; corfu.el --- Completion Overlay Region FUnction -*- lexical-binding: t -*-
+
+;; Copyright (C) 2021  Free Software Foundation, Inc.
+
+;; Author: Luis Henriquez-Perez 
+;; Maintainer: Daniel Mendler 
+;; Created: 2022
+;; Version: 0.19
+;; Package-Requires: ((emacs "27.1"))
+;; Homepage: https://github.com/minad/corfu
+
+;; This file is part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; This package is a Corfu extension, which prefixes candidates with indices 
and
+;; allows you to select with prefix arguments. This is designed to be a faster
+;; alternative to selecting a candidate with `corfu-next' and `corfu-previous'.
+
+;;; Code:
+
+(require 'corfu)
+
+(defface corfu-indexed
+  '((t :height 0.75 :inherit font-lock-comment-face))
+  "Face used for the candidate index prefix."
+  :group 'corfu-faces)
+
+(defvar corfu-indexed--commands
+  '(corfu-insert corfu-complete)
+  "Commands that should be indexed.")
+
+(defvar corfu-indexed--max 0)
+
+(defun corfu-indexed--format-candidate (orig cands)
+  "Advice for `corfu--format-candidates' that add an index to candidates.
+See `corfu--format-candidates'."
+  (let ((updated-cands nil)
+   (index 0)
+   (index-string nil))
+(pcase-dolist (`(,prefix ,suffix ,cand) cands)
+  (cl-incf index)
+  (setq index-string (format (format "%%%ds " (if (> corfu-count 10) 2 1)) 
index))
+  (setq prefix (concat (propertize index-string 'face 'corfu-indexed) 
prefix))
+  (push (list prefix suffix cand) updated-cands))
+(setq corfu-indexed--max index)
+(funcall orig (reverse updated-cands
+
+(defun corfu-indexed--handle-prefix (orig &rest args)
+  "Handle prefix argument before calling ORIG function with ARGS."
+  (if (and current-prefix-arg (called-interactively-p t))
+  (let ((corfu--index (+ 0 (prefix-numeric-value current-prefix-arg
+(if (or (< corfu--index 0)
+(> corfu--index corfu-indexed--max)
+(= corfu--total 0))
+(message "Out of range")
+  (funcall orig)))
+(apply orig args)))
+
+;;;###autoload
+(define-minor-mode corfu-indexed-mode
+  "Prefix candidates with indices."
+  :global t :group 'corfu
+  (cond
+   (corfu-indexed-mode
+(advice-add #'corfu--format-candidates :around 
#'corfu-indexed--format-candidate)
+(dolist (cmd corfu-indexed--commands)
+  (advice-add cmd :around #'corfu-indexed--handle-prefix)))
+   (t
+(advice-remove #'corfu--format-candidates 
#'corfu-indexed--format-candidate)
+(dolist (cmd corfu-indexed--commands)
+  (advice-remove cmd #'corfu-indexed--handle-prefix)
+
+(provide 'corfu-indexed)
+;;; corfu-indexed.el ends here
diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
new file mode 100644
index 00..5dbacd42f2
--- /dev/null
+++ b/extensions/corfu-quick.el
@@ -0,0 +1,132 @@
+;;; corfu-quick.el --- Completion Overlay Region FUnction -*- lexical-binding: 
t -*-
+
+;; Copyright (C) 2021  Free Software Foundation, Inc.
+
+;; Author: Luis Henriquez-Perez 
+;; Maintainer: Daniel Mendler 
+;; Created: 2022
+;; Version: 0.19
+;; Package-Requires: ((emacs "27.1"))
+;; Homepage: https://github.com/minad/corfu
+
+;; This file is part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this progra

[elpa] externals/corfu 3c8d58dc76 4/4: README: Remove caveats

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 3c8d58dc76e46a5a2b808a080ed9efa41694de06
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Remove caveats
---
 README.org | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/README.org b/README.org
index 0450d6ef0b..c20c741398 100644
--- a/README.org
+++ b/README.org
@@ -456,17 +456,6 @@ enhance your setup.
   your completions in the minibuffer ~consult-completion-in-region~ is your 
best
   option.
 
-* Caveats
-
-Corfu is robust in most scenarios. There are a few known technical caveats.
-
-- Corfu uses child frames to show the popup. For now Corfu falls back to the
-  default setting of the ~completion-in-region-function~ on non-graphical
-  displays. You can use one of the alternatives in terminals.
-
-- Corfu does not sort by history, since ~completion-at-point~ does not 
maintain a
-  history (See branch =history= for a possible solution).
-
 * Contributions
 
 Since this package is part of [[http://elpa.gnu.org/packages/corfu.html][GNU 
ELPA]] contributions require a copyright



[elpa] externals/corfu bfbe9ddf99 3/4: Add corfu-history and corfu-info extensions

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit bfbe9ddf991ad846f8cabe3a0338919e5b2eb255
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add corfu-history and corfu-info extensions
---
 corfu.el|  56 ++--
 extensions/corfu-history.el | 101 
 extensions/corfu-indexed.el |   2 +-
 extensions/corfu-info.el|  95 +
 extensions/corfu-quick.el   |  36 
 5 files changed, 218 insertions(+), 72 deletions(-)

diff --git a/corfu.el b/corfu.el
index 403efa44e6..5daf7043ba 100644
--- a/corfu.el
+++ b/corfu.el
@@ -240,8 +240,8 @@ The completion backend can override this with
 (define-key map "\C-g" #'corfu-quit)
 (define-key map "\r" #'corfu-insert)
 (define-key map "\t" #'corfu-complete)
-(define-key map "\eg" #'corfu-show-location)
-(define-key map "\eh" #'corfu-show-documentation)
+(define-key map "\eg" 'corfu-info-location)
+(define-key map "\eh" 'corfu-info-documentation)
 (define-key map (concat "\e" " ") #'corfu-insert-separator) ;; Avoid ugly 
warning
 map)
   "Corfu keymap used when popup is shown.")
@@ -949,56 +949,6 @@ See `corfu-separator' for more details."
   (interactive)
   (corfu--goto (1- corfu--total)))
 
-(defun corfu--restore-on-next-command ()
-  "Restore window configuration before next command."
-  (let ((config (current-window-configuration))
-(other other-window-scroll-buffer)
-(restore (make-symbol "corfu--restore")))
-(fset restore
-  (lambda ()
-(setq other-window-scroll-buffer other)
-(unless (memq this-command '(scroll-other-window 
scroll-other-window-down))
-  (when (memq this-command '(corfu-quit corfu-reset))
-(setq this-command #'ignore))
-  (remove-hook 'pre-command-hook restore)
-  (set-window-configuration config
-(add-hook 'pre-command-hook restore)))
-
-;; Company support, taken from `company.el', see `company-show-doc-buffer'.
-(defun corfu-show-documentation ()
-  "Show documentation of current candidate."
-  (interactive)
-  (when (< corfu--index 0)
-(user-error "No candidate selected"))
-  (if-let* ((fun (plist-get corfu--extra :company-doc-buffer))
-(res (funcall fun (nth corfu--index corfu--candidates
-  (let ((buf (or (car-safe res) res)))
-(corfu--restore-on-next-command)
-(setq other-window-scroll-buffer (get-buffer buf))
-(set-window-start (display-buffer buf t) (or (cdr-safe res) 
(point-min
-(user-error "No documentation available")))
-
-;; Company support, taken from `company.el', see `company-show-location'.
-(defun corfu-show-location ()
-  "Show location of current candidate."
-  (interactive)
-  (when (< corfu--index 0)
-(user-error "No candidate selected"))
-  (if-let* ((fun (plist-get corfu--extra :company-location))
-(loc (funcall fun (nth corfu--index corfu--candidates
-  (let ((buf (or (and (bufferp (car loc)) (car loc)) (find-file-noselect 
(car loc) t
-(corfu--restore-on-next-command)
-(setq other-window-scroll-buffer buf)
-(with-selected-window (display-buffer buf t)
-  (save-restriction
-(widen)
-(if (bufferp (car loc))
-(goto-char (cdr loc))
-  (goto-char (point-min))
-  (forward-line (1- (cdr loc
-(set-window-start nil (point)
-(user-error "No candidate location available")))
-
 (defun corfu-complete ()
   "Try to complete current input.
 If a candidate is selected, insert it."
@@ -1273,7 +1223,7 @@ The ORIG function takes the FUN and WHICH arguments."
 ;; Emacs 28: Do not show Corfu commands with M-X
 (dolist (sym '(corfu-next corfu-previous corfu-first corfu-last corfu-quit 
corfu-reset
corfu-complete corfu-insert corfu-scroll-up corfu-scroll-down
-   corfu-show-location corfu-show-documentation 
corfu-insert-separator))
+   corfu-insert-separator))
   (put sym 'completion-predicate #'ignore))
 
 (provide 'corfu)
diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el
new file mode 100644
index 00..ff90779671
--- /dev/null
+++ b/extensions/corfu-history.el
@@ -0,0 +1,101 @@
+;;; corfu-history.el --- Sorting by history for Corfu -*- lexical-binding: t 
-*-
+
+;; Copyright (C) 2022  Free Software Foundation, Inc.
+
+;; Author: Daniel Mendler 
+;; Maintainer: Daniel Mendler 
+;; Created: 2021
+;; Version: 0.1
+;; Package-Requires: ((emacs "27.1") (corfu "0.21"))
+;; Homepage: https://github.com/minad/corfu
+
+;; This file is part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is

[elpa] externals/vertico b6e021cd55 1/2: vertico-quick: Update faces according to Modus

2022-04-13 Thread ELPA Syncer
branch: externals/vertico
commit b6e021cd550fea59b77127959cec01d981fbd324
Author: Daniel Mendler 
Commit: Daniel Mendler 

vertico-quick: Update faces according to Modus
---
 extensions/vertico-quick.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/extensions/vertico-quick.el b/extensions/vertico-quick.el
index a430de806c..9a8ea01b01 100644
--- a/extensions/vertico-quick.el
+++ b/extensions/vertico-quick.el
@@ -39,19 +39,19 @@
 
 (defface vertico-quick1
   'class color) (min-colors 88) (background dark))
- :background "#7042a2" :weight bold :foreground "white")
+ :background "#2a40b8" :weight bold :foreground "white")
 (((class color) (min-colors 88) (background light))
- :weight bold :background "#d5baff" :foreground "black")
-(t :background "magenta" :foreground "white"))
+ :background "#77baff" :weight bold :foreground "black")
+(t :background "blue" :foreground "white"))
   "Face used for the first quick key."
   :group 'vertico-faces)
 
 (defface vertico-quick2
   'class color) (min-colors 88) (background dark))
- :background "#004065" :weight bold :foreground "white")
+ :background "#71206a" :weight bold :foreground "#ffcaf0")
 (((class color) (min-colors 88) (background light))
- :weight bold :background "#8ae4f2" :foreground "black")
-(t :background "blue" :foreground "white"))
+ :background "#ffccff" :weight bold :foreground "#770077")
+(t :background "magenta" :foreground "white"))
   "Face used for the second quick key."
   :group 'vertico-faces)
 



[elpa] externals/vertico updated (8734ab9073 -> 836a8a7dc1)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/vertico.

  from  8734ab9073 Use pcase-dolist
   new  b6e021cd55 vertico-quick: Update faces according to Modus
   new  836a8a7dc1 vertico-quick: Extract vertico-quick--keys function


Summary of changes:
 extensions/vertico-quick.el | 57 -
 1 file changed, 30 insertions(+), 27 deletions(-)



[elpa] externals/corfu updated (d14c3fad68 -> 3c8d58dc76)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  d14c3fad68 corfu--preview-current: Remove STR argument
   new  cff3ca580e Add corfu indexed and corfu-quick. (#127)
   new  611acfec50 Rework corfu-indexed
   new  bfbe9ddf99 Add corfu-history and corfu-info extensions
   new  3c8d58dc76 README: Remove caveats


Summary of changes:
 README.org  |  11 
 corfu.el|  56 +--
 extensions/corfu-history.el | 101 +
 extensions/corfu-indexed.el |  95 +++
 extensions/corfu-info.el|  95 +++
 extensions/corfu-quick.el   | 132 
 6 files changed, 426 insertions(+), 64 deletions(-)
 create mode 100644 extensions/corfu-history.el
 create mode 100644 extensions/corfu-indexed.el
 create mode 100644 extensions/corfu-info.el
 create mode 100644 extensions/corfu-quick.el



[elpa] externals/vertico 836a8a7dc1 2/2: vertico-quick: Extract vertico-quick--keys function

2022-04-13 Thread ELPA Syncer
branch: externals/vertico
commit 836a8a7dc1e5f1f9d03f1cab7cbad6a6376fa6d8
Author: Daniel Mendler 
Commit: Daniel Mendler 

vertico-quick: Extract vertico-quick--keys function
---
 extensions/vertico-quick.el | 45 -
 1 file changed, 24 insertions(+), 21 deletions(-)

diff --git a/extensions/vertico-quick.el b/extensions/vertico-quick.el
index 9a8ea01b01..ef4f93fc9e 100644
--- a/extensions/vertico-quick.el
+++ b/extensions/vertico-quick.el
@@ -68,29 +68,32 @@
 (defvar-local vertico-quick--list nil)
 (defvar-local vertico-quick--first nil)
 
-(defun vertico-quick--format-candidate (orig cand prefix suffix index start)
-  "Format candidate, see `vertico--format-candidate' for arguments."
+(defun vertico-quick--keys (index)
+  "Format keys for INDEX."
   (let* ((fst (length vertico-quick1))
  (snd (length vertico-quick2))
- (len (+ fst snd))
- (idx (- index start))
- (keys (if (>= idx fst)
-   (let ((first (elt vertico-quick2 (mod (/ (- idx fst) len) 
snd)))
- (second (elt (concat vertico-quick1 vertico-quick2) 
(mod (- idx fst) len
- (cond
-  ((eq first vertico-quick--first)
-   (push (cons second index) vertico-quick--list)
-   (concat " " (propertize (char-to-string second) 'face 
'vertico-quick1)))
-  (vertico-quick--first "  ")
-  (t
-   (push (cons first (list first)) vertico-quick--list)
-   (concat (propertize (char-to-string first) 'face 
'vertico-quick1)
-   (propertize (char-to-string second) 'face 
'vertico-quick2)
- (let ((first (elt vertico-quick1 (mod idx fst
-   (if vertico-quick--first
-   "  "
- (push (cons first index) vertico-quick--list)
- (concat (propertize (char-to-string first) 'face 
'vertico-quick1) " "))
+ (len (+ fst snd)))
+(if (>= index fst)
+(let ((first (elt vertico-quick2 (mod (/ (- index fst) len) snd)))
+  (second (elt (concat vertico-quick1 vertico-quick2) (mod (- 
index fst) len
+  (cond
+   ((eq first vertico-quick--first)
+(push (cons second index) vertico-quick--list)
+(concat " " (propertize (char-to-string second) 'face 
'vertico-quick1)))
+   (vertico-quick--first "  ")
+   (t
+(push (cons first (list first)) vertico-quick--list)
+(concat (propertize (char-to-string first) 'face 'vertico-quick1)
+(propertize (char-to-string second) 'face 
'vertico-quick2)
+  (let ((first (elt vertico-quick1 (mod index fst
+(if vertico-quick--first
+"  "
+  (push (cons first index) vertico-quick--list)
+  (concat (propertize (char-to-string first) 'face 'vertico-quick1) " 
"))
+
+(defun vertico-quick--format-candidate (orig cand prefix suffix index start)
+  "Format candidate, see `vertico--format-candidate' for arguments."
+  (let ((keys (vertico-quick--keys (- index start
 (if (bound-and-true-p vertico-flat-mode)
 (setq keys (replace-regexp-in-string " " "" keys)
   cand (string-trim cand)



[elpa] externals/corfu 416031cead 5/5: corfu-history: Improve commentary

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 416031cead49a0f4ed584516d790b4e52bf4be81
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-history: Improve commentary
---
 extensions/corfu-history.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el
index aeffe38d32..be6d1cd395 100644
--- a/extensions/corfu-history.el
+++ b/extensions/corfu-history.el
@@ -26,8 +26,10 @@
 
 ;;; Commentary:
 
-;; Sort candidates by their history position. Maintain a list of
-;; recently selected candidates.
+;; Enable `corfu-history-mode' to sort candidates by their history
+;; position. Maintain a list of recently selected candidates. In order
+;; to save the history across Emacs sessions, enable `savehist-mode' and
+;; add `corfu-history' to `savehist-additional-variables'.
 
 ;;; Code:
 



[elpa] externals/corfu updated (3c8d58dc76 -> 416031cead)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  3c8d58dc76 README: Remove caveats
   new  e42d79ed1a Rework corfu-quick
   new  5f71b00af2 README: Document corfu-send-shell
   new  a56cd0ef09 README: Add short section about extensions
   new  151b2d0cf5 corfu-indexed: Improve face
   new  416031cead corfu-history: Improve commentary


Summary of changes:
 README.org  |  35 
 extensions/corfu-history.el |   8 ++-
 extensions/corfu-indexed.el |   7 ++-
 extensions/corfu-info.el|   2 +-
 extensions/corfu-quick.el   | 136 
 5 files changed, 111 insertions(+), 77 deletions(-)



[elpa] externals/corfu a56cd0ef09 3/5: README: Add short section about extensions

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit a56cd0ef095338bfb48bdd694af8e475ebdd8493
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Add short section about extensions
---
 README.org | 21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index a8f3188161..52dfeb95d0 100644
--- a/README.org
+++ b/README.org
@@ -378,12 +378,29 @@ shown. The keymap defines the following remappings and 
bindings:
 - ~previous-line~, =up=, =M-p= -> ~corfu-previous~
 - ~completion-at-point~, =TAB= -> ~corfu-complete~
 - =RET= -> ~corfu-insert~
-- =M-g= -> ~corfu-show-location~
-- =M-h= -> ~corfu-show-documentation~
+- =M-g= -> ~corfu-info-location~
+- =M-h= -> ~corfu-info-documentation~
 - =M-SPC= -> ~corfu-insert-separator~
 - =C-g= -> ~corfu-quit~
 - ~keyboard-escape-quit~ -> ~corfu-reset~
 
+* Extensions
+:properties:
+:custom_id: extensions
+:end:
+
+We maintain small extension packages to Corfu in this repository in the
+subdirectory 
[[https://github.com/minad/corfu/tree/main/extensions][extensions/]]. The 
extensions are installed together with Corfu if
+you pull the package from ELPA. The extensions are inactive by default and can
+be enabled manually if desired. Furthermore it is possible to install all of 
the
+files separately, both ~corfu.el~ and the ~corfu-*.el~ extensions. Currently 
the
+following extensions come with the Corfu ELPA package:
+
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-history.el][corfu-history]]:
 =corfu-history-mode= to remember selected candidates and to improve sorting.
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-indexed.el][corfu-indexed]]:
 =corfu-indexed-mode= to select indexed candidates with prefix arguments.
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-info.el][corfu-info]]:
 Candidate actions to access the candidate location and documentation.
+- 
[[https://github.com/minad/corfu/blob/main/extensions/corfu-quick.el][corfu-quick]]:
 Commands to select using Avy-style quick keys.
+
 * Complementary packages
 
 Corfu works well together with all packages providing code completion via the



[elpa] externals/corfu 5f71b00af2 2/5: README: Document corfu-send-shell

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 5f71b00af200188eea41801234b479fc39759213
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Document corfu-send-shell
---
 README.org | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/README.org b/README.org
index c20c741398..a8f3188161 100644
--- a/README.org
+++ b/README.org
@@ -216,21 +216,19 @@ will be invoked. This command does inserts the currently 
selected candidate, but
 it does not send the prompt input to Eshell or the comint process. Therefore 
you
 often have to press =RET= twice which feels like an unnecessary double
 confirmation. Fortunately it is easy to improve this! In my configuration I
-define the command ~corfu-insert-and-send~ which performs the two steps at 
once.
+define the advice ~corfu-send-shell~ which sends the candidate after insertion.
 
 #+begin_src emacs-lisp
-  (defun corfu-insert-and-send ()
-(interactive)
-;; 1. First insert the completed candidate
-(corfu-insert)
-;; 2. Send the entire prompt input to the shell
+  (defun corfu-send-shell (&rest _)
+"Send completion candidate when inside comint/eshell."
 (cond
  ((and (derived-mode-p 'eshell-mode) (fboundp 'eshell-send-input))
   (eshell-send-input))
- ((and (derived-mode-p 'comint-mode) (fboundp 'comint-send-input))
+ ((and (derived-mode-p 'comint-mode)  (fboundp 'comint-send-input))
   (comint-send-input
 
-  (define-key corfu-map "\r" #'+corfu-insert-and-send)
+  (advice-add #'corfu-insert :after #'corfu-send-shell)
+  (advice-add #'corfu-quick-insert :after #'corfu-send-shell)
 #+end_src
 
 Shell completion uses the flexible ~pcomplete~ mechanism internally, which 
allows



[elpa] externals/corfu 151b2d0cf5 4/5: corfu-indexed: Improve face

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 151b2d0cf52c5007095f16d969c499ac5c0ddacf
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-indexed: Improve face
---
 extensions/corfu-indexed.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el
index 19cf876574..6829110cb0 100644
--- a/extensions/corfu-indexed.el
+++ b/extensions/corfu-indexed.el
@@ -35,7 +35,12 @@
 (require 'corfu)
 
 (defface corfu-indexed
-  '((t :height 0.75 :inherit font-lock-comment-face))
+  '((default :height 0.75)
+(((class color) (min-colors 88) (background dark))
+ :foreground "#f4f4f4" :background "#323232")
+ (((class color) (min-colors 88) (background light))
+ :foreground "#404148" :background "#d7d7d7")
+(t :background "black"))
   "Face used for the candidate index prefix."
   :group 'corfu-faces)
 



[elpa] externals/corfu e42d79ed1a 1/5: Rework corfu-quick

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit e42d79ed1af7f410ceba5775715a9bc43f50a9d6
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rework corfu-quick
---
 extensions/corfu-history.el |   2 +-
 extensions/corfu-info.el|   2 +-
 extensions/corfu-quick.el   | 136 
 3 files changed, 76 insertions(+), 64 deletions(-)

diff --git a/extensions/corfu-history.el b/extensions/corfu-history.el
index ff90779671..aeffe38d32 100644
--- a/extensions/corfu-history.el
+++ b/extensions/corfu-history.el
@@ -4,7 +4,7 @@
 
 ;; Author: Daniel Mendler 
 ;; Maintainer: Daniel Mendler 
-;; Created: 2021
+;; Created: 2022
 ;; Version: 0.1
 ;; Package-Requires: ((emacs "27.1") (corfu "0.21"))
 ;; Homepage: https://github.com/minad/corfu
diff --git a/extensions/corfu-info.el b/extensions/corfu-info.el
index 1662a916d7..203bbcf390 100644
--- a/extensions/corfu-info.el
+++ b/extensions/corfu-info.el
@@ -4,7 +4,7 @@
 
 ;; Author: Daniel Mendler 
 ;; Maintainer: Daniel Mendler 
-;; Created: 2021
+;; Created: 2022
 ;; Version: 0.1
 ;; Package-Requires: ((emacs "27.1") (corfu "0.21"))
 ;; Homepage: https://github.com/minad/corfu
diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
index 7c824904ee..d4de3137d5 100644
--- a/extensions/corfu-quick.el
+++ b/extensions/corfu-quick.el
@@ -1,6 +1,6 @@
-;;; corfu-quick.el --- Completion Overlay Region FUnction -*- lexical-binding: 
t -*-
+;;; corfu-quick.el --- Quick keys for Corfu -*- lexical-binding: t -*-
 
-;; Copyright (C) 2021  Free Software Foundation, Inc.
+;; Copyright (C) 2022  Free Software Foundation, Inc.
 
 ;; Author: Luis Henriquez-Perez , Daniel Mendler 

 ;; Maintainer: Daniel Mendler 
@@ -26,11 +26,13 @@
 
 ;;; Commentary:
 
-;; This package is a Corfu extension, which prefixes candidates with quick
-;; keys. The term "quick keys" refers to letters displayed in the `corfu' popup
-;; in front each candidate. Typing these quick keys allows you to select the
-;; candidate in front of them. This is designed to be a faster alternative to
-;; selecting a candidate with `corfu-next' and `corfu-previous'.
+;; This package is a Corfu extension, which prefixes candidates with
+;; quick keys. Typing these quick keys allows you to select the
+;; candidate in front of them. This is designed to be a faster
+;; alternative to selecting a candidate with `corfu-next' and
+;; `corfu-previous'.
+;; (define-key corfu-map "\M-q" #'corfu-quick-complete)
+;; (define-key corfu-map "\C-q" #'corfu-quick-exit)
 
 ;;; Code:
 
@@ -48,78 +50,77 @@
 
 (defface corfu-quick1
   'class color) (min-colors 88) (background dark))
- :background "#7042a2" :weight bold :foreground "white")
+ :background "#2a40b8" :weight bold :foreground "white")
 (((class color) (min-colors 88) (background light))
- :weight bold :background "#d5baff" :foreground "black")
-(t :background "magenta" :foreground "white"))
+ :background "#77baff" :weight bold :foreground "black")
+(t :background "blue" :foreground "white"))
   "Face used for the first quick key."
   :group 'corfu-faces)
 
 (defface corfu-quick2
   'class color) (min-colors 88) (background dark))
- :background "#004065" :weight bold :foreground "white")
+ :background "#71206a" :weight bold :foreground "#ffcaf0")
 (((class color) (min-colors 88) (background light))
- :weight bold :background "#8ae4f2" :foreground "black")
-(t :background "blue" :foreground "white"))
+ :background "#ffccff" :weight bold :foreground "#770077")
+(t :background "magenta" :foreground "white"))
   "Face used for the second quick key."
   :group 'corfu-faces)
 
-(defvar-local corfu-quick--alist nil
-  "An alist whose elements are (QUICK-KEYS . INDEX).
-QUICK-KEYS is a string containing the quick keys. INDEX is the index of
-the candidate that corresponds to QUICK-KEYS.")
-
-(defun corfu-quick--keys (index)
-  "Return `corfu-quick' keys for candidate at INDEX."
-  (let ((length1 (seq-length corfu-quick1))
-(length2 (seq-length corfu-quick2))
-(key1 "")
-(key2 ""))
-(if (< index length1)
-(setq key1 (char-to-string (seq-elt corfu-quick1 index)))
-  (setq key1 (char-to-string (seq-elt corfu-quick1 (% (- index length1) 
length1
-  (setq key2 (char-to-string (seq-elt corfu-quick2 (% (- index length1) 
length2)
-(concat (propertize key2 'face 'corfu-quick1)
-(propertize key1 'face 'corfu-quick2
-
-(defun corfu-quick--format-candidates (orig candidates)
-  "Advice for `corfu--format-candidates' that adds quick keys to candidates.
-See `corfu--format-candidates'."
-  (let ((updated-candidates nil)
-(quick-keys nil)
-(index 0))
-(setq corfu-quick--alist nil)
-(pcase-dolist (`(,candidate ,prefix ,suffix) candidates)
-  (setq quick-keys (corfu-quick--keys index))
-  (push (list candidate (concat quick-keys " " prefix) suffix) 
updated-candidates)
-  (push (cons (substring-no-properties

[elpa] externals/lin d3adbf63cc 1/2: Autoload lin-mode

2022-04-13 Thread ELPA Syncer
branch: externals/lin
commit d3adbf63cc0b95b9008bd1d3643e4f643cbba5a6
Author: Nicolas De Jaeghere 
Commit: Protesilaos Stavrou 

Autoload lin-mode

Pondering on why the global mode is autoloaded but the local one not,
derailed into an investigation on the autoload cutoff marker. I can't be
discovered a fraud! Anyway, the local mode should also be autoloaded.
---
 lin.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lin.el b/lin.el
index 9ec7d06cb6..b9918ae851 100644
--- a/lin.el
+++ b/lin.el
@@ -294,6 +294,7 @@ updates the face.  Users who prefer to use `setq' must run
(t
 'hl-line)))
 
+;;;###autoload
 (define-minor-mode lin-mode
   "Enable `hl-line-mode' and remap its face to `lin-face'."
   :global nil



[elpa] externals/lin updated (0917f889d5 -> 97e4eb4650)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/lin.

  from  0917f889d5 Add link to mailing list in lin.el
   new  d3adbf63cc Autoload lin-mode
   new  97e4eb4650 Add grep and proced to lin-mode-hooks


Summary of changes:
 lin.el | 3 +++
 1 file changed, 3 insertions(+)



[elpa] externals/lin 97e4eb4650 2/2: Add grep and proced to lin-mode-hooks

2022-04-13 Thread ELPA Syncer
branch: externals/lin
commit 97e4eb46502c4358539cc68e8f27df5c75c7e1f0
Author: Nicolas De Jaeghere 
Commit: Protesilaos Stavrou 

Add grep and proced to lin-mode-hooks

Grep and Proced make good candidates for inclusion in the default hooks.
---
 lin.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lin.el b/lin.el
index b9918ae851..a51479646f 100644
--- a/lin.el
+++ b/lin.el
@@ -77,6 +77,7 @@
 dired-mode-hook
 elfeed-search-mode-hook
 git-rebase-mode-hook
+grep-mode-hook
 ibuffer-mode-hook
 ilist-mode-hook
 ledger-report-mode-hook
@@ -87,6 +88,7 @@
 notmuch-tree-mode-hook
 occur-mode-hook
 org-agenda-mode-hook
+proced-mode-hook
 tabulated-list-mode-hook)
   "List of hooks that should enable Lin.
 



[elpa] externals/vertico 365865ab73 1/2: Rename vertico-repeat-history variable

2022-04-13 Thread ELPA Syncer
branch: externals/vertico
commit 365865ab73742e40dc1db1899721fc55bfee65f7
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename vertico-repeat-history variable
---
 extensions/vertico-repeat.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/extensions/vertico-repeat.el b/extensions/vertico-repeat.el
index 2da16896d4..10634491a6 100644
--- a/extensions/vertico-repeat.el
+++ b/extensions/vertico-repeat.el
@@ -48,7 +48,7 @@
   :type '(repeat symbol)
   :group 'vertico)
 
-(defvar vertico-repeat--history nil)
+(defvar vertico-repeat-history nil)
 (defvar-local vertico-repeat--command nil)
 (defvar-local vertico-repeat--input nil)
 
@@ -57,9 +57,9 @@
   (setq vertico-repeat--input (minibuffer-contents)))
 
 (defun vertico-repeat--save-exit ()
-  "Save command session in `vertico-repeat--history'."
+  "Save command session in `vertico-repeat-history'."
   (add-to-history
-   'vertico-repeat--history
+   'vertico-repeat-history
(list
 vertico-repeat--command
 vertico-repeat--input
@@ -91,7 +91,7 @@ This function must be registered as `minibuffer-setup-hook'."
 (defun vertico-repeat-last (&optional session)
   "Repeat last Vertico completion SESSION."
   (interactive
-   (list (or (car vertico-repeat--history)
+   (list (or (car vertico-repeat-history)
  (user-error "No repeatable Vertico session"
   (minibuffer-with-setup-hook
   (apply-partially #'vertico-repeat--restore session)
@@ -105,7 +105,7 @@ This function must be registered as 
`minibuffer-setup-hook'."
   (delete-dups
(or
 (cl-loop
- for session in vertico-repeat--history collect
+ for session in vertico-repeat-history collect
  (list
   (symbol-name (car session))
   (replace-regexp-in-string



[elpa] externals/vertico updated (836a8a7dc1 -> ca202d112b)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/vertico.

  from  836a8a7dc1 vertico-quick: Extract vertico-quick--keys function
   new  365865ab73 Rename vertico-repeat-history variable
   new  ca202d112b vertico-repeat: Document savehist-mode


Summary of changes:
 extensions/vertico-repeat.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)



[elpa] externals/vertico ca202d112b 2/2: vertico-repeat: Document savehist-mode

2022-04-13 Thread ELPA Syncer
branch: externals/vertico
commit ca202d112bf93bfa077ad6e88cdd8483966a6f91
Author: Daniel Mendler 
Commit: Daniel Mendler 

vertico-repeat: Document savehist-mode
---
 extensions/vertico-repeat.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/extensions/vertico-repeat.el b/extensions/vertico-repeat.el
index 10634491a6..33e41b4303 100644
--- a/extensions/vertico-repeat.el
+++ b/extensions/vertico-repeat.el
@@ -30,6 +30,9 @@
 ;; Vertico sessions via the `vertico-repeat', `vertico-repeat-last' and
 ;; `vertico-repeat-select' commands. It is necessary to register a
 ;; minibuffer setup hook, which saves the Vertico state for repetition.
+;; In order to save the history across Emacs sessions, enable
+;; `savehist-mode' and add `vertico-repeat-history' to
+;; `savehist-additional-variables'.
 ;;
 ;; (global-set-key "\M-R" #'vertico-repeat)
 ;; (add-hook 'minibuffer-setup-hook #'vertico-repeat-save)



[elpa] externals/corfu bfe7ff088c: corfu--post-command: Check if universal-argument-map is active

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit bfe7ff088c224e814c2a6e3456baeba899bd340d
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu--post-command: Check if universal-argument-map is active

Otherwise completion will be terminated when pressing an
universal-argument key after a command which is not an element of
corfu-continue-commands.
---
 corfu.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/corfu.el b/corfu.el
index 5daf7043ba..8ee32f584c 100644
--- a/corfu.el
+++ b/corfu.el
@@ -893,6 +893,8 @@ See `corfu-separator' for more details."
 (goto-char beg)
 (<= (line-beginning-position) pt (line-end-position)))
   (or
+   ;; Check if we universal-argument-map is active
+   prefix-arg
;; Check if it is an explicitly listed continue command
(corfu--match-symbol-p corfu-continue-commands 
this-command)
(and



[elpa] externals/vertico cc633d5121: Fix regression in vertico-quick

2022-04-13 Thread ELPA Syncer
branch: externals/vertico
commit cc633d51213765f0198928f9911f280eb7090017
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix regression in vertico-quick
---
 extensions/vertico-quick.el | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/extensions/vertico-quick.el b/extensions/vertico-quick.el
index ef4f93fc9e..f49298c5b2 100644
--- a/extensions/vertico-quick.el
+++ b/extensions/vertico-quick.el
@@ -68,14 +68,15 @@
 (defvar-local vertico-quick--list nil)
 (defvar-local vertico-quick--first nil)
 
-(defun vertico-quick--keys (index)
-  "Format keys for INDEX."
+(defun vertico-quick--keys (index start)
+  "Format keys for INDEX and START."
   (let* ((fst (length vertico-quick1))
  (snd (length vertico-quick2))
+ (idx (- index start))
  (len (+ fst snd)))
-(if (>= index fst)
-(let ((first (elt vertico-quick2 (mod (/ (- index fst) len) snd)))
-  (second (elt (concat vertico-quick1 vertico-quick2) (mod (- 
index fst) len
+(if (>= idx fst)
+(let ((first (elt vertico-quick2 (mod (/ (- idx fst) len) snd)))
+  (second (elt (concat vertico-quick1 vertico-quick2) (mod (- idx 
fst) len
   (cond
((eq first vertico-quick--first)
 (push (cons second index) vertico-quick--list)
@@ -85,7 +86,7 @@
 (push (cons first (list first)) vertico-quick--list)
 (concat (propertize (char-to-string first) 'face 'vertico-quick1)
 (propertize (char-to-string second) 'face 
'vertico-quick2)
-  (let ((first (elt vertico-quick1 (mod index fst
+  (let ((first (elt vertico-quick1 (mod idx fst
 (if vertico-quick--first
 "  "
   (push (cons first index) vertico-quick--list)
@@ -93,7 +94,7 @@
 
 (defun vertico-quick--format-candidate (orig cand prefix suffix index start)
   "Format candidate, see `vertico--format-candidate' for arguments."
-  (let ((keys (vertico-quick--keys (- index start
+  (let ((keys (vertico-quick--keys index start)))
 (if (bound-and-true-p vertico-flat-mode)
 (setq keys (replace-regexp-in-string " " "" keys)
   cand (string-trim cand)



[elpa] externals/corfu 858d738b28 1/3: Fix corfu-quick

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 858d738b28424ef5dfde29b0710282c220ce03d3
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix corfu-quick
---
 extensions/corfu-quick.el | 19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
index d4de3137d5..58bcb802e7 100644
--- a/extensions/corfu-quick.el
+++ b/extensions/corfu-quick.el
@@ -69,33 +69,32 @@
 (defvar corfu-quick--list nil)
 (defvar corfu-quick--first nil)
 
-(defun corfu-quick--keys (index) ;; See vertico-quick--keys
-  "Format keys for INDEX."
+(defun corfu-quick--keys (idx) ;; See vertico-quick--keys
+  "Format keys for IDX."
   (let* ((fst (length corfu-quick1))
  (snd (length corfu-quick2))
  (len (+ fst snd)))
-(if (>= index fst)
-(let ((first (elt corfu-quick2 (mod (/ (- index fst) len) snd)))
-  (second (elt (concat corfu-quick1 corfu-quick2) (mod (- index 
fst) len
+(if (>= idx fst)
+(let ((first (elt corfu-quick2 (mod (/ (- idx fst) len) snd)))
+  (second (elt (concat corfu-quick1 corfu-quick2) (mod (- idx fst) 
len
   (cond
((eq first corfu-quick--first)
-(push (cons second index) corfu-quick--list)
+(push (cons second (+ corfu--scroll idx)) corfu-quick--list)
 (concat " " (propertize (char-to-string second) 'face 
'corfu-quick1)))
(corfu-quick--first "  ")
(t
 (push (cons first (list first)) corfu-quick--list)
 (concat (propertize (char-to-string first) 'face 'corfu-quick1)
 (propertize (char-to-string second) 'face 
'corfu-quick2)
-  (let ((first (elt corfu-quick1 (mod index fst
+  (let ((first (elt corfu-quick1 (mod idx fst
 (if corfu-quick--first
 "  "
-  (push (cons first index) corfu-quick--list)
+  (push (cons first (+ corfu--scroll idx)) corfu-quick--list)
   (concat (propertize (char-to-string first) 'face 'corfu-quick1) " 
"))
 
 (defun corfu-quick--affixate (cands)
   "Advice for `corfu--affixate' which prefixes the CANDS with quick keys."
   (let ((index 0))
-(setq corfu-quick--list nil)
 (dolist (cand cands)
   (setf (cadr cand) (corfu-quick--keys index))
   (cl-incf index))
@@ -109,7 +108,7 @@
 (cons nil (corfu-quick--affixate (cdr (funcall orig cands))
  (corfu-quick--first first)
  (corfu-quick--list))
-(corfu--update)
+(corfu--candidates-popup (max (line-beginning-position) (- (point) 3)))
 (alist-get (read-key) corfu-quick--list)))
 
 ;;;###autoload



[elpa] externals/lin c62ae864e3: Update sample code in the manual

2022-04-13 Thread ELPA Syncer
branch: externals/lin
commit c62ae864e3e260f68f4b52d0c68fce1f6de6289c
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Update sample code in the manual

This matches commit 97e4eb4 from Nicolas De Jaeghere.
---
 README.org | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.org b/README.org
index cf84fa47b1..6611767327 100644
--- a/README.org
+++ b/README.org
@@ -180,6 +180,7 @@ Everything is in place to set up the package.
 dired-mode-hook
 elfeed-search-mode-hook
 git-rebase-mode-hook
+grep-mode-hook
 ibuffer-mode-hook
 ilist-mode-hook
 ledger-report-mode-hook
@@ -190,6 +191,7 @@ Everything is in place to set up the package.
 notmuch-tree-mode-hook
 occur-mode-hook
 org-agenda-mode-hook
+proced-mode-hook
 tabulated-list-mode-hook))
 
 (lin-global-mode 1)



[elpa] externals/corfu af4c453d84 3/3: README: Minor correction

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit af4c453d844fcd23848b9cdd3962639372afc8be
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Minor correction
---
 README.org | 1 -
 1 file changed, 1 deletion(-)

diff --git a/README.org b/README.org
index 52dfeb95d0..a558e05864 100644
--- a/README.org
+++ b/README.org
@@ -228,7 +228,6 @@ define the advice ~corfu-send-shell~ which sends the 
candidate after insertion.
   (comint-send-input
 
   (advice-add #'corfu-insert :after #'corfu-send-shell)
-  (advice-add #'corfu-quick-insert :after #'corfu-send-shell)
 #+end_src
 
 Shell completion uses the flexible ~pcomplete~ mechanism internally, which 
allows



[elpa] externals/corfu updated (bfe7ff088c -> af4c453d84)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  bfe7ff088c corfu--post-command: Check if universal-argument-map is 
active
   new  858d738b28 Fix corfu-quick
   new  3258b77b91 Fix corfu-quick
   new  af4c453d84 README: Minor correction


Summary of changes:
 README.org|  1 -
 extensions/corfu-quick.el | 19 +--
 2 files changed, 9 insertions(+), 11 deletions(-)



[elpa] externals/corfu 3258b77b91 2/3: Fix corfu-quick

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 3258b77b91eb2ec16446994b58434a04caf91c5f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix corfu-quick
---
 extensions/corfu-quick.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
index 58bcb802e7..67c30b35d6 100644
--- a/extensions/corfu-quick.el
+++ b/extensions/corfu-quick.el
@@ -108,7 +108,7 @@
 (cons nil (corfu-quick--affixate (cdr (funcall orig cands))
  (corfu-quick--first first)
  (corfu-quick--list))
-(corfu--candidates-popup (max (line-beginning-position) (- (point) 3)))
+(corfu--candidates-popup (car completion-in-region--data))
 (alist-get (read-key) corfu-quick--list)))
 
 ;;;###autoload



[elpa] externals/corfu updated (af4c453d84 -> d99778c6ea)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  af4c453d84 README: Minor correction
   new  c432d14ad4 corfu-quick: Get rid of global state
   new  5fec0b89e9 README: Update features
   new  d99778c6ea corfu-quick: Temporarily increase popup minimum width


Summary of changes:
 README.org|  2 +-
 extensions/corfu-quick.el | 62 +--
 2 files changed, 34 insertions(+), 30 deletions(-)



[elpa] externals/corfu c432d14ad4 1/3: corfu-quick: Get rid of global state

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit c432d14ad48c4b8238c0a16f5732032f25d7806a
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-quick: Get rid of global state
---
 extensions/corfu-quick.el | 60 ---
 1 file changed, 31 insertions(+), 29 deletions(-)

diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
index 67c30b35d6..f79a18f6f5 100644
--- a/extensions/corfu-quick.el
+++ b/extensions/corfu-quick.el
@@ -66,11 +66,10 @@
   "Face used for the second quick key."
   :group 'corfu-faces)
 
-(defvar corfu-quick--list nil)
-(defvar corfu-quick--first nil)
-
-(defun corfu-quick--keys (idx) ;; See vertico-quick--keys
-  "Format keys for IDX."
+(defun corfu-quick--keys (two idx) ;; See vertico-quick--keys
+  "Format quick keys prefix.
+IDX is the current candidate index.
+TWO is non-nil if two keys should be displayed."
   (let* ((fst (length corfu-quick1))
  (snd (length corfu-quick2))
  (len (+ fst snd)))
@@ -78,38 +77,41 @@
 (let ((first (elt corfu-quick2 (mod (/ (- idx fst) len) snd)))
   (second (elt (concat corfu-quick1 corfu-quick2) (mod (- idx fst) 
len
   (cond
-   ((eq first corfu-quick--first)
-(push (cons second (+ corfu--scroll idx)) corfu-quick--list)
-(concat " " (propertize (char-to-string second) 'face 
'corfu-quick1)))
-   (corfu-quick--first "  ")
+   ((eq first two)
+(list
+ (concat " " (propertize (char-to-string second) 'face 
'corfu-quick1))
+ (cons second (+ corfu--scroll idx
+   (two
+(list "  "))
(t
-(push (cons first (list first)) corfu-quick--list)
-(concat (propertize (char-to-string first) 'face 'corfu-quick1)
-(propertize (char-to-string second) 'face 
'corfu-quick2)
+(list
+ (concat (propertize (char-to-string first) 'face 'corfu-quick1)
+ (propertize (char-to-string second) 'face 'corfu-quick2))
+ (cons first (list first))
   (let ((first (elt corfu-quick1 (mod idx fst
-(if corfu-quick--first
-"  "
-  (push (cons first (+ corfu--scroll idx)) corfu-quick--list)
-  (concat (propertize (char-to-string first) 'face 'corfu-quick1) " 
"))
-
-(defun corfu-quick--affixate (cands)
-  "Advice for `corfu--affixate' which prefixes the CANDS with quick keys."
-  (let ((index 0))
-(dolist (cand cands)
-  (setf (cadr cand) (corfu-quick--keys index))
-  (cl-incf index))
-cands))
+(if two
+(list "  ")
+  (list
+   (concat (propertize (char-to-string first) 'face 'corfu-quick1) " ")
+   (cons first (+ corfu--scroll idx
 
 (defun corfu-quick--read (&optional first)
   "Read quick key given FIRST pressed key."
-  (cl-letf* ((orig (symbol-function #'corfu--affixate))
+  (cl-letf* ((list nil)
+ (orig (symbol-function #'corfu--affixate))
  ((symbol-function #'corfu--affixate)
   (lambda (cands)
-(cons nil (corfu-quick--affixate (cdr (funcall orig cands))
- (corfu-quick--first first)
- (corfu-quick--list))
+(setq cands (cdr (funcall orig cands)))
+(let ((index 0))
+  (dolist (cand cands)
+(pcase-let ((`(,keys . ,events) (corfu-quick--keys first 
index)))
+  (setq list (nconc events list))
+  (setf (cadr cand) keys)
+  (cl-incf index)))
+  cands)
+(cons nil cands
 (corfu--candidates-popup (car completion-in-region--data))
-(alist-get (read-key) corfu-quick--list)))
+(alist-get (read-key) list)))
 
 ;;;###autoload
 (defun corfu-quick-jump ()



[elpa] externals/corfu d99778c6ea 3/3: corfu-quick: Temporarily increase popup minimum width

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit d99778c6ea5a81a3f6a1e409df55c49f4dde72a7
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-quick: Temporarily increase popup minimum width
---
 extensions/corfu-quick.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
index f79a18f6f5..505a0730e7 100644
--- a/extensions/corfu-quick.el
+++ b/extensions/corfu-quick.el
@@ -109,7 +109,9 @@ TWO is non-nil if two keys should be displayed."
   (setf (cadr cand) keys)
   (cl-incf index)))
   cands)
-(cons nil cands
+(cons nil cands)))
+ ;; Increase minimum width to avoid odd jumping
+ (corfu-min-width (+ 2 corfu-min-width)))
 (corfu--candidates-popup (car completion-in-region--data))
 (alist-get (read-key) list)))
 



[elpa] externals/vertico 54ddbac683: vertico-quick: Get rid of global state

2022-04-13 Thread ELPA Syncer
branch: externals/vertico
commit 54ddbac683cf63c7c97128f9be8133197744887c
Author: Daniel Mendler 
Commit: Daniel Mendler 

vertico-quick: Get rid of global state
---
 extensions/vertico-quick.el | 65 +++--
 1 file changed, 33 insertions(+), 32 deletions(-)

diff --git a/extensions/vertico-quick.el b/extensions/vertico-quick.el
index f49298c5b2..621b4d33ba 100644
--- a/extensions/vertico-quick.el
+++ b/extensions/vertico-quick.el
@@ -65,11 +65,11 @@
   :type 'string
   :group 'vertico)
 
-(defvar-local vertico-quick--list nil)
-(defvar-local vertico-quick--first nil)
-
-(defun vertico-quick--keys (index start)
-  "Format keys for INDEX and START."
+(defun vertico-quick--keys (two index start)
+  "Format quick keys prefix.
+INDEX is the current candidate index.
+START is the index of the first displayed candidate.
+TWO is non-nil if two keys should be displayed."
   (let* ((fst (length vertico-quick1))
  (snd (length vertico-quick2))
  (idx (- index start))
@@ -78,39 +78,40 @@
 (let ((first (elt vertico-quick2 (mod (/ (- idx fst) len) snd)))
   (second (elt (concat vertico-quick1 vertico-quick2) (mod (- idx 
fst) len
   (cond
-   ((eq first vertico-quick--first)
-(push (cons second index) vertico-quick--list)
-(concat " " (propertize (char-to-string second) 'face 
'vertico-quick1)))
-   (vertico-quick--first "  ")
+   ((eq first two)
+(list
+ (concat " " (propertize (char-to-string second) 'face 
'vertico-quick1))
+ (cons second index)))
+   (two
+(list "  "))
(t
-(push (cons first (list first)) vertico-quick--list)
-(concat (propertize (char-to-string first) 'face 'vertico-quick1)
-(propertize (char-to-string second) 'face 
'vertico-quick2)
+(list
+ (concat (propertize (char-to-string first) 'face 'vertico-quick1)
+ (propertize (char-to-string second) 'face 
'vertico-quick2))
+ (cons first (list first))
   (let ((first (elt vertico-quick1 (mod idx fst
-(if vertico-quick--first
-"  "
-  (push (cons first index) vertico-quick--list)
-  (concat (propertize (char-to-string first) 'face 'vertico-quick1) " 
"))
-
-(defun vertico-quick--format-candidate (orig cand prefix suffix index start)
-  "Format candidate, see `vertico--format-candidate' for arguments."
-  (let ((keys (vertico-quick--keys index start)))
-(if (bound-and-true-p vertico-flat-mode)
-(setq keys (replace-regexp-in-string " " "" keys)
-  cand (string-trim cand)
-  cand (substring cand (min (length cand) (length keys
-  (setq keys (concat keys (make-string (max 1 (- (length prefix) 2)) 
?\s
-(funcall orig cand keys suffix index start)))
+(if two
+(list "  ")
+  (list
+   (concat (propertize (char-to-string first) 'face 'vertico-quick1) " 
")
+   (cons first index)))
 
 (defun vertico-quick--read (&optional first)
   "Read quick key given FIRST pressed key."
-  (cl-letf (((symbol-function #'vertico--format-candidate)
- (apply-partially #'vertico-quick--format-candidate
-  (symbol-function #'vertico--format-candidate)))
-(vertico-quick--first first)
-(vertico-quick--list))
+  (cl-letf* ((list nil)
+ (orig (symbol-function #'vertico--format-candidate))
+ ((symbol-function #'vertico--format-candidate)
+  (lambda (cand prefix suffix index start)
+(pcase-let ((`(,keys . ,events) (vertico-quick--keys first 
index start)))
+  (setq list (nconc events list))
+  (if (bound-and-true-p vertico-flat-mode)
+  (setq keys (replace-regexp-in-string " " "" keys)
+cand (string-trim cand)
+cand (substring cand (min (length cand) (length 
keys
+(setq keys (concat keys (make-string (max 1 (- (length 
prefix) 2)) ?\s
+  (funcall orig cand keys suffix index start)
 (vertico--exhibit)
-(alist-get (read-key) vertico-quick--list)))
+(alist-get (read-key) list)))
 
 ;;;###autoload
 (defun vertico-quick-jump ()



[elpa] externals/corfu 5fec0b89e9 2/3: README: Update features

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 5fec0b89e9030b2256846352fc5c502f4b616bf2
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Update features
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index a558e05864..28a95d33f1 100644
--- a/README.org
+++ b/README.org
@@ -47,10 +47,10 @@ default setting of the ~completion-in-region-function~ on 
non-graphical displays
   arbitrary characters, after inserting a space via =M-SPC= (configurable via
   ~corfu-quit-at-boundary~ and ~corfu-separator~).
 - Deferred completion style highlighting for performance.
-- Jumping to location/documentation of current candidate.
 - Support for candidate annotations and documentation in the echo area.
 - Deprecated candidates are crossed out in the display.
 - Icons can be provided by an external package via margin formatter functions.
+- Extensions: Quick keys, Index keys, Sorting by history, Candidate 
documentation
 
 * Installation and Configuration
 



[elpa] externals/compat 81358f53ae: Add completion-pcm--all-completions

2022-04-13 Thread ELPA Syncer
branch: externals/compat
commit 81358f53ae36be5cd740c8fe3593da345043a237
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Add completion-pcm--all-completions
---
 MANUAL   | 5 +
 compat-25.el | 7 +++
 2 files changed, 12 insertions(+)

diff --git a/MANUAL b/MANUAL
index 74f3185bb3..1429aa7378 100644
--- a/MANUAL
+++ b/MANUAL
@@ -10,6 +10,7 @@
 #+options:  compact-itemx:t
 
 #+macro: version 28.1.0.0
+#+link: debbugs https://debbugs.gnu.org/cgi/bugreport.cgi?bug=
 
 This manual documents the usage of the "compat" Emacs lisp library,
 the forward-compatibility library for Emacs Lisp, corresponding to
@@ -189,6 +190,10 @@ when ~compat-25~ is required:
 - Function: compat-sort :: See [[info:elisp#Sequence Functions][(elisp) 
Sequence Functions]].
 
   Adds support for vectors to be sorted, next to just lists.
+- Function: completion-pcm--all-completions :: Defined in
+  ~minibuffer.el~.
+
+  Reverse the resulting completion list, as fixed by [[debbugs:24676]].
 
 Compat does not provide support for the following Lisp features
 implemented in 25.1:
diff --git a/compat-25.el b/compat-25.el
index b236622714..60e547db46 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -339,5 +339,12 @@ recursion."
 (push (concat dir "/" file) files)
 (nconc result (nreverse files
 
+ Defined in minibuffer.el
+;;* UNTESTED
+(compat-defun completion-pcm--all-completions (prefix pattern table pred)
+  "Reverse the resulting list as fixed by bug#24676.
+All arguments are passed on to the original function."
+  :prefix t
+  (nreverse (completion-pcm--all-completions prefix pattern table pred)))
 (provide 'compat-25)
 ;;; compat-25.el ends here



[elpa] externals/corfu updated (d99778c6ea -> 45a8ebef6f)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  d99778c6ea corfu-quick: Temporarily increase popup minimum width
   new  be32c459d7 corfu--pre-command, corfu--post-command: Check for 
overriding-terminal-local-map
   new  45a8ebef6f corfu-continue-commands: Remove commands


Summary of changes:
 corfu.el | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)



[elpa] externals/corfu be32c459d7 1/2: corfu--pre-command, corfu--post-command: Check for overriding-terminal-local-map

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit be32c459d77e570235349ed7e0c6e35db4699daf
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu--pre-command, corfu--post-command: Check for 
overriding-terminal-local-map
---
 corfu.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/corfu.el b/corfu.el
index 8ee32f584c..953ab08215 100644
--- a/corfu.el
+++ b/corfu.el
@@ -872,7 +872,8 @@ there hasn't been any input, then quit."
 (setq corfu--preview-ov nil))
   (when (and (eq corfu-preview-current 'insert)
  (/= corfu--index corfu--preselect)
- (not (corfu--match-symbol-p corfu-continue-commands 
this-command)))
+ (not (or overriding-terminal-local-map ;; for example 
universal-argument-map
+  (corfu--match-symbol-p corfu-continue-commands 
this-command
 (corfu--insert 'exact)))
 
 (defun corfu-insert-separator ()
@@ -893,9 +894,8 @@ See `corfu-separator' for more details."
 (goto-char beg)
 (<= (line-beginning-position) pt (line-end-position)))
   (or
-   ;; Check if we universal-argument-map is active
-   prefix-arg
;; Check if it is an explicitly listed continue command
+   overriding-terminal-local-map ;; for example 
universal-argument-map
(corfu--match-symbol-p corfu-continue-commands 
this-command)
(and
 ;; Check for empty input



[elpa] externals/corfu 45a8ebef6f 2/2: corfu-continue-commands: Remove commands

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 45a8ebef6fa8645e6403d0bb3bf5f694f891407d
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-continue-commands: Remove commands
---
 corfu.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index 953ab08215..682bef4d7e 100644
--- a/corfu.el
+++ b/corfu.el
@@ -70,8 +70,7 @@ The value should lie between 0 and corfu-count/2."
 
 (defcustom corfu-continue-commands
   ;; nil is undefined command
-  '(nil ignore universal-argument universal-argument-more digit-argument
-"\\`corfu-" "\\`scroll-other-window")
+  '(nil ignore "\\`corfu-" "\\`scroll-other-window")
   "Continue Corfu completion after executing these commands."
   :type '(repeat (choice regexp symbol)))
 



[elpa] main 0bf51c032d: * elpa-packages (corfu): Rename `extensions/`

2022-04-13 Thread Stefan Monnier via
branch: main
commit 0bf51c032d760c5e98ea70e2c866393ccaa29eb1
Author: Stefan Monnier 
Commit: Stefan Monnier 

* elpa-packages (corfu): Rename `extensions/`
---
 elpa-packages | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index 18678f1b7e..6446298046 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -139,7 +139,9 @@
  ;; FIXME: https://github.com/jacksonrayhamilton/context-coloring/issues/9
  ("context-coloring"   :url 
"https://github.com/jacksonrayhamilton/context-coloring.git";)
  ("corfu"  :url "https://github.com/minad/corfu";
-  :doc "README.org" :auto-sync t)
+  :doc "README.org"
+  :renames (("extensions/" ""))
+  :auto-sync t)
  ("coterm" :url "https://repo.or.cz/emacs-coterm.git";
   :auto-sync t)
  ("counsel":url "https://github.com/abo-abo/swiper";)



[elpa] externals/corfu 24ccf40df4 1/3: corfu-indexed: Fix popup alignment

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 24ccf40df4b8bf87f850a6ea3db6e9a00e70cf2c
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-indexed: Fix popup alignment
---
 extensions/corfu-indexed.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el
index 6829110cb0..10744dd48e 100644
--- a/extensions/corfu-indexed.el
+++ b/extensions/corfu-indexed.el
@@ -53,15 +53,15 @@
   (setq cands (cdr cands))
   (let* ((index 0)
  (space #(" " 0 1 (face (:height 0.5 :inherit corfu-indexed
- (fmt
-  (concat space
-  (propertize
-   (format "%%%ds" (if (> (length cands) 10) 2 1))
-   'face 'corfu-indexed)
-  space))
+ (width (if (> (length cands) 10) 2 1))
+ (fmt (concat space
+  (propertize (format "%%%ds" width)
+  'face 'corfu-indexed)
+  space))
  (align
-  (propertize "  " 'display
-  `(space :align-to (+ left ,(if (> (length cands) 10) 3 
2))
+  (propertize (make-string width ?\s)
+  'display
+  `(space :align-to (+ left ,(1+ width))
 (dolist (cand cands)
   (setf (cadr cand)
 (concat



[elpa] externals/corfu db853e2134 3/3: corfu--post-command: Add a comment about the overriding-terminal-local-map

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit db853e21348efc59409da70103857475c391
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu--post-command: Add a comment about the overriding-terminal-local-map
---
 corfu.el | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index 953ab08215..adf94d44a8 100644
--- a/corfu.el
+++ b/corfu.el
@@ -872,7 +872,8 @@ there hasn't been any input, then quit."
 (setq corfu--preview-ov nil))
   (when (and (eq corfu-preview-current 'insert)
  (/= corfu--index corfu--preselect)
- (not (or overriding-terminal-local-map ;; for example 
universal-argument-map
+ ;; See the comment about `overriding-local-map' in 
`corfu--post-command'.
+ (not (or overriding-terminal-local-map
   (corfu--match-symbol-p corfu-continue-commands 
this-command
 (corfu--insert 'exact)))
 
@@ -894,8 +895,13 @@ See `corfu-separator' for more details."
 (goto-char beg)
 (<= (line-beginning-position) pt (line-end-position)))
   (or
+   ;; TODO We keep alive Corfu if a 
`overriding-terminal-local-map' is
+   ;; installed, for example the `universal-argument-map'. 
It would be good to
+   ;; think about a better criterion instead. 
Unfortunately relying on
+   ;; `this-command' alone is not sufficient, since the 
value of `this-command'
+   ;; gets clobbered in the case of transient keymaps.
+   overriding-terminal-local-map
;; Check if it is an explicitly listed continue command
-   overriding-terminal-local-map ;; for example 
universal-argument-map
(corfu--match-symbol-p corfu-continue-commands 
this-command)
(and
 ;; Check for empty input



[elpa] externals/corfu updated (45a8ebef6f -> db853e2134)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  45a8ebef6f corfu-continue-commands: Remove commands
   new  24ccf40df4 corfu-indexed: Fix popup alignment
   new  3e31c40e79 Revert "corfu-continue-commands: Remove commands"
   new  db853e2134 corfu--post-command: Add a comment about the 
overriding-terminal-local-map


Summary of changes:
 corfu.el| 13 ++---
 extensions/corfu-indexed.el | 16 
 2 files changed, 18 insertions(+), 11 deletions(-)



[elpa] externals/corfu 3e31c40e79 2/3: Revert "corfu-continue-commands: Remove commands"

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 3e31c40e79a499c06eb7648b1ade0abdc03089c8
Author: Daniel Mendler 
Commit: Daniel Mendler 

Revert "corfu-continue-commands: Remove commands"

This reverts commit 45a8ebef6fa8645e6403d0bb3bf5f694f891407d.
---
 corfu.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/corfu.el b/corfu.el
index 682bef4d7e..953ab08215 100644
--- a/corfu.el
+++ b/corfu.el
@@ -70,7 +70,8 @@ The value should lie between 0 and corfu-count/2."
 
 (defcustom corfu-continue-commands
   ;; nil is undefined command
-  '(nil ignore "\\`corfu-" "\\`scroll-other-window")
+  '(nil ignore universal-argument universal-argument-more digit-argument
+"\\`corfu-" "\\`scroll-other-window")
   "Continue Corfu completion after executing these commands."
   :type '(repeat (choice regexp symbol)))
 



[elpa] externals/embark 72732dc1a4 5/7: Remove last trace of unused embark--candidate text property

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit 72732dc1a4da41105198655ec9342c0b00d6eda2
Author: Omar Antolín 
Commit: Omar Antolín 

Remove last trace of unused embark--candidate text property
---
 embark.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/embark.el b/embark.el
index 9de9143a93..2b4a6c5c8a 100644
--- a/embark.el
+++ b/embark.el
@@ -2781,9 +2781,7 @@ candidate."
   ;; avoid allocation for full string
   (push (substring string pos inv) chunks)))
   (setq pos inv))
-(propertize
- (if chunks (apply #'concat (nreverse chunks)) string)
- 'embark--candidate string)))
+(if chunks (apply #'concat (nreverse chunks)) string)))
 
 (defun embark-collect--format-entries (candidates)
   "Format CANDIDATES for `tabulated-list-mode'."



[elpa] externals/embark b415040c21 2/7: Simplify collect candidate storage, stop using revert

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit b415040c21e5bfca7c00639386c4c4ff531544e6
Author: Omar Antolín 
Commit: Omar Antolín 

Simplify collect candidate storage, stop using revert

Remove the variable embark-collect--candidates. The entries were
duplicated in variable tabulated-list-entries anyway, now we only
store them there.

Also, instead of storing the original candidate (with tofu and
whatnot) in a text property, we now store it as the id of the
tabulated list entry.

Finally, some internal things used to rely on revert-buffer being
tabulated-list-revert. We now call tabulated-list-revert or
tabulated-list-print directly as appropriate. This will allow use to
change the value of revert-buffer-function to mean "rerun the command
that created this collect buffer".
---
 embark-consult.el |   5 ++-
 embark.el | 105 --
 2 files changed, 41 insertions(+), 69 deletions(-)

diff --git a/embark-consult.el b/embark-consult.el
index a3b405f504..dc4795919b 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -168,9 +168,8 @@ The elements of LINES are assumed to be values of category 
`consult-line'."
   "Upgrade consult-location cheap markers to real markers.
 This function is meant to be added to `embark-collect-mode-hook'."
   (when (eq embark--type 'consult-location)
-(let ((fn (if (consp (car embark-collect--candidates)) #'car #'identity)))
-  (mapc (lambda (x) (consult--get-location (funcall fn x)))
-embark-collect--candidates
+(mapc (lambda (entry) (consult--get-location (car entry)))
+  tabulated-list-entries)))
 
 (setf (alist-get 'consult-location embark-exporters-alist)
   #'embark-consult-export-occur)
diff --git a/embark.el b/embark.el
index 76d56be6c0..3771b403e8 100644
--- a/embark.el
+++ b/embark.el
@@ -693,9 +693,6 @@ This function is meant to be added to 
`minibuffer-setup-hook'."
 (defvar embark--prompter-history nil
   "History used by the `embark-completing-read-prompter'.")
 
-(defvar-local embark-collect--candidates nil
-  "List of candidates in current collect buffer.")
-
 (defvar-local embark--export-pre-revert-hook nil
   "Hook run before reverting an Embark Export buffer.")
 
@@ -939,7 +936,7 @@ their own target finder.  See for example
   ("Annotation" (previous-button (point)
(start (button-start button))
(end (button-end button))
-   (candidate (get-text-property start 'embark--candidate)))
+   (candidate (tabulated-list-get-id)))
   `(,embark--type
 ,(if (eq embark--type 'file)
  (abbreviate-file-name (expand-file-name candidate))
@@ -2528,13 +2525,7 @@ This makes `embark-export' work in Embark Collect 
buffers."
   (lambda (ov)
 (eq (overlay-get ov 'face) 'embark-collect-marked))
   (overlays-in (point-min) (point-max))
-  (let ((fn (if (consp (car embark-collect--candidates))
-#'car
-  #'identity)))
-(mapcar (lambda (x)
-  (get-text-property 0 'embark--candidate
- (funcall fn x)))
-embark-collect--candidates))
+  (mapcar #'car tabulated-list-entries)
 
 (defun embark-completions-buffer-candidates ()
   "Return all candidates in a completions buffer."
@@ -2674,40 +2665,6 @@ embark collect direct action minor mode by adding the 
function
 `embark-collect-direct-action-minor-mode' to
 `embark-collect-mode-hook'.")
 
-(defun embark-collect--revert ()
-  "List view of candidates and annotations for Embark Collect buffer."
-  (let ((max-width 0)
-(affixed (consp (car embark-collect--candidates
-(if tabulated-list-use-header-line
-(tabulated-list-init-header)
-  (setq header-line-format nil tabulated-list--header-string nil))
-(setq tabulated-list-entries
-  (mapcar
-   (if affixed
-   (pcase-lambda (`(,cand ,prefix ,annotation))
- (setq max-width (max max-width (+ (string-width prefix)
-   (string-width cand
- (let* ((length (length annotation))
-(faces (text-property-not-all
-0 length 'face nil annotation)))
-   (when faces
- (add-face-text-property 0 length 'default t annotation))
-   `(,cand
- [(,(propertize cand 'line-prefix prefix)
-   type embark-collect-entry)
-  (,annotation
-   skip t
-   ,@(unless faces
-   '(face embark-collect-annotation)))])))
- (lambda (cand)
- 

[elpa] externals/embark 0e027c57da 1/7: Fix bug that kept embark-live from actually updating 😬

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit 0e027c57da19aa2fb346396439efcd408edfe26d
Author: Omar Antolín 
Commit: Omar Antolín 

Fix bug that kept embark-live from actually updating 😬
---
 embark.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/embark.el b/embark.el
index 2ba4d42e1c..76d56be6c0 100644
--- a/embark.el
+++ b/embark.el
@@ -2940,6 +2940,7 @@ with key \"Embark Live\"."
  (embark-collect--update-candidates live-buffer)
  (with-current-buffer live-buffer
;; TODO figure out why I can't restore point
+   (embark-collect--revert)
(tabulated-list-print nil t))
  (setq timer nil
 (add-hook 'after-change-functions run-collect nil t)



[elpa] externals/embark 0421e1de0f 3/7: Implement "revert = just rerun" for export

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit 0421e1de0fd6b0e911497c5c6885c15df5b795e2
Author: Omar Antolín 
Commit: Omar Antolín 

Implement "revert = just rerun" for export

This removes the previous revert behavior with its hacky "peek at
Consult's minibuffer overlay to figure out when the search is over" in
favor of simply killing the export buffer and rerunning the command.

This simpler behavior was suggested by @minad in #171.

Still left to do: implement it for collect as well.
---
 embark-consult.el | 15 --
 embark.el | 61 +++
 2 files changed, 21 insertions(+), 55 deletions(-)

diff --git a/embark-consult.el b/embark-consult.el
index dc4795919b..2780d69d8d 100644
--- a/embark-consult.el
+++ b/embark-consult.el
@@ -118,14 +118,6 @@
 (setf (alist-get 'consult-location embark-default-action-overrides)
   #'embark-consult-goto-location)
 
-(defun embark-consult--await ()
-  "Wait for a Consult async search commmand to finish."
-  (when-let (((minibufferp))
- (ov (car (overlays-at (- (minibuffer-prompt-end) 2)
-(while (not (equal (overlay-get ov 'display) ":"))
-  (sit-for 0.3 t))
-(sit-for 0.3 t)))
-
 (defun embark-consult-export-occur (lines)
   "Create an occur mode buffer listing LINES.
 The elements of LINES are assumed to be values of category `consult-line'."
@@ -194,7 +186,6 @@ This function is meant to be added to 
`embark-collect-mode-hook'."
   (grep-mode)
   (setq-local wgrep-header/footer-parser #'ignore)
   (when (fboundp 'wgrep-setup) (wgrep-setup))
-  (add-hook 'embark--export-pre-revert-hook #'embark-consult--await nil t)
   (use-local-map (make-composed-keymap
   embark-consult-export-grep-map
   (current-local-map
@@ -227,12 +218,6 @@ This function is meant to be added to 
`embark-collect-mode-hook'."
 (setf (alist-get '(file . consult-locate) embark-default-action-overrides)
   #'find-file)
 
-(defun embark-consult--wait-for-find ()
-  (when (eq embark--command 'consult-find)
-(add-hook 'embark--export-pre-revert-hook #'embark-consult--await nil t)))
-
-(add-hook 'embark-after-export-hook #'embark-consult--wait-for-find)
-
 ;;; Support for consult-isearch
 
 (setf (alist-get 'consult-isearch embark-transformer-alist)
diff --git a/embark.el b/embark.el
index 3771b403e8..836566915c 100644
--- a/embark.el
+++ b/embark.el
@@ -693,9 +693,6 @@ This function is meant to be added to 
`minibuffer-setup-hook'."
 (defvar embark--prompter-history nil
   "History used by the `embark-completing-read-prompter'.")
 
-(defvar-local embark--export-pre-revert-hook nil
-  "Hook run before reverting an Embark Export buffer.")
-
 ;;; Core functionality
 
 (defconst embark--verbose-indicator-buffer " *Embark Actions*")
@@ -2920,48 +2917,35 @@ with key \"Embark Live\"."
 (when (minibufferp)
   (add-hook 'change-major-mode-hook stop-collect nil t
 
-(defun embark--export-revert-function ()
-  "Return an appropriate revert function for an export buffer in this context."
-  (let ((buffer (or embark--target-buffer (embark--target-buffer
-(cl-flet ((reverter (wrapper)
+(defun embark--revert-function (kind)
+  "Return a revert function for an export or collect buffer in this context.
+The parameter KIND should be either `embark-export' or `embark-collect'."
+  (let ((buffer (or embark--target-buffer (embark--target-buffer)))
+(command embark--command))
+(cl-flet ((reverter (action)
 (lambda (&rest _)
-  (let ((windows (get-buffer-window-list nil nil t))
-(old (current-buffer))
-(hook embark--export-pre-revert-hook))
-(kill-buffer old)
-(with-current-buffer
-(if (buffer-live-p buffer) buffer (current-buffer))
-  (funcall wrapper
-   (lambda ()
- (let ((embark--export-pre-revert-hook hook))
-   (run-hooks 'embark--export-pre-revert-hook))
- (embark-export windows
+  (quit-window 'kill-buffer)
+  (with-current-buffer
+  (if (buffer-live-p buffer) buffer (current-buffer))
+(let ((embark--command command))
+  (funcall action))
 (if (minibufferp)
   (reverter
-   (let ((command embark--command)
- (input (minibuffer-contents-no-properties)))
- (lambda (export)
+   (let ((input (minibuffer-contents-no-properties)))
+ (lambda ()
(minibuffer-with-setup-hook
(lambda ()
  (delete-minibuffer-contents)
- (insert input)
- (add-hook 'post-command-hook

[elpa] externals/embark updated (67ef67885a -> af67f6d25b)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark.

  from  67ef67885a Simplify test for URLs in file target finder
   new  0e027c57da Fix bug that kept embark-live from actually updating 😬
   new  b415040c21 Simplify collect candidate storage, stop using revert
   new  0421e1de0f Implement "revert = just rerun" for export
   new  72a1ae6495 revert=just rerun for collect buffers too
   new  72732dc1a4 Remove last trace of unused embark--candidate text 
property
   new  2c9550f4a5 Stylistic change
   new  af67f6d25b Revert "Stylistic change"


Summary of changes:
 embark-consult.el |  20 +--
 embark.el | 173 --
 2 files changed, 66 insertions(+), 127 deletions(-)



[elpa] externals/embark 2c9550f4a5 6/7: Stylistic change

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit 2c9550f4a551b0aef16b341cb137c17a8cb885a2
Author: Omar Antolín 
Commit: Omar Antolín 

Stylistic change
---
 embark.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/embark.el b/embark.el
index 2b4a6c5c8a..c5477233bb 100644
--- a/embark.el
+++ b/embark.el
@@ -2810,10 +2810,11 @@ candidate."
 
 (defun embark-collect--update-candidates (buffer)
   "Update candidates for Embark Collect BUFFER."
-  (let* ((transformed (embark--maybe-transform-candidates))
- (type (plist-get transformed :orig-type)) ; we need the originals for
- (candidates (plist-get transformed :orig-candidates)) ; default action
- (affixator (embark-collect--affixator type)))
+  (when-let ((transformed (embark--maybe-transform-candidates))
+ ;; we need the originals for default action:
+ (type (plist-get transformed :orig-type))
+ (candidates (plist-get transformed :orig-candidates))
+ (affixator (embark-collect--affixator type)))
 (when (eq type 'file)
   (let ((dir (buffer-local-value 'default-directory buffer)))
 (setq candidates
@@ -2824,8 +2825,7 @@ candidate."
 (setq candidates (funcall affixator candidates))
 (with-current-buffer buffer
   (setq embark--type type)
-  (embark-collect--format-entries candidates))
-candidates))
+  (embark-collect--format-entries candidates
 
 (defun embark--collect (buffer-name)
   "Create an Embark Collect buffer named BUFFER-NAME.



[elpa] externals/embark 72a1ae6495 4/7: revert=just rerun for collect buffers too

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit 72a1ae64959f6baa47e3574c4b5de32e52030b10
Author: Omar Antolín 
Commit: Omar Antolín 

revert=just rerun for collect buffers too
---
 embark.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/embark.el b/embark.el
index 836566915c..9de9143a93 100644
--- a/embark.el
+++ b/embark.el
@@ -2834,7 +2834,8 @@ candidate."
 
 The function `generate-new-buffer-name' is used to ensure the
 buffer has a unique name."
-  (let ((buffer (generate-new-buffer buffer-name)))
+  (let ((buffer (generate-new-buffer buffer-name))
+(revert (embark--revert-function #'embark-collect)))
 (with-current-buffer buffer
   ;; we'll run the mode hooks once the buffer is displayed, so
   ;; the hooks can make use of the window
@@ -2845,9 +2846,10 @@ buffer has a unique name."
   (user-error "No candidates to collect"))
 
 (with-current-buffer buffer
-  (setq tabulated-list-use-header-line nil  ; default to no header
+  (setq tabulated-list-use-header-line nil ; default to no header
 header-line-format nil
 tabulated-list--header-string nil)
+  (setq revert-buffer-function revert)
   (when (memq embark--type embark-collect-zebra-types)
 (embark-collect-zebra-minor-mode)))
 



[elpa] externals/embark-consult updated (67ef67885a -> af67f6d25b)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark-consult.

  from  67ef67885a Simplify test for URLs in file target finder
  adds  0e027c57da Fix bug that kept embark-live from actually updating 😬
  adds  b415040c21 Simplify collect candidate storage, stop using revert
  adds  0421e1de0f Implement "revert = just rerun" for export
  adds  72a1ae6495 revert=just rerun for collect buffers too
  adds  72732dc1a4 Remove last trace of unused embark--candidate text 
property
  adds  2c9550f4a5 Stylistic change
  adds  af67f6d25b Revert "Stylistic change"

No new revisions were added by this update.

Summary of changes:
 embark-consult.el |  20 +--
 embark.el | 173 --
 2 files changed, 66 insertions(+), 127 deletions(-)



[elpa] externals/embark af67f6d25b 7/7: Revert "Stylistic change"

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit af67f6d25b60616ace7433fe6ea6f732fb697ddd
Author: Omar Antolín 
Commit: Omar Antolín 

Revert "Stylistic change"

This reverts commit 2c9550f4a551b0aef16b341cb137c17a8cb885a2.

That introduced a bug: when the type was nil, you got a "No
candidates" message. :(
---
 embark.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/embark.el b/embark.el
index c5477233bb..2b4a6c5c8a 100644
--- a/embark.el
+++ b/embark.el
@@ -2810,11 +2810,10 @@ candidate."
 
 (defun embark-collect--update-candidates (buffer)
   "Update candidates for Embark Collect BUFFER."
-  (when-let ((transformed (embark--maybe-transform-candidates))
- ;; we need the originals for default action:
- (type (plist-get transformed :orig-type))
- (candidates (plist-get transformed :orig-candidates))
- (affixator (embark-collect--affixator type)))
+  (let* ((transformed (embark--maybe-transform-candidates))
+ (type (plist-get transformed :orig-type)) ; we need the originals for
+ (candidates (plist-get transformed :orig-candidates)) ; default action
+ (affixator (embark-collect--affixator type)))
 (when (eq type 'file)
   (let ((dir (buffer-local-value 'default-directory buffer)))
 (setq candidates
@@ -2825,7 +2824,8 @@ candidate."
 (setq candidates (funcall affixator candidates))
 (with-current-buffer buffer
   (setq embark--type type)
-  (embark-collect--format-entries candidates
+  (embark-collect--format-entries candidates))
+candidates))
 
 (defun embark--collect (buffer-name)
   "Create an Embark Collect buffer named BUFFER-NAME.



[elpa] externals/corfu 30b66b223f 2/2: Fix obsolete function declaration

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 30b66b223f10abe8aa5cae56790a38511c675e0c
Author: Daniel Mendler 
Commit: Daniel Mendler 

Fix obsolete function declaration
---
 corfu.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/corfu.el b/corfu.el
index f2fc85474d..ff2f5bc912 100644
--- a/corfu.el
+++ b/corfu.el
@@ -1215,7 +1215,7 @@ The ORIG function takes the FUN and WHICH arguments."
   (if corfu-mode (corfu--capf-wrapper fun t) (funcall orig fun which)))
 
 ;;;###autoload
-(define-obsolete-function-alias 'global-corfu-mode 'global-corfu-mode "0.21")
+(define-obsolete-function-alias 'corfu-global-mode 'global-corfu-mode "0.21")
 
 ;;;###autoload
 (define-globalized-minor-mode global-corfu-mode corfu-mode corfu--on :group 
'corfu)



[elpa] externals/corfu updated (db853e2134 -> 30b66b223f)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  db853e2134 corfu--post-command: Add a comment about the 
overriding-terminal-local-map
   new  e4dc7d4275 Rename corfu-global-mode to global-corfu-mode
   new  30b66b223f Fix obsolete function declaration


Summary of changes:
 README.org | 16 
 corfu.el   |  7 +--
 2 files changed, 13 insertions(+), 10 deletions(-)



[elpa] externals/corfu e4dc7d4275 1/2: Rename corfu-global-mode to global-corfu-mode

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit e4dc7d4275d67a28a661bac5f7deb6ae58812dbe
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename corfu-global-mode to global-corfu-mode
---
 README.org | 16 
 corfu.el   |  7 +--
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index 28a95d33f1..5ede421f26 100644
--- a/README.org
+++ b/README.org
@@ -56,15 +56,15 @@ default setting of the ~completion-in-region-function~ on 
non-graphical displays
 
 Corfu is available from [[http://elpa.gnu.org/packages/corfu.html][GNU ELPA]], 
such that it can be installed directly via
 ~package-install~. After installation, the global minor mode can be enabled 
with
-=M-x corfu-global-mode=. In order to configure Corfu and other packages in your
+=M-x global-corfu-mode=. In order to configure Corfu and other packages in your
 init.el, you may want to use ~use-package~.
 
 Corfu is highly flexible and customizable via ~corfu-*~ customization 
variables,
 such that you can adapt it precisely to your requirements. However in order to
 quickly try out the Corfu completion package, it should be sufficient to
-activate ~corfu-global-mode~. Then you experiment with manual completion for
+activate ~global-corfu-mode~. Then you experiment with manual completion for
 example in an Elisp buffer or in an Eshell or Shell buffer. For auto 
completion,
-set ~corfu-auto=t~ before turning on ~corfu-global-mode~.
+set ~corfu-auto=t~ before turning on ~global-corfu-mode~.
 
 Here is an example configuration:
 
@@ -91,7 +91,7 @@ Here is an example configuration:
 ;; Recommended: Enable Corfu globally.
 ;; This is recommended since dabbrev can be used globally (M-/).
 :init
-(corfu-global-mode))
+(global-corfu-mode))
 
   ;; Use dabbrev with Corfu!
   (use-package dabbrev
@@ -167,7 +167,7 @@ some want to cycle with TAB and some with the arrow keys...
 ** Completing with Corfu in the minibuffer
 
 Corfu can be used for completion in the minibuffer, since it relies on child
-frames to display the candidates. By default, ~corfu-global-mode~ does not
+frames to display the candidates. By default, ~global-corfu-mode~ does not
 activate ~corfu-mode~ in the minibuffer, to avoid interference with specialised
 minibuffer completion UIs like Vertico or Mct. However you may still want to
 enable Corfu completion for commands like ~M-:~ (~eval-expression~) or ~M-!~
@@ -300,7 +300,7 @@ always use =SPC= to separate the Orderless components.
  ;; Another key binding can be used, such as S-SPC.
  ;; (:map corfu-map ("M-SPC" . corfu-insert-separator))
  :init
- (corfu-global-mode))
+ (global-corfu-mode))
 
;; Manual completion example
(use-package corfu
@@ -310,7 +310,7 @@ always use =SPC= to separate the Orderless components.
  ;; Configure SPC for separator insertion
  (:map corfu-map ("SPC" . corfu-insert-separator))
  :init
- (corfu-global-mode))
+ (global-corfu-mode))
 #+end_src
 
 ** TAB-and-Go completion
@@ -337,7 +337,7 @@ force snippet expansion, confirm a candidate explicitly 
with ~RET~.
   ([backtab] . corfu-previous))
 
 :init
-(corfu-global-mode))
+(global-corfu-mode))
 #+end_src
 
 ** Transfer completion to the minibuffer
diff --git a/corfu.el b/corfu.el
index adf94d44a8..f2fc85474d 100644
--- a/corfu.el
+++ b/corfu.el
@@ -111,7 +111,7 @@ separator: Only stay alive if there is no match and
   :type '(choice boolean (const separator)))
 
 (defcustom corfu-excluded-modes nil
-  "List of modes excluded by `corfu-global-mode'."
+  "List of modes excluded by `global-corfu-mode'."
   :type '(repeat symbol))
 
 (defcustom corfu-left-margin-width 0.5
@@ -1215,7 +1215,10 @@ The ORIG function takes the FUN and WHICH arguments."
   (if corfu-mode (corfu--capf-wrapper fun t) (funcall orig fun which)))
 
 ;;;###autoload
-(define-globalized-minor-mode corfu-global-mode corfu-mode corfu--on :group 
'corfu)
+(define-obsolete-function-alias 'global-corfu-mode 'global-corfu-mode "0.21")
+
+;;;###autoload
+(define-globalized-minor-mode global-corfu-mode corfu-mode corfu--on :group 
'corfu)
 
 (defun corfu--on ()
   "Turn `corfu-mode' on."



[elpa] externals/embark ab778510d5: Document new revert behavior for export & collect buffers

2022-04-13 Thread ELPA Syncer
branch: externals/embark
commit ab778510d5db9935a2d436b13d98c47b824172ee
Author: Omar Antolín 
Commit: Omar Antolín 

Document new revert behavior for export & collect buffers
---
 README.org  |  9 +
 embark.el   | 33 ++---
 embark.texi | 12 ++--
 3 files changed, 49 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index ed5e3142ad..882bfd119e 100644
--- a/README.org
+++ b/README.org
@@ -192,6 +192,15 @@ and are bound to =A=, =S= (for "snapshot"), and =E=, 
respectively, in
 key bindings for these (although you can, of course!), just a key
 binding for =embark-act=.
 
+Reverting an Embark Collect or Embark Export buffer has slightly
+unusual behavior if the buffer was obtained by running =embark-collect=
+or =embark-export= from within a minibuffer completion session. In that
+case reverting just restarts the completion session, that is, the
+command that opened the minibuffer is run again and the minibuffer
+contents restored. You can then interact normally with the command,
+perhaps editing the minibuffer contents, and, if you wish, you can
+rerun =embark-collect= or =embark-export= to get an updated buffer.
+
 ** Switching to a different command without losing what you've typed
 
 Embark also has the =embark-become= command which is useful for when
diff --git a/embark.el b/embark.el
index 2b4a6c5c8a..b7d8e72abb 100644
--- a/embark.el
+++ b/embark.el
@@ -2660,7 +2660,16 @@ you might prefer to change the key binding to match your 
other
 key binding for it. Or alternatively you might want to enable the
 embark collect direct action minor mode by adding the function
 `embark-collect-direct-action-minor-mode' to
-`embark-collect-mode-hook'.")
+`embark-collect-mode-hook'.
+
+Reverting an Embark Collect buffer has slightly unusual behavior
+if the buffer was obtained by running `embark-collect' from
+within a minibuffer completion session.  In that case reverting
+just restarts the completion session, that is, the command that
+opened the minibuffer is run again and the minibuffer contents
+restored.  You can then interact normally with the command,
+perhaps editing the minibuffer contents, and, if you wish, you
+can rerun `embark-collect' to get an updated buffer.")
 
 (defun embark-collect--remove-zebra-stripes ()
   "Remove highlighting of alternate rows."
@@ -2873,7 +2882,16 @@ TYPE should be either `collect' or `export'."
   "Create an Embark Collect buffer.
 
 To control the display, add an entry to `display-buffer-alist'
-with key \"Embark Collect\"."
+with key \"Embark Collect\".
+
+Reverting an Embark Collect buffer has slightly unusual behavior
+if the buffer was obtained by running `embark-collect' from
+within a minibuffer completion session.  In that case reverting
+just restarts the completion session, that is, the command that
+opened the minibuffer is run again and the minibuffer contents
+restored.  You can then interact normally with the command,
+perhaps editing the minibuffer contents, and, if you wish, you
+can rerun `embark-collect' to get an updated buffer."
   (interactive)
   (let ((buffer (embark--collect (embark--descriptive-buffer-name 'collect
 (when (minibufferp)
@@ -2945,7 +2963,16 @@ The parameter KIND should be either `embark-export' or 
`embark-collect'."
 (defun embark-export ()
   "Create a type-specific buffer to manage current candidates.
 The variable `embark-exporters-alist' controls how to make the
-buffer for each type of completion."
+buffer for each type of completion.
+
+Reverting an Embark Export buffer has slightly unusual behavior if
+the buffer was obtained by running `embark-export' from within a
+minibuffer completion session.  In that case reverting just
+restarts the completion session, that is, the command that opened
+the minibuffer is run again and the minibuffer contents restored.
+You can then interact normally with the command, perhaps editing
+the minibuffer contents, and, if you wish, you can rerun
+`embark-export' to get an updated buffer."
   (interactive)
   (let* ((transformed (embark--maybe-transform-candidates))
  (candidates (or (plist-get transformed :candidates)
diff --git a/embark.texi b/embark.texi
index b514b54b90..d1b97a3768 100644
--- a/embark.texi
+++ b/embark.texi
@@ -250,8 +250,7 @@ option @samp{embark-confirm-act-all} to @samp{nil}.)
 @item
 The @samp{embark-collect} command produces a buffer listing all the current
 candidates, for you to peruse and run actions on at your leisure.
-The candidates can be viewed in a grid or as a list showing
-additional annotations.
+The candidates are displayed as a list showing additional annotations.
 
 The Embark Collect buffer is ``dired-like'': you can mark and unmark
 candidates with @samp{m} and @samp{u}, you can unmark all marked candidates 
with @samp{U}
@@ -288,6 +287,15 @@ and are bound to @samp{A}, @samp{S} (for ``snapshot''), 
and @samp{E}, respective
 key bindings for these (although you can, of course

[elpa] externals/embark-consult updated (af67f6d25b -> ab778510d5)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark-consult.

  from  af67f6d25b Revert "Stylistic change"
  adds  ab778510d5 Document new revert behavior for export & collect buffers

No new revisions were added by this update.

Summary of changes:
 README.org  |  9 +
 embark.el   | 33 ++---
 embark.texi | 12 ++--
 3 files changed, 49 insertions(+), 5 deletions(-)



[elpa] externals/org-modern 914d755bbe 1/2: Rename org-modern-global-mode to global-org-modern-mode

2022-04-13 Thread ELPA Syncer
branch: externals/org-modern
commit 914d755bbee598515eec3b5a45e653e72ede9011
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename org-modern-global-mode to global-org-modern-mode
---
 org-modern.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index ca90648872..eae8b62720 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -561,10 +561,10 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
   (org-modern--todo))
 
 ;;;###autoload
-(define-globalized-minor-mode org-modern-global-mode
+(define-globalized-minor-mode global-org-modern-mode
   org-modern-mode org-modern--on
   :group 'org-modern
-  (if org-modern-global-mode
+  (if global-org-modern-mode
   (add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
 (remove-hook 'org-agenda-finalize-hook #'org-modern-agenda)))
 



[elpa] externals/org-modern 8cd0d0653a 2/2: README update

2022-04-13 Thread ELPA Syncer
branch: externals/org-modern
commit 8cd0d0653a962e1f9e99e9c8dc126d8615f132f0
Author: Daniel Mendler 
Commit: Daniel Mendler 

README update
---
 README.org | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 529a168cd3..28b073d67a 100644
--- a/README.org
+++ b/README.org
@@ -56,8 +56,12 @@ invoking =M-x org-modern-mode=. In order to enable 
=org-modern= for all your Org
 buffers, add =org-modern-mode= to the Org mode hooks.
 
 #+begin_src emacs-lisp
+  ;; Option 1: Per buffer
   (add-hook 'org-mode-hook #'org-modern-mode)
   (add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
+
+  ;; Option 2: Globally
+  (global-org-modern-mode)
 #+end_src
 
 Try the following minimal setup in =emacs -Q= to emulate the looks of the
@@ -72,8 +76,8 @@ screenshot above.
   (modus-themes-load-operandi)
 
   ;; Choose some fonts
-  ;; (set-face-attribute 'default nil :family "???")
-  ;; (set-face-attribute 'variable-pitch nil :family "???")
+  ;; (set-face-attribute 'default nil :family "Iosevka")
+  ;; (set-face-attribute 'variable-pitch nil :family "Iosevka Aile")
   ;; (set-face-attribute 'org-modern-symbol nil :family "Iosevka")
 
   ;; Add frame borders and window dividers
@@ -109,9 +113,7 @@ screenshot above.
org-agenda-current-time-string
"⭠ now ─")
 
-  ;; Enable org-modern-mode
-  (add-hook 'org-mode-hook #'org-modern-mode)
-  (add-hook 'org-agenda-finalize-hook #'org-modern-agenda)
+  (global-org-modern-mode)
 #+end_src
 
 * Contributions



[elpa] externals/org-modern updated (2e851d3742 -> 8cd0d0653a)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/org-modern.

  from  2e851d3742 org-modern-star: Use lighter star for n≥5
   new  914d755bbe Rename org-modern-global-mode to global-org-modern-mode
   new  8cd0d0653a README update


Summary of changes:
 README.org| 12 +++-
 org-modern.el |  4 ++--
 2 files changed, 9 insertions(+), 7 deletions(-)



[elpa] externals/tempel d915e56b3c: Rename tempel-global-abbrev-mode to global-tempel-abbrev-mode

2022-04-13 Thread ELPA Syncer
branch: externals/tempel
commit d915e56b3c5cee3388a9e60334447a1b2ab3e2d4
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename tempel-global-abbrev-mode to global-tempel-abbrev-mode
---
 README.org | 6 +++---
 tempel.el  | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index c6cccf53b4..9146d6e864 100644
--- a/README.org
+++ b/README.org
@@ -40,7 +40,7 @@ soon as you move before (behind) the first (last) field, the 
fields are
 finalized.
 
 Tempel can hook into the abbrev mechanism of Emacs by enabling the
-~tempel-abbrev-mode~ in a buffer or by enabling the 
~tempel-global-abbrev-mode~.
+~tempel-abbrev-mode~ in a buffer or by enabling the 
~global-tempel-abbrev-mode~.
 Then the Tempel templates will be available via ~expand-abbrev~ which is 
usually
 bound to ~C-x '~.
 
@@ -90,13 +90,13 @@ on =use-package=.
 ;; Optionally make the Tempel templates available to Abbrev,
 ;; either locally or globally. `expand-abbrev' is bound to C-x '.
 ;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode)
-;; (tempel-global-abbrev-mode)
+;; (global-tempel-abbrev-mode)
   )
 
   ;; Optional: Use the Corfu completion UI
   (use-package corfu
 :init
-(corfu-global-mode))
+(global-corfu-mode))
 #+end_src
 
 * Template file format
diff --git a/tempel.el b/tempel.el
index 1439909606..6e5e6d6314 100644
--- a/tempel.el
+++ b/tempel.el
@@ -715,7 +715,7 @@ If called interactively, select a template with 
`completing-read'."
 abbrev-minor-mode-table-alist)
 
 ;;;###autoload
-(define-globalized-minor-mode tempel-global-abbrev-mode tempel-abbrev-mode
+(define-globalized-minor-mode global-tempel-abbrev-mode tempel-abbrev-mode
   tempel--abbrev-on :group 'tempel)
 
 (defun tempel--abbrev-on ()



[elpa] externals/compat c42abd3474: Explicitly mention that with-connection-local-variables is missing

2022-04-13 Thread ELPA Syncer
branch: externals/compat
commit c42abd3474728e7c61a9f20880b5ca005760671a
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Explicitly mention that with-connection-local-variables is missing
---
 MANUAL | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MANUAL b/MANUAL
index 1429aa7378..5c202e9641 100644
--- a/MANUAL
+++ b/MANUAL
@@ -353,6 +353,8 @@ implemented in 27.1:
 - Additional ~format-spec~ modifiers.
 - Support for additional body forms for
   ~define-globalized-minor-mode~.
+- The macro ~with-connection-local-variables~ and related
+  functionality.
 
 ** Emacs 28.1
 The following functions and macros implemented in 28.1, and are



[elpa] externals/corfu updated (30b66b223f -> 7b44e56371)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/corfu.

  from  30b66b223f Fix obsolete function declaration
   new  3a597800f7 corfu-quick: Improve formatting
   new  7b44e56371 Update copyright


Summary of changes:
 extensions/corfu-indexed.el |  2 +-
 extensions/corfu-quick.el   | 12 +---
 2 files changed, 10 insertions(+), 4 deletions(-)



[elpa] externals/corfu 3a597800f7 1/2: corfu-quick: Improve formatting

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 3a597800f7ff3bdcaa10e62a4fe01b4bf9dbe439
Author: Daniel Mendler 
Commit: Daniel Mendler 

corfu-quick: Improve formatting
---
 extensions/corfu-quick.el | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/extensions/corfu-quick.el b/extensions/corfu-quick.el
index 505a0730e7..60c5112efd 100644
--- a/extensions/corfu-quick.el
+++ b/extensions/corfu-quick.el
@@ -98,6 +98,12 @@ TWO is non-nil if two keys should be displayed."
 (defun corfu-quick--read (&optional first)
   "Read quick key given FIRST pressed key."
   (cl-letf* ((list nil)
+ (space1 (propertize " " 'display
+ `(space :width
+ (+ 0.5 (,(alist-get
+   'child-frame-border-width
+   
corfu--frame-parameters))
+ (space2 #(" " 0 1 (display (space :width 0.5
  (orig (symbol-function #'corfu--affixate))
  ((symbol-function #'corfu--affixate)
   (lambda (cands)
@@ -106,12 +112,12 @@ TWO is non-nil if two keys should be displayed."
   (dolist (cand cands)
 (pcase-let ((`(,keys . ,events) (corfu-quick--keys first 
index)))
   (setq list (nconc events list))
-  (setf (cadr cand) keys)
+  (setf (cadr cand) (concat space1 (propertize " " 
'display keys) space2))
   (cl-incf index)))
   cands)
-(cons nil cands)))
+(cons t cands)))
  ;; Increase minimum width to avoid odd jumping
- (corfu-min-width (+ 2 corfu-min-width)))
+ (corfu-min-width (+ 3 corfu-min-width)))
 (corfu--candidates-popup (car completion-in-region--data))
 (alist-get (read-key) list)))
 



[elpa] externals/corfu 7b44e56371 2/2: Update copyright

2022-04-13 Thread ELPA Syncer
branch: externals/corfu
commit 7b44e5637187e50f3839816f36df87dfd0a3fca0
Author: Daniel Mendler 
Commit: Daniel Mendler 

Update copyright
---
 extensions/corfu-indexed.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/corfu-indexed.el b/extensions/corfu-indexed.el
index 10744dd48e..0cb591276b 100644
--- a/extensions/corfu-indexed.el
+++ b/extensions/corfu-indexed.el
@@ -1,6 +1,6 @@
 ;;; corfu-indexed.el --- Select indexed candidates -*- lexical-binding: t -*-
 
-;; Copyright (C) 2021  Free Software Foundation, Inc.
+;; Copyright (C) 2022  Free Software Foundation, Inc.
 
 ;; Author: Luis Henriquez-Perez , Daniel Mendler 

 ;; Maintainer: Daniel Mendler 



[nongnu] elpa/evil 05714e8daa: Ensure we're not in visual state if there's no ex range

2022-04-13 Thread ELPA Syncer
branch: elpa/evil
commit 05714e8daacadb7603a05ffe81d1fbda7439a748
Author: Tom Dalziel 
Commit: Tom Dalziel <33435574+tomd...@users.noreply.github.com>

Ensure we're not in visual state if there's no ex range

fixes #1595
---
 evil-ex.el| 1 +
 evil-tests.el | 5 +
 2 files changed, 6 insertions(+)

diff --git a/evil-ex.el b/evil-ex.el
index b375a74455..491eef0858 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -718,6 +718,7 @@ This function interprets special file names like # and %."
   (cond
((not evil-ex-range)
 (setq this-command evil-ex-command)
+(evil-exit-visual-state)
 (run-hooks 'pre-command-hook)
 (call-interactively evil-ex-command)
 (run-hooks 'post-command-hook))
diff --git a/evil-tests.el b/evil-tests.el
index 2836f22751..b0d2ce1c08 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -8386,6 +8386,11 @@ Source
 (evil-test-buffer
   "5\n4\n3\n2\n1\n"
   (":g/^/m0")
+  "1\n2\n3\n4\n5\n"))
+  (ert-info ("Move with global, and visual selection")
+(evil-test-buffer
+  "<5\n4\n3\n2\n[1]>\n"
+  (":g/^/m0")
   "1\n2\n3\n4\n5\n")))
 
 (ert-deftest evil-test-write ()



[elpa] externals/cape aadf69d015: cape-tex: Convert to hash table

2022-04-13 Thread ELPA Syncer
branch: externals/cape
commit aadf69d01512bf980245ffe073df5710ccdb6385
Author: Daniel Mendler 
Commit: Daniel Mendler 

cape-tex: Convert to hash table
---
 README.org |  2 +-
 cape.el| 20 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/README.org b/README.org
index 15383d74d9..f79a2ad5b4 100644
--- a/README.org
+++ b/README.org
@@ -61,7 +61,7 @@ could be upstreamed into Emacs itself.
   ;; See the Corfu README for more configuration tips.
   (use-package corfu
 :init
-(corfu-global-mode))
+(global-corfu-mode))
 
   ;; Add extensions
   (use-package cape
diff --git a/cape.el b/cape.el
index 03f1d6b6d3..46c4cd83b1 100644
--- a/cape.el
+++ b/cape.el
@@ -607,7 +607,7 @@ If INTERACTIVE is nil the function acts like a capf."
 ;; `macroexpand-all' the expensive `cape--define-char' macro calls.
 (eval-when-compile
   (defun cape--char-translation (method regexp)
-"Return character translation alist for METHOD.
+"Return character translation hash for METHOD.
 REGEXP is the regular expression matching the names."
 (declare (pure t))
 (save-window-excursion
@@ -623,7 +623,7 @@ REGEXP is the regular expression matching the names."
"\\`\\(\n\\|.\\)*?KEY SEQUENCE\n-+\n" ""
(buffer-string
 "\n"))
-  (list nil))
+  (hash (make-hash-table :test #'equal)))
   (dolist (line lines)
 (let ((beg 0) (len (length line)))
   (while (< beg len)
@@ -633,10 +633,10 @@ REGEXP is the regular expression matching the names."
 (let ((name (string-trim (substring-no-properties line beg 
ename)))
   (char (string-trim (substring-no-properties line 
ename echar
   (when (and (string-match-p regexp name) (= (length char) 
1))
-(push (cons name (aref char 0)) list
+(puthash name (aref char 0) hash
   (setq beg echar)
   (kill-buffer)
-  (sort list (lambda (x y) (string< (car x) (car y)
+  hash)
 
 (defmacro cape--char-define (name method &rest prefix)
   "Define character translation capf.
@@ -645,23 +645,23 @@ METHOD is the input method.
 PREFIX are the prefix characters."
   (let ((capf (intern (format "cape-%s" name)))
 (prefix-required (intern (format "cape-%s-prefix-required" name)))
-(list (intern (format "cape--%s-list" name)))
+(hash (intern (format "cape--%s-hash" name)))
 (ann (intern (format "cape--%s-annotation" name)))
 (docsig (intern (format "cape--%s-docsig" name)))
 (exit (intern (format "cape--%s-exit" name)))
 (properties (intern (format "cape--%s-properties" name
 `(progn
-   (defvar ,list (cape--char-translation
+   (defvar ,hash (cape--char-translation
   ,method
   ,(concat "\\`" (regexp-opt (mapcar #'char-to-string 
prefix)
(defcustom ,prefix-required t
  ,(format "Initial prefix is required for `%s' to trigger." capf)
  :type 'boolean)
(defun ,ann (name)
- (when-let (char (cdr (assoc name ,list)))
+ (when-let (char (gethash name ,hash))
(format " %c" char)))
(defun ,docsig (name)
- (when-let (char (cdr (assoc name ,list)))
+ (when-let (char (gethash name ,hash))
(format "%s (%s)"
(get-char-code-property char 'name)
(char-code-property-description
@@ -669,7 +669,7 @@ PREFIX are the prefix characters."
 (get-char-code-property char 'general-category)
(defun ,exit (name status)
  (unless (eq status 'exact)
-   (when-let (char (cdr (assoc name ,list)))
+   (when-let (char (gethash name ,hash))
  (delete-region (max (point-min) (- (point) (length name))) 
(point))
  (insert (char-to-string char)
(defvar ,properties
@@ -698,7 +698,7 @@ is nil the function acts like a capf." method method)
((not ,prefix-required) (cons (point) (point)
  (append
   (list (car bounds) (cdr bounds)
-(cape--table-with-properties ,list :category ',capf)
+(cape--table-with-properties ,hash :category ',capf)
 :exclusive 'no)
   ,properties)))
 



[elpa] externals/javaimp 9efdf954d5: Implement next-error support in javaimp-show-scopes-mode

2022-04-13 Thread Filipp Gunbin
branch: externals/javaimp
commit 9efdf954d5d63ebb41c07fea91c3e70cd5ca9b71
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Implement next-error support in javaimp-show-scopes-mode
---
 javaimp-util.el |   2 +-
 javaimp.el  | 136 
 2 files changed, 89 insertions(+), 49 deletions(-)

diff --git a/javaimp-util.el b/javaimp-util.el
index 639474a673..0379a9e308 100644
--- a/javaimp-util.el
+++ b/javaimp-util.el
@@ -40,7 +40,7 @@
  array)
javaimp--classlike-scope-types))
 
-(defconst javaimp--help-scope-type-abbrevs
+(defconst javaimp--show-scopes-scope-type-abbrevs
   '((anonymous-class . "ac")
 (statement . "st")
 (simple-statement . "ss")
diff --git a/javaimp.el b/javaimp.el
index 3ce295a518..fe2d7d9510 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -92,9 +92,9 @@
 ;; "scopes") parses in ~1.5 seconds, which is not that bad...
 ;;
 ;; Parsing is also used for Imenu support.  A simple debug command,
-;; `javaimp-help-show-scopes', lists all parsed "scopes" (blocks of
-;; code in braces).  As there's no minor/major mode (yet), you have to
-;; set `imenu-create-index-function' in major mode hook yourself.  See
+;; `javaimp-show-scopes', lists all parsed "scopes" (blocks of code in
+;; braces).  As there's no minor/major mode (yet), you have to set
+;; `imenu-create-index-function' in major mode hook yourself.  See
 ;; example below.
 ;;
 ;; - `javaimp-imenu-use-sub-alists' - if non-nil then Imenu items are
@@ -116,7 +116,7 @@
 ;;
 ;; (local-set-key (kbd "C-c i") #'javaimp-add-import)
 ;; (local-set-key (kbd "C-c o") #'javaimp-organize-imports)
-;; (local-set-key (kbd "C-c s") #'javaimp-help-show-scopes)
+;; (local-set-key (kbd "C-c s") #'javaimp-show-scopes)
 ;;
 ;; To enable Imenu (overriding Imenu support from cc-mode):
 ;;
@@ -769,44 +769,54 @@ in a major mode hook."
   (back-to-indentation))
 
 
-;; Help
+;; Show scopes
 
-(defvar javaimp-help-keymap
+(put 'javaimp-show-scopes-mode 'mode-class 'special)
+(define-derived-mode javaimp-show-scopes-mode special-mode "Javaimp Show 
Scopes"
+  (setq next-error-function #'javaimp-show-scopes-next-error))
+
+(defvar javaimp-show-scopes-mode-map
   (let ((map (make-sparse-keymap)))
-(define-key map "\C-m" #'javaimp-help-goto-scope)
-(define-key map [mouse-2] #'javaimp-help-goto-scope-mouse)
+(set-keymap-parent map text-mode-map)
+(define-key map "\C-m" #'javaimp-show-scopes-goto-scope)
+(define-key map [mouse-2] #'javaimp-show-scopes-goto-scope-mouse)
+(define-key map "n" #'next-error-no-select)
+(define-key map "p" #'previous-error-no-select)
+(define-key map "l" #'recenter-current-error)
 map)
-  "Keymap for Javaimp help buffers.")
+  "Javaimp Show Scopes keymap.")
 
-(defun javaimp-help-goto-scope (pos)
+(defun javaimp-show-scopes-goto-scope (pos)
   "Go to scope at point in another window."
   (interactive "d")
-  (javaimp-help--goto-scope-1 pos))
+  (javaimp-show-scopes--goto-scope-1 pos current-prefix-arg))
 
 ;; TODO handle mouse-1
-(defun javaimp-help-goto-scope-mouse (event)
+(defun javaimp-show-scopes-goto-scope-mouse (event)
   "Go to scope you click on in another window."
   (interactive "e")
   (let ((window (posn-window (event-end event)))
 (pos (posn-point (event-end event
 (with-current-buffer (window-buffer window)
-  (javaimp-help--goto-scope-1 pos
+  (javaimp-show-scopes--goto-scope-1 pos current-prefix-arg
 
-(defun javaimp-help--goto-scope-1 (pos)
+(defun javaimp-show-scopes--goto-scope-1 (pos &optional to-start)
   "Go to the opening brace (`javaimp-scope-open-brace') of the
-scope at POS.  With prefix arg, go to scope
+scope at POS.  When TO-START is non-nil, go to scope
 start (`javaimp-scope-start') instead."
-  (let ((scope (get-text-property pos 'javaimp-help-scope))
-(file (get-text-property (point-min) 'javaimp-help-file)))
-(when (and scope file)
-  (with-current-buffer (find-file-other-window file)
-(goto-char (if current-prefix-arg
-   (javaimp-scope-start scope)
- (javaimp-scope-open-brace scope)))
-
-(defun javaimp-help-show-scopes (&optional show-all)
-  "Show scopes in *javaimp-scopes* buffer, with clickable
-text.  By default, the scopes are only those which appear in
+  (when-let ((scope (get-text-property pos 'javaimp-show-scopes-scope))
+ (file (get-text-property (point-min) 'javaimp-show-scopes-file))
+ (buf (find-file-noselect file)))
+(with-current-buffer buf
+  (goto-char (if to-start
+ (javaimp-scope-start scope)
+   (javaimp-scope-open-brace scope
+(pop-to-buffer buf)))
+
+
+(defun javaimp-show-scopes (&optional show-all)
+  "Show scopes in *javaimp-scopes* buffer, with clickable text.
+By default, the scopes are only those which appear in
 Imenu (`javaimp-imenu-create-index' is responsible for that), but
 with prefix arg, show all scopes."

[elpa] externals/eev 1f79d9e54f: Now psne-ing uses "echo -N" in eshell by default (or sort of).

2022-04-13 Thread ELPA Syncer
branch: externals/eev
commit 1f79d9e54ffb58003a5739ce458a8989e2a921cd
Author: Eduardo Ochs 
Commit: Eduardo Ochs 

Now psne-ing uses "echo -N" in eshell by default (or sort of).
---
 ChangeLog |  9 +++
 VERSION   |  4 +--
 eev-intro.el  | 84 ---
 eev-tlinks.el | 46 +++-
 4 files changed, 119 insertions(+), 24 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 744225a574..e0c7ae2261 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2022-04-13  Eduardo Ochs  
+
+   * eev-tlinks.el (ee-find-psne-echo-options): new function.
+   (find-psne-links, ee-find-psne-core): added the argument
+   `echo-options'.
+
+   * eev-intro.el (find-windows-beginner-intro): added the section
+   "5.6.1. Echo in Eshell".
+
 2022-04-12  Eduardo Ochs  
 
* eev-code.el (ee-code-c-d-base): added some links to the
diff --git a/VERSION b/VERSION
index a4c5a0740f..64cba9fa6d 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Wed Apr 13 00:49:20 GMT 2022
-Tue Apr 12 21:49:20 -03 2022
+Thu Apr 14 03:00:14 GMT 2022
+Thu Apr 14 00:00:14 -03 2022
diff --git a/eev-intro.el b/eev-intro.el
index fa84be27bc..afee1620df 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20220313
+;; Version:20220413
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el>
@@ -1225,12 +1225,21 @@ described above.
 For more on `M-x', and on why the defuns above need the
 \"(interactive)\", see:
 
-  (find-node \"(emacs)M-x\")
-  (find-node \"(emacs)Commands\")
-  (find-node \"(elisp)Defining Commands\")
+  (find-enode \"M-x\")
+  (find-enode \"Commands\")
+  (find-elnode \"Defining Commands\")
+
+Remember that you can list all current eejump targets with:
+
+  (find-eejumps)
+
+you can list the current commands with very short names with:
+
+  (find-eeshortdefs)
 
 [Video links:]
   (find-eev2020video \"19:03\" \"commands with very short names\")
+  (find-eev2020video \"21:07\" \"commands with very short numbers\")
 
 
 
@@ -13914,6 +13923,73 @@ tecnhical details, see:
 
 
 
+5.6.1. Echo in Eshell
+-
+Note that the \"echo\" of Eshell has a quirk: if you run these
+lines
+
+  echo http://foo.bar/>> ~/.psne.log
+  echo http://qux.bletch/ >> ~/.psne.log
+  echo http://plic.ploc/  >> ~/.psne.log
+
+on a \"normal\" unix shell these URLs will be appended to
+~/.psne.log with newlines separating them, but if you run that in
+Eshell they will be appended without newlines. One way to fix
+that is to invoke the (built-in!) echo of Eshell with the \"-N\"
+option, like this:
+
+  echo -N http://foo.bar/>> ~/.psne.log
+  echo -N http://qux.bletch/ >> ~/.psne.log
+  echo -N http://plic.ploc/  >> ~/.psne.log
+
+The option \"-N\" (\"terminate with a newline\") is only
+explained in the source of eshell:
+
+  (find-efile \"eshell/em-basic.el\" \"defun eshell/echo\" \"?N\")
+
+`find-psne-links' accepts two optional arguments after the URL.
+The first of them is called `wget-options', and when it is not
+given it defaults to \"-nc\" (\"no-clobber\"). The optional
+argument is called `echo-options', and _ideally_ it should
+default to \"\" on \"normal\" unix shells, and to \"-N\" on
+eshell. When it is not given eev runs the function
+`ee-find-psne-echo-options' to decide what to do, and the
+default definition of that function is:
+
+  ;; See: (find-eev \"eev-tlinks.el\" \"ee-find-psne-echo-options\")
+  ;;
+  (defun ee-find-psne-echo-options ()
+(if (eq system-type 'windows-nt) \"-N\" \"\"))
+
+which means: if a person is \"on Windows\", suppose that she is
+using Eshell, and that she needs \"echo -N\"; is a person is on
+\"non-Windows\", suppose that she is using a \"normal\" unix
+shell, and that she needs just \"echo\", without the \"-N\". The
+exact definition of the term \"on Windows\" can be found here:
+
+  (find-evardescr 'system-type  \"windows-nt\")
+  (find-elnode \"System Environment\" \"windows-nt\")
+
+The suppositions above are often wrong. Here is the easiest way
+to fix them: if you are \"on Windows\" but you use a \"normal\"
+unix shell, you can put these two lines in your ~/.emacs to
+override the definition above:
+
+  ;; See: (find-windows-beginner-intro \"5.6.1. Echo in Eshell\")
+  (defun ee-find-psne-echo-options () \"\")
+
+and if you are 

[elpa] externals/org-modern 1ab67473d1: Improve agenda styling

2022-04-13 Thread ELPA Syncer
branch: externals/org-modern
commit 1ab67473d1096aa17c30339214e01cf91cff02a6
Author: Daniel Mendler 
Commit: Daniel Mendler 

Improve agenda styling
---
 org-modern.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-modern.el b/org-modern.el
index eae8b62720..8bf99cc5f1 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -552,7 +552,7 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
   (save-excursion
 (save-match-data
   (goto-char (point-min))
-  (let ((re (format " %s "
+  (let ((re (format ": +%s "
 (regexp-opt
  (append org-todo-keywords-for-agenda
  org-done-keywords-for-agenda) t)))



[elpa] externals/aggressive-completion d7bfb380b8: Don't bump back to top on scroll commands.

2022-04-13 Thread Tassilo Horn
branch: externals/aggressive-completion
commit d7bfb380b8b9f56582558f944d648fb17a42f9fb
Author: Tassilo Horn 
Commit: Tassilo Horn 

Don't bump back to top on scroll commands.

* aggressive-completion.el (aggressive-completion--do): Don't bump back to 
top
on scroll commands.
---
 aggressive-completion.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/aggressive-completion.el b/aggressive-completion.el
index ddf49ef2ee..73dd1e8709 100644
--- a/aggressive-completion.el
+++ b/aggressive-completion.el
@@ -146,14 +146,18 @@ Ivy, Selectrum, or Vertico."
 (minibuffer-completion-help)))
   ;; Only show the completion help.  This slightly awkward
   ;; condition ensures we still can repeatedly hit TAB to scroll
-  ;; through the list of completions.
+  ;; through the list of completions or scroll the list using
+  ;; scroll commands without having it bump back.
   (when (and aggressive-completion-auto-completion-help
  (not
   (and
(memq last-command
  (cons aggressive-completion-auto-complete-fn
'(completion-at-point
- minibuffer-complete)))
+ minibuffer-complete
+ scroll-other-window
+ mwheel-scroll
+ pixel-scroll-precision)))
(window-live-p
 (get-buffer-window "*Completions*"))
(with-current-buffer "*Completions*"



[elpa] externals/cape 3c8ded3f61: Add cape-line-buffer-function (Fix #36)

2022-04-13 Thread ELPA Syncer
branch: externals/cape
commit 3c8ded3f61aec2daf815d16f1ac329b48de5802c
Author: Daniel Mendler 
Commit: Daniel Mendler 

Add cape-line-buffer-function (Fix #36)
---
 cape.el | 52 
 1 file changed, 36 insertions(+), 16 deletions(-)

diff --git a/cape.el b/cape.el
index 46c4cd83b1..941bb5bad3 100644
--- a/cape.el
+++ b/cape.el
@@ -81,6 +81,14 @@ Any other non-nil value only checks some other buffers, as 
per
   "The parent directory must exist for file completion."
   :type 'integer)
 
+(defcustom cape-line-buffer-function #'cape--buffers-major-mode
+  "Function which returns list of buffers.
+The buffers are scanned for completion candidates by `cape-line'."
+  :type '(choice (const :tag "Current buffer" current-buffer)
+ (const :tag "All buffers" buffer-list)
+ (const :tag "Buffers with same major mode" 
cape--buffers-major-mode)
+ (function :tag "Custom function")))
+
 (defcustom cape-keywords
   ;; This variable was taken from company-keywords.el.
   ;; Please contribute corrections or additions to both Cape and Company.
@@ -791,28 +799,40 @@ If INTERACTIVE is nil the function acts like a capf."
 (defvar cape--line-properties nil
   "Completion extra properties for `cape-line'.")
 
+(defun cape--buffers-major-mode ()
+  "Return buffers with same major mode as current buffer."
+  (cl-loop for buf in (buffer-list)
+   if (eq major-mode (buffer-local-value 'major-mode buf))
+   collect buf))
+
 (defun cape--line-list ()
   "Return all lines from buffer."
-  (let ((beg (point-min))
-(max (point-max))
-(pt (point))
-(ht (make-hash-table :test #'equal))
-end lines)
-(save-excursion
-  (while (< beg max)
-(goto-char beg)
-(setq end (line-end-position))
-(unless (<= beg pt end)
-  (let ((line (buffer-substring-no-properties beg end)))
-(unless (or (string-blank-p line) (gethash line ht))
-  (puthash line t ht)
-  (push line lines
-(setq beg (1+ end
+  (let ((ht (make-hash-table :test #'equal))
+(curr-buf (current-buffer))
+(buffers (funcall cape-line-buffer-function))
+lines)
+(dolist (buf (if (listp buffers) buffers (list buffers)))
+  (with-current-buffer buf
+(let ((beg (point-min))
+  (max (point-max))
+  (pt (if (eq curr-buf buf) (point) -1))
+  end)
+  (save-excursion
+(while (< beg max)
+  (goto-char beg)
+  (setq end (line-end-position))
+  (unless (<= beg pt end)
+(let ((line (buffer-substring-no-properties beg end)))
+  (unless (or (string-blank-p line) (gethash line ht))
+(puthash line t ht)
+(push line lines
+  (setq beg (1+ end)))
 (nreverse lines)))
 
 ;;;###autoload
 (defun cape-line (&optional interactive)
-  "Complete current line from other lines in buffer.
+  "Complete current line from other lines.
+The buffers returned by `cape-line-buffer-function' are scanned for lines.
 If INTERACTIVE is nil the function acts like a capf."
   (interactive (list t))
   (if interactive



[elpa] externals/cape updated (3c8ded3f61 -> 0a618040aa)

2022-04-13 Thread ELPA Syncer
elpasync pushed a change to branch externals/cape.

  from  3c8ded3f61 Add cape-line-buffer-function (Fix #36)
   new  809076d88a Move some of the heavier, rarely used Capfs to separate 
files
   new  0a618040aa README: Minor update


Summary of changes:
 README.org  |   5 +-
 cape-char.el| 138 
 cape-keyword.el | 306 
 cape.el | 387 
 4 files changed, 447 insertions(+), 389 deletions(-)
 create mode 100644 cape-char.el
 create mode 100644 cape-keyword.el



[elpa] externals/cape 0a618040aa 2/2: README: Minor update

2022-04-13 Thread ELPA Syncer
branch: externals/cape
commit 0a618040aa4adaa4f42bcc9cd65491453e2e6253
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Minor update
---
 README.org | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index f79a2ad5b4..072a87e03b 100644
--- a/README.org
+++ b/README.org
@@ -66,6 +66,7 @@ could be upstreamed into Emacs itself.
   ;; Add extensions
   (use-package cape
 ;; Bind dedicated completion commands
+;; Alternative prefix keys: C-c p, M-p, M-+, ...
 :bind (("C-c p p" . completion-at-point) ;; capf
("C-c p t" . complete-tag);; etags
("C-c p d" . cape-dabbrev);; or dabbrev-completion
@@ -84,9 +85,9 @@ could be upstreamed into Emacs itself.
 :init
 ;; Add `completion-at-point-functions', used by `completion-at-point'.
 (add-to-list 'completion-at-point-functions #'cape-file)
-(add-to-list 'completion-at-point-functions #'cape-tex)
 (add-to-list 'completion-at-point-functions #'cape-dabbrev)
-(add-to-list 'completion-at-point-functions #'cape-keyword)
+;;(add-to-list 'completion-at-point-functions #'cape-keyword)
+;;(add-to-list 'completion-at-point-functions #'cape-tex)
 ;;(add-to-list 'completion-at-point-functions #'cape-sgml)
 ;;(add-to-list 'completion-at-point-functions #'cape-rfc1345)
 ;;(add-to-list 'completion-at-point-functions #'cape-abbrev)



[elpa] externals/cape 809076d88a 1/2: Move some of the heavier, rarely used Capfs to separate files

2022-04-13 Thread ELPA Syncer
branch: externals/cape
commit 809076d88a4bc99f46266362e9efa3a3d673be3a
Author: Daniel Mendler 
Commit: Daniel Mendler 

Move some of the heavier, rarely used Capfs to separate files
---
 cape-char.el| 138 
 cape-keyword.el | 306 
 cape.el | 387 
 3 files changed, 444 insertions(+), 387 deletions(-)

diff --git a/cape-char.el b/cape-char.el
new file mode 100644
index 00..4eb65fa401
--- /dev/null
+++ b/cape-char.el
@@ -0,0 +1,138 @@
+;;; cape-char.el --- Character completion functions -*- lexical-binding: t -*-
+
+;; Copyright (C) 2021, 2022  Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; This package provides the `cape-tex', `cape-sgml' and `cape-rfc1345'
+;; completion functions.
+
+;;; Code:
+
+(require 'cape)
+
+;; Declare as pure function which is evaluated at compile time. We don't use a
+;; macro for this computation since packages like `helpful' will
+;; `macroexpand-all' the expensive `cape-char--define' macro calls.
+(eval-when-compile
+  (defun cape-char--translation (method regexp)
+"Return character translation hash for METHOD.
+REGEXP is the regular expression matching the names."
+(declare (pure t))
+(save-window-excursion
+  (describe-input-method method)
+  (with-current-buffer "*Help*"
+(let ((lines
+   (split-string
+(replace-regexp-in-string
+ "\n\n\\(\n\\|.\\)*" ""
+ (replace-regexp-in-string
+  "\\`\\(\n\\|.\\)*?\n" ""
+  (replace-regexp-in-string
+   "\\`\\(\n\\|.\\)*?KEY SEQUENCE\n-+\n" ""
+   (buffer-string
+"\n"))
+  (hash (make-hash-table :test #'equal)))
+  (dolist (line lines)
+(let ((beg 0) (len (length line)))
+  (while (< beg len)
+(let* ((ename (next-single-property-change beg 'face line len))
+   (echar (next-single-property-change ename 'face line 
len)))
+  (when (and (get-text-property beg 'face line) (< ename len) 
(<= echar len))
+(let ((name (string-trim (substring-no-properties line beg 
ename)))
+  (char (string-trim (substring-no-properties line 
ename echar
+  (when (and (string-match-p regexp name) (= (length char) 
1))
+(puthash name (aref char 0) hash
+  (setq beg echar)
+  (kill-buffer)
+  hash)
+
+(defmacro cape-char--define (name method &rest prefix)
+  "Define character translation capf.
+NAME is the name of the capf.
+METHOD is the input method.
+PREFIX are the prefix characters."
+  (let ((capf (intern (format "cape-%s" name)))
+(prefix-required (intern (format "cape-%s-prefix-required" name)))
+(hash (intern (format "cape--%s-hash" name)))
+(ann (intern (format "cape--%s-annotation" name)))
+(docsig (intern (format "cape--%s-docsig" name)))
+(exit (intern (format "cape--%s-exit" name)))
+(properties (intern (format "cape--%s-properties" name
+`(progn
+   (defvar ,hash (cape-char--translation
+  ,method
+  ,(concat "\\`" (regexp-opt (mapcar #'char-to-string 
prefix)
+   (defcustom ,prefix-required t
+ ,(format "Initial prefix is required for `%s' to trigger." capf)
+ :type 'boolean
+ :group 'cape)
+   (defun ,ann (name)
+ (when-let (char (gethash name ,hash))
+   (format " %c" char)))
+   (defun ,docsig (name)
+ (when-let (char (gethash name ,hash))
+   (format "%s (%s)"
+   (get-char-code-property char 'name)
+   (char-code-property-description
+'general-category
+(get-char-code-property char 'general-category)
+   (defun ,exit (name status)
+ (unless (eq status 'exact)
+   (when-let (char (gethash name ,hash))
+ (delete-region (max (point-min) (- (point) (length name))) 
(point))
+ (insert (char-to-string char)
+   (defvar ,prope

[nongnu] elpa/shellcop 327f5ac43e: add shellcop-directories-from-z

2022-04-13 Thread ELPA Syncer
branch: elpa/shellcop
commit 327f5ac43e5d543149a772aef06cdb616477eb43
Author: Chen Bin 
Commit: Chen Bin 

add shellcop-directories-from-z
---
 shellcop.el | 31 +++
 1 file changed, 19 insertions(+), 12 deletions(-)

diff --git a/shellcop.el b/shellcop.el
index 59e44d8e54..5baed20d64 100644
--- a/shellcop.el
+++ b/shellcop.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2020-2021 Chen Bin
 ;;
-;; Version: 0.0.8
+;; Version: 0.0.9
 ;; Keywords: unix tools
 ;; Author: Chen Bin 
 ;; URL: https://github.com/redguardtoo/shellcop
@@ -396,11 +396,8 @@ Or else erase current buffer."
(funcall shellcop-string-search-function keyword)
 
 ;;;###autoload
-(defun shellcop-jump-around ()
-  "Jump to directories recorded by https://github.com/rupa/z.
-If shell is visible, \"cd destination-dir\" is inserted into shell.
-Or else, the directory is opened in `dired-mode'."
-  (interactive)
+(defun shellcop-directories-from-z ()
+  "Get directories from z's data file."
   (when (file-exists-p shellcop-jump-around-data-file)
 ;; Emacs use gzip to extract plain text file "~/.z"
 (let* ((content (shell-command-to-string (format "cat %s" 
shellcop-jump-around-data-file)))
@@ -408,12 +405,25 @@ Or else, the directory is opened in `dired-mode'."
;; line's format: "dir | score | timestamp"
(let* ((a (split-string line "|")))
  (cons (nth 0 a) (string-to-number (nth 2 a)
- (split-string (string-trim content
+ (split-string (string-trim content)
+
+  ;; sort by timestamp in descending order
+  (setq dirs (sort dirs (lambda (a b) (> (cdr a) (cdr b)
+  dirs)))
+
+;;;###autoload
+(defun shellcop-jump-around ()
+  "Jump to directories recorded by https://github.com/rupa/z.
+If shell is visible, \"cd destination-dir\" is inserted into shell.
+Or else, the directory is opened in `dired-mode'."
+  (interactive)
+  (when (file-exists-p shellcop-jump-around-data-file)
+;; Emacs use gzip to extract plain text file "~/.z"
+(let* ((dirs (shellcop-directories-from-z))
dest
pattern
shell-window)
-  ;; sort by timestamp in descending order
-  (setq dirs (sort dirs (lambda (a b) (> (cdr a) (cdr b)
+
   (when (> (length dirs) 0)
 (setq pattern
   (read-string "pattern to filter directory (or leave it empty): 
"))
@@ -431,9 +441,6 @@ Or else, the directory is opened in `dired-mode'."
 (when dest
   (cond
((derived-mode-p 'comint-mode)
-;; press return key to clear up current input
-(comint-send-input)
-;; cd into "dest" directory
 (insert "cd " dest))
 
;; jump to the shell