[elpa] externals/corfu b1d4e2d: README: Fix formatting

2021-12-10 Thread ELPA Syncer
branch: externals/corfu
commit b1d4e2dcfd2d24f23701edfdf9ad1a55f4421348
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Fix formatting
---
 README.org | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/README.org b/README.org
index ad80032..9edf82b 100644
--- a/README.org
+++ b/README.org
@@ -187,21 +187,21 @@ moves to the next candidate and further input will then 
commit the selection.
   to enhance your setup.
 
   - [[https://github.com/oantolin/orderless][Orderless]]: Cofu supports 
completion styles,
-  including the advanced [[https://github.com/oantolin/orderless][Orderless]] 
completion style, where the filtering
-  expressions are separated by spaces (see ~corfu-quit-at-boundary~).
+including the advanced 
[[https://github.com/oantolin/orderless][Orderless]] completion style, where 
the filtering
+expressions are separated by spaces (see ~corfu-quit-at-boundary~).
 
   - [[https://github.com/minad/cape][Cape]]: I collect additional Capf 
backends and =completion-in-region= commands
-  in my [[https://github.com/minad/cape][Cape]] package. The package provides 
a file path, a dabbrev completion
-  backend and a backend which allows you to enter unicode characters in the 
form
-  of TeX commands. Furthermore Cape provides an adapter to reuse Company
-  backends in Corfu.
+in my [[https://github.com/minad/cape][Cape]] package. The package 
provides a file path, a dabbrev completion
+backend and a backend which allows you to enter unicode characters in the
+form of TeX commands. Furthermore Cape provides an adapter to reuse Company
+backends in Corfu.
 
   - [[https://github.com/jdtsmith/kind-icon][kind-icon]]: Icons are supported 
by Corfu via an external package. For example
-  the [[https://github.com/jdtsmith/kind-icon][kind-icon]] package provides 
beautifully styled SVG icons based on
-  monochromatic icon sets like material design.
+the [[https://github.com/jdtsmith/kind-icon][kind-icon]] package provides 
beautifully styled SVG icons based on
+monochromatic icon sets like material design.
 
   - [[https://github.com/minad/vertico][Vertico]]: You may also want to look 
into my [[https://github.com/minad/vertico][Vertico]] package. Vertico is the
-  minibuffer completion counterpart of Corfu.
+minibuffer completion counterpart of Corfu.
 
 * Caveats
 



[elpa] externals/pyim updated (2931549 -> 124bd15)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/pyim.

  from  2931549   * tests/pyim-tests.el 
(pyim-tests-pyim-import-words-and-counts): New test.
   new  11e071f   * tests/pyim-tests.el 
(pyim-tests-pyim-import-words-and-counts): :expected-result :failed.
   new  7da7893   * tests/pyim-tests.el 
(pyim-tests-pyim-import-words-and-counts): Use pyim-process-delete-word.
   new  a282820   * pyim-hacks.el (pyim-hacks-add-unread-command-events): 
Fixed.
   new  124bd15   Fix warn.


Summary of changes:
 pyim-codes.el   | 6 +-
 pyim-hacks.el   | 6 +++---
 pyim-imobjs.el  | 5 -
 pyim-indicator.el   | 3 +--
 pyim-process.el | 6 +-
 tests/pyim-tests.el | 2 ++
 6 files changed, 20 insertions(+), 8 deletions(-)



[elpa] externals/pyim 7da7893 2/4: * tests/pyim-tests.el (pyim-tests-pyim-import-words-and-counts): Use pyim-process-delete-word.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 7da7893114d5060572c17529cbcc9977726dd8d8
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-import-words-and-counts): Use 
pyim-process-delete-word.
---
 tests/pyim-tests.el | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index c02dfbc..da23ba2 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -475,10 +475,13 @@
   :expected-result :failed
   (let ((file (make-temp-file "pyim-tests-import")))
 ;; 删除测试用词条
-(puthash "ce-ai" nil pyim-dhashcache-icode2word)
-(puthash "测㤅"  nil pyim-dhashcache-iword2count)
-(puthash "测嘊" nil pyim-dhashcache-iword2count)
-(puthash "测伌" nil pyim-dhashcache-iword2count)
+(dolist (x '("测㤅" "测嘊" "测伌"))
+  (pyim-process-delete-word x))
+(dolist (x '("测㤅" "测嘊" "测伌"))
+  (should-not (member x (pyim-dcache-get "ce-ai" '(icode2word)
+(should-not (equal (gethash "测㤅" pyim-dhashcache-iword2count) 76543))
+(should-not (equal (gethash "测嘊" pyim-dhashcache-iword2count) 34567))
+(should-not (equal (gethash "测伌" pyim-dhashcache-iword2count) 0))
 
 ;; 导入测试用词条
 (with-temp-buffer



[elpa] externals/pyim a282820 3/4: * pyim-hacks.el (pyim-hacks-add-unread-command-events): Fixed.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit a282820084cea64c50cceb62f316729e162c94f7
Author: Feng Shu 
Commit: Feng Shu 

* pyim-hacks.el (pyim-hacks-add-unread-command-events): Fixed.
---
 pyim-hacks.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyim-hacks.el b/pyim-hacks.el
index 65b9232..3c4b7c0 100644
--- a/pyim-hacks.el
+++ b/pyim-hacks.el
@@ -50,9 +50,9 @@ problem, so I do this ugly hack, and wait others help ...
 (setq unread-command-events
   (if (characterp key)
   (cons key unread-command-events)
-(append (mapcan (lambda (e) (list e)))
-(append key nil))
-unread-command-events
+(append (mapcan (lambda (e) (list e))
+(append key nil))
+unread-command-events)
 
 (advice-add 'pyim-add-unread-command-events :around 
#'pyim-hacks-add-unread-command-events)
 



[elpa] externals/pyim 11e071f 1/4: * tests/pyim-tests.el (pyim-tests-pyim-import-words-and-counts): :expected-result :failed.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 11e071f4b65b221527b3cadd3d40e3c39d6d2354
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-import-words-and-counts): 
:expected-result :failed.
---
 tests/pyim-tests.el | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index d28e477..c02dfbc 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -471,15 +471,14 @@
 
 ;; ** pyim-import 相关单元测试
 (ert-deftest pyim-tests-pyim-import-words-and-counts ()
+  ;; 这个测试目前主要用于手工测试,在 github 上这个测试无法通过的。
+  :expected-result :failed
   (let ((file (make-temp-file "pyim-tests-import")))
 ;; 删除测试用词条
-(dolist (x '("测㤅" "测嘊" "测伌"))
-  (pyim-process-delete-word x))
-(dolist (x '("测㤅" "测嘊" "测伌"))
-  (should-not (member x (pyim-dcache-get "ce-ai" '(icode2word)
-(should-not (equal (gethash "测㤅" pyim-dhashcache-iword2count) 76543))
-(should-not (equal (gethash "测嘊" pyim-dhashcache-iword2count) 34567))
-(should-not (equal (gethash "测伌" pyim-dhashcache-iword2count) 0))
+(puthash "ce-ai" nil pyim-dhashcache-icode2word)
+(puthash "测㤅"  nil pyim-dhashcache-iword2count)
+(puthash "测嘊" nil pyim-dhashcache-iword2count)
+(puthash "测伌" nil pyim-dhashcache-iword2count)
 
 ;; 导入测试用词条
 (with-temp-buffer



[elpa] externals/pyim 124bd15 4/4: Fix warn.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 124bd153d820c20782825d1cc2928ee9cc010598
Author: Feng Shu 
Commit: Feng Shu 

Fix warn.
---
 pyim-codes.el | 6 +-
 pyim-imobjs.el| 5 -
 pyim-indicator.el | 3 +--
 pyim-process.el   | 6 +-
 4 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/pyim-codes.el b/pyim-codes.el
index f927bfa..a7476b3 100644
--- a/pyim-codes.el
+++ b/pyim-codes.el
@@ -46,7 +46,11 @@
 列表 codes 中包含一个或者多个 code 字符串,这些 code 字符串用于从
 词库中搜索相关词条。
 
-(pyim-codes-create '((\"w\" \"o\" \"w\" \"o\") (\"\" \"ai\" \"\" \"ai\") 
(\"m\" \"ei\" \"m\" \"ei\") (\"n\"  \"v\" \"n\"  \"v\")) 'quanpin)
+(pyim-codes-create '((\"w\" \"o\" \"w\" \"o\")
+ (\"\" \"ai\" \"\" \"ai\")
+ (\"m\" \"ei\" \"m\" \"ei\")
+ (\"n\"  \"v\" \"n\"  \"v\"))
+   'quanpin)
 
 结果为:
 
diff --git a/pyim-imobjs.el b/pyim-imobjs.el
index 9ff21a3..9440b8b 100644
--- a/pyim-imobjs.el
+++ b/pyim-imobjs.el
@@ -98,7 +98,10 @@ imobj 组合构成在一起,构成了 imobjs 这个概念。比如:
 
 结果为:
 
-(((\"w\" \"o\" \"w\" \"o\") (\"\" \"ai\" \"\" \"ai\") (\"m\" \"ei\" \"m\" 
\"ei\") (\"n\" \"v\" \"n\" \"v\")))
+(((\"w\" \"o\" \"w\" \"o\")
+  (\"\" \"ai\" \"\" \"ai\")
+  (\"m\" \"ei\" \"m\" \"ei\")
+  (\"n\" \"v\" \"n\" \"v\")))
 
 如果字符串无法正确处理,则返回 nil, 比如:
 
diff --git a/pyim-indicator.el b/pyim-indicator.el
index 7c33598..55421f9 100644
--- a/pyim-indicator.el
+++ b/pyim-indicator.el
@@ -165,8 +165,7 @@ timer 实现。"
 (defun pyim-indicator-with-posframe (input-method chinese-input-p)
   "Pyim 自带的 indicator, 通过 posframe 来显示输入状态。"
   (when (posframe-workable-p)
-(let ((buffer " *pyim-indicator*")
-  (posframe-mouse-banish nil))
+(let ((buffer " *pyim-indicator*"))
   (if (not (equal input-method "pyim"))
   (posframe-delete buffer)
 (if chinese-input-p
diff --git a/pyim-process.el b/pyim-process.el
index 227b8bf..07edfef 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -44,6 +44,10 @@
 (require 'pyim-cstring)
 (require 'pyim-magic)
 
+(defgroup pyim-process nil
+  "Process for pyim."
+  :group 'pyim)
+
 (defcustom pyim-english-input-switch-functions nil
   "让 pyim 开启英文输入功能.
 
@@ -95,7 +99,7 @@
pyim-process-translating
pyim-process-last-created-word))
 
-(defun pyim-process-init-dcaches (&optional force save-caches)
+(defun pyim-process-init-dcaches (&optional force)
   "PYIM 流程,词库相关的初始化工作。"
   (pyim-recreate-local-variables)
   (pyim-pymap-cache-create)



[elpa] externals/consult 36ac62c: Optimize consult--completion-filter

2021-12-10 Thread ELPA Syncer
branch: externals/consult
commit 36ac62c7de467dd8f677421a6366bd17f7c8446d
Author: Daniel Mendler 
Commit: Daniel Mendler 

Optimize consult--completion-filter
---
 consult-vertico.el | 14 ++
 consult.el |  6 ++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/consult-vertico.el b/consult-vertico.el
index 98f8e99..5e20143 100644
--- a/consult-vertico.el
+++ b/consult-vertico.el
@@ -32,6 +32,7 @@
 (defvar vertico--lock-candidate)
 (declare-function vertico--exhibit "ext:vertico")
 (declare-function vertico--candidate "ext:vertico")
+(declare-function vertico--all-completions "ext:vertico")
 
 (defun consult-vertico--candidate ()
   "Return current candidate for Consult preview."
@@ -46,6 +47,19 @@
 vertico--lock-candidate nil))
 (vertico--exhibit)))
 
+(defun consult-vertico--filter-adv (orig pattern cands category highlight)
+  "Advice for ORIG `consult--completion-filter' function.
+See `consult--completion-filter' for arguments PATTERN, CANDS, CATEGORY
+and HIGHLIGHT."
+  (if (and (bound-and-true-p vertico-mode) (not highlight))
+  ;; Optimize `consult--completion-filter' using the deferred highlighting
+  ;; from Vertico. The advice is not necessary - it is a pure optimization.
+  (nconc (car (vertico--all-completions pattern cands nil (length pattern)
+`(metadata (category . 
,category
+ nil)
+(funcall orig pattern cands category highlight)))
+
+(advice-add #'consult--completion-filter :around #'consult-vertico--filter-adv)
 (add-hook 'consult--completion-candidate-hook #'consult-vertico--candidate)
 (add-hook 'consult--completion-refresh-hook #'consult-vertico--refresh)
 (define-key consult-async-map [remap vertico-insert] 'vertico-next-group)
diff --git a/consult.el b/consult.el
index dbb69e4..3d96262 100644
--- a/consult.el
+++ b/consult.el
@@ -702,10 +702,8 @@ CATEGORY is the completion category, used to find the 
completion style via
 HIGHLIGHT must be non-nil if the resulting strings should be highlighted."
   ;; completion-all-completions returns an improper list
   ;; where the last link is not necessarily nil.
-  ;; TODO Implement support to disable highlighting as in Vertico deferred 
highlighting.
-  (nconc (completion-all-completions
-  pattern cands nil (length pattern)
-  `(metadata (category . ,category)))
+  (nconc (completion-all-completions pattern cands nil (length pattern)
+ `(metadata (category . ,category)))
  nil))
 
 (defun consult--completion-filter-complement (pattern cands category 
_highlight)



[elpa] externals/embark 570a025 1/7: Change elp-instrument-function binding to m for measure

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit 570a025abaccf61a9206b9de0604a81675372284
Author: Daniel Mendler 
Commit: Daniel Mendler 

Change elp-instrument-function binding to m for measure

S conflicts with embark-collect-snapshot.
---
 embark.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/embark.el b/embark.el
index 0ca3a2f..6596af2 100644
--- a/embark.el
+++ b/embark.el
@@ -3747,8 +3747,8 @@ and leaves the point to the left of it."
 (embark-define-keymap embark-function-map
   "Keymap for Embark function actions."
   :parent embark-symbol-map
-  ("s" elp-instrument-function) ;; s like statistics
-  ("S" 'elp-restore-function) ;; quoted, not autoloaded
+  ("m" elp-instrument-function) ;; m=measure
+  ("M" 'elp-restore-function) ;; quoted, not autoloaded
   ("t" trace-function)
   ("T" 'untrace-function)) ;; quoted, not autoloaded
 
@@ -3771,8 +3771,8 @@ and leaves the point to the left of it."
   ("W" embark-save-package-url)
   ("a" package-autoremove)
   ("g" package-refresh-contents)
-  ("s" elp-instrument-package)
-  ("S" embark-elp-restore-package))
+  ("m" elp-instrument-package) ;; m=measure
+  ("M" embark-elp-restore-package))
 
 (embark-define-keymap embark-bookmark-map
   "Keymap for Embark bookmark actions."



[elpa] externals/embark 731723a 2/7: embark-act etc: Bail out early with user error

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit 731723a3dcd4c892c32906e976ae2f7eb10e87c1
Author: Daniel Mendler 
Commit: Daniel Mendler 

embark-act etc: Bail out early with user error
---
 embark.el | 270 +++---
 1 file changed, 134 insertions(+), 136 deletions(-)

diff --git a/embark.el b/embark.el
index 6596af2..6d1b31f 100644
--- a/embark.el
+++ b/embark.el
@@ -1975,42 +1975,41 @@ ARG is the prefix argument."
  (orig-type (plist-get transformed :orig-type))
  (dir (embark--default-directory))
  (candidates
-  (cl-mapcar
-   (lambda (cand orig-cand)
- (list :type type :orig-type orig-type
-   :target (if (eq type 'file) (expand-file-name cand dir) 
cand)
-   :orig-target orig-cand))
-   (plist-get transformed :candidates)
-   (plist-get transformed :orig-candidates))) 
+  (or (cl-mapcar
+   (lambda (cand orig-cand)
+ (list :type type :orig-type orig-type
+   :target (if (eq type 'file) (expand-file-name cand dir) 
cand)
+   :orig-target orig-cand))
+   (plist-get transformed :candidates)
+   (plist-get transformed :orig-candidates))
+  (user-error "No candidates for export")))
  (indicators (mapcar #'funcall embark-indicators)))
-(if (null candidates)
-(user-error "No candidates for export")
-  (unwind-protect
-  (let* ((summary (format "%d %ss" (length candidates) type))
- (action
-  (or (embark--prompt
-   indicators (embark--action-keymap type nil)
-   (list (list :type type :target summary)))
-  (user-error "Canceled")))
- (act (lambda (candidate)
-(let ((embark-allow-edit-actions nil)
-  (embark-post-action-hooks
-   (mapcar (lambda (x) (remq 'embark--restart x))
-   embark-post-action-hooks)))
-  (embark--act action candidate)
-(when (and (eq action (embark--default-action type))
-   (eq action embark--command))
-  (dolist (cand candidates)
-(plist-put cand :target (plist-get cand :orig-target))
-(plist-put cand :type   (plist-get cand :orig-type
-(when (y-or-n-p (format "Run %s on %s? " action summary))
-  (if (if embark-quit-after-action (not arg) arg)
-  (embark--quit-and-run #'mapc act candidates)
-(mapc act candidates)
-(when (memq 'embark--restart
-(alist-get action embark-post-action-hooks))
-  (embark--restart)
-(mapc #'funcall indicators)
+(unwind-protect
+(let* ((summary (format "%d %ss" (length candidates) type))
+   (action
+(or (embark--prompt
+ indicators (embark--action-keymap type nil)
+ (list (list :type type :target summary)))
+(user-error "Canceled")))
+   (act (lambda (candidate)
+  (let ((embark-allow-edit-actions nil)
+(embark-post-action-hooks
+ (mapcar (lambda (x) (remq 'embark--restart x))
+ embark-post-action-hooks)))
+(embark--act action candidate)
+  (when (and (eq action (embark--default-action type))
+ (eq action embark--command))
+(dolist (cand candidates)
+  (plist-put cand :target (plist-get cand :orig-target))
+  (plist-put cand :type   (plist-get cand :orig-type
+  (when (y-or-n-p (format "Run %s on %s? " action summary))
+(if (if embark-quit-after-action (not arg) arg)
+(embark--quit-and-run #'mapc act candidates)
+  (mapc act candidates)
+  (when (memq 'embark--restart
+  (alist-get action embark-post-action-hooks))
+(embark--restart)
+  (mapc #'funcall indicators
 
 (defun embark-highlight-indicator ()
   "Action indicator highlighting the target at point."
@@ -2782,90 +2781,90 @@ the minibuffer is exited."
(`(,type . ,candidates)
 (run-hook-with-args-until-success 'embark-candidate-collectors))
(affixator (embark-collect--affixator type)))
-(if (and (null candidates) (eq kind :snapshot))
-(user-error "No candidates to collect")
-  (setq embark-collect-linked-buffer buffer)
-  (with-current-buffer buffer
-;; we'll run the mode hooks once the buffer is displayed, so
-;; the hooks can make use of the window
-(delay-mode-hooks (emb

[elpa] externals/embark 8fec816 6/7: Move post-action-wo-restart out of lambda

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit 8fec816e490e3e3862f66e2915459a710a3c1775
Author: Daniel Mendler 
Commit: Daniel Mendler 

Move post-action-wo-restart out of lambda
---
 embark.el | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/embark.el b/embark.el
index ac8f9a7..05f8ae3 100644
--- a/embark.el
+++ b/embark.el
@@ -2004,6 +2004,8 @@ ARG is the prefix argument."
   (or (cl-mapcar
(lambda (cand orig-cand)
  (list :type type :orig-type orig-type
+   ;; TODO The file special casing here seems odd.
+   ;; Why do we need this?
:target (if (eq type 'file) (expand-file-name cand dir) 
cand)
:orig-target orig-cand))
(plist-get transformed :candidates)
@@ -2016,11 +2018,12 @@ ARG is the prefix argument."
  indicators (embark--action-keymap type nil)
  (list (list :type type :multi (length candidates
 (user-error "Canceled")))
+   (post-action-wo-restart
+(mapcar (lambda (x) (remq 'embark--restart x))
+embark-post-action-hooks))
(act (lambda (candidate)
   (let ((embark-allow-edit-actions nil)
-(embark-post-action-hooks
- (mapcar (lambda (x) (remq 'embark--restart x))
- embark-post-action-hooks)))
+(embark-post-action-hooks post-action-wo-restart))
 (embark--act action candidate)
   (when (and (eq action (embark--default-action type))
  (eq action embark--command))



[elpa] externals/org updated (f1929af -> 04f9fa3)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  f1929af   Merge branch 'bugfix'
   new  c6186be   oc-csl: Also look for style files in default directory
   new  8d18972   ox: Fix async export with native compilation
   new  f0d8041   ox: Clarify `org-export-to-(buffer|file)' docstrings
   new  96e022b   Merge branch 'bugfix'
   new  a957a4c   keys: Don't bind illegal C-TAB
   new  04f9fa3   Merge branch 'bugfix'


Summary of changes:
 etc/ORG-NEWS   |  5 +
 lisp/oc-csl.el | 22 +++---
 lisp/org-keys.el   |  2 +-
 lisp/ox-beamer.el  |  2 +-
 lisp/ox-icalendar.el   |  4 ++--
 lisp/ox-koma-letter.el |  2 +-
 lisp/ox-man.el |  2 +-
 lisp/ox-texinfo.el |  2 +-
 lisp/ox.el | 11 +--
 9 files changed, 36 insertions(+), 16 deletions(-)



[elpa] externals/org c6186be 1/3: oc-csl: Also look for style files in default directory

2021-12-10 Thread ELPA Syncer
branch: externals/org
commit c6186be3fd6c09a6deaa4edc1fbabbad0cb986d3
Author: Emmanuel Charpentier 
Commit: Nicolas Goaziou 

oc-csl: Also look for style files in default directory

* lisp/oc-csl.el (org-cite-csl--style-file): When file name is
relative, look for it in default directory before expanding it against
`org-cite-csl-styles-dir'.
(org-cite-csl-styles-dir): Document change.
---
 etc/ORG-NEWS   |  5 +
 lisp/oc-csl.el | 22 +++---
 2 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index eb5a5d4..81459eb 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -97,6 +97,11 @@ argument.
 
 ** Miscellaneous
 
+*** Org also searches for CSL style files in default directory
+
+When CSL style file name is relative, Org first looks into
+default-directory before trying ~org-cite-csl-styles-dir~.
+
 *** Users can add checkers to the linting process
 
 The function ~org-lint-add-checker~ allows one to add personal checks
diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el
index bc3b379..03c9649 100644
--- a/lisp/oc-csl.el
+++ b/lisp/oc-csl.el
@@ -134,13 +134,15 @@ If nil then only the fallback en-US locale will be 
available."
 
 (defcustom org-cite-csl-styles-dir nil
   "Directory of CSL style files.
-When non-nil, relative style file names are expanded relatively to this
-directory.  This variable is ignored when style file is absolute."
+
+Relative style file names are expanded according to document's
+default directory.  If it fails and the variable is non-nil, Org
+looks for style files in this directory, too."
   :group 'org-cite
   :package-version '(Org . "9.5")
   :type '(choice
   (directory :tag "Styles directory")
-  (const :tag "Use absolute file names" nil))
+  (const :tag "No central directory for style files" nil))
   ;; It's not obvious to me that arbitrary locations are safe.
 ;;;  :safe #'string-or-null-p
   )
@@ -370,15 +372,21 @@ corresponding to one of the output formats supported by 
Citeproc: `html',
 
 INFO is the export state, as a property list.
 
-When file name is relative, expand it according to `org-cite-csl-styles-dir',
-or raise an error if the variable is unset."
+When file name is relative, look for it in buffer's default
+directory, failing that in `org-cite-csl-styles-dir' if non-nil.
+Raise an error if no style file can be found."
   (pcase (org-cite-bibliography-style info)
 ('nil org-cite-csl--fallback-style-file)
 ((and (pred file-name-absolute-p) file) file)
-((and (guard org-cite-csl-styles-dir) file)
+((and (pred file-exists-p) file) (expand-file-name file))
+((and (guard org-cite-csl-styles-dir)
+  (pred (lambda (f)
+  (file-exists-p
+   (expand-file-name f org-cite-csl-styles-dir
+  file)
  (expand-file-name file org-cite-csl-styles-dir))
 (other
- (user-error "Cannot handle relative style file name: %S" other
+ (user-error "CSL style file not found: %S" other
 
 (defun org-cite-csl--locale-getter ()
   "Return a locale getter.



[elpa] externals/embark updated (91e6db4 -> f9e6749)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark.

  from  91e6db4   Add embark-act-all command to act on all candidates
   new  570a025   Change elp-instrument-function binding to m for measure
   new  731723a   embark-act etc: Bail out early with user error
   new  a5d199f   embark-indicators: Display Act* when acting on all 
candidates
   new  56fdd1d   embark-keymap-prompter: Handle quit commands
   new  ea10bea   Extract embark--orig-target
   new  8fec816   Move post-action-wo-restart out of lambda
   new  f9e6749   Merge pull request #419 from minad/improvements


Summary of changes:
 embark.el | 359 +-
 1 file changed, 190 insertions(+), 169 deletions(-)



[elpa] externals/embark 56fdd1d 4/7: embark-keymap-prompter: Handle quit commands

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit 56fdd1d8d58f7b559a549546976c6442820facdb
Author: Daniel Mendler 
Commit: Daniel Mendler 

embark-keymap-prompter: Handle quit commands

Otherwise embark-act-all will ask "Run keyboard-quit on 352 ...?".
---
 embark.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/embark.el b/embark.el
index 3e21060..50b84d9 100644
--- a/embark.el
+++ b/embark.el
@@ -1093,6 +1093,8 @@ UPDATE is the indicator update function."
(embark-keymap-prompter keymap update))
   ('execute-extended-command
(intern-soft (read-extended-command)))
+  ((or 'keyboard-quit 'keyboard-escape-quit)
+   nil)
   (_ cmd
 
 (defun embark--command-name (cmd)



[elpa] externals/embark ea10bea 5/7: Extract embark--orig-target

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit ea10beabea119e022de41c3374366b0065a97aa5
Author: Daniel Mendler 
Commit: Daniel Mendler 

Extract embark--orig-target
---
 embark.el | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/embark.el b/embark.el
index 50b84d9..ac8f9a7 100644
--- a/embark.el
+++ b/embark.el
@@ -1851,6 +1851,14 @@ keymap for the given type."
   (setq k (mod k (length list)))
   (append (seq-drop list k) (seq-take list k)))
 
+(defun embark--orig-target (target)
+  "Convert TARGET to original target."
+  (plist-put
+   (plist-put
+(copy-sequence target)
+:target (plist-get target :orig-target))
+   :type (plist-get target :orig-type)))
+
 ;;;###autoload
 (defun embark-act (&optional arg)
   "Prompt the user for an action and perform it.
@@ -1916,11 +1924,7 @@ target."
action
(if (and (eq action default-action)
 (eq action embark--command))
-   (plist-put
-(plist-put
- (copy-sequence target)
- :target (plist-get target :orig-target))
-:type (plist-get target :orig-type))
+   (embark--orig-target target)
  target)
(if embark-quit-after-action (not arg) arg))
 (user-error
@@ -2020,9 +2024,7 @@ ARG is the prefix argument."
 (embark--act action candidate)
   (when (and (eq action (embark--default-action type))
  (eq action embark--command))
-(dolist (cand candidates)
-  (plist-put cand :target (plist-get cand :orig-target))
-  (plist-put cand :type   (plist-get cand :orig-type
+(setq candidates (mapcar #'embark--orig-target candidates)))
   (when (y-or-n-p (format "Run %s on %d %ss? "
   action (length candidates) type))
 (if (if embark-quit-after-action (not arg) arg)
@@ -2107,11 +2109,7 @@ See `embark-act' for the meaning of the prefix ARG."
   (plist-get target :type
 (embark--act default-action
  (if (eq default-action embark--command)
- (plist-put
-  (plist-put
-   (copy-sequence target)
-   :target (plist-get target :orig-target))
-  :type (plist-get target :orig-type))
+ (embark--orig-target target)
target)
  (if embark-quit-after-action (not arg) arg)))
 (user-error "No target found")))



[elpa] externals/embark-consult updated (91e6db4 -> f9e6749)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark-consult.

  from  91e6db4   Add embark-act-all command to act on all candidates
  adds  570a025   Change elp-instrument-function binding to m for measure
  adds  731723a   embark-act etc: Bail out early with user error
  adds  a5d199f   embark-indicators: Display Act* when acting on all 
candidates
  adds  56fdd1d   embark-keymap-prompter: Handle quit commands
  adds  ea10bea   Extract embark--orig-target
  adds  8fec816   Move post-action-wo-restart out of lambda
  adds  f9e6749   Merge pull request #419 from minad/improvements

No new revisions were added by this update.

Summary of changes:
 embark.el | 359 +-
 1 file changed, 190 insertions(+), 169 deletions(-)



[elpa] externals-release/org updated (4aca51f -> a957a4c)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals-release/org.

  from  4aca51f   org-priority: Fix SPC handling for numeric priorities 
(bug#52341)
   new  8d18972   ox: Fix async export with native compilation
   new  f0d8041   ox: Clarify `org-export-to-(buffer|file)' docstrings
   new  a957a4c   keys: Don't bind illegal C-TAB


Summary of changes:
 lisp/org-keys.el   |  2 +-
 lisp/ox-beamer.el  |  2 +-
 lisp/ox-icalendar.el   |  4 ++--
 lisp/ox-koma-letter.el |  2 +-
 lisp/ox-man.el |  2 +-
 lisp/ox-texinfo.el |  2 +-
 lisp/ox.el | 11 +--
 7 files changed, 16 insertions(+), 9 deletions(-)



[elpa] externals-release/org f0d8041 2/3: ox: Clarify `org-export-to-(buffer|file)' docstrings

2021-12-10 Thread ELPA Syncer
branch: externals-release/org
commit f0d8041f0c648b0db1d5c70b653863600aeb8c2d
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

ox: Clarify `org-export-to-(buffer|file)' docstrings

* lisp/ox.el (org-export-to-buffer):
(org-export-to-file): Fix example and add precision about the need for
quoting lambda sexps.
---
 lisp/ox.el | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index b27ec56..80202b0 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6373,7 +6373,11 @@ use it to set a major mode there, e.g,
 (&optional async subtreep visible-only body-only ext-plist)
 (interactive)
 (org-export-to-buffer \\='latex \"*Org LATEX Export*\"
-  async subtreep visible-only body-only ext-plist (lambda () 
(LaTeX-mode
+  async subtreep visible-only body-only ext-plist
+  #'LaTeX-mode))
+
+When expressed as an anonymous function, using `lambda',
+POST-PROCESS needs to be quoted.
 
 This function returns BUFFER."
   (declare (indent 2))
@@ -6436,7 +6440,10 @@ to send the output file through additional processing, 
e.g,
 (let ((outfile (org-export-output-file-name \".tex\" subtreep)))
   (org-export-to-file \\='latex outfile
 async subtreep visible-only body-only ext-plist
-(lambda (file) (org-latex-compile file)))
+#'org-latex-compile)))
+
+When expressed as an anonymous function, using `lambda',
+POST-PROCESS needs to be quoted.
 
 The function returns either a file name returned by POST-PROCESS,
 or FILE."



[elpa] externals-release/org a957a4c 3/3: keys: Don't bind illegal C-TAB

2021-12-10 Thread ELPA Syncer
branch: externals-release/org
commit a957a4c19d42db43e4bf7e2f90b5734064055361
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

keys: Don't bind illegal C-TAB

* lisp/org-keys.el (org-mode-map): Bind `org-force-cycle-archived' to
C-c C- instead of C-c C-TAB.

Reported-by: Ingo Lohmar 

---
 lisp/org-keys.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-keys.el b/lisp/org-keys.el
index a10db7e..a3d9576 100644
--- a/lisp/org-keys.el
+++ b/lisp/org-keys.el
@@ -444,7 +444,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command 
names."
 
  TAB key with modifiers
 (org-defkey org-mode-map (kbd "TAB") #'org-cycle)
-(org-defkey org-mode-map (kbd "C-c C-TAB") #'org-force-cycle-archived)
+(org-defkey org-mode-map (kbd "C-c C-") #'org-force-cycle-archived)
 ;; Override text-mode binding to expose `complete-symbol' for
 ;; pcomplete functionality.
 (org-defkey org-mode-map (kbd "M-TAB") nil)



[elpa] externals/org 96e022b 2/3: Merge branch 'bugfix'

2021-12-10 Thread ELPA Syncer
branch: externals/org
commit 96e022bbe02131f347e6b362528b91dd1b09061f
Merge: c6186be f0d8041
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

Merge branch 'bugfix'
---
 lisp/ox-beamer.el  |  2 +-
 lisp/ox-icalendar.el   |  4 ++--
 lisp/ox-koma-letter.el |  2 +-
 lisp/ox-man.el |  2 +-
 lisp/ox-texinfo.el |  2 +-
 lisp/ox.el | 11 +--
 6 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index c9a67f8..3bfcd01 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -1059,7 +1059,7 @@ Return PDF file's name."
   (let ((file (org-export-output-file-name ".tex" subtreep)))
 (org-export-to-file 'beamer file
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-latex-compile file)
+  #'org-latex-compile)))
 
 ;;;###autoload
 (defun org-beamer-select-environment ()
diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 0a682c7..68c5679 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -888,8 +888,8 @@ Return ICS file name."
 (org-export-to-file 'icalendar outfile
   async subtreep visible-only body-only
   '(:ascii-charset utf-8 :ascii-links-to-notes nil)
-  (lambda (file)
-   (run-hook-with-args 'org-icalendar-after-save-hook file) nil
+  '(lambda (file)
+(run-hook-with-args 'org-icalendar-after-save-hook file) nil
 
 ;;;###autoload
 (defun org-icalendar-export-agenda-files (&optional async)
diff --git a/lisp/ox-koma-letter.el b/lisp/ox-koma-letter.el
index 6a895a6..978e4e4 100644
--- a/lisp/ox-koma-letter.el
+++ b/lisp/ox-koma-letter.el
@@ -982,7 +982,7 @@ Return PDF file's name."
 (org-koma-letter-special-contents))
 (org-export-to-file 'koma-letter file
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-latex-compile file)
+  #'org-latex-compile)))
 
 
 (provide 'ox-koma-letter)
diff --git a/lisp/ox-man.el b/lisp/ox-man.el
index 6d3476c..9a1f00f 100644
--- a/lisp/ox-man.el
+++ b/lisp/ox-man.el
@@ -1117,7 +1117,7 @@ Return PDF file's name."
   (let ((outfile (org-export-output-file-name ".man" subtreep)))
 (org-export-to-file 'man outfile
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-latex-compile file)
+  #'org-latex-compile)))
 
 (defun org-man-compile (file)
   "Compile a Groff file.
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index b012589..734c8a4 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -1701,7 +1701,7 @@ Return INFO file's name."
(org-export-coding-system org-texinfo-coding-system))
 (org-export-to-file 'texinfo outfile
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-texinfo-compile file)
+  #'org-texinfo-compile)))
 
 ;;;###autoload
 (defun org-texinfo-publish-to-texinfo (plist filename pub-dir)
diff --git a/lisp/ox.el b/lisp/ox.el
index eb3a25e..d5440aa 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6377,7 +6377,11 @@ use it to set a major mode there, e.g,
 (&optional async subtreep visible-only body-only ext-plist)
 (interactive)
 (org-export-to-buffer \\='latex \"*Org LATEX Export*\"
-  async subtreep visible-only body-only ext-plist (lambda () 
(LaTeX-mode
+  async subtreep visible-only body-only ext-plist
+  #'LaTeX-mode))
+
+When expressed as an anonymous function, using `lambda',
+POST-PROCESS needs to be quoted.
 
 This function returns BUFFER."
   (declare (indent 2))
@@ -6440,7 +6444,10 @@ to send the output file through additional processing, 
e.g,
 (let ((outfile (org-export-output-file-name \".tex\" subtreep)))
   (org-export-to-file \\='latex outfile
 async subtreep visible-only body-only ext-plist
-(lambda (file) (org-latex-compile file)))
+#'org-latex-compile)))
+
+When expressed as an anonymous function, using `lambda',
+POST-PROCESS needs to be quoted.
 
 The function returns either a file name returned by POST-PROCESS,
 or FILE."



[elpa] externals/org 04f9fa3 3/3: Merge branch 'bugfix'

2021-12-10 Thread ELPA Syncer
branch: externals/org
commit 04f9fa314c60361d886624fa9d49589528e06a38
Merge: 96e022b a957a4c
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

Merge branch 'bugfix'
---
 lisp/org-keys.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-keys.el b/lisp/org-keys.el
index 1034565..0b8c5ff 100644
--- a/lisp/org-keys.el
+++ b/lisp/org-keys.el
@@ -444,7 +444,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command 
names."
 
  TAB key with modifiers
 (org-defkey org-mode-map (kbd "TAB") #'org-cycle)
-(org-defkey org-mode-map (kbd "C-c C-TAB") #'org-force-cycle-archived)
+(org-defkey org-mode-map (kbd "C-c C-") #'org-force-cycle-archived)
 ;; Override text-mode binding to expose `complete-symbol' for
 ;; pcomplete functionality.
 (org-defkey org-mode-map (kbd "M-TAB") nil)



[elpa] externals/embark a5d199f 3/7: embark-indicators: Display Act* when acting on all candidates

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit a5d199fb29b88b01b5dcf3a9d7b76dbaa38ed72a
Author: Daniel Mendler 
Commit: Daniel Mendler 

embark-indicators: Display Act* when acting on all candidates
---
 embark.el | 66 +--
 1 file changed, 43 insertions(+), 23 deletions(-)

diff --git a/embark.el b/embark.el
index 6d1b31f..3e21060 100644
--- a/embark.el
+++ b/embark.el
@@ -945,9 +945,14 @@ If CYCLE is non-nil bind `embark-cycle'."
   (concat (substring target 0 pos) "…")
 target))
 
-(defun embark--act-label (rep)
-  "Return highlighted Act/Rep string depending on REP."
-  (propertize (if rep "Rep" "Act") 'face 'highlight))
+(defun embark--act-label (rep multi)
+  "Return highlighted Act/Rep indicator label given REP and MULTI."
+  (propertize
+   (cond
+(multi "Act*")
+(rep "Rep")
+(t "Act"))
+   'face 'highlight))
 
 (defun embark-minimal-indicator ()
   "Minimal indicator, appearing in the minibuffer prompt or echo area.
@@ -960,12 +965,14 @@ the minibuffer is open, the message is added to the 
prompt."
   (if (null keymap)
   (when indicator-overlay
 (delete-overlay indicator-overlay))
-(let* ((act (embark--act-label
- (eq (lookup-key keymap [13]) #'embark-done)))
-   (target (car targets))
+(let* ((target (car targets))
+   (act (embark--act-label
+ (eq (lookup-key keymap [13]) #'embark-done)
+ (plist-get target :multi)))
(shadowed-targets (cdr targets))
(indicator
 (cond
+ ;; TODO code duplication with 
embark--verbose-indicator-section-target
  ((eq (plist-get target :type) 'embark-become)
   (propertize "Become" 'face 'highlight))
  ((and (minibufferp)
@@ -976,6 +983,11 @@ the minibuffer is open, the message is added to the 
prompt."
   ;; we are in a minibuffer but not from the
   ;; completing-read prompter, use just "Act"
   act)
+ ((plist-get target :multi)
+  (format "%s on %s %ss"
+  act
+  (plist-get target :multi)
+  (plist-get target :type)))
  (t (format
  "%s on %s%s '%s'"
  act
@@ -1329,18 +1341,28 @@ of all full key sequences bound in the keymap."
 embark-verbose-indicator-excluded-actions))
 
 (cl-defun embark--verbose-indicator-section-target
-(&key target bindings &allow-other-keys)
-  "Format the TARGET section for the indicator buffer.
-BINDINGS is the formatted list of keybinding.s"
-  (let* ((kind (car target))
- (result (if (eq kind 'embark-become)
- (concat (propertize "Become" 'face 'highlight))
-   (format "%s on%s '%s'"
+(&key targets bindings &allow-other-keys)
+  "Format the TARGETS section for the indicator buffer.
+BINDINGS is the formatted list of keybindings."
+  (let* ((target (plist-get (car targets) :target))
+ (kind (plist-get (car targets) :type))
+ (result (cond
+  ;; TODO code duplication with embark-minimal-indicator
+  ((eq kind 'embark-become)
+   (concat (propertize "Become" 'face 'highlight)))
+  ((plist-get (car targets) :multi)
+   (format "%s on %s %ss"
+   (embark--act-label nil t)
+   (plist-get (car targets) :multi)
+   kind))
+  (t
+   (format "%s on %s '%s'"
(embark--act-label
 (seq-find (lambda (b) (eq (caddr b) #'embark-done))
-  bindings))
-   (if kind (format " %s" kind) "")
-   (embark--truncate-target (cdr target))
+  bindings)
+nil)
+   kind
+   (embark--truncate-target target))
 (add-face-text-property 0 (length result)
 'embark-verbose-indicator-title
 'append
@@ -1391,8 +1413,6 @@ The arguments are the new KEYMAP and TARGETS."
(bindings
 (embark--formatted-bindings keymap 
embark-verbose-indicator-nested))
(bindings (car bindings))
-   (target (cons (plist-get (car targets) :type)
- (plist-get (car targets) :target)))
(shadowed-targets (mapcar
   (lambda (x) (symbol-name (plist-get x :type)))
   (cdr targets)))
@@ -1415,7 +1435,7 @@ The arguments are the new KEYMAP and TARGETS."
((fboundp section) section)
   

[elpa] externals/embark f9e6749 7/7: Merge pull request #419 from minad/improvements

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit f9e6749aade62b21bf077df0be17a5c79624dda2
Merge: 91e6db4 8fec816
Author: Omar Antolín Camarena 
Commit: GitHub 

Merge pull request #419 from minad/improvements

Some improvements to embark-act-all
---
 embark.el | 359 +-
 1 file changed, 190 insertions(+), 169 deletions(-)

diff --git a/embark.el b/embark.el
index 0ca3a2f..05f8ae3 100644
--- a/embark.el
+++ b/embark.el
@@ -945,9 +945,14 @@ If CYCLE is non-nil bind `embark-cycle'."
   (concat (substring target 0 pos) "…")
 target))
 
-(defun embark--act-label (rep)
-  "Return highlighted Act/Rep string depending on REP."
-  (propertize (if rep "Rep" "Act") 'face 'highlight))
+(defun embark--act-label (rep multi)
+  "Return highlighted Act/Rep indicator label given REP and MULTI."
+  (propertize
+   (cond
+(multi "Act*")
+(rep "Rep")
+(t "Act"))
+   'face 'highlight))
 
 (defun embark-minimal-indicator ()
   "Minimal indicator, appearing in the minibuffer prompt or echo area.
@@ -960,12 +965,14 @@ the minibuffer is open, the message is added to the 
prompt."
   (if (null keymap)
   (when indicator-overlay
 (delete-overlay indicator-overlay))
-(let* ((act (embark--act-label
- (eq (lookup-key keymap [13]) #'embark-done)))
-   (target (car targets))
+(let* ((target (car targets))
+   (act (embark--act-label
+ (eq (lookup-key keymap [13]) #'embark-done)
+ (plist-get target :multi)))
(shadowed-targets (cdr targets))
(indicator
 (cond
+ ;; TODO code duplication with 
embark--verbose-indicator-section-target
  ((eq (plist-get target :type) 'embark-become)
   (propertize "Become" 'face 'highlight))
  ((and (minibufferp)
@@ -976,6 +983,11 @@ the minibuffer is open, the message is added to the 
prompt."
   ;; we are in a minibuffer but not from the
   ;; completing-read prompter, use just "Act"
   act)
+ ((plist-get target :multi)
+  (format "%s on %s %ss"
+  act
+  (plist-get target :multi)
+  (plist-get target :type)))
  (t (format
  "%s on %s%s '%s'"
  act
@@ -1081,6 +1093,8 @@ UPDATE is the indicator update function."
(embark-keymap-prompter keymap update))
   ('execute-extended-command
(intern-soft (read-extended-command)))
+  ((or 'keyboard-quit 'keyboard-escape-quit)
+   nil)
   (_ cmd
 
 (defun embark--command-name (cmd)
@@ -1329,18 +1343,28 @@ of all full key sequences bound in the keymap."
 embark-verbose-indicator-excluded-actions))
 
 (cl-defun embark--verbose-indicator-section-target
-(&key target bindings &allow-other-keys)
-  "Format the TARGET section for the indicator buffer.
-BINDINGS is the formatted list of keybinding.s"
-  (let* ((kind (car target))
- (result (if (eq kind 'embark-become)
- (concat (propertize "Become" 'face 'highlight))
-   (format "%s on%s '%s'"
+(&key targets bindings &allow-other-keys)
+  "Format the TARGETS section for the indicator buffer.
+BINDINGS is the formatted list of keybindings."
+  (let* ((target (plist-get (car targets) :target))
+ (kind (plist-get (car targets) :type))
+ (result (cond
+  ;; TODO code duplication with embark-minimal-indicator
+  ((eq kind 'embark-become)
+   (concat (propertize "Become" 'face 'highlight)))
+  ((plist-get (car targets) :multi)
+   (format "%s on %s %ss"
+   (embark--act-label nil t)
+   (plist-get (car targets) :multi)
+   kind))
+  (t
+   (format "%s on %s '%s'"
(embark--act-label
 (seq-find (lambda (b) (eq (caddr b) #'embark-done))
-  bindings))
-   (if kind (format " %s" kind) "")
-   (embark--truncate-target (cdr target))
+  bindings)
+nil)
+   kind
+   (embark--truncate-target target))
 (add-face-text-property 0 (length result)
 'embark-verbose-indicator-title
 'append
@@ -1391,8 +1415,6 @@ The arguments are the new KEYMAP and TARGETS."
(bindings
 (embark--formatted-bindings keymap 
embark-verbose-indicator-nested))
(bindings (car bindings))
-   (target (cons (plist-get 

[elpa] externals-release/org 8d18972 1/3: ox: Fix async export with native compilation

2021-12-10 Thread ELPA Syncer
branch: externals-release/org
commit 8d189720b2bcf29a9d798ec2a9b6de2a3839ebde
Author: Sébastien Miquel 
Commit: Nicolas Goaziou 

ox: Fix async export with native compilation

* lisp/ox-beamer.el (org-beamer-export-to-pdf):
* lisp/ox-icalendar.el (org-icalendar-export-to-ics):
* lisp/ox-koma-letter.el (org-koma-letter-export-to-pdf):
* lisp/ox-man.el (org-man-export-to-pdf):
* lisp/ox-texinfo.el (org-texinfo-export-to-info): Quote lambda.

Quote or name lambdas to prevent their compilation into anonymous
functions which cannot be passed to the external async emacs process.
---
 lisp/ox-beamer.el  | 2 +-
 lisp/ox-icalendar.el   | 4 ++--
 lisp/ox-koma-letter.el | 2 +-
 lisp/ox-man.el | 2 +-
 lisp/ox-texinfo.el | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el
index ca0f1c7..77de0aa 100644
--- a/lisp/ox-beamer.el
+++ b/lisp/ox-beamer.el
@@ -1059,7 +1059,7 @@ Return PDF file's name."
   (let ((file (org-export-output-file-name ".tex" subtreep)))
 (org-export-to-file 'beamer file
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-latex-compile file)
+  #'org-latex-compile)))
 
 ;;;###autoload
 (defun org-beamer-select-environment ()
diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el
index 081a283..16c3dc9 100644
--- a/lisp/ox-icalendar.el
+++ b/lisp/ox-icalendar.el
@@ -888,8 +888,8 @@ Return ICS file name."
 (org-export-to-file 'icalendar outfile
   async subtreep visible-only body-only
   '(:ascii-charset utf-8 :ascii-links-to-notes nil)
-  (lambda (file)
-   (run-hook-with-args 'org-icalendar-after-save-hook file) nil
+  '(lambda (file)
+(run-hook-with-args 'org-icalendar-after-save-hook file) nil
 
 ;;;###autoload
 (defun org-icalendar-export-agenda-files (&optional async)
diff --git a/lisp/ox-koma-letter.el b/lisp/ox-koma-letter.el
index 6a895a6..978e4e4 100644
--- a/lisp/ox-koma-letter.el
+++ b/lisp/ox-koma-letter.el
@@ -982,7 +982,7 @@ Return PDF file's name."
 (org-koma-letter-special-contents))
 (org-export-to-file 'koma-letter file
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-latex-compile file)
+  #'org-latex-compile)))
 
 
 (provide 'ox-koma-letter)
diff --git a/lisp/ox-man.el b/lisp/ox-man.el
index 6d3476c..9a1f00f 100644
--- a/lisp/ox-man.el
+++ b/lisp/ox-man.el
@@ -1117,7 +1117,7 @@ Return PDF file's name."
   (let ((outfile (org-export-output-file-name ".man" subtreep)))
 (org-export-to-file 'man outfile
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-latex-compile file)
+  #'org-latex-compile)))
 
 (defun org-man-compile (file)
   "Compile a Groff file.
diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index 8b949b3..46077ec 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -1701,7 +1701,7 @@ Return INFO file's name."
(org-export-coding-system org-texinfo-coding-system))
 (org-export-to-file 'texinfo outfile
   async subtreep visible-only body-only ext-plist
-  (lambda (file) (org-texinfo-compile file)
+  #'org-texinfo-compile)))
 
 ;;;###autoload
 (defun org-texinfo-publish-to-texinfo (plist filename pub-dir)



[elpa] externals/embark fed1459 2/2: Merge pull request #420 from minad/∀

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit fed14590737b6e2d82a89321d2bf5642c2479a22
Merge: f9e6749 c98fd83
Author: Omar Antolín Camarena 
Commit: GitHub 

Merge pull request #420 from minad/∀

∀
---
 embark.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index 05f8ae3..66f6d2c 100644
--- a/embark.el
+++ b/embark.el
@@ -949,7 +949,7 @@ If CYCLE is non-nil bind `embark-cycle'."
   "Return highlighted Act/Rep indicator label given REP and MULTI."
   (propertize
(cond
-(multi "Act*")
+(multi "∀ct")
 (rep "Rep")
 (t "Act"))
'face 'highlight))



[elpa] externals/embark c98fd83 1/2: ∀

2021-12-10 Thread ELPA Syncer
branch: externals/embark
commit c98fd83a0ebad0067c690ecba10a8dd8e929d784
Author: Daniel Mendler 
Commit: Daniel Mendler 

∀
---
 embark.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index 05f8ae3..66f6d2c 100644
--- a/embark.el
+++ b/embark.el
@@ -949,7 +949,7 @@ If CYCLE is non-nil bind `embark-cycle'."
   "Return highlighted Act/Rep indicator label given REP and MULTI."
   (propertize
(cond
-(multi "Act*")
+(multi "∀ct")
 (rep "Rep")
 (t "Act"))
'face 'highlight))



[elpa] externals/embark-consult updated (f9e6749 -> fed1459)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/embark-consult.

  from  f9e6749   Merge pull request #419 from minad/improvements
  adds  c98fd83   ∀
  adds  fed1459   Merge pull request #420 from minad/∀

No new revisions were added by this update.

Summary of changes:
 embark.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[elpa] externals/pyim bf92514: 拼音输入法可以搜索当前 buffer 来获取词条。

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit bf925142a53a36179ec42e7d93e389da0487dc8c
Author: Feng Shu 
Commit: Feng Shu 

拼音输入法可以搜索当前 buffer 来获取词条。

* tests/pyim-tests.el (pyim-tests-pyim-cregexp): test cinese-only 
argument.

* pyim-cregexp.el (pyim-cregexp-build, pyim-cregexp-build-1): Add 
chinese-only argument.

* pyim-common.el (pyim-time-limit-while): New macro.

* pyim-candidates.el (pyim-candidates-create:quanpin): support async.
(pyim-candidates-search-buffer): New function.
---
 pyim-candidates.el  | 28 +++-
 pyim-common.el  | 13 +
 pyim-cregexp.el | 20 
 tests/pyim-tests.el |  6 ++
 4 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/pyim-candidates.el b/pyim-candidates.el
index c9d1232..afe61de 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -91,7 +91,17 @@ IMOBJS 获得候选词条。"
 
 (defun pyim-candidates-create:quanpin (imobjs scheme-name &optional async)
   "`pyim-candidates-create' 处理全拼输入法的函数."
-  (unless async
+  (if async
+  ;; 使用当前的 entered 构建一个搜索中文的正则表达式, 然后使用这个正则表达式
+  ;; 在当前 buffer 中搜索词条。
+  (let ((str (pyim-entered-get)))
+(if (< (length str) 1)
+pyim-candidates
+  ;; NOTE: 让第一个词保持不变是不是合理,有待进一步的观察。
+  `(,(car pyim-candidates)
+,@(pyim-candidates-search-buffer
+   (pyim-cregexp-build str 3 t))
+,@(cdr pyim-candidates
 ;; 这段代码主要实现以下功能:假如用户输入 nihaomazheshi, 但词库里面找不到对
 ;; 应的词条,那么输入法自动用 nihaoma 和 zheshi 的第一个词条:"你好吗" 和 "
 ;; 这是" 连接成一个新的字符串 "你好吗这是" 做为第一个候选词。
@@ -110,6 +120,22 @@ IMOBJS 获得候选词条。"
   (append (pyim-subconcat (nreverse output) "")
   candidates
 
+(defun pyim-candidates-search-buffer (regexp)
+  "在当前 buffer 中使用 REGEXP 搜索词条。"
+  (save-excursion
+(let ((start (current-time))
+  words)
+  (goto-char (point-min))
+  ;; Search after pos.
+  (pyim-time-limit-while (and (not (input-pending-p))
+  (re-search-forward regexp nil t))
+  start 0.1 25
+  (let ((match (match-string-no-properties 0)))
+;; NOTE: 单个汉字我觉得不值得收集。
+(when (>= (length match) 2)
+  (cl-pushnew match words :test #'equal
+  words)))
+
 (defun pyim-candidates-create-quanpin (imobjs scheme-name &optional 
fast-search)
   "`pyim-candidates-create:quanpin' 内部使用的函数。"
   (let (jianpin-words znabc-words personal-words common-words pinyin-chars-1 
pinyin-chars-2)
diff --git a/pyim-common.el b/pyim-common.el
index 5158da3..0173c12 100644
--- a/pyim-common.el
+++ b/pyim-common.el
@@ -178,6 +178,19 @@ When CARE-FIRST-ONE is no-nil, ((a b c) (d e)) => (a d)."
   (append key nil))
   unread-command-events
 
+;; Fork from `company-dabbrev--time-limit-while' in company-mode."
+(defmacro pyim-time-limit-while (test start limit freq &rest body)
+  (declare (indent 3) (debug t))
+  `(let ((pyim-time-limit-while-counter 0))
+ (catch 'done
+   (while ,test
+ ,@body
+ (and ,limit
+  (= (cl-incf pyim-time-limit-while-counter) ,freq)
+  (setq pyim-time-limit-while-counter 0)
+  (> (float-time (time-since ,start)) ,limit)
+  (throw 'done 'pyim-time-out))
+
 ;; * Footer
 (provide 'pyim-common)
 
diff --git a/pyim-cregexp.el b/pyim-cregexp.el
index 56a5a1b..2a999a1 100644
--- a/pyim-cregexp.el
+++ b/pyim-cregexp.el
@@ -49,7 +49,7 @@
   (max (min num 4) 1)
 4))
 
-(defun pyim-cregexp-build (string &optional char-level-num)
+(defun pyim-cregexp-build (string &optional char-level-num chinese-only)
   "根据 STRING 构建一个中文 regexp, 用于 \"拼音搜索汉字\".
 
 比如:\"nihao\" -> \"[你呢...][好号...] \\| nihao\"
@@ -60,6 +60,8 @@ CHAR-LEVEL-NUM 代表汉字常用级别,pyim 中根据汉字的使用频率,
 如果这个参数设置为3, 那么代表在构建 regexp 是,只使用常用级别小于
 等于3的汉字。
 
+如果 CHINESE-ONLY 为真,那么生成的 regexp 只能搜索汉字。
+
 注意事项:如果生成的 regexp 太长,Emacs 无法处理,那么,这个命令
 会抛弃一些不常用的汉字,重新生成,知道生成一个 Emacs 可以处理的
 regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子的时候,
@@ -77,7 +79,7 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
  (pyim-cregexp-build-from-rx
   (lambda (x)
 (if (stringp x)
-(xr (pyim-cregexp-build-1 x num))
+(xr (pyim-cregexp-build-1 x num chinese-only))
   x))
   (xr string
   string))
@@ -104,7 +106,7 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
  rx-form))
 (_ (funcall fn rx-form
 
-(defun pyim-cregexp-build-1 (str &optional char-level-num)
+(defun pyim-cregexp-build-1 (str &optional char-level-num chinese-only)
   (let* ((num (pyim-cregexp-char-level-num char-level-num))
  (scheme-name (pyim-scheme-name))
  (class (pyim-scheme-get-option scheme-name :class))
@@ -139,11 +141,13 @@ regexp, 所以搜索单字的时候一般可以搜到生僻字,但搜索句子
   (delq nil regexp-list)

[elpa] externals/consult a8dea90: Detect project root when formatting consult-ripgrep prompt (Fix #478)

2021-12-10 Thread ELPA Syncer
branch: externals/consult
commit a8dea906824e1e171fb01c3cdb2d7ffa1f24bb5f
Author: Daniel Mendler 
Commit: Daniel Mendler 

Detect project root when formatting consult-ripgrep prompt (Fix #478)

This allows you to write a command which has the ability to switch to a 
project.

;; new
(defun consult-ripgrep-project ()
  (interactive)
  (consult-ripgrep (project-root (project-current t

Before this commit such a command was also possible, but a bit less 
intuitive.

;; old
(defun consult-ripgrep-project ()
  (interactive)
  (let ((default-directory (project-root (project-current t
(consult-ripgrep)))
---
 consult.el | 44 +---
 1 file changed, 21 insertions(+), 23 deletions(-)

diff --git a/consult.el b/consult.el
index 3d96262..5c534c2 100644
--- a/consult.el
+++ b/consult.el
@@ -801,16 +801,6 @@ The line beginning/ending BEG/END is bound in BODY."
   (format "…/%s/%s/" (match-string 1 adir) (match-string 2 adir))
 adir
 
-(defun consult--directory-prompt-1 (prompt dir)
-  "Format PROMPT, expand directory DIR and return them as a pair."
-  (let ((edir (file-name-as-directory (expand-file-name dir)))
-(ddir (file-name-as-directory (expand-file-name default-directory
-(cons
- (if (string= ddir edir)
- (concat prompt ": ")
-   (format "%s (%s): " prompt (consult--abbreviate-directory dir)))
- edir)))
-
 (defun consult--directory-prompt (prompt dir)
   "Return prompt and directory.
 
@@ -824,19 +814,27 @@ If DIR is a string, it is returned.
 If DIR is a true value, the user is asked.
 Then the `consult-project-root-function' is tried.
 Otherwise the `default-directory' is returned."
-  (cond
-   ((stringp dir) (consult--directory-prompt-1 prompt dir))
-   (dir (consult--directory-prompt-1
- prompt
- ;; HACK Preserve this-command across `read-directory-name' call,
- ;; such that `consult-customize' continues to work.
- ;; TODO Find a better and more general solution which preserves 
`this-command'.
- (let ((this-command this-command))
-   (read-directory-name "Directory: " nil nil t
-   ((when-let (root (consult--project-root))
-  (cons (format "%s (Project %s): " prompt (consult--project-name root))
-root)))
-   (t (consult--directory-prompt-1 prompt default-directory
+  (let* ((dir
+  (cond
+   ((stringp dir) dir)
+   (dir
+;; HACK Preserve this-command across `read-directory-name' call,
+;; such that `consult-customize' continues to work.
+;; TODO Find a better and more general solution which preserves 
`this-command'.
+(let ((this-command this-command))
+  (read-directory-name "Directory: " nil nil t)))
+   (t (or (consult--project-root) default-directory
+ (edir (file-name-as-directory (expand-file-name dir)))
+ ;; Bind default-directory in order to find the project
+ (pdir (let ((default-directory edir)) (consult--project-root
+(cons
+ (cond
+  ((equal edir pdir)
+   (format "%s (Project %s): " prompt (consult--project-name pdir)))
+  ((equal edir (file-name-as-directory (expand-file-name 
default-directory)))
+   (concat prompt ": "))
+  (t (format "%s (%s): " prompt (consult--abbreviate-directory dir
+ edir)))
 
 (defun consult--project-root ()
   "Return project root as absolute path."



[elpa] externals/crdt 81b55a2 2/2: Merge branch 'jimmyhmiller-master-patch-76360' into 'master'

2021-12-10 Thread ELPA Syncer
branch: externals/crdt
commit 81b55a27b815b8afec7a93d22c65029aa06ae870
Merge: c427979 5719de1
Author: Qiantan Hong 
Commit: Qiantan Hong 

Merge branch 'jimmyhmiller-master-patch-76360' into 'master'

Check if the process-mark is non-nil and if mark-pos is non-nil to prevent 
errors

See merge request qhong/crdt.el!1
---
 crdt.el | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/crdt.el b/crdt.el
index abac05c..001f517 100644
--- a/crdt.el
+++ b/crdt.el
@@ -2596,14 +2596,17 @@ The result DIFF can be used in (CRDT--NAPPLY-DIFF OLD 
DIFF) to reproduce NEW."
 (cl-defun crdt--send-process-mark-maybe (&optional (lazy t))
   (let ((buffer-process (get-buffer-process (current-buffer
 (when buffer-process
-  (let* ((mark-pos (marker-position (process-mark buffer-process)))
- (current-id (crdt--get-id mark-pos)))
-(unless (and lazy (string-equal crdt--last-process-mark-id current-id))
-  (setq crdt--last-process-mark-id current-id)
-  (crdt--broadcast-maybe
-   (crdt--format-message
-`(process-mark ,crdt--buffer-network-name
-   ,current-id ,mark-pos
+  (let* ((mark (process-mark buffer-process)))
+(when mark
+  (let* ((mark-pos (marker-position mark)))
+(when mark-pos
+  (let* ((current-id (crdt--get-id mark-pos)))
+(unless (and lazy (string-equal crdt--last-process-mark-id 
current-id))
+  (setq crdt--last-process-mark-id current-id)
+  (crdt--broadcast-maybe
+   (crdt--format-message
+`(process-mark ,crdt--buffer-network-name
+   ,current-id ,mark-pos
 
 (defun crdt--process-status-advice (orig-func process)
   (if (crdt--pseudo-process-p process)



[elpa] externals/crdt 5719de1 1/2: Check if the process-mark is non-nil and if mark-pos is non-nil to prevent errors

2021-12-10 Thread ELPA Syncer
branch: externals/crdt
commit 5719de1c06a81923ecdfb21d2923ce4cc5f4cc9c
Author: Jimmy Miller 
Commit: Jimmy Miller 

Check if the process-mark is non-nil and if mark-pos is non-nil to prevent 
errors
---
 crdt.el | 19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/crdt.el b/crdt.el
index abac05c..001f517 100644
--- a/crdt.el
+++ b/crdt.el
@@ -2596,14 +2596,17 @@ The result DIFF can be used in (CRDT--NAPPLY-DIFF OLD 
DIFF) to reproduce NEW."
 (cl-defun crdt--send-process-mark-maybe (&optional (lazy t))
   (let ((buffer-process (get-buffer-process (current-buffer
 (when buffer-process
-  (let* ((mark-pos (marker-position (process-mark buffer-process)))
- (current-id (crdt--get-id mark-pos)))
-(unless (and lazy (string-equal crdt--last-process-mark-id current-id))
-  (setq crdt--last-process-mark-id current-id)
-  (crdt--broadcast-maybe
-   (crdt--format-message
-`(process-mark ,crdt--buffer-network-name
-   ,current-id ,mark-pos
+  (let* ((mark (process-mark buffer-process)))
+(when mark
+  (let* ((mark-pos (marker-position mark)))
+(when mark-pos
+  (let* ((current-id (crdt--get-id mark-pos)))
+(unless (and lazy (string-equal crdt--last-process-mark-id 
current-id))
+  (setq crdt--last-process-mark-id current-id)
+  (crdt--broadcast-maybe
+   (crdt--format-message
+`(process-mark ,crdt--buffer-network-name
+   ,current-id ,mark-pos
 
 (defun crdt--process-status-advice (orig-func process)
   (if (crdt--pseudo-process-p process)



[elpa] externals/corfu 76339f0: Use run-at-time instead of idle timer

2021-12-10 Thread ELPA Syncer
branch: externals/corfu
commit 76339f0dc31f3ce99dd66198e990b03f448de3de
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use run-at-time instead of idle timer
---
 corfu.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/corfu.el b/corfu.el
index fb2cd27..a36d119 100644
--- a/corfu.el
+++ b/corfu.el
@@ -765,8 +765,8 @@ there hasn't been any input, then quit."
   (doc (funcall fun cand)))
 (if (or (eq corfu-echo-documentation t) corfu--echo-message)
 (corfu--echo-show doc)
-  (setq corfu--echo-timer (run-with-idle-timer corfu-echo-documentation
-   nil #'corfu--echo-show 
doc)))
+  (setq corfu--echo-timer (run-at-time corfu-echo-documentation
+   nil #'corfu--echo-show doc)))
   (when corfu--echo-message
 (corfu--echo-show "")
 



[elpa] externals/emms da021c0: * emms.el: complain if `emms-player-list' is empty

2021-12-10 Thread ELPA Syncer
branch: externals/emms
commit da021c0d300d334069ab4cfe5ca3194564fd628a
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms.el: complain if `emms-player-list' is empty
---
 emms.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/emms.el b/emms.el
index 0e33321..8d8095c 100644
--- a/emms.el
+++ b/emms.el
@@ -1495,6 +1495,8 @@ If the track can be played by more than one player, call
   (if emms-player-playing-p
   (error "A player is already playing")
 (let ((player (emms-players-for track)))
+  (when (not emms-player-list)
+   (error "emms-player-list empty"))
   (if (not player)
   (error "Don't know how to play track: %S" track)
 ;; Change default-directory so we don't accidentally block any



[elpa] externals/pyim 380d526: * tests/pyim-tests.el (pyim-tests-pyim-candidates-search-buffer): New test.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 380d52657034b55ef99bd589eae107387947dd5b
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-candidates-search-buffer): New test.
---
 tests/pyim-tests.el | 29 +
 1 file changed, 29 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index ca552e4..ca85165 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -284,6 +284,35 @@
   'cangjie)
  '("cangjie/"
 
+;; ** pyim-candidates 相关单元测试
+(ert-deftest pyim-tests-pyim-candidates-search-buffer ()
+  (with-temp-buffer
+(insert "
+一日,正当嗟悼之际,俄见一僧一道远远而来,生得骨格不凡,丰神迥别,说说
+笑笑,来至峰下,坐于石边,高谈快论:先是说些云山雾海、神仙玄幻之事,后
+便说到红尘中荣华富贵。此石听了,不觉打动凡心,也想要到人间去享一享这荣
+华富贵,但自恨粗蠢,不得已,便口吐人言,向那僧道说道:“大师,弟子蠢物,
+不能见礼了!适闻二位谈那人世间荣耀繁华,心切慕之。弟子质虽粗蠢,性却稍
+通,况见二师仙形道体,定非凡品,必有补天济世之材,利物济人之德。如蒙发
+一点慈心,携带弟子得入红尘,在那富贵场中,温柔乡里受享几年,自当永佩洪
+恩,万劫不忘也!”二仙师听毕,齐憨笑道:“善哉,善哉!那红尘中有却有些乐
+事,但不能永远依恃;况又有‘美中不足,好事多磨’八个字紧相连属,瞬息间则
+又乐极悲生,人非物换,究竟是到头一梦,万境归空,倒不如不去的好。”这石
+凡心已炽,那里听得进这话去,乃复苦求再四。二仙知不可强制,乃叹道:“此
+亦静极思动,无中生有之数也!既如此,我们便携你去受享受享,只是到不得意
+时,切莫后悔!”石道:“自然,自然。”那僧又道:“若说你性灵,却又如此质蠢,
+并更无奇贵之处。如此也只好踮脚而已。也罢!我如今大施佛法,助你助,待劫
+终之日,复还本质,以了此案。你道好否?”石头听了,感谢不尽。那僧便念咒
+书符,大展幻术,将一块大石登时变成一块鲜明莹洁的美玉,且又缩成扇坠大小
+的可佩可拿。那僧托于掌上,笑道:“形体倒也是个宝物了!还只没有实在的好
+处,须得再镌上数字,使人一见便知是奇物方妙。然后好携你到那昌明隆盛之邦、
+诗礼簪缨之族、花柳繁华地、温柔富贵乡去安身乐业。”石头听了,喜不能禁,
+乃问:“不知赐了弟子那哪几件奇处?又不知携了弟子到何地方?望乞明示,使
+弟子不惑。”那僧笑道:“你且莫问,日后自然明白的。”说着,便袖了这石,同
+那道人飘然而去,竟不知投奔何方何舍。")
+(should (equal (pyim-candidates-search-buffer (pyim-cregexp-build "hs" 3 
t))
+   '("何舍" "幻术" "好事")
+
 ;; ** pyim-cstring 相关单元测试
 (ert-deftest pyim-tests-pyim-cstring-partition ()
   (should (equal (pyim-cstring-partition "你好 hello 你好")



[elpa] externals/javaimp 4af23e9: Improve docs

2021-12-10 Thread Filipp Gunbin
branch: externals/javaimp
commit 4af23e9f0b3f50d6627cd0dab0bf05075987edb8
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Improve docs
---
 javaimp.el | 113 -
 1 file changed, 75 insertions(+), 38 deletions(-)

diff --git a/javaimp.el b/javaimp.el
index 5a934a7..5bfefa2 100644
--- a/javaimp.el
+++ b/javaimp.el
@@ -23,51 +23,91 @@
 ;;; Commentary:
 
 ;; Allows to manage Java import statements in Maven/Gradle projects.
+;; This module does not add all needed imports automatically!  It only
+;; helps you to quickly add imports when stepping through compilation
+;; errors.  In addition, this module provides good Imenu support for
+;; Java source files - with nesting and abstract methods in interfaces
+;; and abstract classes.
+;;
 ;;
 ;;   Quick start:
 ;;
-;; - customize `javaimp-import-group-alist'
-;; - call `javaimp-visit-project', giving it the top-level project
-;; directory where pom.xml / build.gradle[.kts] resides
+;; - Customize `javaimp-import-group-alist'.
+;;
+;; - Call `javaimp-visit-project', giving it the top-level build file
+;; of your project.  If called within a project, supplies useful
+;; default candidates in minibuffer input.
 ;;
-;; Then in a Java buffer visiting a file under that project or one of its
-;; submodules call `javaimp-organize-imports' or `javaimp-add-import'.
+;; - Then in a Java buffer visiting a file under that project or one
+;; of its submodules call `javaimp-organize-imports' or
+;; `javaimp-add-import'.
 ;;
-;; This module does not add all needed imports automatically!  It only helps
-;; you to quickly add imports when stepping through compilation errors.
 ;;
 ;;   Some details:
 ;;
-;; Contents of jar files and Maven/Gradle project structures are
-;; cached, so usually only the first command should take a
-;; considerable amount of time to complete.  If a module's build file
-;; or any of its parents' build files (within visited tree) was
-;; modified after information was loaded, dependencies are fetched
-;; from the build tool again.  If a jar file was changed, its contents
-;; are re-read.
+;; Contents of jar files, list of classes in source files, and
+;; Maven/Gradle project structures are cached, so usually only the
+;; first command should take a considerable amount of time to
+;; complete.  Project structure is re-read if a module's build file or
+;; any of its parents' build files (within visited tree) was modified
+;; since last check.  `javaimp-flush-cache' clears jar / source cache.
+;; To forget visited projects structure, eval `(setq javaimp-project
+;; forest nil)'.
+;;
+;; Project structure and dependency information is retrieved from the
+;; build tool, see `javaimp--maven-visit' and `javaimp--gradle-visit'.
+;; The output from the build tool can be inspected in buffer named by
+;; `javaimp-tool-output-buf-name' variable.
+;;
+;; See docstring of `javaimp-add-import' for how import completion
+;; alternative are collected.
+;;
+;; Important defcustoms are:
+;;
+;; - `javaimp-java-home' - used to obtain classes in the JDK, and also
+;; the build tool is invoked with JAVA_HOME environment variable set
+;; to it.  It's initialized from JAVA_HOME env var, so typically it's
+;; not required to set it explicitly in Lisp.
+;;
+;; - `javaimp-enable-parsing' - determines whether we parse the
+;; current project for the list of classes.  Parsing is implemented in
+;; javaimp-parse.el using `syntax-ppss', generally is simple (we do
+;; not try to parse the source completely - just the interesting
+;; pieces), but can be time-consuming for large projects (to be
+;; improved).  Currently, on the author's machine, source for
+;; java.util.Collections from JDK 11 (~ 5600 lines and > 1000
+;; "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
+;; example below.
 ;;
+;; - `javaimp-imenu-use-sub-alists' - if non-nil then Imenu items are
+;; presented in a nested fashion, instead of a flat list (the
+;; default).
 ;;
-;;   Example:
+;; See other defcustoms via 'M-x customize-group javaimp'.
+;;
+;;
+;; Configuration example:
 ;;
 ;; (require 'javaimp)
 ;; (add-to-list 'javaimp-import-group-alist
 ;;   '("\\`\\(my\\.company\\.\\|my\\.company2\\.\\)" . 80))
-;; (setq javaimp-additional-source-dirs '("generated-sources/thrift"))
-;; (add-hook 'java-mode-hook
-;;   (lambda ()
-;; (local-set-key "\C-ci" #'javaimp-add-import)
-;; (local-set-key "\C-co" #'javaimp-organize-imports)))
-;; (global-set-key (kbd "C-c j v") #'javaimp-visit-project)
+;; (global-set-key (kbd "C-c J v") 'javaimp-visit-project)
 ;;
-
-;;; News:
-
-;; v0.7:
-;; - Added Gradle support.
 ;;
-;; - Removed javaimp-maven-visit-project i

[elpa] externals/pyim updated (380d526 -> 74c93ae)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/pyim.

  from  380d526   * tests/pyim-tests.el 
(pyim-tests-pyim-candidates-search-buffer): New test.
   new  c335aa4   Simplify pyim-time-limit-while.
   new  74c93ae   rename pyim-process-async-ui-refresh to 
pyim-process-run-async.


Summary of changes:
 pyim-candidates.el  | 15 ++-
 pyim-common.el  | 22 +++---
 pyim-process.el | 28 
 tests/pyim-tests.el |  7 +++
 4 files changed, 40 insertions(+), 32 deletions(-)



[elpa] externals/pyim 74c93ae 2/2: rename pyim-process-async-ui-refresh to pyim-process-run-async.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 74c93ae01f312120ad5cd83465ccd3f5e21bd8e7
Author: Feng Shu 
Commit: Feng Shu 

rename pyim-process-async-ui-refresh to pyim-process-run-async.

* pyim-process.el (pyim-process-run-async): rename from 
pyim-process-async-ui-refresh.
(pyim-process-run-1): Use pyim-process-run-async.
---
 pyim-process.el | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/pyim-process.el b/pyim-process.el
index 07edfef..db90b33 100644
--- a/pyim-process.el
+++ b/pyim-process.el
@@ -245,10 +245,14 @@
   (or (delete-dups (pyim-candidates-create pyim-imobjs scheme-name))
   (list entered-to-translate)))
 (pyim-process-run-async-timer-reset)
-;; 延迟1秒异步处理 entered, pyim 内置的输入法目前不使用异步获取
-;; 词条的方式,主要用于 pyim-liberime 支持。
+;; 当用户选择词条时,如果停顿超过1秒,就激活异步流程,不同的输入法异步流程定
+;; 义也可能不同,比如:全拼输入法目前的异步流程是搜索当前 buffer 获取词条。
+;; 而 rime 的异步流程是获取所有的词条。
+;;
+;; 注意事项:异步流程对 page tooltip 有要求, 有些 page tooltip 是无法支持异
+;; 步流程的。
 (setq pyim-process-run-async-timer
-  (run-with-timer 1 nil #'pyim-process-async-ui-refresh))
+  (run-with-timer 1 nil #'pyim-process-run-async))
 ;; 自动上屏功能
 (let ((autoselector-results
(mapcar (lambda (x)
@@ -309,16 +313,16 @@
   "测试 CMD 是否是一个 pyim self insert command."
   (member cmd pyim-process-self-insert-commands))
 
-(defun pyim-process-async-ui-refresh ()
+(defun pyim-process-run-async ()
   "Function used by `pyim-process-run-async-timer'"
-  (let* ((scheme-name (pyim-scheme-name))
- (words (delete-dups (pyim-candidates-create pyim-imobjs scheme-name 
t
-(when words
-  (setq pyim-candidates words)
-  (pyim-preview-refresh)
-  ;; NEED HELP: 目前只有 posframe 和 minibufer 可以正确处理异步刷新 page
-  (when (and (member pyim-page-tooltip '(posframe minibuffer))
- (not (eq (selected-window) (minibuffer-window
+  ;; NEED HELP: 目前只有 posframe 和 minibufer 两种 page 可以用于异步处理。
+  (when (and (member pyim-page-tooltip '(posframe minibuffer))
+ (not (eq (selected-window) (minibuffer-window
+(let* ((scheme-name (pyim-scheme-name))
+   (words (delete-dups (pyim-candidates-create pyim-imobjs scheme-name 
t
+  (when words
+(setq pyim-candidates words)
+(pyim-preview-refresh)
 (pyim-page-refresh)
 
 (defun pyim-process-run-async-timer-reset ()



[elpa] externals/pyim c335aa4 1/2: Simplify pyim-time-limit-while.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit c335aa4b92dcda3fcf8c63d1d68599e8091aac36
Author: Feng Shu 
Commit: Feng Shu 

Simplify pyim-time-limit-while.

* pyim-candidates.el (pyim-candidates-search-buffer): simplify.

* pyim-common.el (pyim-time-limit-while): simplify.

* tests/pyim-tests.el (pyim-tests-pyim-time-limit-while): New test.
---
 pyim-candidates.el  | 15 ++-
 pyim-common.el  | 22 +++---
 tests/pyim-tests.el |  7 +++
 3 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/pyim-candidates.el b/pyim-candidates.el
index afe61de..b30b928 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -123,17 +123,14 @@ IMOBJS 获得候选词条。"
 (defun pyim-candidates-search-buffer (regexp)
   "在当前 buffer 中使用 REGEXP 搜索词条。"
   (save-excursion
-(let ((start (current-time))
-  words)
+(let (words)
   (goto-char (point-min))
-  ;; Search after pos.
   (pyim-time-limit-while (and (not (input-pending-p))
-  (re-search-forward regexp nil t))
-  start 0.1 25
-  (let ((match (match-string-no-properties 0)))
-;; NOTE: 单个汉字我觉得不值得收集。
-(when (>= (length match) 2)
-  (cl-pushnew match words :test #'equal
+  (re-search-forward regexp nil t)) 0.1
+(let ((match (match-string-no-properties 0)))
+  ;; NOTE: 单个汉字我觉得不值得收集。
+  (when (>= (length match) 2)
+(cl-pushnew match words :test #'equal
   words)))
 
 (defun pyim-candidates-create-quanpin (imobjs scheme-name &optional 
fast-search)
diff --git a/pyim-common.el b/pyim-common.el
index 0173c12..80417bf 100644
--- a/pyim-common.el
+++ b/pyim-common.el
@@ -179,17 +179,17 @@ When CARE-FIRST-ONE is no-nil, ((a b c) (d e)) => (a d)."
   unread-command-events
 
 ;; Fork from `company-dabbrev--time-limit-while' in company-mode."
-(defmacro pyim-time-limit-while (test start limit freq &rest body)
-  (declare (indent 3) (debug t))
-  `(let ((pyim-time-limit-while-counter 0))
- (catch 'done
-   (while ,test
- ,@body
- (and ,limit
-  (= (cl-incf pyim-time-limit-while-counter) ,freq)
-  (setq pyim-time-limit-while-counter 0)
-  (> (float-time (time-since ,start)) ,limit)
-  (throw 'done 'pyim-time-out))
+(defmacro pyim-time-limit-while (test limit &rest body)
+  "If TEST non-nil and time consumption < LIMIT, repeat eval BODY."
+  (declare (indent 2) (debug t))
+  (let ((start (make-symbol "start")))
+`(let ((,start (current-time)))
+   (catch 'done
+ (while ,test
+   ,@body
+   (and ,limit
+(> (float-time (time-since ,start)) ,limit)
+(throw 'done 'pyim-time-out)))
 
 ;; * Footer
 (provide 'pyim-common)
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index ca85165..0593138 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -93,6 +93,13 @@
  '("a-b-c-d" "a-b-c" "a-b")))
   (should (equal (pyim-subconcat nil) nil)))
 
+(ert-deftest pyim-tests-pyim-time-limit-while ()
+  (let ((time (current-time))
+(limit 0.1))
+(pyim-time-limit-while t limit
+  t)
+(should (< (float-time (time-since time)) (* limit 1.5)
+
 ;; ** pyim-pymap 相关单元测试
 (ert-deftest pyim-tests-pyim-pymap ()
   (should-not (cl-find-if-not



[elpa] externals/emms 32ff8a7 2/2: * emms-player-mpv.el: graceful handling of no icy-title

2021-12-10 Thread ELPA Syncer
branch: externals/emms
commit 32ff8a70ca9726dd0e3b8ad68430bc6fd66bf387
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms-player-mpv.el: graceful handling of no icy-title
---
 emms-player-mpv.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/emms-player-mpv.el b/emms-player-mpv.el
index b7d9f93..b2bb8c1 100644
--- a/emms-player-mpv.el
+++ b/emms-player-mpv.el
@@ -770,7 +770,9 @@ metadata from mpv."
 (unless track (setq track (emms-playlist-current-selected-track)))
 (set-track-info track
 title (or (key title)
-  (key icy-title))
+  (and (not (string= "" (key icy-title)))
+  (key icy-title))
+ (key icy-name))
 artist (or (key artist)
(key album_artist)
(key icy-name))



[elpa] externals/emms updated (da021c0 -> 32ff8a7)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/emms.

  from  da021c0   * emms.el: complain if `emms-player-list' is empty
   new  fe23e21   * emms-streams.el: remove defunct channel
   new  32ff8a7   * emms-player-mpv.el: graceful handling of no icy-title


Summary of changes:
 emms-player-mpv.el | 4 +++-
 emms-streams.el| 3 ---
 2 files changed, 3 insertions(+), 4 deletions(-)



[elpa] externals/emms fe23e21 1/2: * emms-streams.el: remove defunct channel

2021-12-10 Thread ELPA Syncer
branch: externals/emms
commit fe23e21bb6ac03ed22adc78f808df8722986
Author: Yoni Rabkin 
Commit: Yoni Rabkin 

* emms-streams.el: remove defunct channel
---
 emms-streams.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/emms-streams.el b/emms-streams.el
index 3055f73..bb8a29c 100644
--- a/emms-streams.el
+++ b/emms-streams.el
@@ -74,9 +74,6 @@
 (*track* (type . streamlist)
 (name . "http://www.somafm.com/indiepop.pls";)
 (metadata "SomaFM: Indie Pop Rocks" 
"http://www.somafm.com/indiepop.pls"; 1 streamlist))
-(*track* (type . streamlist)
-(name . "http://www.somafm.com/doomed.pls";)
-(metadata "SomaFM: Doomed" "http://www.somafm.com/doomed.pls"; 1 
streamlist))
 (*track* (type . url) (name . 
"http://listen.radionomy.com:80/-PHILOSOMATIKAPROGRESSIVE-";)
 (metadata "P H I L O S O M A T I K A - Progressive Psytrance" 
"http://listen.radionomy.com:80/-PHILOSOMATIKAPROGRESSIVE-"; 1 url))
 (*track* (type . streamlist)



[elpa] externals/org updated (04f9fa3 -> edddc7d)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  04f9fa3   Merge branch 'bugfix'
   new  67fb7a4   org-agenda-get-deadline: Use org-element-cache
   new  0350c7d   org.el: Avoid excessive memory usage by effort text 
properties
   new  edddc7d   org-element-cache-map: Reduce memory allocation and time 
re-search


Summary of changes:
 lisp/org-agenda.el  | 439 
 lisp/org-clock.el   |   3 +-
 lisp/org-element.el | 165 +++-
 lisp/org.el |  18 ++-
 4 files changed, 407 insertions(+), 218 deletions(-)



[elpa] externals/org 67fb7a4 1/3: org-agenda-get-deadline: Use org-element-cache

2021-12-10 Thread ELPA Syncer
branch: externals/org
commit 67fb7a48925fe5177141da14788b0535aa108c53
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-agenda-get-deadline: Use org-element-cache
---
 lisp/org-agenda.el | 439 +
 1 file changed, 304 insertions(+), 135 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dfab7b7..2bd584e 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6223,144 +6223,313 @@ specification like [h]h:mm."
 (current (calendar-absolute-from-gregorian date))
 deadline-items)
 (goto-char (point-min))
-(while (re-search-forward regexp nil t)
-  (catch :skip
-   (unless (save-match-data (org-at-planning-p)) (throw :skip nil))
-   (org-agenda-skip)
-   (let* ((s (match-string 1))
-  (pos (1- (match-beginning 1)))
-  (todo-state (save-match-data (org-get-todo-state)))
-  (done? (member todo-state org-done-keywords))
-   (sexp? (string-prefix-p "%%" s))
-  ;; DEADLINE is the deadline date for the entry.  It is
-  ;; either the base date or the last repeat, according
-  ;; to `org-agenda-prefer-last-repeat'.
-  (deadline
-   (cond
-(sexp? (org-agenda--timestamp-to-absolute s current))
-((or (eq org-agenda-prefer-last-repeat t)
- (member todo-state org-agenda-prefer-last-repeat))
- (org-agenda--timestamp-to-absolute
-  s today 'past (current-buffer) pos))
-(t (org-agenda--timestamp-to-absolute s
-  ;; REPEAT is the future repeat closest from CURRENT,
-  ;; according to `org-agenda-show-future-repeats'. If
-  ;; the latter is nil, or if the time stamp has no
-  ;; repeat part, default to DEADLINE.
-  (repeat
-   (cond
-(sexp? deadline)
-((<= current today) deadline)
-((not org-agenda-show-future-repeats) deadline)
-(t
- (let ((base (if (eq org-agenda-show-future-repeats 'next)
- (1+ today)
-   current)))
+(if (org-element--cache-active-p)
+(org-element-cache-map
+ (lambda (el)
+   (when (and (org-element-property :deadline el)
+  (or (not with-hour)
+  (org-element-property
+   :hour-start
+   (org-element-property :deadline el))
+  (org-element-property
+   :hour-end
+   (org-element-property :deadline el
+ (goto-char (org-element-property :contents-begin el))
+ (catch :skip
+  (org-agenda-skip el)
+  (let* ((s (substring (org-element-property
+ :raw-value
+ (org-element-property :deadline el))
+1 -1))
+ (pos (save-excursion
+ (goto-char (org-element-property :contents-begin 
el))
+ ;; We intentionally leave NOERROR
+ ;; argument in `re-search-forward' nil.  If
+ ;; the search fails here, something went
+ ;; wrong and we are looking at
+ ;; non-matching headline.
+ (re-search-forward regexp (line-end-position))
+ (1- (match-beginning 1
+ (todo-state (org-element-property :todo-keyword el))
+ (done? (eq 'done (org-element-property :todo-type el)))
+  (sexp? (eq 'diary
+ (org-element-property
+  :type (org-element-property :deadline el
+ ;; DEADLINE is the deadline date for the entry.  It is
+ ;; either the base date or the last repeat, according
+ ;; to `org-agenda-prefer-last-repeat'.
+ (deadline
+  (cond
+   (sexp? (org-agenda--timestamp-to-absolute s current))
+   ((or (eq org-agenda-prefer-last-repeat t)
+(member todo-state org-agenda-prefer-last-repeat))
+(org-agenda--timestamp-to-absolute
+ s today 'past (current-buffer) pos))
+   (t (org-agenda--timestamp-to-absolute s
+ ;; REPEAT is the future repeat closest from CURRENT,
+ ;; according to `org-agenda-show-future-repeats'. If
+ ;; the latter is nil, or if the time stamp has no
+ ;; repeat par

[elpa] externals/org 0350c7d 2/3: org.el: Avoid excessive memory usage by effort text properties

2021-12-10 Thread ELPA Syncer
branch: externals/org
commit 0350c7dd71ed137940eb01aca6956f26d81fbac2
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org.el: Avoid excessive memory usage by effort text properties

* lisp/org.el (org-set-effort):
(org-property-next-allowed-value): Do not use text properties cache
for `effort' and `effort-minutes' when org-element-cache is active.
These text properties are superceded by element cache and their only
effect (when cache is active) is extra load on Emacs garbage collector
leading to overall Emacs slowdown.
* lisp/org-clock.el (org-clock-in): Use `org-element-use-cache'
instead of `org-element--cache-active-p' to check if element cache is
active. The latter is too precise and may trigger
`org-refresh-effort-properties' when cache is temporarily disabled by
internal calls.
---
 lisp/org-clock.el |  3 ++-
 lisp/org.el   | 18 ++
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 1ac680b..e6c7568 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -36,6 +36,7 @@
 (declare-function org-element-property "org-element" (property element))
 (declare-function org-element-type "org-element" (element))
 (declare-function org-element--cache-active-p "org-element" ())
+(defvar org-element-use-cache)
 (declare-function org-inlinetask-at-task-p "org-inlinetask" ())
 (declare-function org-inlinetask-goto-beginning "org-inlinetask" ())
 (declare-function org-inlinetask-goto-end "org-inlinetask" ())
@@ -1266,7 +1267,7 @@ time as the start time.  See `org-clock-continuously' to 
make this
 the default behavior."
   (interactive "P")
   (setq org-clock-notification-was-shown nil)
-  (unless (org-element--cache-active-p)
+  (unless org-element-use-cache
 (org-refresh-effort-properties))
   (catch 'abort
 (let ((interrupting (and (not org-clock-resolving-clocks-due-to-idleness)
diff --git a/lisp/org.el b/lisp/org.el
index 7ff8574..2962034 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12965,9 +12965,10 @@ variables is set."
 ;; Maybe update the effort value:
 (unless (equal current value)
   (org-entry-put nil org-effort-property value))
-(org-refresh-property '((effort . identity)
-   (effort-minutes . org-duration-to-minutes))
- value)
+(unless (org-element--cache-active-p)
+  (org-refresh-property '((effort . identity)
+  (effort-minutes . org-duration-to-minutes))
+value))
 (when (equal (org-get-heading t t t t)
 (bound-and-true-p org-clock-current-task))
   (setq org-clock-effort value)
@@ -13915,10 +13916,11 @@ completion."
 (beginning-of-line 1)
 (skip-chars-forward " \t")
 (when (equal prop org-effort-property)
-  (org-refresh-property
-   '((effort . identity)
-(effort-minutes . org-duration-to-minutes))
-   nval)
+  (unless (org-element--cache-active-p)
+(org-refresh-property
+ '((effort . identity)
+  (effort-minutes . org-duration-to-minutes))
+ nval))
   (when (string= org-clock-current-task heading)
(setq org-clock-effort nval)
(org-clock-update-mode-line)))
@@ -15907,7 +15909,7 @@ When a buffer is unmodified, it is just killed.  When 
modified, it is saved
(or (memq 'stats org-agenda-ignore-properties)
(org-refresh-stats-properties))
(or (memq 'effort org-agenda-ignore-properties)
-(unless (org-element--cache-active-p)
+(unless org-element-use-cache
  (org-refresh-effort-properties)))
(or (memq 'appt org-agenda-ignore-properties)
(org-refresh-properties "APPT_WARNTIME" 'org-appt-warntime))



[elpa] externals/org edddc7d 3/3: org-element-cache-map: Reduce memory allocation and time re-search

2021-12-10 Thread ELPA Syncer
branch: externals/org
commit edddc7d149b8668a830443b12db14075beb28607
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-element-cache-map: Reduce memory allocation and time re-search

* lisp/org-element.el (org-element-cache-map): Move all possible
let-bindings outside the loop to avoid remory re-allocation on every
iteration.  Track statistics for `re-search-forward' calls.
---
 lisp/org-element.el | 165 +---
 1 file changed, 91 insertions(+), 74 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 5c52318..26e7dec 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -7109,7 +7109,11 @@ the cache."
   (setq to-pos mk)))
   ;; Make sure that garbage collector does not stand on the way to
   ;; maximum performance.
-  (let ((gc-cons-threshold #x4000))
+  (let ((gc-cons-threshold #x4000)
+;; Bind variables used inside loop to avoid memory
+;; re-allocation on every iteration.
+;; See https://emacsconf.org/2021/talks/faster/
+tmpnext-start tmpparent tmpelement)
 (save-excursion
   (save-restriction
 (unless narrow (widen))
@@ -7138,37 +7142,38 @@ the cache."
() `(setq continue-flag t
  node nil))
   (element-match-at-point
-   ;; Returning the first element to match around point.
-   ;; For example, if point is inside headline and
-   ;; granularity is restricted to headlines only, skip
-   ;; over all the child elements inside the headline
-   ;; and return the first parent headline.
-   ;; When we are inside a cache gap, calling
-   ;; `org-element-at-point' also fills the cache gap down 
to
-   ;; point.
-   () `(progn
- ;; Parsing is one of the performance
- ;; bottlenecks.  Make sure to optimise it as
- ;; much as possible.
- ;;
- ;; Avoid extra staff like timer cancels et al
- ;; and only call 
`org-element--cache-sync-requests' when
- ;; there are pending requests.
- (when org-element--cache-sync-requests
-   (org-element--cache-sync (current-buffer)))
- ;; Call `org-element--parse-to' directly avoiding 
any
- ;; kind of `org-element-at-point' overheads.
- (if restrict-elements
- ;; Search directly instead of calling
- ;; `org-element-lineage' to avoid funcall 
overheads
- ;; and making sure that we do not go all
- ;; the way to `org-data' as 
`org-element-lineage'
- ;; does.
- (let ((el (org-element--parse-to (point
-   (while (and el (not (memq (org-element-type 
el) restrict-elements)))
- (setq el (org-element-property :parent 
el)))
-   el)
-   (org-element--parse-to (point)
+;; Returning the first element to match around point.
+;; For example, if point is inside headline and
+;; granularity is restricted to headlines only, skip
+;; over all the child elements inside the headline
+;; and return the first parent headline.
+;; When we are inside a cache gap, calling
+;; `org-element-at-point' also fills the cache gap 
down to
+;; point.
+() `(progn
+  ;; Parsing is one of the performance
+  ;; bottlenecks.  Make sure to optimise it as
+  ;; much as possible.
+  ;;
+  ;; Avoid extra staff like timer cancels et al
+  ;; and only call 
`org-element--cache-sync-requests' when
+  ;; there are pending requests.
+  (when org-element--cache-sync-requests
+(org-element--cache-sync (current-buffer)))
+  ;; Call `org-element--parse-to' directly 
avoiding any
+  ;; kind of `org-element-at-point' overheads.
+  (if restrict-elements
+  ;; Search directly instead of calling
+ 

[elpa] externals/pyim updated (74c93ae -> 95edff8)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch externals/pyim.

  from  74c93ae   rename pyim-process-async-ui-refresh to 
pyim-process-run-async.
   new  93ede76   * tests/pyim-tests.el (pyim-tests-pyim-time-limit-while): 
limit * 1.5  -> limit * 2.
   new  5c4500d   * tests/pyim-tests.el (pyim-tests-pyim-dline-parse): New 
test.
   new  05e24f3   * tests/pyim-tests.el 
(pyim-tests-pyim-char-before/after-to-string): New test.
   new  2d33442   * tests/pyim-tests.el 
(pyim-tests-pyim-add-unread-command-events): New test.
   new  95edff8   * pyim-common.el (pyim-add-unread-command-events): use 
cl-mapcan instead.


Summary of changes:
 pyim-common.el  |  4 ++--
 tests/pyim-tests.el | 46 +-
 2 files changed, 47 insertions(+), 3 deletions(-)



[elpa] externals/pyim 05e24f3 3/5: * tests/pyim-tests.el (pyim-tests-pyim-char-before/after-to-string): New test.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 05e24f38d572188f66d09c4b43d618bc6f4407ec
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-char-before/after-to-string): New 
test.
---
 tests/pyim-tests.el | 12 
 1 file changed, 12 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 58aae18..183e82f 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -70,6 +70,18 @@
   (should (equal (pyim-scheme-get-option 'wubi :class) 'xingma)))
 
 ;; ** pyim-common 相关单元测试
+(ert-deftest pyim-tests-pyim-char-before/after-to-string ()
+  (with-temp-buffer
+(insert "你好世界abc")
+(print (pyim-char-before-to-string 0))
+(should (equal (pyim-char-before-to-string 0) "c"))
+(should (equal (pyim-char-before-to-string 1) "b"))
+(backward-char 5)
+(should (equal (pyim-char-before-to-string 0) "好"))
+(should (equal (pyim-char-before-to-string 1) "你"))
+(should (equal (pyim-char-after-to-string 0) "世"))
+(should (equal (pyim-char-after-to-string 1) "界"
+
 (ert-deftest pyim-tests-pyim-dline-parse ()
   (with-temp-buffer
 (insert "ni-hao 你好")



[elpa] externals/pyim 93ede76 1/5: * tests/pyim-tests.el (pyim-tests-pyim-time-limit-while): limit * 1.5 -> limit * 2.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 93ede76eefe0627ef63350c921e5b7f2d0bcbbc4
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-time-limit-while): limit * 1.5  -> 
limit * 2.
---
 tests/pyim-tests.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 0593138..485eaea 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -98,7 +98,7 @@
 (limit 0.1))
 (pyim-time-limit-while t limit
   t)
-(should (< (float-time (time-since time)) (* limit 1.5)
+(should (< (float-time (time-since time)) (* limit 2)
 
 ;; ** pyim-pymap 相关单元测试
 (ert-deftest pyim-tests-pyim-pymap ()



[elpa] externals/pyim 2d33442 4/5: * tests/pyim-tests.el (pyim-tests-pyim-add-unread-command-events): New test.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 2d334422e96ed22591bf25ffcae12b025957326c
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-add-unread-command-events): New test.
---
 tests/pyim-tests.el | 21 +
 1 file changed, 21 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 183e82f..4196dff 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -116,6 +116,27 @@
  '("a-b-c-d" "a-b-c" "a-b")))
   (should (equal (pyim-subconcat nil) nil)))
 
+(ert-deftest pyim-tests-pyim-add-unread-command-events ()
+  (let ((unread-command-events nil))
+(pyim-add-unread-command-events ?a)
+(should (equal unread-command-events
+   '((no-record . 97
+(pyim-add-unread-command-events "b")
+(should (equal unread-command-events
+   '((no-record . 98)
+ (no-record . 97
+(pyim-add-unread-command-events "cd")
+(should (equal unread-command-events
+   '((no-record . 99)
+ (no-record . 100)
+ (no-record . 98)
+ (no-record . 97
+(pyim-add-unread-command-events "e" t)
+(should (equal unread-command-events
+   '((no-record . 101
+(pyim-add-unread-command-events nil t)
+(should (equal unread-command-events nil
+
 (ert-deftest pyim-tests-pyim-time-limit-while ()
   (let ((time (current-time))
 (limit 0.1))



[elpa] externals/pyim 95edff8 5/5: * pyim-common.el (pyim-add-unread-command-events): use cl-mapcan instead.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 95edff8014cf052bb15a05af90425b3d33f30321
Author: Feng Shu 
Commit: Feng Shu 

* pyim-common.el (pyim-add-unread-command-events): use cl-mapcan instead.

Emacs 25.3 have no mapcan.
---
 pyim-common.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyim-common.el b/pyim-common.el
index 80417bf..7b421d3 100644
--- a/pyim-common.el
+++ b/pyim-common.el
@@ -174,8 +174,8 @@ When CARE-FIRST-ONE is no-nil, ((a b c) (d e)) => (a d)."
   (setq unread-command-events
 (if (characterp key)
 (cons (cons 'no-record key) unread-command-events)
-  (append (mapcan (lambda (e) (list (cons 'no-record e)))
-  (append key nil))
+  (append (cl-mapcan (lambda (e) (list (cons 'no-record e)))
+ (append key nil))
   unread-command-events
 
 ;; Fork from `company-dabbrev--time-limit-while' in company-mode."



[elpa] externals/pyim 5c4500d 2/5: * tests/pyim-tests.el (pyim-tests-pyim-dline-parse): New test.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit 5c4500d2b34ea3378d1adf5bbb6199a08680ed6c
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-dline-parse): New test.
---
 tests/pyim-tests.el | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 485eaea..58aae18 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -70,6 +70,17 @@
   (should (equal (pyim-scheme-get-option 'wubi :class) 'xingma)))
 
 ;; ** pyim-common 相关单元测试
+(ert-deftest pyim-tests-pyim-dline-parse ()
+  (with-temp-buffer
+(insert "ni-hao 你好")
+(should (equal (pyim-dline-parse) '("ni-hao" "你好"
+  (with-temp-buffer
+(insert "a-b-c-d")
+(should (equal (pyim-dline-parse "-") '("a" "b" "c" "d"
+  (with-temp-buffer
+(insert "你好 2")
+(should (equal (pyim-dline-parse) '("你好" "2")
+
 (ert-deftest pyim-tests-pyim-permutate-list ()
   (should (equal (pyim-permutate-list '((a b) (c d e) (f)))
  '((a c f)



[elpa] externals/pyim ebded0b: * tests/pyim-tests.el (pyim-tests-pyim-string-distance): New test.

2021-12-10 Thread ELPA Syncer
branch: externals/pyim
commit ebded0b42fce44187ac8a1364244c471872e9449
Author: Feng Shu 
Commit: Feng Shu 

* tests/pyim-tests.el (pyim-tests-pyim-string-distance): New test.
---
 tests/pyim-tests.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 4196dff..2de6d67 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -116,6 +116,15 @@
  '("a-b-c-d" "a-b-c" "a-b")))
   (should (equal (pyim-subconcat nil) nil)))
 
+(ert-deftest pyim-tests-pyim-string-distance ()
+  (should (equal (pyim-string-distance "nihaoma" "nihaoma") 0))
+  (should (equal (pyim-string-distance "nihaoma" "nhm") 4))
+  (should (equal (pyim-string-distance "nihaoma" "niham") 2))
+  (should (equal (pyim-string-distance "nihaoma" "nbm") 5))
+  (should (equal (pyim-string-distance "nihaoma" "wbc") 7))
+  (should (equal (pyim-string-distance "nihaoma" "ni") 5))
+  (should (equal (pyim-string-distance "nihaoma" "ci") 6)))
+
 (ert-deftest pyim-tests-pyim-add-unread-command-events ()
   (let ((unread-command-events nil))
 (pyim-add-unread-command-events ?a)



[nongnu] elpa/webpaste 73f2f29 3/4: feat(readme): Promote NonGNU ELPA as a way to install the package

2021-12-10 Thread ELPA Syncer
branch: elpa/webpaste
commit 73f2f2963e64c571b6052713652a8b29c1c35fbf
Author: Elis Hirwing 
Commit: Elis Hirwing 

feat(readme): Promote NonGNU ELPA as a way to install the package
---
 README.org | 16 ++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 95193ee..1f318fe 100644
--- a/README.org
+++ b/README.org
@@ -15,7 +15,8 @@ over time and preferred services can easily be configured.
 * Table of Contents
  - [[#webpasteelpaste-text-to-pastebin-like-services][Webpaste.el -- Paste 
text to pastebin-like services]]
  - [[#installation][Installation]]
-   - [[#the-lazy-way-using-use-package][The lazy way (Using use-package)]]
+   - [[#the-interactive-way][The interactive way]]
+   - [[#a-declarative-way-using-use-package][A declarative way (Using 
use-package)]]
  - [[#configuration][Configuration]]
- [[#choosing-providers--provider-priority][Choosing providers / provider 
priority]]
- [[#only-paste-plaintext-pastes][Only paste plaintext pastes]]
@@ -30,7 +31,18 @@ over time and preferred services can easily be configured.
  - [[#providers-to-implement-710][Providers to implement]]
 
 * Installation
-** The lazy way (Using 
[[https://github.com/jwiegley/use-package][use-package]])
+The package is available on [[https://elpa.nongnu.org/][NonGNU ELPA]], which 
is part of the default set of
+repositories starting in Emacs 28. For information on how to add this
+repository if you're on an older Emacs, check the 
[[https://elpa.nongnu.org/][NonGNU ELPA]] instructions.
+
+** The interactive way
+You can install ~webpaste~ using the interactive ~package-install~ command
+like the following:
+#+BEGIN_CODE
+M-x package-install RET webpaste RET
+#+END_CODE
+
+** A declarative way (Using 
[[https://github.com/jwiegley/use-package][use-package]])
 This requires that you have 
[[https://github.com/jwiegley/use-package][use-package]] set up. But it's in my 
opinion the
 easiest way to install and configure packages.
 



[nongnu] elpa/webpaste updated (65f664d -> 030a9ad)

2021-12-10 Thread ELPA Syncer
elpasync pushed a change to branch elpa/webpaste.

  from  65f664d   elpaignore: Add .elpaignore to ignore files in elpa builds
   new  47743f1   chore(readme): Drop the unused tag on the table of 
contents
   new  2a60718   feat(readme): Add the nongnu elpa badge
   new  73f2f29   feat(readme): Promote NonGNU ELPA as a way to install the 
package
   new  030a9ad   chore(authortags): Add email to author and a maintainer 
tag


Summary of changes:
 README.org  | 19 ---
 webpaste.el |  3 ++-
 2 files changed, 18 insertions(+), 4 deletions(-)



[nongnu] elpa/webpaste 47743f1 1/4: chore(readme): Drop the unused tag on the table of contents

2021-12-10 Thread ELPA Syncer
branch: elpa/webpaste
commit 47743f1cbfd3cbc567e51daf37f3f154fd9a8223
Author: Elis Hirwing 
Commit: Elis Hirwing 

chore(readme): Drop the unused tag on the table of contents
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index 29c4b8b..d7ecbb7 100644
--- a/README.org
+++ b/README.org
@@ -11,7 +11,7 @@ pastebin-like services. It supports more than one service and 
will
 failover if one service fails. More services can easily be added
 over time and preferred services can easily be configured.
 
-* Table of Contents:TOC_3_gh:
+* Table of Contents
  - [[#webpasteelpaste-text-to-pastebin-like-services][Webpaste.el -- Paste 
text to pastebin-like services]]
  - [[#installation][Installation]]
- [[#the-lazy-way-using-use-package][The lazy way (Using use-package)]]



[nongnu] elpa/webpaste 030a9ad 4/4: chore(authortags): Add email to author and a maintainer tag

2021-12-10 Thread ELPA Syncer
branch: elpa/webpaste
commit 030a9ad637ea842224ec9c92f1eea17a5d76f5d2
Author: Elis Hirwing 
Commit: Elis Hirwing 

chore(authortags): Add email to author and a maintainer tag
---
 webpaste.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/webpaste.el b/webpaste.el
index e6acd66..af6ac5d 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -2,7 +2,8 @@
 
 ;; Copyright (c) 2016 Elis Hirwing
 
-;; Author: Elis "etu" Hirwing
+;; Author: Elis "etu" Hirwing 
+;; Maintainer: Elis "etu" Hirwing 
 ;; URL: https://github.com/etu/webpaste.el
 ;; Package-Version: 3.2.1
 ;; Version: 3.2.1



[nongnu] elpa/webpaste 2a60718 2/4: feat(readme): Add the nongnu elpa badge

2021-12-10 Thread ELPA Syncer
branch: elpa/webpaste
commit 2a60718a3af6c4ed3565ed5346a6e31498f4c027
Author: Elis Hirwing 
Commit: Elis Hirwing 

feat(readme): Add the nongnu elpa badge
---
 README.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.org b/README.org
index d7ecbb7..95193ee 100644
--- a/README.org
+++ b/README.org
@@ -1,4 +1,5 @@
 
[[https://www.gnu.org/licenses/gpl-3.0.txt][https://img.shields.io/badge/license-GPL_3-green.svg]]
+[[https://elpa.nongnu.org/nongnu/webpaste.html][https://elpa.nongnu.org/nongnu/webpaste.svg]]
 [[https://melpa.org/#/webpaste][https://melpa.org/packages/webpaste-badge.svg]]
 
[[https://stable.melpa.org/#/webpaste][https://stable.melpa.org/packages/webpaste-badge.svg]]
 
[[https://github.com/etu/webpaste.el/actions?query=workflow%3A%22Unit+tests%22][https://github.com/etu/webpaste.el/workflows/Unit%20tests/badge.svg]]



[nongnu] elpa/webpaste 7827266: fix(version): Prepare a new patch release

2021-12-10 Thread ELPA Syncer
branch: elpa/webpaste
commit 78272662e6992b8614e79a571ff2395fa9630357
Author: Elis Hirwing 
Commit: Elis Hirwing 

fix(version): Prepare a new patch release
---
 webpaste.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/webpaste.el b/webpaste.el
index af6ac5d..769ab2e 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -5,8 +5,8 @@
 ;; Author: Elis "etu" Hirwing 
 ;; Maintainer: Elis "etu" Hirwing 
 ;; URL: https://github.com/etu/webpaste.el
-;; Package-Version: 3.2.1
-;; Version: 3.2.1
+;; Package-Version: 3.2.2
+;; Version: 3.2.2
 ;; Keywords: convenience, comm, paste
 ;; Package-Requires: ((emacs "24.4") (request "0.2.0") (cl-lib "0.5"))