[elpa] externals/org 26e6881: element: Integrate some syntax constants

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 26e68816bdae78c24a26274fe3e79df8998f3488
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

element: Integrate some syntax constants

* lisp/org-element.el (org-element-archive-tag):
(org-element-clock-line-re):
(org-element-comment-string):
(org-element-closed-keyword):
(org-element-deadline-keyword):
(org-element-scheduled-keyword):
(org-element-planning-keywords-re):
(org-element-planning-line-re):
(org-element-drawer-re):
(org-element-dynamic-block-open-re):
(org-element-headline-re): New constants.
(org-element-drawer-parser):
(org-element-dynamic-block-parser):
(org-element--footnote-separator):
(org-element--get-node-properties):
(org-element--get-time-properties):
(org-element-headline-parser):
(org-element-headline-interpreter):
(org-element-inlinetask-parser):
(org-element--list-struct):
(org-element-paragraph-parser):
(org-element-planning-parser):
(org-element-planning-interpreter):
(org-element--current-element):
(org-element--cache-for-removal):
(org-element-cache-map):
(org-element-context): Use new constants so as to not use org.el's.
* testing/lisp/test-org-element.el 
(test-org-element/headline-comment-keyword):
(test-org-element/headline-archive-tag):
* testing/lisp/test-ox.el (test-org-export/handle-options): Fix tests.
---
 lisp/org-element.el  | 147 ++-
 testing/lisp/test-org-element.el |  37 --
 testing/lisp/test-ox.el  |  23 +++---
 3 files changed, 121 insertions(+), 86 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 6e228d4..8102387 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -82,25 +82,14 @@
 (declare-function outline-next-heading "outline" ())
 (declare-function outline-previous-heading "outline" ())
 
-(defvar org-archive-tag)
-(defvar org-clock-line-re)
-(defvar org-closed-string)
-(defvar org-comment-string)
 (defvar org-complex-heading-regexp)
-(defvar org-dblock-start-re)
-(defvar org-deadline-string)
 (defvar org-done-keywords)
-(defvar org-drawer-regexp)
 (defvar org-edit-src-content-indentation)
-(defvar org-keyword-time-not-clock-regexp)
 (defvar org-match-substring-regexp)
 (defvar org-odd-levels-only)
-(defvar org-outline-regexp-bol)
-(defvar org-planning-line-re)
 (defvar org-property-drawer-re)
 (defvar org-property-format)
 (defvar org-property-re)
-(defvar org-scheduled-string)
 (defvar org-src-preserve-indentation)
 (defvar org-tags-column)
 (defvar org-time-stamp-formats)
@@ -117,6 +106,9 @@
 ;; `org-element-update-syntax' builds proper syntax regexps according
 ;; to current setup.
 
+(defconst org-element-archive-tag "ARCHIVE"
+  "Tag marking a substree as archived.")
+
 (defconst org-element-citation-key-re
   (rx "@" (group (one-or-more (any word "-.:?!`'/*@+|(){}<>&_^$#%~"
   "Regexp matching a citation key.
@@ -130,6 +122,56 @@ Key is located in match group 1.")
   "Regexp matching a citation prefix.
 Style, if any, is located in match group 1.")
 
+(defconst org-element-clock-line-re
+  (rx line-start (0+ (or ?\t ?\s)) "CLOCK:")
+  "Regexp matching a clock line.")
+
+(defconst org-element-comment-string "COMMENT"
+  "String marker for commented headlines.")
+
+(defconst org-element-closed-keyword "CLOSED:"
+  "Keyword used to close TODO entries.")
+
+(defconst org-element-deadline-keyword "DEADLINE:"
+  "Keyword used to mark deadline entries.")
+
+(defconst org-element-scheduled-keyword "SCHEDULED:"
+  "Keyword used to mark scheduled entries.")
+
+(defconst org-element-planning-keywords-re
+  (regexp-opt (list org-element-closed-keyword
+org-element-deadline-keyword
+org-element-scheduled-keyword))
+  "Regexp matching any planning line keyword.")
+
+(defconst org-element-planning-line-re
+  (rx-to-string
+   `(seq line-start (0+ (any ?\s ?\t))
+ (group (regexp ,org-element-planning-keywords-re
+  "Regexp matching a planning line.")
+
+(defconst org-element-drawer-re
+  (rx line-start (0+ (any ?\s ?\t))
+  ":" (group (1+ (any ?- ?_ word))) ":"
+  (0+ (any ?\s ?\t)) line-end)
+  "Regexp matching opening or closing line of a drawer.
+Drawer's name is located in match group 1.")
+
+(defconst org-element-dynamic-block-open-re
+  (rx line-start (0+ (any ?\s ?\t))
+  "#+BEGIN:" (0+ (any ?\s ?\t))
+  (group (1+ word))
+  (opt
+   (1+ (any ?\s ?\t))
+   (group (1+ nonl
+  "Regexp matching the opening line of a dynamic block.
+Dynamic block's name is located in match group 1.
+Parameters are in match group 2.")
+
+(defconst org-element-headline-re
+  (rx line-start (1+ "*") " ")
+  "Regexp matching a headline.")
+
 (defvar org-element-paragraph-separate nil
   "Regexp to separate paragraphs in an Org buffer.
 In the case of lines starting with \"#\" and \":\", this regexp
@@ -789,8 +831,10 @@ Assume point is at beginn

[elpa] externals/kind-icon 8ac781a: Mention ELPA

2021-11-20 Thread ELPA Syncer
branch: externals/kind-icon
commit 8ac781a8f51a424548a786f77a1083365c58ab28
Author: JD Smith <93749+jdtsm...@users.noreply.github.com>
Commit: JD Smith <93749+jdtsm...@users.noreply.github.com>

Mention ELPA
---
 README.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 158c533..69639d8 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ A few examples of `kind-icon` in action with 
[lsp-mode](https://github.com/emacs
 
 ## Installation 
 
-Get it from your local package archive (TBD).  Note that icon support requires 
[svg-lib](https://github.com/rougier/svg-lib).  At present `kind-icon` has been 
tested extensively with the excellent [corfu](https://github.com/minad/corfu) 
completion front-end (from the maker of vertico, consult, marginalia, and 
more). 
+Get it from ELPA (e.g. `M-x package-install RET kind-icon RET`).  Note that 
icon support requires [svg-lib](https://github.com/rougier/svg-lib).  At 
present `kind-icon` has been tested extensively with the excellent 
[corfu](https://github.com/minad/corfu) completion front-end (from the maker of 
vertico, consult, marginalia, and more). 
 
 kind-icon works either as a "margin-formatter" (for supporting UI's such as 
corfu) or by wrapping the completion function, for other completion UI's which 
can handle the Emacs 28+ 
[`affixation-function`](https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/minibuf.texi?id=d8e037eeaa7eef26349bc0fb3fa00e10a5c4b894#n1819)
 completion property.  
 
@@ -26,11 +26,11 @@ kind-icon works either as a "margin-formatter" (for 
supporting UI's such as corf
 To enable for completion UI's with margin-formatters capability such as 
[corfu](https://github.com/minad/corfu):
 
 ```elisp
-(use-package kind-icon ;package availability TBD
+(use-package kind-icon
   :ensure t
   :after corfu
   :custom
-  (kind-icon-default-face 'corfu-background) ; to compute blended background 
correctly
+  (kind-icon-default-face 'corfu-background) ; to compute blended backgrounds 
correctly
   :config
   (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
 ```



[elpa] externals/org updated (26e6881 -> 048f478)

2021-11-20 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  26e6881   element: Integrate some syntax constants
   new  3a66860   ob-tangle: Use oXXX as file mode octal shorthand
   new  ff6fd93   ob-tangle: Check that integer file modes are valid
   new  048f478   ob-tangle: Make ls-style file mode regex stricter


Summary of changes:
 lisp/ob-tangle.el | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)



[elpa] externals/org 3a66860 1/3: ob-tangle: Use oXXX as file mode octal shorthand

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 3a6686010e6c1b243208af10ee2635a5e3a82908
Author: TEC 
Commit: TEC 

ob-tangle: Use oXXX as file mode octal shorthand

* lisp/ob-tangle (org-babel-interpret-file-mode): Accept "o755" and
similar as octal shorthand. A non-digit character must be included as
otherwise `org-babel-parse-header-arguments' will convert it to a
base-10 integer.
---
 lisp/ob-tangle.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 3168445..90c7ae5 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -310,7 +310,7 @@ matching a regular expression."
   "Determine the integer representation of a file MODE specification.
 The following forms are currently recognised:
 - an integer (returned without modification)
-- \"755\" (chmod style octal)
+- \"o755\" (chmod style octal)
 - \"rwxrw-r--\" (ls style specification)
 - \"a=rw,u+x\" (chmod style) *
 
@@ -320,8 +320,8 @@ The following forms are currently recognised:
((integerp mode) mode)
((not (stringp mode))
 (error "File mode %S not recognised as a valid format." mode))
-   ((string-match-p "^0?[0-7][0-7][0-7]$" mode)
-(string-to-number mode 8))
+   ((string-match-p "^o0?[0-7][0-7][0-7]$" mode)
+(string-to-number (replace-regexp-in-string "^o" "" mode) 8))
((string-match-p 
"^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" 
mode)
 (file-modes-symbolic-to-number mode org-babel-tangle-default-mode))
((string-match-p "^[rwx-]\\{9\\}$" mode)



[elpa] externals/org 048f478 3/3: ob-tangle: Make ls-style file mode regex stricter

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 048f4787994c2494b50ed7b4539b1158b054bb04
Author: TEC 
Commit: TEC 

ob-tangle: Make ls-style file mode regex stricter

* lisp/ob-tangle (org-babel-interpret-file-mode): Instead of allowing 9
characters from [rwx-], require [r-][w-][x-] repeated thrice.  This no
longer allows invalid ls-style file modes.
---
 lisp/ob-tangle.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 7484ffe..3a38745 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -327,8 +327,9 @@ Did you give the decimal value %1$d by mistake?" mode)))
((string-match-p "^o0?[0-7][0-7][0-7]$" mode)
 (string-to-number (replace-regexp-in-string "^o" "" mode) 8))
((string-match-p 
"^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" 
mode)
+;; Match regexp taken from `file-modes-symbolic-to-number'.
 (file-modes-symbolic-to-number mode org-babel-tangle-default-mode))
-   ((string-match-p "^[rwx-]\\{9\\}$" mode)
+   ((string-match-p "^\\(?:[r-][w-][x-]\\)\\{3\\}$" mode)
 (file-modes-symbolic-to-number (concat  "u=" (substring mode 0 3)
 ",g=" (substring mode 3 6)
 ",a=" (substring mode 6 9))



[elpa] externals/org ff6fd93 2/3: ob-tangle: Check that integer file modes are valid

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit ff6fd9387626258841f5d3a6a8e9fc10d02a6377
Author: TEC 
Commit: TEC 

ob-tangle: Check that integer file modes are valid

* lisp/ob-tangle.el (org-babel-interpret-file-mode): Check that the
integer as an octal represents a valid file mode, and complain
otherwise.
---
 lisp/ob-tangle.el | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 90c7ae5..7484ffe 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -317,7 +317,11 @@ The following forms are currently recognised:
 * The interpretation of these forms relies on `file-modes-symbolic-to-number',
   and uses `org-babel-tangle-default-mode' as the base mode."
   (cond
-   ((integerp mode) mode)
+   ((integerp mode)
+(if (string-match-p "^[0-7][0-7][0-7]$" (format "%o" mode))
+mode
+  (user-error "%1$o is not a valid file mode octal. \
+Did you give the decimal value %1$d by mistake?" mode)))
((not (stringp mode))
 (error "File mode %S not recognised as a valid format." mode))
((string-match-p "^o0?[0-7][0-7][0-7]$" mode)



[elpa] externals/org updated (048f478 -> 1db301a)

2021-11-20 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  048f478   ob-tangle: Make ls-style file mode regex stricter
   new  c5d6656   Backport commit 42d4e24ff from Emacs
   new  af40fa9   Merge branch 'bugfix'
   new  9b398ba   oc-basic: Add function to shorten names
   new  69dbe86   org-element: Silence byte-compiler
   new  1db301a   element: Drop `org-end-of-subtree' use


Summary of changes:
 doc/org-manual.org  |  2 +-
 lisp/oc-basic.el| 17 -
 lisp/org-element.el | 34 --
 3 files changed, 33 insertions(+), 20 deletions(-)



[elpa] externals/org 69dbe86 3/4: org-element: Silence byte-compiler

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 69dbe86625e82107c6ed50203edd1258ca189d1c
Author: Kyle Meyer 
Commit: Kyle Meyer 

org-element: Silence byte-compiler

* lisp/org-element.el (org-element--cache-gapless): Move definition
before first use to remove byte-compiler warning about assignment to
free variable.
---
 lisp/org-element.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 8102387..4ffc15e 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6964,6 +6964,11 @@ The element is: %S\n The real element is: %S\n Cache 
around :begin:\n%S\n%S\n%S"
 
  Public Functions
 
+(defvar-local org-element--cache-gapless nil
+  "An alist containing (granularity . `org-element--cache-change-tic') 
elements.
+Each element indicates the latest `org-element--cache-change-tic' when
+change did not contain gaps.")
+
 ;;;###autoload
 (defun org-element-cache-reset (&optional all)
   "Reset cache in current buffer.
@@ -7007,10 +7012,7 @@ buffers."
 (org-element--cache-set-timer (current-buffer
 
 (defvar warning-minimum-log-level) ; Defined in warning.el
-(defvar-local org-element--cache-gapless nil
-  "An alist containing (granularity . `org-element--cache-change-tic') 
elements.
-Each element indicates the latest `org-element--cache-change-tic' when
-change did not contain gaps.")
+
 (defvar org-element-cache-map--recurse nil)
 ;;;###autoload
 (cl-defun org-element-cache-map (func &key (granularity 'headline+inlinetask) 
restrict-elements



[elpa] externals/org 1db301a 4/4: element: Drop `org-end-of-subtree' use

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 1db301a758c8bb6bf0160702368d6b47384b5e43
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

element: Drop `org-end-of-subtree' use

* lisp/org-element.el (org-element-headline-parser): Implement
a simple end of subtree search instead of relying on
`org-end-of-subtree'.
---
 lisp/org-element.el | 24 ++--
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 4ffc15e..ba43eca 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -72,7 +72,6 @@
 (require 'org-table)
 
 (declare-function org-at-heading-p "org" (&optional _))
-(declare-function org-end-of-subtree "org" (&optional invisible-ok to-heading))
 (declare-function org-escape-code-in-string "org-src" (s))
 (declare-function org-macro-escape-arguments "org-macro" (&rest args))
 (declare-function org-macro-extract-arguments "org-macro" (s))
@@ -1090,8 +1089,9 @@ parsed as a secondary string, but as a plain string 
instead.
 Assume point is at beginning of the headline."
   (save-excursion
 (let* ((begin (point))
-  (level (prog1 (org-reduced-level (skip-chars-forward "*"))
-   (skip-chars-forward " \t")))
+   (true-level (prog1 (skip-chars-forward "*")
+ (skip-chars-forward " \t")))
+  (level (org-reduced-level true-level))
   (todo (and org-todo-regexp
  (let (case-fold-search) (looking-at (concat 
org-todo-regexp " ")))
  (progn (goto-char (match-end 0))
@@ -1124,17 +1124,13 @@ Assume point is at beginning of the headline."
(string= org-footnote-section raw-value)))
   (standard-props (org-element--get-node-properties))
   (time-props (org-element--get-time-properties))
-  (end (save-excursion
-  ;; Make sure that `org-end-of-subtree' does not try
-  ;; to use cache.  The headline parser might be
-  ;; called in the midst of cache processing.
-  ;; FIXME: We cannot simply bind `org-element-use-cache' here
-  ;; because apparently some magic related to lexical
-  ;; scoping prevents `org-element--cache-active-p' call inside
-  ;; `org-end-of-subtree' to use the overridden value
-  ;; of `org-element-use-cache'.
-  (org-element-with-disabled-cache
-  (org-end-of-subtree t t
+  (end
+(save-excursion
+  (let ((re (rx-to-string
+ `(seq line-start (** 1 ,true-level "*") " "
+(if (re-search-forward re nil t)
+(line-beginning-position)
+  (point-max)
   (contents-begin (save-excursion
 (forward-line)
 (skip-chars-forward " \r\t\n" end)



[elpa] externals/org af40fa9 1/4: Merge branch 'bugfix'

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit af40fa9ae734263509fa1c17c267fd7ff2d861b2
Merge: 048f478 c5d6656
Author: Kyle Meyer 
Commit: Kyle Meyer 

Merge branch 'bugfix'
---
 doc/org-manual.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index a38dbec..61030a9 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -16577,7 +16577,7 @@ identifying a reference in the bibliography.
 - Each key starts with the character =@=.
 
 - Each key can be qualified by a /prefix/ (e.g.\nbsp{}"see ") and/or
-  a /suffix/ (e.g.\nbsp{}"p.\nbsp{}123"), giving informations useful or 
necessary
+  a /suffix/ (e.g.\nbsp{}"p.\nbsp{}123"), giving information useful or 
necessary
   fo the comprehension of the citation but not included in the
   reference.
 



[elpa] externals-release/org c5d6656: Backport commit 42d4e24ff from Emacs

2021-11-20 Thread ELPA Syncer
branch: externals-release/org
commit c5d66563284220f4af89e55fc8dd33e58f6c195f
Author: Stefan Kangas 
Commit: Kyle Meyer 

Backport commit 42d4e24ff from Emacs

; Fix typos
42d4e24ff3f13ccbd401d93d70ecdee99b88a26d
Stefan Kangas
Fri Nov 12 13:59:58 2021 +0100
---
 doc/org-manual.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index def0fc7..3772c6b 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -16556,7 +16556,7 @@ identifying a reference in the bibliography.
 - Each key starts with the character =@=.
 
 - Each key can be qualified by a /prefix/ (e.g.\nbsp{}"see ") and/or
-  a /suffix/ (e.g.\nbsp{}"p.\nbsp{}123"), giving informations useful or 
necessary
+  a /suffix/ (e.g.\nbsp{}"p.\nbsp{}123"), giving information useful or 
necessary
   fo the comprehension of the citation but not included in the
   reference.
 



[elpa] externals/org 9b398ba 2/4: oc-basic: Add function to shorten names

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 9b398ba626bd418fdb0dec2f95a2a1ca0a3b2439
Author: Bruce D'Arcus 
Commit: Nicolas Goaziou 

oc-basic: Add function to shorten names

* lisp/oc-basic.el (org-cite-basic--shorten-names): new function to
shorten author names

* lisp/oc-basic.el (org-cite-basic--print-entry): shorten author name
list for the "plain" output style
---
 lisp/oc-basic.el | 17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index 8fba708..ffca49f 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -309,6 +309,20 @@ non-nil."
 (org-export-raw-string value)
   value)))
 
+(defun org-cite-basic--shorten-names (names)
+  "Return a list of family names from a list of full NAMES.
+
+To better accomomodate corporate names, this will only shorten
+personal names of the form 'family, given'."
+  (when (stringp names)
+(mapconcat
+ (lambda (name)
+   (if (eq 1 (length name))
+   (cdr (split-string name))
+ (car (split-string name ", "
+ (split-string names " and ")
+ ", ")))
+
 (defun org-cite-basic--number-to-suffix (n)
   "Compute suffix associated to number N.
 This is used for disambiguation."
@@ -395,7 +409,8 @@ Optional argument INFO is the export state, as a property 
list."
   ("plain"
(let ((year (org-cite-basic--get-year entry info 'no-suffix)))
  (org-cite-concat
-  author ". " title (and from (list ", " from)) ", " year ".")))
+  (org-cite-basic--shorten-names author) ". "
+  title (and from (list ", " from)) ", " year ".")))
   ("numeric"
(let ((n (org-cite-basic--key-number (cdr (assq 'id entry)) info))
  (year (org-cite-basic--get-year entry info 'no-suffix)))



[elpa] externals/org 58cc9ef 3/4: Update customize-package-emacs-version-alist

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 58cc9efd7d83d4467e90d6e9eee712936744bd7c
Author: Kyle Meyer 
Commit: Kyle Meyer 

Update customize-package-emacs-version-alist

* lisp/org.el (customize-package-emacs-version-alist): Map Org 9.6 to
Emacs 29.1.

Emacs 28.1 is nearing release.  The earliest Emacs version that Org
9.6 would be synced with is 29.1.
---
 lisp/org.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index cb1b58c..eeefb4a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4993,7 +4993,8 @@ The following commands are available:
   ("9.2" . "27.1")
   ("9.3" . "27.1")
   ("9.4" . "27.2")
-  ("9.5" . "28.1")))
+  ("9.5" . "28.1")
+  ("9.6" . "29.1")))
 
 (defvar org-mode-transpose-word-syntax-table
   (let ((st (make-syntax-table text-mode-syntax-table)))



[elpa] externals/org updated (1db301a -> 27edae8)

2021-11-20 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  1db301a   element: Drop `org-end-of-subtree' use
   new  e6ae351   ob-tangle: Rename org-babel-tangle-default-mode
   new  b21d11c   Document new :tangle-mode forms
   new  58cc9ef   Update customize-package-emacs-version-alist
   new  27edae8   tangle: Fix :version keyword of 
org-babel-tangle-default-file-mode


Summary of changes:
 doc/org-manual.org | 24 +---
 etc/ORG-NEWS   | 12 
 lisp/ob-tangle.el  |  8 
 lisp/org.el|  3 ++-
 4 files changed, 35 insertions(+), 12 deletions(-)



[elpa] externals/org e6ae351 1/4: ob-tangle: Rename org-babel-tangle-default-mode

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit e6ae351f96c29876a48d2207a486cc0f3eaf84bd
Author: TEC 
Commit: TEC 

ob-tangle: Rename org-babel-tangle-default-mode

* lisp/ob-tangle.el (org-babel-tangle-default-mode,
org-babel-interpret-file-mode): Rename `org-babel-tangle-default-mode`
to the slightly more apt `org-babel-tangle-default-file-mode`, and
update `org-babel-interpret-file-mode` accordingly.
---
 lisp/ob-tangle.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 3a38745..6428f23 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -140,7 +140,7 @@ result.  The default value is `org-remove-indentation'."
   :version "24.1"
   :type 'function)
 
-(defcustom org-babel-tangle-default-mode #o544
+(defcustom org-babel-tangle-default-file-mode #o544
   "The default mode used for tangled files, as an integer.
 The default value 356 correspands to the octal #o544, which is
 read-write permissions for the user, read-only for everyone else."
@@ -315,7 +315,7 @@ The following forms are currently recognised:
 - \"a=rw,u+x\" (chmod style) *
 
 * The interpretation of these forms relies on `file-modes-symbolic-to-number',
-  and uses `org-babel-tangle-default-mode' as the base mode."
+  and uses `org-babel-tangle-default-file-mode' as the base mode."
   (cond
((integerp mode)
 (if (string-match-p "^[0-7][0-7][0-7]$" (format "%o" mode))
@@ -328,7 +328,7 @@ Did you give the decimal value %1$d by mistake?" mode)))
 (string-to-number (replace-regexp-in-string "^o" "" mode) 8))
((string-match-p 
"^[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\(,[ugoa]*\\(?:[+-=][rwxXstugo]*\\)+\\)*$" 
mode)
 ;; Match regexp taken from `file-modes-symbolic-to-number'.
-(file-modes-symbolic-to-number mode org-babel-tangle-default-mode))
+(file-modes-symbolic-to-number mode org-babel-tangle-default-file-mode))
((string-match-p "^\\(?:[r-][w-][x-]\\)\\{3\\}$" mode)
 (file-modes-symbolic-to-number (concat  "u=" (substring mode 0 3)
 ",g=" (substring mode 3 6)



[elpa] externals/org b21d11c 2/4: Document new :tangle-mode forms

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit b21d11c614d7416db08a52c9a66c13ceefeb87bc
Author: TEC 
Commit: TEC 

Document new :tangle-mode forms

* etc/ORG-NEWS: Mention new forms that :tangle-mode accepts.

* doc/org-manual.org (Header arguments): Mention new forms that
:tangle-mode accepts.
---
 doc/org-manual.org | 24 +---
 etc/ORG-NEWS   | 12 
 2 files changed, 29 insertions(+), 7 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 61030a9..1d02139 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -18182,13 +18182,23 @@ the tangled file's executable permission.
 
 #+cindex: @samp{tangle-mode}, header argument
 The =tangle-mode= header argument specifies what permissions to set
-for tangled files by ~set-file-modes~.  For example, to make
-a read-only tangled file, use =:tangle-mode (identity #o444)=.  To
-make it executable, use =:tangle-mode (identity #o755)=.  It also
-overrides executable permission granted by =shebang=.  When multiple
-source code blocks tangle to a single file with different and
-conflicting =tangle-mode= header arguments, Org's behavior is
-undefined.
+for tangled files by ~set-file-modes~.  Permissions are given by an
+octal value, which can be provided calling the ~identity~ function on
+an elisp octal value. For instance, to create a read-only file one may
+use =:tangle-mode (identity #o444)=. To reduce the verbosity required,
+a octal shorthand is defined, =oXXX= (=o= for octal). Using this, our
+read-only example is =:tangle-mode o444=. Omitting the =o= prefix will
+cause the argument to be interpreted as an integer, which can lead to
+unexpected results (=444= is the same as =o674=).
+Two other shorthands are recognised, ls-style strings like
+=rw-r--r--=, and chmod-style permissions like =g+w=.
+Note that chmod-style permissions are based on
+~org-babel-tangle-default-file-mode~, which is =#o544= by default.
+
+When =:tangle-mode= and =:shebang= are both specified, the give
+=:tangle-mode= will override the permissions from =:shebang=. When
+multiple source code blocks tangle to a single file with conflicting
+=:tangle-mode= header arguments, Org's behaviour is undefined.
 
 #+cindex: @samp{no-expand}, header argument
 By default Org expands code blocks during tangling.  The =no-expand=
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 7bb7fe5..e618feb 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -103,6 +103,18 @@ The =dvipng= option in ~org-preview-latex-process-alist~ 
has a new
 property =transparent-image-converter= which is used instead of
 =image-converter= when producing transparent images.
 
+*** =:tangle-mode= now accepts more permissions formats
+
+Previously =:tangle-mode (identity #o755)= was the only reasonable way
+to set the file mode. ~org-babel-interpret-file-mode~ has been
+introduced which will accept three new formats:
++ Short octals, e.g. =:tangle-mode o755=
++ ls-style, e.g. =:tangle-mode rwxrw-rw-=
++ chmod-style, e.g. =:tangle-mode u+x=
+
+Chmod-style permissions are based on the new variable
+~org-babel-tangle-default-file-mode~.
+
 * Version 9.5
 
 ** Important announcements and breaking changes



[elpa] externals/org 27edae8 4/4: tangle: Fix :version keyword of org-babel-tangle-default-file-mode

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit 27edae8cedd1fc793acb8ff34e478762a330e867
Author: Kyle Meyer 
Commit: Kyle Meyer 

tangle: Fix :version keyword of org-babel-tangle-default-file-mode

* lisp/ob-tangle.el (org-babel-tangle-default-file-mode): Prefer
":package-version" to ":version".

The :version keyword should correspond to the Emacs version.  Using
the Org version leads to an incorrect help message:

  This variable was introduced, or its default value was changed, in
  version 9.6 of Emacs.

Instead go through :package-version so that the displayed message is

  This variable was introduced, or its default value was changed, in
  version 9.6 of the Org package that is part of Emacs 29.1.
---
 lisp/ob-tangle.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 6428f23..a55b339 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -145,7 +145,7 @@ result.  The default value is `org-remove-indentation'."
 The default value 356 correspands to the octal #o544, which is
 read-write permissions for the user, read-only for everyone else."
   :group 'org-babel
-  :version "9.6"
+  :package-version '(Org . "9.6")
   :type 'integer)
 
 (defun org-babel-find-file-noselect-refresh (file)



[nongnu] elpa/git-commit updated (9413847 -> 877c389)

2021-11-20 Thread ELPA Syncer
elpasync pushed a change to branch elpa/git-commit.

  from  9413847   magit-diff-dwim: Compare unpushed/unpulled changes with 
merged-base
   new  c7fb546   git-commit: Use preferred form in face specs
   new  523c05f   git-rebase-comment-heading: Fix custom group
   new  877c389   magit-list-worktrees: Fix comment typo


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



[nongnu] elpa/git-commit c7fb546 1/3: git-commit: Use preferred form in face specs

2021-11-20 Thread ELPA Syncer
branch: elpa/git-commit
commit c7fb546c4d4fe5610f701d6c4d51d8b2fcc7becc
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

git-commit: Use preferred form in face specs

Use (DISPLAY . PLIST); (DISPLAY PLIST) is
only supported for backward compatibility.
---
 lisp/git-rebase.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el
index 8ffe5ee..cb1e82d 100644
--- a/lisp/git-rebase.el
+++ b/lisp/git-rebase.el
@@ -112,11 +112,11 @@
   :group 'faces
   :group 'git-rebase)
 
-(defface git-rebase-hash '((t (:inherit magit-hash)))
+(defface git-rebase-hash '((t :inherit magit-hash))
   "Face for commit hashes."
   :group 'git-rebase-faces)
 
-(defface git-rebase-label '((t (:inherit magit-refname)))
+(defface git-rebase-label '((t :inherit magit-refname))
   "Face for labels in label, merge, and reset lines."
   :group 'git-rebase-faces)
 
@@ -125,12 +125,12 @@
   :group 'git-rebase-faces)
 
 (defface git-rebase-killed-action
-  '((t (:inherit font-lock-comment-face :strike-through t)))
+  '((t :inherit font-lock-comment-face :strike-through t))
   "Face for commented commit action lines."
   :group 'git-rebase-faces)
 
 (defface git-rebase-comment-hash
-  '((t (:inherit git-rebase-hash :weight bold)))
+  '((t :inherit git-rebase-hash :weight bold))
   "Face for commit hashes in commit message comments."
   :group 'git-rebase-faces)
 



[nongnu] elpa/git-commit 523c05f 2/3: git-rebase-comment-heading: Fix custom group

2021-11-20 Thread ELPA Syncer
branch: elpa/git-commit
commit 523c05f5fe76cb7beea1e29bffd1f6cfac713025
Author: Jonas Bernoulli 
Commit: Jonas Bernoulli 

git-rebase-comment-heading: Fix custom group
---
 lisp/git-rebase.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/git-rebase.el b/lisp/git-rebase.el
index cb1e82d..45d2824 100644
--- a/lisp/git-rebase.el
+++ b/lisp/git-rebase.el
@@ -137,7 +137,7 @@
 (defface git-rebase-comment-heading
   '((t :inherit font-lock-keyword-face))
   "Face for headings in rebase message comments."
-  :group 'git-commit-faces)
+  :group 'git-rebase-faces)
 
 ;;; Keymaps
 



[nongnu] elpa/git-commit 877c389 3/3: magit-list-worktrees: Fix comment typo

2021-11-20 Thread ELPA Syncer
branch: elpa/git-commit
commit 877c389ca0161959081fa2c77045ce1ae9463be4
Author: Kyle Meyer 
Commit: Kyle Meyer 

magit-list-worktrees: Fix comment typo
---
 lisp/magit-git.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/magit-git.el b/lisp/magit-git.el
index 6625183..dba75b6 100644
--- a/lisp/magit-git.el
+++ b/lisp/magit-git.el
@@ -1836,7 +1836,7 @@ PATH has to be relative to the super-repository."
;; If the git directory is separate from the main
;; worktree, then "git worktree" returns the git
;; directory instead of the worktree, which isn't
-   ;; what it is supposed to do and now what we want.
+   ;; what it is supposed to do and not what we want.
(setq path (magit-toplevel path))
(setq worktree (list path nil nil nil))
(push worktree worktrees)))



[nongnu] elpa/magit updated (9413847 -> 877c389)

2021-11-20 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit.

  from  9413847   magit-diff-dwim: Compare unpushed/unpulled changes with 
merged-base
  adds  c7fb546   git-commit: Use preferred form in face specs
  adds  523c05f   git-rebase-comment-heading: Fix custom group
  adds  877c389   magit-list-worktrees: Fix comment typo

No new revisions were added by this update.

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



[nongnu] elpa/magit-section updated (9413847 -> 877c389)

2021-11-20 Thread ELPA Syncer
elpasync pushed a change to branch elpa/magit-section.

  from  9413847   magit-diff-dwim: Compare unpushed/unpulled changes with 
merged-base
  adds  c7fb546   git-commit: Use preferred form in face specs
  adds  523c05f   git-rebase-comment-heading: Fix custom group
  adds  877c389   magit-list-worktrees: Fix comment typo

No new revisions were added by this update.

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



[elpa] externals/pyim 3bbfe10: Let pyim-dcache-save-value-to-file more reliable.

2021-11-20 Thread ELPA Syncer
branch: externals/pyim
commit 3bbfe10856ff778ae75f32ab2ccd812cc2e958fa
Author: Feng Shu 
Commit: Feng Shu 

Let pyim-dcache-save-value-to-file more reliable.

* pyim-dcache.el (pyim-dcache-save-value-to-file): Let save more 
reliable.
(pyim-dcache-get-value-from-file): do not dump.
---
 pyim-dcache.el | 51 +--
 1 file changed, 29 insertions(+), 22 deletions(-)

diff --git a/pyim-dcache.el b/pyim-dcache.el
index 261d2a3..d6b2ee8 100644
--- a/pyim-dcache.el
+++ b/pyim-dcache.el
@@ -112,34 +112,41 @@ VARIABLE 变量,FORCE-RESTORE 设置为 t 时,强制恢复,变量原来的
 
 (defun pyim-dcache-save-value-to-file (value file)
   "将 VALUE 保存到 FILE 文件中."
-  (when value
-(with-temp-buffer
-  ;; FIXME: We could/should set the major mode to `lisp-data-mode'.
-  (insert ";; Auto generated by `pyim-dhashcache-save-variable-to-file', 
don't edit it by hand!\n")
-  (insert (format ";; Build time: %s\n\n" (current-time-string)))
-  (insert (prin1-to-string value))
-  (insert "\n\n")
-  (insert ";; Local\sVariables:\n") ;Use \s to avoid a false positive!
-  (insert ";; coding: utf-8-unix\n")
-  (insert ";; End:")
-  (make-directory (file-name-directory file) t)
-  (let ((save-silently t))
-(pyim-dcache-write-file file)
+  (make-directory (file-name-directory file) t)
+  (let ((dump-file (concat file "-dump-" (format-time-string "%Y%m%d%H%M%S"
+(when value
+  (with-temp-buffer
+(insert ";; -*- lisp-data -*-\n")
+(insert ";; Auto generated by `pyim-dhashcache-save-variable-to-file', 
don't edit it by hand!\n")
+(insert (format ";; Build time: %s\n\n" (current-time-string)))
+(insert (let ((print-level nil)
+  (print-length nil))
+  (prin1-to-string value)))
+(insert "\n\n")
+(insert ";; Local\sVariables:\n") ;Use \s to avoid a false positive!
+(insert ";; coding: utf-8-unix\n")
+(insert ";; End:")
+(goto-char (point-min))
+(let ((save-silently t))
+  ;; 使用 read 读取一下当前 buffer,读取没问题后再保存到 dcache 文件,因
+  ;; 为我发现保存的词库文件偶尔会出现 "..." 这样的字符串,可能是 print1
+  ;; abbreviating 导致的,但暂时没有发现原因,这个问题非常严重,会导致词
+  ;; 库损坏,用户自定义词条丢失。
+  (if (ignore-errors (read (current-buffer)))
+  (pyim-dcache-write-file file)
+;; 如果词库内容有问题,就保存到 dump 文件,这样用户可以通过 dump 文
+;; 件发现问题原因,需要注意的是,这个操作会丢失当前 sesson 的自定义
+;; 词条内容。
+(message "PYIM: %S 保存出错,执行 dump 操作!" file)
+(pyim-dcache-write-file dump-file)))
 
 (defun pyim-dcache-get-value-from-file (file)
   "读取保存到 FILE 里面的 value."
   (when (file-exists-p file)
 (with-temp-buffer
   (insert-file-contents file)
-  (let ((output
- (condition-case nil
- (read (current-buffer))
-   (error nil
-(unless output
-  ;; 有时候词库缓存会发生错误,这时候,就将词库缓存转存到一个
-  ;; 带时间戳的文件中,方便用户手动修复。
-  (write-file (concat file "-dump-" (format-time-string 
"%Y%m%d%H%M%S"
-output
+  (ignore-errors
+(read (current-buffer))
 
 ;; ** Dcache 文件处理功能
 (defun pyim-dcache-write-file (filename &optional confirm)



[elpa] externals/pyim 39a8e38: Fix deactivate-input-method error when active pyim in evil-mode.

2021-11-20 Thread ELPA Syncer
branch: externals/pyim
commit 39a8e38ceb8981738892563cba3fe070fb8f2a0b
Author: Feng Shu 
Commit: Feng Shu 

Fix deactivate-input-method error when active pyim in evil-mode.

* pyim.el ("pyim"): register input as UTF-8 instead of euc-cn.
(pyim-active): just use _args argument.
(pyim-inactivate): kill local variable: input-method-function.

* pyim-hacks.el (pyim-hacks-deactivate-input-method, "evil"): Removed.

The real reason is that deactivate-current-input-method-function variable 
is killed
by pyim-inactivate, for this variable is registerd by pyim:

(pyim-register-local-variables
 '(input-method-function
   inactivate-current-input-method-function
   describe-current-input-method-function))
---
 pyim-hacks.el |  9 -
 pyim.el   | 13 -
 2 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/pyim-hacks.el b/pyim-hacks.el
index 31d5183..65b9232 100644
--- a/pyim-hacks.el
+++ b/pyim-hacks.el
@@ -31,15 +31,6 @@
 ;;; Code:
 ;; * 代码 :code:
 
-;; ** Hack for Evil
-(defun pyim-hacks-deactivate-input-method (orig_func)
-  (let ((deactivate-current-input-method-function
- (or deactivate-current-input-method-function #'ignore)))
-(funcall orig_func)))
-
-(with-eval-after-load "evil"
-  (advice-add 'deactivate-input-method :around 
#'pyim-hacks-deactivate-input-method))
-
 ;; ** Hack for xshell or MobaXTerm.
 (defvar pyim-hacks-for-ssh nil
   "Hack of [ is undefined 
#402](https://github.com/tumashu/pyim/issues/402)
diff --git a/pyim.el b/pyim.el
index 4682d31..50faca5 100644
--- a/pyim.el
+++ b/pyim.el
@@ -119,11 +119,6 @@ Tip: 用户也可以利用 `pyim-outcome-trigger-function-default' 函数
 map)
   "Pyim 的 Keymap.")
 
-(pyim-register-local-variables
- '(input-method-function
-   inactivate-current-input-method-function
-   describe-current-input-method-function))
-
 ;; ** pyim 输入法定义
 (defun pyim-input-method (key)
   "得到需要插入到 buffer 的字符串, 并将其插入到待输入 buffer.
@@ -220,11 +215,11 @@ Tip: 用户也可以利用 `pyim-outcome-trigger-function-default' 函数
 
 ;; ** Pyim 输入法注册
 ;;;###autoload
-(register-input-method "pyim" "euc-cn" 'pyim-active pyim-title)
+(register-input-method "pyim" "UTF-8" #'pyim-active pyim-title)
 
 ;; ** PYim 输入法启动功能
 ;;;###autoload
-(defun pyim-active (_name &optional _active-func)
+(defun pyim-active (&optional _args)
   "pyim 启动函数.
 
 pyim 是使用 `pyim-active' 来启动输入法,这个命令主要做如下工作:
@@ -261,14 +256,13 @@ pyim 使用函数 `pyim-active' 启动输入法的时候,会将变量
   (add-hook 'kill-emacs-hook
 (lambda ()
   (pyim-process-save-dcaches t)))
-  (setq input-method-function #'pyim-input-method)
   (setq deactivate-current-input-method-function #'pyim-inactivate)
-  ;; (setq describe-current-input-method-function 'pyim-help)
   ;; If we are in minibuffer, turn off the current input method
   ;; before exiting.
   (when (eq (selected-window) (minibuffer-window))
 (add-hook 'minibuffer-exit-hook #'pyim-exit-from-minibuffer))
   (run-hooks 'pyim-active-hook)
+  (setq-local input-method-function #'pyim-input-method)
   nil)
 
 ;; ** pyim 从 minibuffer 退出功能
@@ -610,6 +604,7 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
   "取消 pyim 的激活状态."
   (interactive)
   (pyim-kill-local-variables)
+  (kill-local-variable 'input-method-function)
   (pyim-process-stop-daemon)
   (run-hooks 'pyim-inactive-hook))
 



[elpa] externals/pyim 29531ae: active -> activate, inactive -> deactivate, like quail.

2021-11-20 Thread ELPA Syncer
branch: externals/pyim
commit 29531ae6f6378b26377d6b3761ab58956f50df03
Author: Feng Shu 
Commit: Feng Shu 

active -> activate, inactive -> deactivate, like quail.

* pyim.el (pyim-activate-hook): Rename from pyim-active-hook.
(pyim-deactivate-hook): Rename from pyim-inactive-hook.
(pyim-activate): Rename from pyim-active.
(pyim-deactivate): Rename from pyim-deactivate.
---
 pyim.el | 36 
 1 file changed, 24 insertions(+), 12 deletions(-)

diff --git a/pyim.el b/pyim.el
index 50faca5..2e0ab43 100644
--- a/pyim.el
+++ b/pyim.el
@@ -73,8 +73,17 @@ Tip: 用户也可以利用 `pyim-outcome-trigger-function-default' 函数
 (defvar pyim-title "PYIM ")
 
 (defvar pyim-load-hook nil)
-(defvar pyim-active-hook nil)
-(defvar pyim-inactive-hook nil)
+
+(define-obsolete-variable-alias
+  'pyim-active-hook
+  'pyim-activate-hook "4.0.0")
+
+(define-obsolete-variable-alias
+  'pyim-inactive-hook
+  'pyim-deactivate-hook "4.0.0")
+
+(defvar pyim-activate-hook nil)
+(defvar pyim-deactivate-hook nil)
 
 (defvar pyim-mode-map
   (let ((map (make-sparse-keymap))
@@ -215,14 +224,16 @@ Tip: 用户也可以利用 `pyim-outcome-trigger-function-default' 函数
 
 ;; ** Pyim 输入法注册
 ;;;###autoload
-(register-input-method "pyim" "UTF-8" #'pyim-active pyim-title)
+(register-input-method "pyim" "UTF-8" #'pyim-activate pyim-title)
 
 ;; ** PYim 输入法启动功能
+(define-obsolete-function-alias 'pyim-active 'pyim-activate "4.0.0")
+
 ;;;###autoload
-(defun pyim-active (&optional _args)
+(defun pyim-activate (&optional _args)
   "pyim 启动函数.
 
-pyim 是使用 `pyim-active' 来启动输入法,这个命令主要做如下工作:
+pyim 是使用 `pyim-activate' 来启动输入法,这个命令主要做如下工作:
 1. 重置所有的 local 变量。
 2. 创建汉字到拼音和拼音到汉字的 hash table。
 3. 创建词库缓存 dcache.
@@ -232,9 +243,9 @@ pyim 是使用 `pyim-active' 来启动输入法,这个命令主要做如下工
 6. 设定变量:
1. `input-method-function'
2. `deactivate-current-input-method-function'
-7. 运行 `pyim-active-hook'
+7. 运行 `pyim-activate-hook'
 
-pyim 使用函数 `pyim-active' 启动输入法的时候,会将变量
+pyim 使用函数 `pyim-activate' 启动输入法的时候,会将变量
 `input-method-function' 设置为 `pyim-input-method' ,这个变量会影
 响 `read-event' 的行为。
 
@@ -256,12 +267,12 @@ pyim 使用函数 `pyim-active' 启动输入法的时候,会将变量
   (add-hook 'kill-emacs-hook
 (lambda ()
   (pyim-process-save-dcaches t)))
-  (setq deactivate-current-input-method-function #'pyim-inactivate)
+  (setq deactivate-current-input-method-function #'pyim-deactivate)
   ;; If we are in minibuffer, turn off the current input method
   ;; before exiting.
   (when (eq (selected-window) (minibuffer-window))
 (add-hook 'minibuffer-exit-hook #'pyim-exit-from-minibuffer))
-  (run-hooks 'pyim-active-hook)
+  (run-hooks 'pyim-activate-hook)
   (setq-local input-method-function #'pyim-input-method)
   nil)
 
@@ -278,7 +289,7 @@ pyim 使用函数 `pyim-active' 启动输入法的时候,会将变量
 (defun pyim-restart ()
   "重启 pyim,不建议用于编程环境.
 
-这个函数用于重启 pyim,其过程和 `pyim-active' 类似,只是在输入法重
+这个函数用于重启 pyim,其过程和 `pyim-activate' 类似,只是在输入法重
 启之前,询问用户,是否保存个人词频信息。"
   (interactive)
   (let ((save-personal-dcache
@@ -600,13 +611,14 @@ FILE 的格式与 `pyim-dcache-export' 生成的文件格式相同,
   (pyim-process-terminate))
 
 ;; ** 取消激活功能
-(defun pyim-inactivate ()
+(define-obsolete-function-alias 'pyim-inactivate 'pyim-deactivate "4.0.0")
+(defun pyim-deactivate ()
   "取消 pyim 的激活状态."
   (interactive)
   (pyim-kill-local-variables)
   (kill-local-variable 'input-method-function)
   (pyim-process-stop-daemon)
-  (run-hooks 'pyim-inactive-hook))
+  (run-hooks 'pyim-deactivate-hook))
 
 ;; ** 中英文输入模式切换
 (defun pyim-toggle-input-ascii ()



[elpa] externals/crdt c427979 3/3: fix elpa divergence

2021-11-20 Thread ELPA Syncer
branch: externals/crdt
commit c427979efedd5bd867d444b40b446c11e5e066ad
Merge: a80f73d b8a02a5
Author: Qiantan Hong 
Commit: Qiantan Hong 

fix elpa divergence



[elpa] externals/crdt 20ff83c 1/3: fix a bug in buffer remove handler

2021-11-20 Thread ELPA Syncer
branch: externals/crdt
commit 20ff83c8ccc930d4ab2e77a37dc903eaab7681cd
Author: Qiantan Hong 
Commit: Qiantan Hong 

fix a bug in buffer remove handler
---
 crdt.el | 28 +---
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/crdt.el b/crdt.el
index 858d718..abac05c 100644
--- a/crdt.el
+++ b/crdt.el
@@ -6,7 +6,7 @@
 ;; Maintainer: Qiantan Hong 
 ;; URL: https://code.librehq.com/qhong/crdt.el
 ;; Keywords: collaboration crdt
-;; Version: 0.2.6
+;; Version: 0.2.7
 
 ;; This file is part of GNU Emacs.
 
@@ -35,7 +35,7 @@
 (require 'url)
 (require 'color)
 
-(defconst crdt-version "0.2.6")
+(defconst crdt-version "0.2.7")
 (defconst crdt-protocol-version "0.2.5")
 
 (defun crdt-version ()
@@ -1632,19 +1632,17 @@ CRDT--PROCESS should be bound to The network process 
for the client connection."
 (with-current-buffer buffer
   (crdt-mode 0)
   (setq crdt--session nil))
-(let ((notify-names
-   (cl-remove-if-not
-(lambda (buffer-name)
-  (gethash buffer-name (crdt--session-buffer-table crdt--session)))
-buffer-names)))
-  (when notify-names
-(warn "Server stopped sharing %s."
-  (mapconcat #'identity buffer-names ", "
-   (let ((crdt--session saved-session))
- (crdt--broadcast-maybe crdt--message-string
-(when crdt--process
-  (process-get crdt--process 'client-id)))
- (crdt--refresh-buffers-maybe
+(let ((crdt--session saved-session))
+  (let ((notify-names
+ (cl-remove-if-not
+  (lambda (buffer-name)
+(gethash buffer-name (crdt--session-buffer-table 
crdt--session)))
+  buffer-names)))
+(when notify-names
+  (warn "Server stopped sharing %s."
+(mapconcat #'identity buffer-names ", "
+  (crdt--broadcast-maybe crdt--message-string (when crdt--process 
(crdt--client-id)))
+  (crdt--refresh-buffers-maybe
 
 (define-crdt-message-handler login (id session-name)
   (puthash 0 (crdt--make-contact-metadata nil nil



[elpa] externals/crdt a80f73d 2/3: Merge branch 'master' of code.librehq.com:qhong/crdt.el

2021-11-20 Thread ELPA Syncer
branch: externals/crdt
commit a80f73d8129d00be31fbe4ab90de8d38e9325c5d
Merge: 20ff83c 2eddf96
Author: Qiantan Hong 
Commit: Qiantan Hong 

Merge branch 'master' of code.librehq.com:qhong/crdt.el
---
 README.org | 93 +-
 1 file changed, 50 insertions(+), 43 deletions(-)

diff --git a/README.org b/README.org
index 0a3d681..639e4a8 100644
--- a/README.org
+++ b/README.org
@@ -16,6 +16,13 @@ Highlights:
 
 ~crdt.el~ is now on GNU ELPA! Just =M-x package-install crdt=.
 
+*Caution!!!* Please make sure that you and your peers are on the same 
~crdt.el~ version!
+It turns out to be one of the most common causes of ~crdt.el~ not working.
+Because currently the network protocol is not stablized, behavior when using 
mismatched versions is unexpectable.
+- Strictly speaking, it should works when =crdt-protocol-version= are defined 
and the same on all peers.
+  But why not save some hassle and keep everyone on the latest version.
+- To upgrade, just =M-x package-reinstall crdt=, then preferably restart Emacs.
+
 ** Start a shared session
 
 A shared session is a place that can contains multiple buffers (or files),
@@ -33,49 +40,6 @@ optional password and your display name (default to your 
current =(user-full-nam
 ** Join a session
 
 =M-x crdt-connect=, then enter address, port, and your display name.
-
-** What if we don't have a public IP?
-
-There're various workaround.
-
-- You can use [[https://gitlab.com/gjedeer/tuntox][tuntox]] to proxy your 
connection over the [[https://tox.chat][Tox]] protocol.
-  =crdt.el= has experimental built-in integration for =tuntox=.
-  To enable it, you need to install =tuntox=,
-  set up the custom variable =crdt-tuntox-executable= accordingly (the path to 
your =tuntox= binary),
-  and set the custom variable =crdt-use-tuntox=. 
-  Setting it to =t= make =crdt.el= always create =tuntox= proxy for new server 
sessions, 
-  and setting it to ='confirm= make =crdt.el= ask you every time when creating 
new sessions.
-  After starting a session with =tuntox= proxy,
-  you can =M-x crdt-copy-url= to copy a URL recognizable by =M-x crdt-connect= 
and share it to your friends.
-  Be aware that according to my experience, =tuntox= takes significant time to 
establish a connection (sometimes up to half a minute),
-  however it gets much faster after the connection is established.
-
-- You can use Teredo to get a public routable IPv6 address. 
-  One free software implementation is Miredo. Get it from your
-  favorite package manager or from [[https://www.remlab.net/miredo/][their 
website]].
-  A typical usage is (run as root)
-  #+BEGIN_SRC
-# /usr/local/sbin/miredo
-# ifconfig teredo
-  #+END_SRC
-  The =ifconfig= command should print the information of your IPv6 address.
-  Now your traffic go through IPv6, and once you start a =crdt.el= session,
-  your friends should be able to join using the IPv6 address.
-  For more information, see the user guide on the Miredo website.
-
-- You can use SSH port forwarding if you have a VPS with public IP.
-  Example usage:
-  #+BEGIN_SRC 
-$ ssh -R EXAMPLE.COM:6530:127.0.0.1:6530 EXAMPLE.COM
-  #+END_SRC
-  This make your =crdt.el= session on local port =6530= accessible from
-  =EXAMPLE.COM:6530=.
-  
-  Note that you need to set the following =/etc/ssh/sshd_config= option on 
-  your VPS
-  #+BEGIN_SRC 
-GatewayPorts yes
-  #+END_SRC
   
 ** List active users
 
@@ -125,3 +89,46 @@ Just go ahead and share you comint REPL buffer! Tested: 
~shell~ and ~cmuscheme~.
 By default, when sharing a comint buffer, ~crdt.el~ temporarily reset input 
history (as in =M-n= =M-p=)
 so others don't spy into your =.bash_history= and alike.
 You can customize this behavior using variable 
=crdt-comint-share-input-history=.
+
+** What if we don't have a public IP?
+
+There're various workaround.
+
+- You can use [[https://gitlab.com/gjedeer/tuntox][tuntox]] to proxy your 
connection over the [[https://tox.chat][Tox]] protocol.
+  =crdt.el= has experimental built-in integration for =tuntox=.
+  To enable it, you need to install =tuntox=,
+  set up the custom variable =crdt-tuntox-executable= accordingly (the path to 
your =tuntox= binary),
+  and set the custom variable =crdt-use-tuntox=. 
+  Setting it to =t= make =crdt.el= always create =tuntox= proxy for new server 
sessions, 
+  and setting it to ='confirm= make =crdt.el= ask you every time when creating 
new sessions.
+  After starting a session with =tuntox= proxy,
+  you can =M-x crdt-copy-url= to copy a URL recognizable by =M-x crdt-connect= 
and share it to your friends.
+  Be aware that according to my experience, =tuntox= takes significant time to 
establish a connection (sometimes up to half a minute),
+  however it gets much faster after the connection is established.
+
+- You can use Teredo to get a public routable IPv6 address. 
+  One free software implementation is Miredo. Get it from your
+  favorite package manager or from [[https://

[elpa] externals/crdt updated (b8a02a5 -> c427979)

2021-11-20 Thread ELPA Syncer
elpasync pushed a change to branch externals/crdt.

  from  b8a02a5   Squashed commit of the following:
   new  20ff83c   fix a bug in buffer remove handler
   new  a80f73d   Merge branch 'master' of code.librehq.com:qhong/crdt.el
   new  c427979   fix elpa divergence


Summary of changes:



[elpa] externals/org ebd06c1: org-src: Reset buffer-modified-p after fontifying

2021-11-20 Thread ELPA Syncer
branch: externals/org
commit ebd06c15b5bb44070a5a9a7fbf17e1fef41c7521
Author: Clément Pit-Claudel 
Commit: TEC 

org-src: Reset buffer-modified-p after fontifying

* lisp/org-src.el (org-src-font-lock-fontify-block): Reset the
modification flag of the temporary fontification buffer after
fontifying.

Without this some modes cause Emacs to prompt about unsaved buffers
when exiting: "Save buffer *org-src-fontification:...-mode*?".
---
 lisp/org-src.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index f1948bf..51dde60 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -642,7 +642,8 @@ as `org-src-fontify-natively' is non-nil."
  (put-text-property
   (+ start (1- pos)) (1- (+ start next)) prop new-prop
   org-buffer)))
- (setq pos next
+ (setq pos next)))
+  (set-buffer-modified-p nil))
;; Add Org faces.
(let ((src-face (nth 1 (assoc-string lang org-src-block-faces t
   (when (or (facep src-face) (listp src-face))