[elpa] externals/osm 1adbbc99c9: Localize search results, add osm-search-language

2022-05-07 Thread ELPA Syncer
branch: externals/osm
commit 1adbbc99c9e205a18e5b34e16f769e13651d0145
Author: Daniel Mendler 
Commit: Daniel Mendler 

Localize search results, add osm-search-language
---
 osm.el | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/osm.el b/osm.el
index d6e8ae1720..af0ff387e8 100644
--- a/osm.el
+++ b/osm.el
@@ -53,6 +53,10 @@
   "Curl command line options."
   :type 'string)
 
+(defcustom osm-search-language "en-US"
+  "Language used for search results."
+  :type 'string)
+
 (defcustom osm-server-defaults
   '(:min-zoom 2
 :max-zoom 19
@@ -1371,8 +1375,8 @@ Optionally place transient pin with ID and NAME."
 (alist-get
  'display_name
  (osm--fetch-json
-  (format 
"https://nominatim.openstreetmap.org/reverse?format=json&zoom=%s&lat=%s&lon=%s";
-  (min 18 (max 3 osm--zoom)) lat lon)))
+  (format 
"https://nominatim.openstreetmap.org/reverse?format=json&accept-language=%s&zoom=%s&lat=%s&lon=%s";
+  osm-search-language (min 18 (max 3 osm--zoom)) lat 
lon)))
 
 (defun osm--fetch-json (url)
   "Get json from URL."
@@ -1406,8 +1410,8 @@ If the prefix argument LUCKY is non-nil take the first 
result and jump there."
  ,@(mapcar #'string-to-number (alist-get 'boundingbox 
x)
(or
 (osm--fetch-json
- (concat 
"https://nominatim.openstreetmap.org/search?format=json&q=";
- (url-encode-url search)))
+ (format 
"https://nominatim.openstreetmap.org/search?format=json&accept-language=%s&q=%s";
+ osm-search-language (url-encode-url search)))
 (error "No results"
  (selected (or
 (and (or lucky (not (cdr results))) (car results))



[elpa] externals/osm updated (1adbbc99c9 -> f42b67ff57)

2022-05-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/osm.

  from  1adbbc99c9 Localize search results, add osm-search-language
   new  5bb2dfa709 Use language en
   new  c1624e3a69 osm-search-language: Expand docstring
   new  f42b67ff57 osm-mode: Add warning for missing libjansson dependency


Summary of changes:
 osm.el | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)



[elpa] externals/osm f42b67ff57 3/3: osm-mode: Add warning for missing libjansson dependency

2022-05-07 Thread ELPA Syncer
branch: externals/osm
commit f42b67ff57766a7025e1351e7c8cfa1d553c9ee4
Author: Daniel Mendler 
Commit: Daniel Mendler 

osm-mode: Add warning for missing libjansson dependency
---
 osm.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/osm.el b/osm.el
index c318b98972..53767de5db 100644
--- a/osm.el
+++ b/osm.el
@@ -751,8 +751,9 @@ Should be at least 7 days according to the server usage 
policies."
   (unless (libxml-available-p)
 (warn "osm: libxml is not available"))
   ;; json-available-p is not available on Emacs 27
-  ;; (unless (json-available-p)
-  ;;   (warn "osm: libjansson is not available"))
+  (unless (and (fboundp 'json-parse-string)
+   (equal (json-parse-string "[]") []))
+(warn "osm: libjansson is not available"))
   (setq-local osm-server osm-server
   line-spacing nil
   cursor-type nil



[elpa] externals/osm c1624e3a69 2/3: osm-search-language: Expand docstring

2022-05-07 Thread ELPA Syncer
branch: externals/osm
commit c1624e3a6984ffc5fb016620aa9d664621ad3355
Author: Daniel Mendler 
Commit: Daniel Mendler 

osm-search-language: Expand docstring
---
 osm.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/osm.el b/osm.el
index 7688e5bc6f..c318b98972 100644
--- a/osm.el
+++ b/osm.el
@@ -54,7 +54,10 @@
   :type 'string)
 
 (defcustom osm-search-language "en"
-  "Language used for search results."
+  "Language used for search results.
+Use RFC 1766 abbreviations, e.g.: `en' for English, `de' for German.
+A comma-separated specifies descending order of preference. See also
+`url-mime-language-string'."
   :type 'string)
 
 (defcustom osm-server-defaults



[elpa] externals/osm 5bb2dfa709 1/3: Use language en

2022-05-07 Thread ELPA Syncer
branch: externals/osm
commit 5bb2dfa709c54946abb2a332a4b7451585d53193
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use language en
---
 osm.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osm.el b/osm.el
index af0ff387e8..7688e5bc6f 100644
--- a/osm.el
+++ b/osm.el
@@ -53,7 +53,7 @@
   "Curl command line options."
   :type 'string)
 
-(defcustom osm-search-language "en-US"
+(defcustom osm-search-language "en"
   "Language used for search results."
   :type 'string)
 



[elpa] externals/osm bd810d1aa9 1/2: Use more robust check

2022-05-07 Thread ELPA Syncer
branch: externals/osm
commit bd810d1aa9fc248c62068ae5ded192f664114af1
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use more robust check
---
 osm.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/osm.el b/osm.el
index 53767de5db..d70f4f3620 100644
--- a/osm.el
+++ b/osm.el
@@ -751,8 +751,7 @@ Should be at least 7 days according to the server usage 
policies."
   (unless (libxml-available-p)
 (warn "osm: libxml is not available"))
   ;; json-available-p is not available on Emacs 27
-  (unless (and (fboundp 'json-parse-string)
-   (equal (json-parse-string "[]") []))
+  (unless (ignore-errors (equal [] (json-parse-string "[]")))
 (warn "osm: libjansson is not available"))
   (setq-local osm-server osm-server
   line-spacing nil



[elpa] externals/osm updated (f42b67ff57 -> e3ea969ce1)

2022-05-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/osm.

  from  f42b67ff57 osm-mode: Add warning for missing libjansson dependency
   new  bd810d1aa9 Use more robust check
   new  e3ea969ce1 Version 0.7


Summary of changes:
 osm.el | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)



[elpa] externals/osm e3ea969ce1 2/2: Version 0.7

2022-05-07 Thread ELPA Syncer
branch: externals/osm
commit e3ea969ce1bf84343f357efa2de97e1dd857f481
Author: Daniel Mendler 
Commit: Daniel Mendler 

Version 0.7
---
 osm.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/osm.el b/osm.el
index d70f4f3620..584de1bd63 100644
--- a/osm.el
+++ b/osm.el
@@ -5,7 +5,7 @@
 ;; Author: Daniel Mendler 
 ;; Maintainer: Daniel Mendler 
 ;; Created: 2022
-;; Version: 0.6
+;; Version: 0.7
 ;; Package-Requires: ((emacs "27.1"))
 ;; Homepage: https://github.com/minad/osm
 



[nongnu] elpa/evil 61a680042f: Mention evil-move-beyond-eol in docstring of evil-move-cursor-back (#1375)

2022-05-07 Thread ELPA Syncer
branch: elpa/evil
commit 61a680042f422be715b42ceccb2418847c5f6b65
Author: Kevin Brubeck Unhammer 
Commit: GitHub 

Mention evil-move-beyond-eol in docstring of evil-move-cursor-back (#1375)

aa3ea1dcfc54fe25581841a8685679d482e99b3f unwed these, but they should
still keep in touch (so people can easily find out why behaviour
changed).
---
 evil-vars.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/evil-vars.el b/evil-vars.el
index 3b1635e489..5bf1d17f58 100644
--- a/evil-vars.el
+++ b/evil-vars.el
@@ -241,7 +241,9 @@ current line.  This applies to \\[evil-backward-char], \
   "Whether the cursor is moved backwards when exiting insert state.
 If non-nil, the cursor moves \"backwards\" when exiting insert state,
 so that it ends up on the character to the left.  Otherwise it remains
-in place, on the character to the right."
+in place, on the character to the right.
+
+See also `evil-move-beyond-eol'."
   :type 'boolean
   :group 'evil)
 



[elpa] externals/osm 17884f69eb: osm-mode: Check for graphical display

2022-05-07 Thread ELPA Syncer
branch: externals/osm
commit 17884f69eb9681db880865af73762686c8e83cc0
Author: Daniel Mendler 
Commit: Daniel Mendler 

osm-mode: Check for graphical display
---
 osm.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/osm.el b/osm.el
index 584de1bd63..e29d27431b 100644
--- a/osm.el
+++ b/osm.el
@@ -745,6 +745,8 @@ Should be at least 7 days according to the server usage 
policies."
 (define-derived-mode osm-mode special-mode "Osm"
   "OpenStreetMap viewer mode."
   :interactive nil
+  (unless (display-graphic-p)
+(warn "osm: Graphical display is required"))
   (dolist (type '(svg jpeg png))
 (unless (image-type-available-p type)
   (warn "osm: Support for %s images is missing" type)))



[nongnu] elpa/cider 3907351878 2/2: Revert "Inherit test-report mode from cider-popup-mode"

2022-05-07 Thread ELPA Syncer
branch: elpa/cider
commit 3907351878ad3d1657d34291503cfda6090d66c8
Author: yuhan0 
Commit: Bozhidar Batsov 

Revert "Inherit test-report mode from cider-popup-mode"

This reverts commit 9cac6585f6cdff10138b86148bdc6d33d2bbb433.

The change resulted in "Cyclic keymap inheritance" errors for some
users, see #3195,
---
 cider-test.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cider-test.el b/cider-test.el
index 4092b2c2ac..e702498620 100644
--- a/cider-test.el
+++ b/cider-test.el
@@ -188,6 +188,7 @@ Add to this list to have CIDER recognize additional test 
defining macros."
 ;; "run the test at point".  But it's not as nice as rerunning all tests in
 ;; this buffer.
 (define-key map "g" #'cider-test-run-test)
+(define-key map "q" #'cider-popup-buffer-quit-function)
 (easy-menu-define cider-test-report-mode-menu map
   "Menu for CIDER's test result mode"
   '("Test-Report"
@@ -208,7 +209,7 @@ Add to this list to have CIDER recognize additional test 
defining macros."
 ["Display expected/actual diff" cider-test-ediff]))
 map))
 
-(define-derived-mode cider-test-report-mode cider-popup-buffer-mode "Test 
Report"
+(define-derived-mode cider-test-report-mode fundamental-mode "Test Report"
   "Major mode for presenting Clojure test results.
 
 \\{cider-test-report-mode-map}"



[nongnu] elpa/cider updated (acea8e256d -> 3907351878)

2022-05-07 Thread ELPA Syncer
elpasync pushed a change to branch elpa/cider.

  from  acea8e256d Issue template: add `JDK distribution` section
   new  1f1b21b633 Fix Emacs-29 latest breaks
   new  3907351878 Revert "Inherit test-report mode from cider-popup-mode"


Summary of changes:
 cider-test.el   |  3 ++-
 test/cider-eldoc-tests.el   |  3 +++
 test/cider-repl-tests.el| 25 ++---
 test/nrepl-bencode-tests.el |  9 +
 4 files changed, 16 insertions(+), 24 deletions(-)



[nongnu] elpa/cider 1f1b21b633 1/2: Fix Emacs-29 latest breaks

2022-05-07 Thread ELPA Syncer
branch: elpa/cider
commit 1f1b21b633b4bd9d511329ba11bb66a18d8fc407
Author: ikappaki 
Commit: Bozhidar Batsov 

Fix Emacs-29 latest breaks
---
 test/cider-eldoc-tests.el   |  3 +++
 test/cider-repl-tests.el| 25 ++---
 test/nrepl-bencode-tests.el |  9 +
 3 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/test/cider-eldoc-tests.el b/test/cider-eldoc-tests.el
index 0e3cc2a34f..295a1a3234 100644
--- a/test/cider-eldoc-tests.el
+++ b/test/cider-eldoc-tests.el
@@ -122,6 +122,7 @@
 (describe "cider-eldoc-beginning-of-sexp"
   (it "moves to the beginning of the sexp"
 (with-temp-buffer
+  (clojure-mode)
   (save-excursion
 (insert "(a (b b) (c c) d)"))
   (search-forward "d")
@@ -131,6 +132,7 @@
 
   (it "returns the number sexp the point was over or after"
 (with-temp-buffer
+  (clojure-mode)
   (save-excursion
 (insert "(a (b b) (c c) d)"))
   (search-forward "d")
@@ -140,6 +142,7 @@
 
   (it "returns nil if the maximum number of sexps to skip is exceeded"
 (with-temp-buffer
+  (clojure-mode)
   (save-excursion
 (insert "(a (b b) (c c) d)"))
   (search-forward "d")
diff --git a/test/cider-repl-tests.el b/test/cider-repl-tests.el
index dcd56d73ca..84e247656e 100644
--- a/test/cider-repl-tests.el
+++ b/test/cider-repl-tests.el
@@ -169,7 +169,7 @@
 
 
 (defun simulate-cider-output (s property)
-  "Return properties from `cider-repl--emit-output'.
+  "Return S's properties from `cider-repl--emit-output'.
 PROPERTY should be a symbol of either 'text, 'ansi-context or
 'properties."
   (let ((strings (if (listp s) s (list s
@@ -192,28 +192,7 @@ PROPERTY should be a symbol of either 'text, 'ansi-context 
or
   (describe "when the escape code is invalid"
 (it "doesn't hold the string looking for a close tag"
   (expect (simulate-cider-output "\033hi" 'text)
-  :to-equal "\033hi\n")
-  (expect (simulate-cider-output "\033hi" 'ansi-context)
-  :to-equal nil)
-
-  ;; Informational: Ideally, we would have liked any non-SGR
-  ;; sequence to appear on the output verbatim, but as per the
-  ;; `ansi-color-apply' doc string, they are removed
-  ;;
-  ;; """Translates SGR control sequences into text properties.
-  ;;Delete all other control sequences without processing them."""
-  ;;
-  ;; e.g.:
-  (expect (simulate-cider-output
-   "\033[hi" 'text) :to-equal "i\n")
-  (expect (simulate-cider-output
-   '("\033[" "hi") 'text) :to-equal "i\n")
-  ))
-
-  (describe "when the escape code is valid"
-(it "preserves the context"
-  (let ((context (simulate-cider-output "abcd" 
'ansi-context)))
-(expect context :to-equal '((31) nil))
+  :to-equal "\033hi\n"
 
 (describe "cider-locref-at-point"
   (it "works with stdout-stacktrace refs"
diff --git a/test/nrepl-bencode-tests.el b/test/nrepl-bencode-tests.el
index dc75fab7fb..32165ceb86 100644
--- a/test/nrepl-bencode-tests.el
+++ b/test/nrepl-bencode-tests.el
@@ -31,6 +31,15 @@
 (require 'cl-lib)
 (require 'nrepl-client)
 
+;; Workaround for silex/master-dev issue with buggy old snapshot.  To be 
removed
+;; once new snapshot image is build.
+(when (= emacs-major-version 29)
+  (cl-struct-define 'queue nil 'cl-structure-object 'record nil
+   '((cl-tag-slot)
+ (head)
+ (tail))
+   'cl-struct-queue-tags 'queue 't))
+
 (defun nrepl-bdecode-string (string)
   "Return first complete object in STRING.
 If object is incomplete, return a decoded path."



[nongnu] elpa/cider 69d374818b: Add missing changelog entry

2022-05-07 Thread ELPA Syncer
branch: elpa/cider
commit 69d374818bd0af1489ee8828b258c689ccc24a66
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Add missing changelog entry
---
 CHANGELOG.md | 4 
 1 file changed, 4 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2eb304294d..7a17b97bc0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 ## master (unreleased)
 
+### Bugs fixed
+
+* [#3195](https://github.com/clojure-emacs/cider/issues/3195): Revert the 
change that resulted in `(error "Cyclic keymap inheritance")` on 
`cider-test-run-test`.
+
 ## 1.4.0 (2022-05-02)
 
 ## New features



[elpa] externals/embark-consult updated (d88478b45f -> 34e54d19bb)

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

  from  d88478b45f Generalize copy as markdown (previously only available 
for links)
  adds  34e54d19bb Tighten up intro, bring back right-click metaphor

No new revisions were added by this update.

Summary of changes:
 README.org  | 48 ++--
 embark.texi | 48 ++--
 2 files changed, 36 insertions(+), 60 deletions(-)



[elpa] externals/embark 34e54d19bb: Tighten up intro, bring back right-click metaphor

2022-05-07 Thread ELPA Syncer
branch: externals/embark
commit 34e54d19bb94030c6fc307100c40d828f8cb5c6b
Author: Omar Antolín 
Commit: Omar Antolín 

Tighten up intro, bring back right-click metaphor
---
 README.org  | 48 ++--
 embark.texi | 48 ++--
 2 files changed, 36 insertions(+), 60 deletions(-)

diff --git a/README.org b/README.org
index 8de2c3f550..ee1c50da8a 100644
--- a/README.org
+++ b/README.org
@@ -13,39 +13,27 @@
 * Overview
 
 Embark makes it easy to choose a command to run based on what is near
-point. If the command you choose prompts you for input, Embark can
-fill in the data for you. Bind the =embark-act= command to a key and it
-acts like a prefix key for a keymap of /actions/ (commands) relevant to
-the /target/ found around point. For example, if point is on a file
-name, you can rename or copy it by choosing the standard Emacs
-commands =rename-file= or =copy-file=. Those commands prompt for a
-filename to copy or rename and Embark will enter the file name at
-point.
-
-Other examples include: with point on a URL you can open it in a
-browser or in eww; with point on a lisp function name you can go to
-its definition, get help for it, or trace calls to it; if while
-switching buffers you spot an old one, you can kill it right there and
-continue to select another.
-
-Users of Helm or Counsel will be familiar with this way of choosing
-actions for minibuffer completion candidates, and Embark extends this
-idea to all buffers, not just the minibuffer.
-
-Embark can also gather all minibuffer completion candidates into
-their own buffer where you can examine them and run commands on them
-at your leisure. The buffer the candidates are gathered into can be in
-a dired-like major mode provided by Embark suitable for all types of
-candidates, or it can be in a major mode specific to the type of
-candidates you are collecting such as dired mode for files, ibuffer
-for buffers, occur-mode for search results in the current buffer,
-or grep-mode for search results from several files.
+point, both during a minibuffer completion session (in a way familiar
+to Helm or Counsel users) and in normal buffers. Bind the command
+=embark-act= to a key and it acts like prefix-key for a keymap of
+/actions/ (commands) relevant to the /target/ around point. With point on
+an URL in a buffer you can open the URL in a browser or eww or
+download the file it points to. If while switching buffers you spot an
+old one, you can kill it right there and continue to select another.
+Embark comes preconfigured with over a hundred actions for common
+types of targets such as files, buffers, identifiers, s-expressions,
+sentences; and it is easy to add more actions and more target types.
+Embark can also collect all the candidates in a minibuffer to an
+occur-like buffer or export them to a buffer in a major-mode specific
+to the type of candidates, such as dired for a set of files, ibuffer
+for a set of buffers, or customize for a set of variables.
 
 ** Acting on targets
 
-The =embark-act= command (which you should bind to a convenient key),
-acts as a prefix for a keymap offering you relevant /actions/ to use on
-a /target/ determined by the context:
+You can think of =embark-act= as a keyboard-based version of a
+right-click contextual menu. The =embark-act= command (which you should
+bind to a convenient key), acts as a prefix for a keymap offering you
+relevant /actions/ to use on a /target/ determined by the context:
 
 - In the minibuffer, the target is the current top completion
   candidate.
diff --git a/embark.texi b/embark.texi
index 71ae5e3a83..52e9d457bb 100644
--- a/embark.texi
+++ b/embark.texi
@@ -79,33 +79,20 @@ Embark, Marginalia and Consult
 @chapter Overview
 
 Embark makes it easy to choose a command to run based on what is near
-point. If the command you choose prompts you for input, Embark can
-fill in the data for you. Bind the @samp{embark-act} command to a key and it
-acts like a prefix key for a keymap of @emph{actions} (commands) relevant to
-the @emph{target} found around point. For example, if point is on a file
-name, you can rename or copy it by choosing the standard Emacs
-commands @samp{rename-file} or @samp{copy-file}. Those commands prompt for a
-filename to copy or rename and Embark will enter the file name at
-point.
-
-Other examples include: with point on a URL you can open it in a
-browser or in eww; with point on a lisp function name you can go to
-its definition, get help for it, or trace calls to it; if while
-switching buffers you spot an old one, you can kill it right there and
-continue to select another.
-
-Users of Helm or Counsel will be familiar with this way of choosing
-actions for minibuffer completion candidates, and Embark extends this
-idea to all buffers, not just the minibuffer.
-
-Embark can also gather all minibuffer completion candidates into
-their own buffer where you can examine them and run c

[elpa] externals/embark 857c840352: Stricter test for an identifier to be an elisp symbol

2022-05-07 Thread ELPA Syncer
branch: externals/embark
commit 857c8403529f54bfeecf460fe98b1a0b8e206802
Author: Omar Antolín 
Commit: Omar Antolín 

Stricter test for an identifier to be an elisp symbol

Some people apparently have large numbers of interned symbols that are
not variables, functions, faces, etc. (See
https://github.com/oantolin/embark/issues/504#issuecomment-1120239215,
for example).
---
 embark.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/embark.el b/embark.el
index c588b37041..584b6d3e5f 100644
--- a/embark.el
+++ b/embark.el
@@ -880,7 +880,10 @@ As a convenience, in Org Mode an initial ' or surrounding 
== or
(cl-incf (car bounds))
(cl-decf (cdr bounds)
   `(,(if (or (derived-mode-p 'emacs-lisp-mode 'inferior-emacs-lisp-mode)
- (and (intern-soft name) (not (derived-mode-p 'prog-mode
+ (and
+  (not (derived-mode-p 'prog-mode))
+  (when-let ((sym (intern-soft name)))
+(or (boundp sym) (fboundp sym) (symbol-plist sym)
  'symbol
'identifier)
 ,name



[elpa] externals/embark-consult updated (34e54d19bb -> 857c840352)

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

  from  34e54d19bb Tighten up intro, bring back right-click metaphor
  adds  857c840352 Stricter test for an identifier to be an elisp symbol

No new revisions were added by this update.

Summary of changes:
 embark.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)



[elpa] externals/engrave-faces 85ddcdb516 1/8: Refactor ef-define-backend and ef-faces-file

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 85ddcdb516aa2330028e96383db81f6de9c09c02
Author: TEC 
Commit: TEC 

Refactor ef-define-backend and ef-faces-file
---
 engrave-faces.el | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index ded92aa317..817c924c9f 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -98,28 +98,28 @@ and cause a -standalone version of the buffer transforming 
function to be create
 (switch-to-buffer buf)
 ,(when view-setup `(funcall ,view-setup)))
   buf)))
-  (defun ,(intern (concat "engrave-faces-" backend "-file")) (file 
&optional open-result)
+  (defun ,(intern (concat "engrave-faces-" backend "-file")) (file 
&optional out-file open-result)
 ,(concat "Convert file to " backend " formatting.")
-(interactive (list buffer-file-name t))
-(let ((output-file (engrave-faces-file file ,extension ,backend 
,standalone-transformer)))
-  (when open-result (find-file output-file))
-  output-file))
+(interactive (list buffer-file-name nil t))
+(unless out-file
+  (setq out-file (concat file ,extension)))
+(engrave-faces-file file out-file ,backend ,standalone-transformer)
+(when open-result (find-file out-file))
+out-file)
   (defvar ,(intern (concat "engrave-faces-" backend "-before-hook")) 
nil)
   (defvar ,(intern (concat "engrave-faces-" backend "-after-hook")) 
nil)))
 
-(defun engrave-faces-file (file extension backend &optional postprocessor)
-  "Using BACKEND, engrave FILE and save it as FILE.EXTENSION.
+(defun engrave-faces-file (in-file out-file backend &optional postprocessor)
+  "Using BACKEND, engrave IN-FILE and save it as FILE.EXTENSION.
 If a POSTPROCESSOR function is provided, it is called before saving."
-  (let ((output-file (concat file extension)))
-(with-temp-buffer
-  (insert-file-contents file)
-  (let ((buffer-file-name file))
-(normal-mode)
-(with-current-buffer (engrave-faces-buffer backend)
-  (when postprocessor (funcall postprocessor))
-  (write-region (point-min) (point-max) output-file)
-  (kill-buffer
-output-file))
+  (with-temp-buffer
+(insert-file-contents in-file)
+(let ((buffer-file-name in-file))
+  (normal-mode)
+  (with-current-buffer (engrave-faces-buffer backend)
+(when postprocessor (funcall postprocessor))
+(write-region (point-min) (point-max) out-file)
+(kill-buffer)
 
 (defun engrave-faces-buffer (backend)
   "Export the current buffer with BACKEND and return the created buffer."



[elpa] externals/engrave-faces 6fa12694e6 7/8: Rename default theme shorts and slugs

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 6fa12694e6de1bb3fa2ce0a137e7b3d567c0a079
Author: TEC 
Commit: TEC 

Rename default theme shorts and slugs
---
 engrave-faces.el | 68 
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index e80c5c3f23..d31167574a 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -263,45 +263,45 @@ This function is lifted from htmlize."
 (defcustom engrave-faces-themes
   '((default .
   (;; faces.el --- excluding: bold, italic, bold-italic, underline, and 
some others
-   (default :short "default"  :slug 
"D" :foreground "#00")
-   (shadow  :short "shadow"   :slug 
"sh":foreground "#7f7f7f")
-   (success :short "success"  :slug 
"ss":foreground "#228b22" :weight bold)
-   (warning :short "warning"  :slug 
"w" :foreground "#ff8e00" :weight bold)
-   (error   :short "error":slug 
"e" :foreground "#ff" :weight bold)
+   (default :short "default" :slug 
"D"   :foreground "#00")
+   (shadow  :short "shadow"  :slug 
"h"   :foreground "#7f7f7f")
+   (success :short "success" :slug 
"sc"  :foreground "#228b22" :weight bold)
+   (warning :short "warning" :slug 
"w"   :foreground "#ff8e00" :weight bold)
+   (error   :short "error"   :slug 
"e"   :foreground "#ff" :weight bold)
;; font-lock.el
-   (font-lock-comment-face  :short "comment"  :slug 
"ct":foreground "#b2")
-   (font-lock-comment-delimiter-face:short "comment-delim":slug 
"cd":foreground "#b2")
-   (font-lock-string-face   :short "string"   :slug 
"s" :foreground "#8b2252")
-   (font-lock-doc-face  :short "doc"  :slug 
"d" :foreground "#8b2252")
-   (font-lock-doc-markup-face   :short "doc-markup"   :slug 
"dm":foreground "#008b8b")
-   (font-lock-keyword-face  :short "keyword"  :slug 
"k" :foreground "#9370db")
-   (font-lock-builtin-face  :short "builtin"  :slug 
"b" :foreground "#483d8b")
-   (font-lock-function-name-face:short "function" :slug 
"f" :foreground "#ff")
-   (font-lock-variable-name-face:short "variable" :slug 
"v" :foreground "#a0522d")
-   (font-lock-type-face :short "type" :slug 
"t" :foreground "#228b22")
-   (font-lock-constant-face :short "constant" :slug 
"c" :foreground "#008b8b")
-   (font-lock-warning-face  :short "fl-warning"   :slug 
"W" :foreground "#ff" :weight bold)
-   (font-lock-negation-char-face:short "neg-char" :slug 
"nc")
-   (font-lock-preprocessor-face :short "preprocessor" :slug 
"pp":foreground "#483d8b")
-   (font-lock-regexp-grouping-construct :short "regexp"   :slug 
"rc":weight bold)
-   (font-lock-regexp-grouping-backslash :short "regexp-backslash" :slug 
"rb":weight bold)
+   (font-lock-comment-face  :short "fl-comment"  :slug 
"c"   :foreground "#b2")
+   (font-lock-comment-delimiter-face:short "fl-comment-delim":slug 
"cd"  :foreground "#b2")
+   (font-lock-string-face   :short "fl-string"   :slug 
"s"   :foreground "#8b2252")
+   (font-lock-doc-face  :short "fl-doc"  :slug 
"d"   :foreground "#8b2252")
+   (font-lock-doc-markup-face   :short "fl-doc-markup"   :slug 
"m"   :foreground "#008b8b")
+   (font-lock-keyword-face  :short "fl-keyword"  :slug 
"k"   :foreground "#9370db")
+   (font-lock-builtin-face  :short "fl-builtin"  :slug 
"b"   :foreground "#483d8b")
+   (font-lock-function-name-face:short "fl-function" :slug 
"f"   :foreground "#ff")
+   (font-lock-variable-name-face:short "fl-variable" :slug 
"v"   :foreground "#a0522d")
+   (font-lock-type-face :short "fl-type" :slug 
"t"   :foreground "#228b22")
+   (font-lock-constant-face :short "fl-constant" :slug 
"o"   :foreground "#008b8b")
+   (font-lock-warning-face  :short "fl-warning"  :slug 
"wr"  :foreground "#ff" :weight bold)
+   (font-lock-negation-char-face:short "fl-neg-char" :slug 
"nc")
+   (font-lock-preprocessor-face :short 

[elpa] externals/engrave-faces 248196fb4d 8/8: Fix typo in readme

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 248196fb4d54660b9abd0eac26bd43b6b26f6b14
Author: TEC 
Commit: TEC 

Fix typo in readme
---
 README.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.org b/README.org
index f3e7f3e417..afd32dfd4c 100644
--- a/README.org
+++ b/README.org
@@ -10,7 +10,7 @@ each one seems to reinvent the core mechanism of processing 
the font-lock in a
 buffer such that it can be exported to a particular format.
 
 This package aims to produce a versatile generic core which can process a
-fortified buffer and elegantly pass the data to any number of backends which 
can
+fontified buffer and elegantly pass the data to any number of backends which 
can
 deal with specific output formats.
 
 This is very much a work in progress, a rough plan can be seen below.



[elpa] externals/engrave-faces updated (9e41d5f9a8 -> 248196fb4d)

2022-05-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/engrave-faces.

  from  9e41d5f9a8 Add stage badge to readme
   new  85ddcdb516 Refactor ef-define-backend and ef-faces-file
   new  1b50efc320 LaTeX: improve background boxes by adding a strut
   new  0ff0251187 Add ability to log face preset misses
   new  4a0d16715a Themes support
   new  9ef6c83553 Variable declaration rearrangement
   new  571d60774c Reflow a docstring
   new  6fa12694e6 Rename default theme shorts and slugs
   new  248196fb4d Fix typo in readme


Summary of changes:
 README.org |   2 +-
 engrave-faces-html.el  |   8 +-
 engrave-faces-latex.el |  33 +++--
 engrave-faces.el   | 335 +
 4 files changed, 254 insertions(+), 124 deletions(-)



[elpa] externals/engrave-faces 9ef6c83553 5/8: Variable declaration rearrangement

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 9ef6c83553cf5f238520a39a3a0b590949704529
Author: TEC 
Commit: TEC 

Variable declaration rearrangement
---
 engrave-faces.el | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index a6d3940b89..761f31a1a5 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -63,8 +63,18 @@ buffer.  You may use them to modify the outlook of the final 
output."
   :group 'engrave-faces
   :type 'hook)
 
+(defcustom engrave-faces-log-preset-missed-faces nil
+  "Whether to log faces not found in `engrave-faces-current-preset-style'."
+  :type 'boolean
+  :group 'engrave-faces)
+
+(defvar engrave-faces-preset-missed-faces nil
+  "Faces not found in `engrave-faces-current-preset-style'.")
+
 (defvar engrave-faces--backends nil)
 
+(define-obsolete-variable-alias 'engrave-faces-preset-styles 
'engrave-faces-current-preset-style "0.3")
+
 ;;;###autoload
 (defmacro engrave-faces-define-backend (backend extension face-transformer 
&optional standalone-transformer view-setup)
   "Create a new engraving backend BACKEND.
@@ -206,14 +216,6 @@ I.e. ([facea :inherit faceb] facec) results in (facea 
faceb facec)"
(engrave-faces-explicit-inheritance inherit))
  (if (listp faces) faces (list faces)
 
-(defvar engrave-faces-preset-missed-faces nil
-  "Faces not found in `engrave-faces-current-preset-style'.")
-
-(defcustom engrave-faces-log-preset-missed-faces nil
-  "Whether to log faces not found in `engrave-faces-current-preset-style'."
-  :type 'boolean
-  :group 'engrave-faces)
-
 (defun engrave-faces-attribute-values (faces attribute)
   "Fetch all specified instances of ATTRIBUTE for FACES, ignoring inheritence.
 To consider inheritence, use `engrave-faces-explicit-inheritance' first."
@@ -318,8 +320,6 @@ cdrs in the form of `engrave-faces-current-preset-style'."
 :tag "Face specification"
   :group 'engrave-faces)
 
-(define-obsolete-variable-alias 'engrave-faces-preset-styles 
'engrave-faces-current-preset-style "0.3")
-
 (defcustom engrave-faces-current-preset-style
   (alist-get 'default engrave-faces-themes)
   "Overriding face values.



[elpa] externals/engrave-faces 571d60774c 6/8: Reflow a docstring

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 571d60774cb579104980c443f07ee3a9ea091dfd
Author: TEC 
Commit: TEC 

Reflow a docstring
---
 engrave-faces.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index 761f31a1a5..e80c5c3f23 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -398,9 +398,9 @@ Unless NOPUT is non-nil, "
 
 (defun engrave-faces-use-theme (&optional theme insert-def)
   "Select a THEME an apply it as the current engraved preset style.
-When INSERT-DEF is non-nil, or the universal argument has been
-provided, an expression adding THEME to `engrave-faces-themes'
-shall be inserted into the current buffer at point."
+When INSERT-DEF is non-nil, or the universal argument has been provided, an
+expression adding THEME to `engrave-faces-themes' shall be inserted into the
+current buffer at point."
   (interactive (list (intern
   (completing-read
"Theme: "



[elpa] externals/engrave-faces 0ff0251187 3/8: Add ability to log face preset misses

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 0ff02511878d00e34f84d6e77a18e82877b01997
Author: TEC 
Commit: TEC 

Add ability to log face preset misses
---
 engrave-faces.el | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index 817c924c9f..903d9e4078 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -200,6 +200,14 @@ I.e. ([facea :inherit faceb] facec) results in (facea 
faceb facec)"
(engrave-faces-explicit-inheritance inherit))
  (if (listp faces) faces (list faces)
 
+(defvar engrave-faces-preset-missed-faces nil
+  "Faces not found in `engrave-faces-current-preset-style'.")
+
+(defcustom engrave-faces-log-preset-missed-faces nil
+  "Whether to log faces not found in `engrave-faces-current-preset-style'."
+  :type 'boolean
+  :group 'engrave-faces)
+
 (defun engrave-faces-attribute-values (faces attribute)
   "Fetch all specified instances of ATTRIBUTE for FACES, ignoring inheritence.
 To consider inheritence, use `engrave-faces-explicit-inheritance' first."
@@ -209,7 +217,10 @@ To consider inheritence, use 
`engrave-faces-explicit-inheritance' first."
  (if-let ((style (cdr (assoc face 
engrave-faces-preset-styles
  (plist-get style attribute)
(cond
-((symbolp face) (face-attribute face attribute nil 
nil))
+((symbolp face)
+ (when engrave-faces-log-preset-missed-faces
+   (push face engrave-faces-preset-missed-faces))
+ (face-attribute face attribute nil nil))
 ((listp face) (plist-get face attribute)
(delq 'default (if (listp faces) faces (list faces)))
 



[elpa] externals/engrave-faces 1b50efc320 2/8: LaTeX: improve background boxes by adding a strut

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 1b50efc32038aa76614737992a130bde0db51fa2
Author: TEC 
Commit: TEC 

LaTeX: improve background boxes by adding a strut
---
 engrave-faces-latex.el | 27 +++
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/engrave-faces-latex.el b/engrave-faces-latex.el
index 4d19d9a201..f7c867ebc0 100644
--- a/engrave-faces-latex.el
+++ b/engrave-faces-latex.el
@@ -21,14 +21,24 @@ When preset, short commands are generated for 
`engrave-faces-preset-styles'."
   :type '(choice nil preset)
   :group 'engrave-faces)
 
+(defcustom engrave-faces-latex-colorbox-strut
+  "\\vrule height 2.1ex depth 0.8ex width 0pt"
+  "LaTeX code which sets the height and depth for any colorboxes."
+  :type 'string
+  :group 'engrave-faces)
+
 (defun engrave-faces-latex-gen-preamble ()
   "Generate a preamble which provides short commands for the preset styles.
 See `engrave-faces-preset-styles' and `engrave-faces-latex-output-style'."
-  (mapconcat
-   (lambda (face-style)
- (engrave-faces-latex-gen-preamble-line (car face-style) (cdr face-style)))
-   engrave-faces-preset-styles
-   "\n"))
+  (concat
+   (unless (cl-notany (lambda (s) (plist-get (cdr s) :background))
+  engrave-faces-preset-styles)
+ (format "\\newcommand\\efstrut{%s}\n" engrave-faces-latex-colorbox-strut))
+   (mapconcat
+(lambda (face-style)
+  (engrave-faces-latex-gen-preamble-line (car face-style) (cdr 
face-style)))
+engrave-faces-preset-styles
+"\n")))
 
 (defun engrave-faces-latex-gen-preamble-line (face style)
   "Generate a LaTeX preamble line for STYLE representing FACE."
@@ -41,7 +51,7 @@ See `engrave-faces-preset-styles' and 
`engrave-faces-latex-output-style'."
 (concat (when fg (format "\\definecolor{EF%s}{HTML}{%s}\n" short 
(substring fg 1)))
 (when bg (format "\\definecolor{Ef%s}{HTML}{%s}\n" short 
(substring bg 1)))
 "\\newcommand{\\EF" short "}[1]{"
-(when bg (concat "\\colorbox{Ef" short "}{"))
+(when bg (concat "\\colorbox{Ef" short "}{\\efstrut{}"))
 (when fg (concat "\\textcolor{EF" short "}{"))
 (when st "\\sout{") (when bl "\\textbf{") (when it "\\textit{")
 "#1}"
@@ -98,15 +108,16 @@ See `engrave-faces-preset-styles' and 
`engrave-faces-latex-output-style'."
   (goto-char (point-min))
   (insert "\\documentclass{article}
 
+
+\\usepackage[margin=1.5cm]{geometry}
 \\usepackage{xcolor}
 \\usepackage{fvextra}
-\\usepackage[margin=1.5cm]{geometry}
 \\usepackage{sourcecodepro}
 \\pagestyle{empty}\n\n"
   (engrave-faces-latex-gen-preamble)
   "
 \\begin{document}
-
+\\setlength{\\fboxsep}{0pt}
 \\begin{Verbatim}[breaklines=true, commandchars=\\{\\}]\n")
   (goto-char (point-max))
   (insert "\\end{Verbatim}



[elpa] externals/engrave-faces 4a0d16715a 4/8: Themes support

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 4a0d16715a8fc7b1d6f88ecc2c6a83ab5eeef2ea
Author: TEC 
Commit: TEC 

Themes support
---
 engrave-faces-html.el  |   8 +-
 engrave-faces-latex.el |  24 ++--
 engrave-faces.el   | 294 +
 3 files changed, 217 insertions(+), 109 deletions(-)

diff --git a/engrave-faces-html.el b/engrave-faces-html.el
index 9166e01b0e..72be9d023b 100644
--- a/engrave-faces-html.el
+++ b/engrave-faces-html.el
@@ -25,14 +25,16 @@ When preset, CSS classes are generated for 
`engrave-faces-preset-styles'."
   :type 'string
   :group 'engrave-faces)
 
-(defun engrave-faces-html-gen-stylesheet (&optional indent)
+(defun engrave-faces-html-gen-stylesheet (&optional theme indent)
   "Generate a preamble which provides short commands for the preset styles.
 See `engrave-faces-preset-styles' and `engrave-faces-html-output-style'."
   (let ((stylesheet
  (mapconcat
   (lambda (face-style)
 (engrave-faces-html--gen-stylesheet-entry (car face-style) (cdr 
face-style)))
-  engrave-faces-preset-styles
+  (if theme
+  (engrave-faces-get-theme theme)
+engrave-faces-current-preset-style)
   "\n")))
 (if indent
 (mapconcat (lambda (line)
@@ -125,7 +127,7 @@ See `engrave-faces-preset-styles' and 
`engrave-faces-html-output-style'."
(buffer-name)))
   "
 

[elpa] externals/engrave-faces d3a8a55674 1/6: Update macro-generated interactive specs

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit d3a8a55674f15db4714b9130ada7c8ca9fc650c3
Author: TEC 
Commit: TEC 

Update macro-generated interactive specs
---
 engrave-faces.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index d31167574a..fef009e033 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -91,7 +91,7 @@ and cause a -standalone version of the buffer transforming 
function to be create
(list ,backend :face-transformer ,face-transformer 
:extension ,extension))
   (defun ,(intern (concat "engrave-faces-" backend "-buffer")) 
(&optional theme switch-to-result)
 ,(concat "Convert buffer to " backend " formatting.")
-(interactive '(t))
+(interactive '(nil t))
 (let ((buf (engrave-faces-buffer ,backend theme)))
   (when switch-to-result
 (switch-to-buffer buf)
@@ -99,7 +99,7 @@ and cause a -standalone version of the buffer transforming 
function to be create
   buf))
   ,(when standalone-transformer
  `(defun ,(intern (concat "engrave-faces-" backend 
"-buffer-standalone")) (&optional theme switch-to-result)
-(interactive '(t))
+(interactive '(nil t))
 ,(concat "Export the current buffer to a standalone " backend 
" buffer.")
 (let ((buf (engrave-faces-buffer ,backend theme)))
   (with-current-buffer buf
@@ -110,7 +110,7 @@ and cause a -standalone version of the buffer transforming 
function to be create
   buf)))
   (defun ,(intern (concat "engrave-faces-" backend "-file")) (file 
&optional out-file theme open-result)
 ,(concat "Convert file to " backend " formatting.")
-(interactive (list buffer-file-name nil t))
+(interactive (list buffer-file-name nil nil t))
 (unless out-file
   (setq out-file (concat file ,extension)))
 (engrave-faces-file file out-file ,backend theme 
,standalone-transformer)



[elpa] externals/engrave-faces 0efa22cd62 6/6: LaTeX: Don't draw colorbox for default background

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 0efa22cd621c11d4b1912525487d3caf46218102
Author: TEC 
Commit: TEC 

LaTeX: Don't draw colorbox for default background
---
 engrave-faces-latex.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/engrave-faces-latex.el b/engrave-faces-latex.el
index 48dbbdbec8..093ded07cf 100644
--- a/engrave-faces-latex.el
+++ b/engrave-faces-latex.el
@@ -55,11 +55,15 @@ See `engrave-faces-preset-styles' and 
`engrave-faces-latex-output-style'."
 (concat (when fg (format "\\definecolor{EF%s}{HTML}{%s}\n" short 
(substring fg 1)))
 (when bg (format "\\definecolor{Ef%s}{HTML}{%s}\n" short 
(substring bg 1)))
 "\\newcommand{\\EF" short "}[1]{"
-(when bg (concat "\\colorbox{Ef" short "}{\\efstrut{}"))
+(when (and bg (not (eq face 'default)))
+  (concat "\\colorbox{Ef" short "}{\\efstrut{}"))
 (when fg (concat "\\textcolor{EF" short "}{"))
 (when st "\\sout{") (when bl "\\textbf{") (when it "\\textit{")
 "#1}"
-(when bg "}") (when fg "}") (when st "}") (when bl "}") (when it 
"}")
+(make-string
+ (cl-count-if #'identity
+  (list (and bg (not (eq face 'default))) fg st bl it))
+ ?})
 " % " (symbol-name face
 
 (defun engrave-faces-latex-face-apply (faces content)



[elpa] externals/engrave-faces updated (248196fb4d -> 0efa22cd62)

2022-05-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/engrave-faces.

  from  248196fb4d Fix typo in readme
   new  d3a8a55674 Update macro-generated interactive specs
   new  32fb760ca8 Don't record height/strike-through of default face
   new  7bb7f46e22 Reinterpret t theme as current theme
   new  e857ef72ed Redraw display after switching back to orig theme
   new  f4d3af3887 Elaborate on face preset format in docstring
   new  0efa22cd62 LaTeX: Don't draw colorbox for default background


Summary of changes:
 engrave-faces-latex.el |  8 ++--
 engrave-faces.el   | 40 ++--
 2 files changed, 36 insertions(+), 12 deletions(-)



[elpa] externals/engrave-faces 7bb7f46e22 3/6: Reinterpret t theme as current theme

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 7bb7f46e221911999ea5a4d165b255b79ecb6f2f
Author: TEC 
Commit: TEC 

Reinterpret t theme as current theme
---
 engrave-faces.el | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index 7b723650e4..d1f8386a74 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -378,7 +378,10 @@ Unconditionally returns nil when FACES is default."
 
 (defun engrave-faces-get-theme (theme &optional noput)
   "Obtain the preset style for THEME.
-Unless NOPUT is non-nil, "
+Unless NOPUT is non-nil, the preset will be added to `engrave-faces-themes'.
+The theme t is treated as shorthand for the current theme."
+  (when (eq theme t)
+(setq theme (car custom-enabled-themes)))
   (if-let ((theme-preset (alist-get theme engrave-faces-themes)))
   (setq engrave-faces-current-preset-style theme-preset)
 (if (or (eq theme (car custom-enabled-themes))



[elpa] externals/engrave-faces f4d3af3887 5/6: Elaborate on face preset format in docstring

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit f4d3af38871dbcef63a2f1936b74c912c2047dcf
Author: TEC 
Commit: TEC 

Elaborate on face preset format in docstring
---
 engrave-faces.el | 25 -
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index aebf6ee050..04d0576ad9 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -324,13 +324,28 @@ cdrs in the form of `engrave-faces-current-preset-style'."
   (alist-get 'default engrave-faces-themes)
   "Overriding face values.
 
-By setting :foreground, :background, etc. a certain theme can be set for
-the faces.  The face attributes here will also be used when calculating
-inherited styles.
+This is constructed as an alist of faces, and their face attributes as a plist.
+For example, the \"default\" face coud be specified by:
+
+  (default :foreground \"#00\" :background \"#FF\")
+
+By setting :foreground, :background, etc. a certain theme can be
+set for the faces. The face attributes here will also be used
+when calculating inherited styles.
 
 Faces here will represented more compactly when possible, by using the
-:short or :slug parameter to produce a named version styles, wheras other
-faces will need to be explicitly styled each time they're used."
+:short or :slug parameter to produce a named version styles,
+- :short should be a descriptive string comprised of the character class
+  [A-Za-z0-9-_]
+- :slug should be a compact string (i.e. as short as possible), comprised of 
the
+  character class [A-Za-Z]
+
+For example, for the \"default\" face,
+
+  (default :short \"def\" :slug \"D\"
+   :foreground \"#00\" :background \"#FF\")
+
+Other faces will need to be styled explicitly each time they are used."
   :type '(repeat
   (cons (symbol :tag "Face")
 (plist :key-type (choice



[elpa] externals/engrave-faces 32fb760ca8 2/6: Don't record height/strike-through of default face

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit 32fb760ca86c8aa1152fef019f8bfc2903f7a66e
Author: TEC 
Commit: TEC 

Don't record height/strike-through of default face
---
 engrave-faces.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/engrave-faces.el b/engrave-faces.el
index fef009e033..7b723650e4 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -370,7 +370,8 @@ Unconditionally returns nil when FACES is default."
  (let ((attr-val (when (facep (car face-style))
(face-attribute (car face-style) attr 
nil t
(when (or (engrave-faces--check-nondefault attr 
attr-val)
- (eq (car face-style) 'default))
+ (and (eq (car face-style) 'default)
+  (not (memq attr '(:height 
:strike-through)
  (list attr attr-val
engrave-faces-attributes-of-interest
engrave-faces-preset-styles))



[elpa] externals/engrave-faces e857ef72ed 4/6: Redraw display after switching back to orig theme

2022-05-07 Thread ELPA Syncer
branch: externals/engrave-faces
commit e857ef72ed7206e6bb6fba8e04abf08ecea520e7
Author: TEC 
Commit: TEC 

Redraw display after switching back to orig theme
---
 engrave-faces.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/engrave-faces.el b/engrave-faces.el
index d1f8386a74..aebf6ee050 100644
--- a/engrave-faces.el
+++ b/engrave-faces.el
@@ -394,6 +394,7 @@ The theme t is treated as shorthand for the current theme."
(load-theme theme t)
(setq spec (engrave-faces-generate-preset))
(load-theme old-theme t)
+   (redraw-display)
spec
   (unless noput
 (push (cons theme spec) engrave-faces-themes))



[elpa] externals/kind-icon f9d803cc12: Right-pad 2 char badges in terminal

2022-05-07 Thread ELPA Syncer
branch: externals/kind-icon
commit f9d803cc12a9406e7d7981f7ab3c065576055202
Author: JD Smith <93749+jdtsm...@users.noreply.github.com>
Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>

Right-pad 2 char badges in terminal
---
 kind-icon.el | 35 +++
 1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/kind-icon.el b/kind-icon.el
index f1f4edb137..c8f7a15ba2 100644
--- a/kind-icon.el
+++ b/kind-icon.el
@@ -255,6 +255,7 @@ background-color."
   kind-face-bg
 default-bg)))
 (dfw (default-font-width))
+(terminal (eq dfw 1))
 (half (/ dfw 2))
 (pad-right (propertize " " 'display `(space :width (,half
 (pad-left (propertize " " 'display `(space :width (,(- dfw 
half)
@@ -269,9 +270,11 @@ background-color."
 (let* ((txt (truncate-string-to-width (cadr map) 2))
(len (length txt))
(txt-disp (if (eq len 2)
- (concat pad-left
- (propertize "_" 'display 
txt)
- pad-right)
+ (if terminal
+ (concat txt " ")
+   (concat pad-left
+   (propertize "_" 
'display txt)
+   pad-right))
(concat " " txt " "
   (propertize txt-disp 'face
   `(:weight bold :foreground ,col 
:background ,bg-col))
@@ -315,25 +318,25 @@ and its result used as the affixation suffix, first 
setting the
 
 ;;;###autoload
 (defun kind-icon-enhance-completion (completion-function)
-"A wrapper for completion-in-region-functions.
+  "A wrapper for completion-in-region-functions.
 This wrapper sets a custom affixation-function which places an
 icon in the prefix slot. Use it like:
 
   (setq completion-in-region-function 
  (kind-icon-enhance-completion 
completion-in-region-function))"
-(lambda (start end table &optional pred)
-  (let* ((str (buffer-substring start (point)))
-(metadata (completion-metadata str table pred))
-(kind-func (kind-icon--metadata-get metadata "company-kind"))
-(ann-func (kind-icon--metadata-get metadata "annotation-function"))
-(aff-func (kind-icon--metadata-get metadata 
"affixation-function")))
-   (when (and kind-func (not aff-func)) ;; add a custom affixation function
- (kind-icon-reset-cache)
- (setq completion-extra-properties
-   (plist-put completion-extra-properties :affixation-function
-  (kind-icon--affixation-function kind-func 
ann-func)
-  (funcall completion-function start end table pred)))
+  (lambda (start end table &optional pred)
+(let* ((str (buffer-substring start (point)))
+  (metadata (completion-metadata str table pred))
+  (kind-func (kind-icon--metadata-get metadata "company-kind"))
+  (ann-func (kind-icon--metadata-get metadata "annotation-function"))
+  (aff-func (kind-icon--metadata-get metadata "affixation-function")))
+  (when (and kind-func (not aff-func)) ;; add a custom affixation function
+   (kind-icon-reset-cache)
+   (setq completion-extra-properties
+ (plist-put completion-extra-properties :affixation-function
+(kind-icon--affixation-function kind-func ann-func)
+(funcall completion-function start end table pred)))
 
 (provide 'kind-icon)
 ;;; kind-icon.el ends here.



[elpa] externals/logos 70f05c08b7: Add note on status of bug with mode line redraw

2022-05-07 Thread ELPA Syncer
branch: externals/logos
commit 70f05c08b749b6b0e916cb6130d9d432af044917
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Add note on status of bug with mode line redraw
---
 logos.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/logos.el b/logos.el
index 2eeef5cb9f..b6c251c56b 100644
--- a/logos.el
+++ b/logos.el
@@ -393,6 +393,10 @@ options: `logos-scroll-lock', `logos-variable-pitch',
 ;;
 ;; When using `logos-olivetti' the problem no longer occurs, presumably
 ;; because Olivetti triggers some kind of redraw.  Which one?
+;;
+;; UPDATE 2022-05-08: If I use `redraw-display', the mode line is
+;; restored even without `logos-olivetti'.  This, however, feels like
+;; the wrong thing to do because it affects all visible frames.
 (defun logos--hide-mode-line ()
   "Set `logos-hide-mode-line'."
   (when logos-hide-mode-line



[elpa] externals/pyim 4016084880 1/2: 添加简单的云输入法功能,参考 fcitx5.

2022-05-07 Thread ELPA Syncer
branch: externals/pyim
commit 4016084880ce2dbae1672c7db31134d64349a78c
Author: Feng Shu 
Commit: Feng Shu 

添加简单的云输入法功能,参考 fcitx5.

* pyim.el (pyim-cloudim): required.

* pyim-cloudim.el: New file.

* pyim-candidates.el (pyim-candidates-cloud-search-function): New 
variable.
(pyim-candidates-cloud-search): New function.
(pyim-candidates-create:quanpin): Use pyim-candidates-cloud-search.

* README.org (使用云拼音): New.

* Development.org (整体架构): Add cloudpinyin.

* tests/pyim-tests.el (pyim-tests-pyim-candidates-cloud-search, 
pyim-tests-pyim-cloudim): New test.
---
 Development.org |  6 ++--
 README.org  | 10 ++
 pyim-candidates.el  |  9 ++
 pyim-cloudim.el | 90 +
 pyim.el |  3 ++
 tests/pyim-tests.el | 56 +
 6 files changed, 171 insertions(+), 3 deletions(-)

diff --git a/Development.org b/Development.org
index 70fc29976f..db86cdfd3d 100644
--- a/Development.org
+++ b/Development.org
@@ -34,9 +34,9 @@
 | | | |
 | |
 | | +-+
 | |
 | |
 | |
-| |  PYIM 持久化层:   探针:  
  | |
-| |  --   
  | |
-| |  Dregcache
Probe | |
+| |  PYIM 持久化层:云输入法:  探针:| 
|
+| |  ---  
  | |
+| |  Dregcache Cloudim
Probe | |
 | |  Dhashcache
 | |
 | |  Dict  
 | |
 | 
+-+
 |
diff --git a/README.org b/README.org
index 4684ec4d92..50ad30fec3 100644
--- a/README.org
+++ b/README.org
@@ -101,6 +101,9 @@ pyim 的目标是: *尽最大的努力成为一个好用的 Emacs 中文输入
 ;; (pyim-default-scheme 'wubi)
 ;; (pyim-default-scheme 'cangjie)
 
+;; 我使用云拼音
+;; (setq pyim-cloudim 'baidu)
+
 ;; pyim 探针设置
 ;; 设置 pyim 探针设置,这是 pyim 高级功能设置,可以实现 *无痛* 中英文切换 :-)
 ;; 我自己使用的中英文动态切换规则是:
@@ -159,6 +162,13 @@ pyim 默认使用 pyim-basedict 词库, 这个词库的词条量8万左右,是
 | C-DEL 或  C-BACKSPACE | 删除最后一个拼音   |
 | M-DEL 或  M-BACKSPACE | 删除最后一个拼音   |
 | F1,F2,F3,F4   | 以词定字   |
+** 使用云拼音
+pyim 可以使用搜索引擎提供的云拼音服务,比如:
+
+#+begin_example
+(setq pyim-cloudim 'baidu)
+;; (setq pyim-cloudim 'google)
+#+end_example
 
 ** 使用双拼模式
 pyim 支持双拼输入模式,用户可以通过变量 `pyim-default-scheme' 来设定:
diff --git a/pyim-candidates.el b/pyim-candidates.el
index 7311afd0cd..2a17d1d275 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -52,6 +52,9 @@
 
 细节信息请参考 `pyim-page-refresh' 的 docstring.")
 
+(defvar pyim-candidates-cloud-search-function nil
+  "`pyim-candidates-cloud-search' 调用的函数.")
+
 (pyim-register-local-variables
  '(pyim-candidates pyim-candidate-position))
 
@@ -155,6 +158,7 @@ IMOBJS 获得候选词条。"
 pyim-candidates
   ;; NOTE: 让第一个词保持不变是不是合理,有待进一步的观察。
   `(,(car pyim-candidates)
+,@(pyim-candidates-cloud-search str 'pinyin)
 ,@(pyim-candidates-search-buffer
(pyim-cregexp-build str 3 t))
 ,@(cdr pyim-candidates
@@ -176,6 +180,11 @@ IMOBJS 获得候选词条。"
   (append (pyim-subconcat (nreverse output) "")
   candidates
 
+(defun pyim-candidates-cloud-search (string input-method)
+  "云搜索 STRING, 返回候选词条列表."
+  (ignore-errors
+(funcall pyim-candidates-cloud-search-function string input-method)))
+
 (defun pyim-candidates-search-buffer (regexp)
   "在当前 buffer 中使用 REGEXP 搜索词条。"
   (save-excursion
diff --git a/pyim-cloudim.el b/pyim-cloudim.el
new file mode 100644
index 00..cf8d347581
--- /dev/null
+++ b/pyim-cloudim.el
@@ -0,0 +1,90 @@
+;;; pyim-cloudim.el --- cloud input method support for pyim.-*- 
lexical-binding: t; -*-
+
+;; * Header
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Feng Shu 
+;; Maintainer: Feng Shu 
+;; URL: https://github.com/tumashu/pyim
+;; Keywords: convenience, Chinese, pinyin, input-method
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that 

[elpa] externals/pyim 5eb65e0c84 2/2: Revert "添加简单的云输入法功能,参考 fcitx5."

2022-05-07 Thread ELPA Syncer
branch: externals/pyim
commit 5eb65e0c84e17944633fedbd47bc74d276081f33
Author: Feng Shu 
Commit: Feng Shu 

Revert "添加简单的云输入法功能,参考 fcitx5."

This reverts commit 4016084880ce2dbae1672c7db31134d64349a78c.
---
 Development.org |  6 ++--
 README.org  | 10 --
 pyim-candidates.el  |  9 --
 pyim-cloudim.el | 90 -
 pyim.el |  3 --
 tests/pyim-tests.el | 56 -
 6 files changed, 3 insertions(+), 171 deletions(-)

diff --git a/Development.org b/Development.org
index db86cdfd3d..70fc29976f 100644
--- a/Development.org
+++ b/Development.org
@@ -34,9 +34,9 @@
 | | | |
 | |
 | | +-+
 | |
 | |
 | |
-| |  PYIM 持久化层:云输入法:  探针:| 
|
-| |  ---  
  | |
-| |  Dregcache Cloudim
Probe | |
+| |  PYIM 持久化层:   探针:  
  | |
+| |  --   
  | |
+| |  Dregcache
Probe | |
 | |  Dhashcache
 | |
 | |  Dict  
 | |
 | 
+-+
 |
diff --git a/README.org b/README.org
index 50ad30fec3..4684ec4d92 100644
--- a/README.org
+++ b/README.org
@@ -101,9 +101,6 @@ pyim 的目标是: *尽最大的努力成为一个好用的 Emacs 中文输入
 ;; (pyim-default-scheme 'wubi)
 ;; (pyim-default-scheme 'cangjie)
 
-;; 我使用云拼音
-;; (setq pyim-cloudim 'baidu)
-
 ;; pyim 探针设置
 ;; 设置 pyim 探针设置,这是 pyim 高级功能设置,可以实现 *无痛* 中英文切换 :-)
 ;; 我自己使用的中英文动态切换规则是:
@@ -162,13 +159,6 @@ pyim 默认使用 pyim-basedict 词库, 这个词库的词条量8万左右,是
 | C-DEL 或  C-BACKSPACE | 删除最后一个拼音   |
 | M-DEL 或  M-BACKSPACE | 删除最后一个拼音   |
 | F1,F2,F3,F4   | 以词定字   |
-** 使用云拼音
-pyim 可以使用搜索引擎提供的云拼音服务,比如:
-
-#+begin_example
-(setq pyim-cloudim 'baidu)
-;; (setq pyim-cloudim 'google)
-#+end_example
 
 ** 使用双拼模式
 pyim 支持双拼输入模式,用户可以通过变量 `pyim-default-scheme' 来设定:
diff --git a/pyim-candidates.el b/pyim-candidates.el
index 2a17d1d275..7311afd0cd 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -52,9 +52,6 @@
 
 细节信息请参考 `pyim-page-refresh' 的 docstring.")
 
-(defvar pyim-candidates-cloud-search-function nil
-  "`pyim-candidates-cloud-search' 调用的函数.")
-
 (pyim-register-local-variables
  '(pyim-candidates pyim-candidate-position))
 
@@ -158,7 +155,6 @@ IMOBJS 获得候选词条。"
 pyim-candidates
   ;; NOTE: 让第一个词保持不变是不是合理,有待进一步的观察。
   `(,(car pyim-candidates)
-,@(pyim-candidates-cloud-search str 'pinyin)
 ,@(pyim-candidates-search-buffer
(pyim-cregexp-build str 3 t))
 ,@(cdr pyim-candidates
@@ -180,11 +176,6 @@ IMOBJS 获得候选词条。"
   (append (pyim-subconcat (nreverse output) "")
   candidates
 
-(defun pyim-candidates-cloud-search (string input-method)
-  "云搜索 STRING, 返回候选词条列表."
-  (ignore-errors
-(funcall pyim-candidates-cloud-search-function string input-method)))
-
 (defun pyim-candidates-search-buffer (regexp)
   "在当前 buffer 中使用 REGEXP 搜索词条。"
   (save-excursion
diff --git a/pyim-cloudim.el b/pyim-cloudim.el
deleted file mode 100644
index cf8d347581..00
--- a/pyim-cloudim.el
+++ /dev/null
@@ -1,90 +0,0 @@
-;;; pyim-cloudim.el --- cloud input method support for pyim.-*- 
lexical-binding: t; -*-
-
-;; * Header
-;; Copyright (C) 2021 Free Software Foundation, Inc.
-
-;; Author: Feng Shu 
-;; Maintainer: Feng Shu 
-;; URL: https://github.com/tumashu/pyim
-;; Keywords: convenience, Chinese, pinyin, input-method
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software: you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs.  If not, see .
-
-;;; Commentary:
-
-;;; Code:
-;; * 代码   :code:
-(requi

[elpa] externals/pyim updated (76bf7a5a21 -> 5eb65e0c84)

2022-05-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/pyim.

  from  76bf7a5a21 pyim-test use pyim-basedict v0.5.0
   new  4016084880 添加简单的云输入法功能,参考 fcitx5.
   new  5eb65e0c84 Revert "添加简单的云输入法功能,参考 fcitx5."


Summary of changes:



[elpa] externals/org b5f0efc049: ob-plantuml: Allow setting PlantUML args for jar file

2022-05-07 Thread ELPA Syncer
branch: externals/org
commit b5f0efc0491c0c1b354ca2b8686e2f5aa8e6ee11
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

ob-plantuml: Allow setting PlantUML args for jar file

* lisp/ob-plantuml.el (org-plantuml-args): Rename
`org-plantuml-executable-args' to `org-plantuml-args'.
(org-babel-execute:plantuml): Use `org-plantuml-args' when calling
jar.
* lisp/org-compat.el (org-plantuml-executable-args): Obsolete old
variable name.
* etc/ORG-NEWS (=org-plantump-executable-args= is renamed and applies
to jar as well): Document change.

See the discussion in 
https://list.orgmode.org/orgmode/87y23hr045.fsf@localhost/
---
 etc/ORG-NEWS|  5 +
 lisp/ob-plantuml.el | 14 +++---
 lisp/org-compat.el  |  2 ++
 3 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 1e8558c7b8..27de6da624 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -224,6 +224,11 @@ files that are exported to Texinfo.
 
 =org-at-heading-p= now returns t by default on headings inside folds.
 Passing optional argument will produce the old behaviour.
+** Removed or renamed functions and variables
+*** =org-plantump-executable-args= is renamed and applies to jar as well
+
+The new variable name is =org-plantuml-args=.  It now applies to both
+jar PlantUML file and executable.
 
 ** Miscellaneous
 
diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index d237b0fe3d..6e1b1b1710 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -65,8 +65,8 @@ You can also configure extra arguments via 
`org-plantuml-executable-args'."
   :package-version '(Org . "9.4")
   :type 'string)
 
-(defcustom org-plantuml-executable-args (list "-headless")
-  "The arguments passed to plantuml executable when executing PlantUML."
+(defcustom org-plantuml-args (list "-headless")
+  "The arguments passed to plantuml when executing PlantUML."
   :group 'org-babel
   :package-version '(Org . "9.4")
   :type '(repeat string))
@@ -116,15 +116,15 @@ This function is called by `org-babel-execute-src-block'."
 (java (or (cdr (assq :java params)) ""))
 (executable (cond ((eq org-plantuml-exec-mode 'plantuml) 
org-plantuml-executable-path)
   (t "java")))
-(executable-args (cond ((eq org-plantuml-exec-mode 'plantuml) 
org-plantuml-executable-args)
+(executable-args (cond ((eq org-plantuml-exec-mode 'plantuml) 
org-plantuml-args)
((string= "" org-plantuml-jar-path)
 (error "`org-plantuml-jar-path' is not set"))
((not (file-exists-p org-plantuml-jar-path))
 (error "Could not find plantuml.jar at %s" 
org-plantuml-jar-path))
-   (t (list java
-"-Djava.awt.headless=true"
-"-jar"
-(shell-quote-argument 
(expand-file-name org-plantuml-jar-path))
+   (t `(,java
+"-jar"
+,(shell-quote-argument (expand-file-name 
org-plantuml-jar-path))
+ ,@org-plantuml-args
 (full-body (org-babel-plantuml-make-body body params))
 (cmd (mapconcat #'identity
 (append
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index f599e246e4..a29f206a4b 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -471,6 +471,8 @@ Counting starts at 1."
 (define-obsolete-variable-alias 'org-reveal-start-hook
   'org-fold-reveal-start-hook "9.6")
 (define-obsolete-function-alias 'org-file-url-p 'org-url-p "9.6")
+(define-obsolete-variable-alias 'org-plantuml-executable-args 
'org-plantuml-args
+  "Org 9.6")
 (defun org-in-fixed-width-region-p ()
   "Non-nil if point in a fixed-width region."
   (save-match-data



[elpa] externals/pyim updated (5eb65e0c84 -> 069ff6b6b0)

2022-05-07 Thread ELPA Syncer
elpasync pushed a change to branch externals/pyim.

  from  5eb65e0c84 Revert "添加简单的云输入法功能,参考 fcitx5."
   new  921e72f644 Revert "Revert "添加简单的云输入法功能,参考 fcitx5.""
   new  069ff6b6b0 Test function json-parse-buffer exist or not.


Summary of changes:
 Development.org |  6 ++--
 README.org  | 18 +++
 pyim-candidates.el  |  9 ++
 pyim-cloudim.el | 92 +
 pyim.el |  3 ++
 tests/pyim-tests.el | 58 +
 6 files changed, 183 insertions(+), 3 deletions(-)
 create mode 100644 pyim-cloudim.el



[elpa] externals/pyim 921e72f644 1/2: Revert "Revert "添加简单的云输入法功能,参考 fcitx5.""

2022-05-07 Thread ELPA Syncer
branch: externals/pyim
commit 921e72f6440ed1554f4ca0a1742b3f2c4cc11334
Author: Feng Shu 
Commit: Feng Shu 

Revert "Revert "添加简单的云输入法功能,参考 fcitx5.""

This reverts commit 5eb65e0c84e17944633fedbd47bc74d276081f33.
---
 Development.org |  6 ++--
 README.org  | 10 ++
 pyim-candidates.el  |  9 ++
 pyim-cloudim.el | 90 +
 pyim.el |  3 ++
 tests/pyim-tests.el | 56 +
 6 files changed, 171 insertions(+), 3 deletions(-)

diff --git a/Development.org b/Development.org
index 70fc29976f..db86cdfd3d 100644
--- a/Development.org
+++ b/Development.org
@@ -34,9 +34,9 @@
 | | | |
 | |
 | | +-+
 | |
 | |
 | |
-| |  PYIM 持久化层:   探针:  
  | |
-| |  --   
  | |
-| |  Dregcache
Probe | |
+| |  PYIM 持久化层:云输入法:  探针:| 
|
+| |  ---  
  | |
+| |  Dregcache Cloudim
Probe | |
 | |  Dhashcache
 | |
 | |  Dict  
 | |
 | 
+-+
 |
diff --git a/README.org b/README.org
index 4684ec4d92..50ad30fec3 100644
--- a/README.org
+++ b/README.org
@@ -101,6 +101,9 @@ pyim 的目标是: *尽最大的努力成为一个好用的 Emacs 中文输入
 ;; (pyim-default-scheme 'wubi)
 ;; (pyim-default-scheme 'cangjie)
 
+;; 我使用云拼音
+;; (setq pyim-cloudim 'baidu)
+
 ;; pyim 探针设置
 ;; 设置 pyim 探针设置,这是 pyim 高级功能设置,可以实现 *无痛* 中英文切换 :-)
 ;; 我自己使用的中英文动态切换规则是:
@@ -159,6 +162,13 @@ pyim 默认使用 pyim-basedict 词库, 这个词库的词条量8万左右,是
 | C-DEL 或  C-BACKSPACE | 删除最后一个拼音   |
 | M-DEL 或  M-BACKSPACE | 删除最后一个拼音   |
 | F1,F2,F3,F4   | 以词定字   |
+** 使用云拼音
+pyim 可以使用搜索引擎提供的云拼音服务,比如:
+
+#+begin_example
+(setq pyim-cloudim 'baidu)
+;; (setq pyim-cloudim 'google)
+#+end_example
 
 ** 使用双拼模式
 pyim 支持双拼输入模式,用户可以通过变量 `pyim-default-scheme' 来设定:
diff --git a/pyim-candidates.el b/pyim-candidates.el
index 7311afd0cd..2a17d1d275 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -52,6 +52,9 @@
 
 细节信息请参考 `pyim-page-refresh' 的 docstring.")
 
+(defvar pyim-candidates-cloud-search-function nil
+  "`pyim-candidates-cloud-search' 调用的函数.")
+
 (pyim-register-local-variables
  '(pyim-candidates pyim-candidate-position))
 
@@ -155,6 +158,7 @@ IMOBJS 获得候选词条。"
 pyim-candidates
   ;; NOTE: 让第一个词保持不变是不是合理,有待进一步的观察。
   `(,(car pyim-candidates)
+,@(pyim-candidates-cloud-search str 'pinyin)
 ,@(pyim-candidates-search-buffer
(pyim-cregexp-build str 3 t))
 ,@(cdr pyim-candidates
@@ -176,6 +180,11 @@ IMOBJS 获得候选词条。"
   (append (pyim-subconcat (nreverse output) "")
   candidates
 
+(defun pyim-candidates-cloud-search (string input-method)
+  "云搜索 STRING, 返回候选词条列表."
+  (ignore-errors
+(funcall pyim-candidates-cloud-search-function string input-method)))
+
 (defun pyim-candidates-search-buffer (regexp)
   "在当前 buffer 中使用 REGEXP 搜索词条。"
   (save-excursion
diff --git a/pyim-cloudim.el b/pyim-cloudim.el
new file mode 100644
index 00..cf8d347581
--- /dev/null
+++ b/pyim-cloudim.el
@@ -0,0 +1,90 @@
+;;; pyim-cloudim.el --- cloud input method support for pyim.-*- 
lexical-binding: t; -*-
+
+;; * Header
+;; Copyright (C) 2021 Free Software Foundation, Inc.
+
+;; Author: Feng Shu 
+;; Maintainer: Feng Shu 
+;; URL: https://github.com/tumashu/pyim
+;; Keywords: convenience, Chinese, pinyin, input-method
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
+;;; Code:
+;; * 代码   :code:
+(

[elpa] externals/pyim 069ff6b6b0 2/2: Test function json-parse-buffer exist or not.

2022-05-07 Thread ELPA Syncer
branch: externals/pyim
commit 069ff6b6b039b16ccc135a4288eebfcd76a0fbd2
Author: Feng Shu 
Commit: Feng Shu 

Test function json-parse-buffer exist or not.

* pyim-cloudim.el (pyim-cloudim-parse-baidu-buffer)
(pyim-cloudim-parse-google-buffer): test function json-parse-buffer.
---
 README.org  | 12 ++--
 pyim-cloudim.el | 10 ++
 tests/pyim-tests.el | 34 ++
 3 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/README.org b/README.org
index 50ad30fec3..002610c981 100644
--- a/README.org
+++ b/README.org
@@ -162,14 +162,22 @@ pyim 默认使用 pyim-basedict 词库, 这个词库的词条量8万左右,是
 | C-DEL 或  C-BACKSPACE | 删除最后一个拼音   |
 | M-DEL 或  M-BACKSPACE | 删除最后一个拼音   |
 | F1,F2,F3,F4   | 以词定字   |
-** 使用云拼音
-pyim 可以使用搜索引擎提供的云拼音服务,比如:
+** 使用云输入法
+pyim 可以使用搜索引擎提供的云输入法服务,比如:
 
 #+begin_example
 (setq pyim-cloudim 'baidu)
 ;; (setq pyim-cloudim 'google)
 #+end_example
 
+不过,由于 json 解析库的原因,Emacs 旧版本可能无法使用云输入法,可以通过下面的函
+数测试一下。
+
+#+begin_example
+(pyim-cloudim:baidu "nihao" 'pinyin)
+#+end_example
+
+
 ** 使用双拼模式
 pyim 支持双拼输入模式,用户可以通过变量 `pyim-default-scheme' 来设定:
 
diff --git a/pyim-cloudim.el b/pyim-cloudim.el
index cf8d347581..59498c5b2b 100644
--- a/pyim-cloudim.el
+++ b/pyim-cloudim.el
@@ -54,7 +54,8 @@
 
 (defun pyim-cloudim:baidu (string input-method)
   "使用 baidu 云 INPUT-METHOD 输入法引擎搜索 STRING, 获取词条列表。"
-  (when (equal input-method 'pinyin)
+  (when (and (equal input-method 'pinyin)
+ (functionp 'json-parse-buffer))
 (with-current-buffer (url-retrieve-synchronously
   (format "https://olime.baidu.com/py?py=%s"; string)
   t nil 0.5)
@@ -65,12 +66,13 @@
   (goto-char (point-min))
   (search-forward "\n\n" nil t)
   (delete-region (point-min) (point))
-  (let ((data (json-parse-buffer)))
+  (let ((data (funcall 'json-parse-buffer)))
 (list (elt (elt (elt (gethash "0" data) 0) 0) 0
 
 (defun pyim-cloudim:google (string input-method)
   "使用 google 云 INPUT-METHOD 输入法引擎搜索 STRING, 获取词条列表。"
-  (when (eq input-method 'pinyin)
+  (when (and (eq input-method 'pinyin)
+ (functionp 'json-parse-buffer))
 (with-current-buffer (url-retrieve-synchronously
   (format 
"https://www.google.cn/inputtools/request?ime=pinyin&text=%s"; string)
   t nil 0.5)
@@ -81,7 +83,7 @@
   (goto-char (point-min))
   (search-forward "\n\n" nil t)
   (delete-region (point-min) (point))
-  (let ((data (json-parse-buffer)))
+  (let ((data (funcall 'json-parse-buffer)))
 (list (elt (elt (elt (elt data 1) 0) 1) 0
 
 ;; * Footer
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 2d2e1a68fc..ead64cebce 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -939,17 +939,18 @@ yin-xing 因行
 (should (eq (length words) 51
 
 (ert-deftest pyim-tests-pyim-cloudim ()
-  (with-temp-buffer
-(insert "HTTP/1.1 200 OK
+  (when (functionp 'json-parse-buffer)
+(with-temp-buffer
+  (insert "HTTP/1.1 200 OK
 Content-Length: 88
 Content-Type: text/plain; charset=utf-8
 Date: Sun, 08 May 2022 00:56:13 GMT
 
 
{\"0\":[[[\"你好\",5,{\"pinyin\":\"ni'hao\",\"type\":\"IMEDICT\"}]]],\"1\":\"ni'hao\",\"result\":[null]}")
-(should (equal (pyim-cloudim-parse-baidu-buffer) '("你好"
+  (should (equal (pyim-cloudim-parse-baidu-buffer) '("你好"
 
-  (with-temp-buffer
-(insert "HTTP/1.1 200 OK
+(with-temp-buffer
+  (insert "HTTP/1.1 200 OK
 Date: Sun, 08 May 2022 03:33:56 GMT
 Pragma: no-cache
 Expires: -1
@@ -965,22 +966,23 @@ Alt-Svc: h3=\":443\"; ma=2592000,h3-29=\":443\"; 
ma=2592000,h3-Q050=\":443\"; ma
 Transfer-Encoding: chunked
 
 [\"SUCCESS\",[[\"nihao\",[\"你好\"],[],{\"annotation\":[\"ni 
hao\"],\"candidate_type\":[0],\"lc\":[\"16 16\"]}]]]")
-(should (equal (pyim-cloudim-parse-google-buffer) '("你好"
+  (should (equal (pyim-cloudim-parse-google-buffer) '("你好"
 
-  (should (equal (pyim-cloudim:baidu "nihao" 'pinyin) '("你好")))
-  (should (equal (pyim-cloudim:google "nihao" 'pinyin) '("你好")))
+(when (not noninteractive)
+  (should (equal (pyim-cloudim:baidu "nihao" 'pinyin) '("你好")))
+  (should (equal (pyim-cloudim:google "nihao" 'pinyin) '("你好")))
 
-  (let ((pyim-cloudim 'baidu))
-(should (equal (pyim-cloudim "nihao" 'pinyin) '("你好"
+  (let ((pyim-cloudim 'baidu))
+(should (equal (pyim-cloudim "nihao" 'pinyin) '("你好"
 
-  (let ((pyim-cloudim 'google))
-(should (equal (pyim-cloudim "nihao" 'pinyin) '("你好"
+  (let ((pyim-cloudim 'google))
+(should (equal (pyim-cloudim "nihao" 'pinyin) '("你好"
 
-  (let ((pyim-cloudim 'xxx))
-(should (not (pyim-cloudim "nihao" 'pinyin
+  (let ((pyim-cloudim 'xxx))
+(should (not (pyim-cloudim "nihao" 'pinyin
 
-  (let ((pyim-cloudim nil))
-(should (not (pyim-cloudim "nihao" 'pinyin)
+  (let ((pyim-cloudim nil))
+(should