[elpa] externals/pyim 1889493010 2/2: pyim-candidates-pymap-chars -> pyim-candidates-quanpin-first-possible-chars

2022-06-17 Thread ELPA Syncer
branch: externals/pyim
commit 188949301091447cf976c5bf0c818be9466236d7
Author: Feng Shu 
Commit: Feng Shu 

pyim-candidates-pymap-chars -> pyim-candidates-quanpin-first-possible-chars
---
 pyim-candidates.el  | 16 +---
 tests/pyim-tests.el |  6 +++---
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/pyim-candidates.el b/pyim-candidates.el
index 04eb440a65..40ab8728a9 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -217,12 +217,10 @@
 (dolist (imobj imobjs)
   (let* ((w1 (pyim-candidates-quanpin-personal-words imobj scheme))
  (w2 (pyim-candidates-quanpin-common-words imobj scheme))
- ;; 第一个汉字
  (w3 (pyim-candidates-quanpin-first-chars imobj scheme char-num))
- ;; 如果 w3 找不到第一个拼音对应的汉字,那就进一步使用
- ;; `pyim-pymap-py2cchar-get' 来查找,这个函数支持声母搜索。可以得到
- ;; 更多的词条。
- (w4 (unless w3 (pyim-candidates-pymap-chars imobj scheme 
char-num
+ (w4 (unless w3
+   (pyim-candidates-quanpin-first-possible-chars
+imobj scheme char-num
 (push w1 personal-words)
 (push w2 common-words)
 (push w3 pinyin-chars-1)
@@ -259,8 +257,12 @@
 (min num (length chars)
 (cl-subseq chars 0 num)))
 
-(defun pyim-candidates-pymap-chars (imobj scheme &optional num)
-  "从 pymap 表获取汉字。"
+(defun pyim-candidates-quanpin-first-possible-chars (imobj scheme &optional 
num)
+  "获取输入的全拼对应的第一个可能的常用汉字。
+
+1. 假如用户输入 ni 时,获取拼音匹配 ni.* 的常用汉字,比如: ni
+   niao ning niu 等等。
+2. 假如用户输入 nihao 时,获取拼音为 ni 的常用汉字。"
   (let* ((pinyin (car (pyim-codes-create imobj scheme)))
  (chars (mapcar #'char-to-string
 (pyim-zip
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index 4406b0ca26..4dd7d7ccbf 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -635,13 +635,13 @@
 (should (equal (pyim-candidates-quanpin-first-chars (car imobjs) quanpin 
10)
'("你" "呢" "尼" "泥" "拟" "逆" "倪" "妮" "腻" "匿")
 
-(ert-deftest pyim-tests-pyim-candidates-pymap-chars ()
+(ert-deftest pyim-tests-pyim-candidates-quanpin-first-possible-chars ()
   (let* ((quanpin (pyim-scheme-get 'quanpin))
  (imobjs1 (pyim-imobjs-create "ni" quanpin))
  (imobjs2 (pyim-imobjs-create "nihao" quanpin)))
-(should (equal (pyim-candidates-pymap-chars (car imobjs1) quanpin 10)
+(should (equal (pyim-candidates-quanpin-first-possible-chars (car imobjs1) 
quanpin 10)
'("你" "年" "娘" "鸟" "摄" "您" "宁" "牛" "尼" "念")))
-(should (equal (pyim-candidates-pymap-chars (car imobjs2) quanpin 10)
+(should (equal (pyim-candidates-quanpin-first-possible-chars (car imobjs2) 
quanpin 10)
'("你" "尼" "呢" "泥" "拟" "逆" "倪" "妮" "腻" "匿")
 
 (ert-deftest pyim-tests-pyim-candidates-search-buffer ()



[elpa] externals/pyim updated (7bc274f153 -> 1889493010)

2022-06-17 Thread ELPA Syncer
elpasync pushed a change to branch externals/pyim.

  from  7bc274f153 Fix: 候选词丢失bug(有复现步骤) #445
   new  54417ef9b9 pyim-candidates-quanpin-chars -> 
pyim-candidates-quanpin-first-chars
   new  1889493010 pyim-candidates-pymap-chars -> 
pyim-candidates-quanpin-first-possible-chars


Summary of changes:
 pyim-candidates.el  | 23 ++-
 tests/pyim-tests.el | 10 +-
 2 files changed, 19 insertions(+), 14 deletions(-)



[elpa] externals/pyim 54417ef9b9 1/2: pyim-candidates-quanpin-chars -> pyim-candidates-quanpin-first-chars

2022-06-17 Thread ELPA Syncer
branch: externals/pyim
commit 54417ef9b91b50c728ab2ea68d4f0a00b2baa37a
Author: Feng Shu 
Commit: Feng Shu 

pyim-candidates-quanpin-chars -> pyim-candidates-quanpin-first-chars
---
 pyim-candidates.el  | 7 +--
 tests/pyim-tests.el | 4 ++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/pyim-candidates.el b/pyim-candidates.el
index 9664bced47..04eb440a65 100644
--- a/pyim-candidates.el
+++ b/pyim-candidates.el
@@ -218,7 +218,7 @@
   (let* ((w1 (pyim-candidates-quanpin-personal-words imobj scheme))
  (w2 (pyim-candidates-quanpin-common-words imobj scheme))
  ;; 第一个汉字
- (w3 (pyim-candidates-quanpin-chars imobj scheme char-num))
+ (w3 (pyim-candidates-quanpin-first-chars imobj scheme char-num))
  ;; 如果 w3 找不到第一个拼音对应的汉字,那就进一步使用
  ;; `pyim-pymap-py2cchar-get' 来查找,这个函数支持声母搜索。可以得到
  ;; 更多的词条。
@@ -247,7 +247,10 @@
'(code2word shortcode2word)
  '(code2word
 
-(defun pyim-candidates-quanpin-chars (imobj scheme &optional num)
+(defun pyim-candidates-quanpin-first-chars (imobj scheme &optional num)
+  "获取输入的全拼对应的第一个汉字。
+
+假如用户输入 nihao 时,获取 ni 对应的汉字。"
   (let* ((code (car (pyim-codes-create imobj scheme)))
  (chars (delete-dups
  `(,@(pyim-dcache-get code '(icode2word code2word))
diff --git a/tests/pyim-tests.el b/tests/pyim-tests.el
index a40b52d6db..4406b0ca26 100644
--- a/tests/pyim-tests.el
+++ b/tests/pyim-tests.el
@@ -625,14 +625,14 @@
 (should (equal (pyim-candidates-quanpin-common-words (car imobjs3) quanpin)
'("呢耗" "你好" "你坏" "尼耗")
 
-(ert-deftest pyim-tests-pyim-candidates-quanpin-chars ()
+(ert-deftest pyim-tests-pyim-candidates-quanpin-first-chars ()
   (let* ((pyim-dhashcache-icode2word (make-hash-table :test #'equal))
  (pyim-dhashcache-code2word (make-hash-table :test #'equal))
  (quanpin (pyim-scheme-get 'quanpin))
  (imobjs (pyim-imobjs-create "nihao" quanpin)))
 (puthash "ni" (list "你" "呢") pyim-dhashcache-icode2word)
 (puthash "ni" (list "你" "尼") pyim-dhashcache-code2word)
-(should (equal (pyim-candidates-quanpin-chars (car imobjs) quanpin 10)
+(should (equal (pyim-candidates-quanpin-first-chars (car imobjs) quanpin 
10)
'("你" "呢" "尼" "泥" "拟" "逆" "倪" "妮" "腻" "匿")
 
 (ert-deftest pyim-tests-pyim-candidates-pymap-chars ()



[elpa] externals/compat e5ec04fea3: Eagerly expand macros in compat-entwine

2022-06-17 Thread ELPA Syncer
branch: externals/compat
commit e5ec04fea3535e13a374a4b3ed5fd08038c0124c
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Eagerly expand macros in compat-entwine

In order for `compat--entwine-version' to be passed on to the macro
generator functions, we cannot just bind the variable within the macro
and forget about it.  Generating a let binding instead of a
`progn'-block is likewise insufficient, as this would only affect the
evaluation, not the macro-expansion.  It is therefore necessary to
expand all macros (or at least all macros using
`compat--generate-function', which for our intent is almost every
case) while binding `compat--entwine-version', so that the binding is
preserved.

If this is not done, the version cannot be determined when loading
compat.el (the main file).  To my understanding this is not fatal,
because all this affects is that compat.elc cannot be generated, so
the slower compat.el has to be loaded.
---
 compat.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compat.el b/compat.el
index abe43d9204..27ec49227a 100644
--- a/compat.el
+++ b/compat.el
@@ -77,6 +77,7 @@
   ;; compat.el is being compiled.
   ;;   cd compat && make clean all
   (bound-and-true-p byte-compile-current-file)
+ (compat--entwine-version (number-to-string version))
  defs)
 (with-temp-buffer
   (insert-file-contents file)
@@ -84,8 +85,7 @@
   (while (progn
(forward-comment 1)
(not (eobp)))
-(let ((compat--entwine-version (format "%d.1" version))
-  (form (read (current-buffer
+(let ((form (read (current-buffer
   (cond
((memq (car-safe form)
   '(compat-defun
@@ -97,7 +97,7 @@
   '(declare-function
 defvar))
 (push form defs))
-(macroexp-progn (nreverse defs)))
+(macroexpand-all (macroexp-progn (nreverse defs
 
 (compat-entwine 24)
 (compat-entwine 25)



[elpa] externals/org 9b00f4bf1d 1/2: org-persist: Fix expiry check

2022-06-17 Thread ELPA Syncer
branch: externals/org
commit 9b00f4bf1d544331795f64c499868b15f6c60bcd
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-persist: Fix expiry check

* lisp/org-persist.el (org-persist--gc-expired-p): Fix incorrect plist
key.
---
 lisp/org-persist.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-persist.el b/lisp/org-persist.el
index ab13652202..547004025f 100644
--- a/lisp/org-persist.el
+++ b/lisp/org-persist.el
@@ -344,8 +344,8 @@ FORMAT and ARGS are passed to `message'."
  (`nil t)
  (`never nil)
  ((pred numberp)
-  (when (plist-get ,collection :access-time)
-(<= (float-time) (+ (plist-get ,collection :access-time) (* ,cnd 24 60 
60)
+  (when (plist-get ,collection :last-access)
+(<= (float-time) (+ (plist-get ,collection :last-access) (* ,cnd 24 60 
60)
  ((pred functionp)
   (funcall ,cnd ,collection))
  (_ (error "org-persist: Unsupported expiry type %S" ,cnd



[elpa] externals/org updated (41b7410a8c -> 811deae32d)

2022-06-17 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  41b7410a8c doc/Makefile: Limit memory consumption when generating 
docs
   new  9b00f4bf1d org-persist: Fix expiry check
   new  811deae32d Revert "org-export-data: Concatenate strings in 
temporary buffer for performance"


Summary of changes:
 lisp/org-persist.el |  4 ++--
 lisp/ox.el  | 50 ++
 2 files changed, 24 insertions(+), 30 deletions(-)



[elpa] externals/org 811deae32d 2/2: Revert "org-export-data: Concatenate strings in temporary buffer for performance"

2022-06-17 Thread ELPA Syncer
branch: externals/org
commit 811deae32db17d99e1b92e0ad8227268bab8ec7b
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Revert "org-export-data: Concatenate strings in temporary buffer for 
performance"

This reverts commit a158b263a69c89ff74536163d69b12117316b034.
The commit actually makes not measurable performance difference.
---
 lisp/ox.el | 50 ++
 1 file changed, 22 insertions(+), 28 deletions(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 034878c7f3..c75357b979 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -1927,34 +1927,28 @@ Return a string."
  (and (not greaterp)
   (memq type org-element-recursive-objects)))
 (contents
-  (let ((export-buffer (current-buffer)))
-(with-temp-buffer
-  (dolist (element (org-element-contents
-   (if (or greaterp objectp) 
data
- ;; Elements directly 
containing
- ;; objects must have 
their indentation
- ;; normalized first.
- 
(org-element-normalize-contents
-  data
-  ;; When normalizing 
first paragraph
-  ;; of an item or
-  ;; a 
footnote-definition, ignore
-  ;; first line's 
indentation.
-  (and
-   (eq type 'paragraph)
-   (memq (org-element-type 
parent)
- 
'(footnote-definition item))
-   (eq (car 
(org-element-contents parent))
-   data)
-   (eq 
(org-element-property :pre-blank parent)
-   0))
-(insert
- ;; Use right local variable
- ;; environment if there are, for
- ;; example, #+BIND variables.
- (with-current-buffer export-buffer
-   (org-export-data element info
-  (buffer-string)
+ (mapconcat
+  (lambda (element) (org-export-data element info))
+  (org-element-contents
+   (if (or greaterp objectp) data
+ ;; Elements directly containing
+ ;; objects must have their indentation
+ ;; normalized first.
+ (org-element-normalize-contents
+  data
+  ;; When normalizing first paragraph
+  ;; of an item or
+  ;; a footnote-definition, ignore
+  ;; first line's indentation.
+  (and
+   (eq type 'paragraph)
+   (memq (org-element-type parent)
+ '(footnote-definition item))
+   (eq (car (org-element-contents parent))
+   data)
+   (eq (org-element-property :pre-blank parent)
+   0)
+  "")))
(broken-link-handler
 (funcall transcoder data
  (if (not greaterp) contents



[elpa] externals/js2-mode 88c081ec7e 2/2: Merge pull request #589 from pkryger/fix-after-change

2022-06-17 Thread ELPA Syncer
branch: externals/js2-mode
commit 88c081ec7ed960d1058bc9a9712758f5b6330996
Merge: fed41615b2 7a032d37b1
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #589 from pkryger/fix-after-change

Remove the correct hook in js2-minor-mode-exit
---
 js2-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js2-mode.el b/js2-mode.el
index 65241ad04e..9d81065882 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11756,7 +11756,7 @@ highlighting features of `js2-mode'."
 (defun js2-minor-mode-exit ()
   "Turn off `js2-minor-mode'."
   (setq next-error-function nil)
-  (remove-hook 'after-change-functions #'js2-mode-edit t)
+  (remove-hook 'after-change-functions #'js2-minor-mode-edit t)
   (remove-hook 'change-major-mode-hook #'js2-minor-mode-exit t)
   (when js2-mode-node-overlay
 (delete-overlay js2-mode-node-overlay)



[elpa] externals/js2-mode 7a032d37b1 1/2: Remove the correct hook in js2-minor-mode-exit

2022-06-17 Thread ELPA Syncer
branch: externals/js2-mode
commit 7a032d37b1327134f9593a6be0fdb447b6ac7eb0
Author: Przemek Kryger 
Commit: Przemek Kryger 

Remove the correct hook in js2-minor-mode-exit

The `js2-minor-mode-enter` adds `js2-minor-mode-edit` to
`after-change-functions`. Contrary the `js2-minor-mode-exit` removes
`js2-mode-edit` which had not been added to the list.

Without that, after enabling `js2-minor-mode` the `js-lint` remains enabled
even when the mode exits.
---
 js2-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js2-mode.el b/js2-mode.el
index 65241ad04e..9d81065882 100644
--- a/js2-mode.el
+++ b/js2-mode.el
@@ -11756,7 +11756,7 @@ highlighting features of `js2-mode'."
 (defun js2-minor-mode-exit ()
   "Turn off `js2-minor-mode'."
   (setq next-error-function nil)
-  (remove-hook 'after-change-functions #'js2-mode-edit t)
+  (remove-hook 'after-change-functions #'js2-minor-mode-edit t)
   (remove-hook 'change-major-mode-hook #'js2-minor-mode-exit t)
   (when js2-mode-node-overlay
 (delete-overlay js2-mode-node-overlay)



[nongnu] elpa/typescript-mode 10738f8eb4 1/2: added: infer keyword

2022-06-17 Thread ELPA Syncer
branch: elpa/typescript-mode
commit 10738f8eb403f8b5d385de964bd2862cf104db1c
Author: Ruzie 
Commit: GitHub 

added: infer keyword
---
 typescript-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index 220cf75f12..830d79dc9e 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -268,7 +268,7 @@ Match group 1 is MUMBLE.")
'("abstract" "any" "as" "async" "await" "boolean" "bigint" "break" "case" 
"catch" "class" "const"
  "constructor" "continue" "debugger" "declare" "default" "delete" "do" 
"else"
  "enum" "export" "extends" "extern" "false" "finally" "for"
- "function" "from" "get" "goto" "if" "implements" "import" "in" 
"instanceof"
+ "function" "from" "get" "goto" "if" "implements" "import" "in" "infer" 
"instanceof"
  "interface" "keyof" "let" "module" "namespace" "never" "new" "null" 
"number" "object" "of"
  "override" "private" "protected" "public" "readonly" "return" "set" 
"static" "string"
  "super" "switch"  "this" "throw" "true"



[nongnu] elpa/typescript-mode f2de3f4946 2/2: Merge pull request #165 from Ruzie/master

2022-06-17 Thread ELPA Syncer
branch: elpa/typescript-mode
commit f2de3f4946c846a23753b351eaf8b56017e02d89
Merge: 4f056f6db7 10738f8eb4
Author: Jostein Kjønigsen 
Commit: GitHub 

Merge pull request #165 from Ruzie/master

added: infer keyword
---
 typescript-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index 220cf75f12..830d79dc9e 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -268,7 +268,7 @@ Match group 1 is MUMBLE.")
'("abstract" "any" "as" "async" "await" "boolean" "bigint" "break" "case" 
"catch" "class" "const"
  "constructor" "continue" "debugger" "declare" "default" "delete" "do" 
"else"
  "enum" "export" "extends" "extern" "false" "finally" "for"
- "function" "from" "get" "goto" "if" "implements" "import" "in" 
"instanceof"
+ "function" "from" "get" "goto" "if" "implements" "import" "in" "infer" 
"instanceof"
  "interface" "keyof" "let" "module" "namespace" "never" "new" "null" 
"number" "object" "of"
  "override" "private" "protected" "public" "readonly" "return" "set" 
"static" "string"
  "super" "switch"  "this" "throw" "true"



[elpa] externals/javaimp 150b592b35: Improve flat imenu

2022-06-17 Thread Filipp Gunbin
branch: externals/javaimp
commit 150b592b3512b42929ed7e07f47e6fa1db6e6477
Author: Filipp Gunbin 
Commit: Filipp Gunbin 

Improve flat imenu

* Also show non-method items.
  * Include anon/local classes and their methods.
  * Refactor abstract method parsing.
---
 javaimp-parse.el | 137 ++--
 javaimp-util.el  |   4 +-
 javaimp.el   | 145 +--
 tests/imenu.el   |  29 ---
 tests/parse.el   |  46 ++
 5 files changed, 196 insertions(+), 165 deletions(-)

diff --git a/javaimp-parse.el b/javaimp-parse.el
index 867ea99521..1178bc5606 100644
--- a/javaimp-parse.el
+++ b/javaimp-parse.el
@@ -18,6 +18,17 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with this program.  If not, see .
 
+;; When changing parsing, it may make sense to benchmark performance
+;; on a large source tree with something like this:
+;;
+;; (benchmark-run 1
+;;   (javaimp-flush-cache)
+;;   (javaimp--read-dir-source-idents
+;;(javaimp-scope-defun-p t)
+;;"/src/java.base/share/classes/"
+;;"bench"))
+
+
 (require 'cc-mode)  ;for java-mode-syntax-table
 (require 'cl-lib)
 (require 'seq)
@@ -32,7 +43,10 @@
   open-brace
   (parent
nil
-   :documentation "Reference to parent scope struct."))
+   :documentation "Reference to parent scope struct.")
+  (attrs
+   nil
+   :documentation "Attributes plist"))
 
 
 (defconst javaimp-scope-all-types
@@ -343,12 +357,13 @@ PARENT-PRED."
   (push scope parents))
 (mapconcat #'javaimp-scope-name parents ".")))
 
-(defsubst javaimp-scope-test-type (scope leaf-types parent-types)
+(defsubst javaimp-scope-test-type (scope leaf-types &optional parent-types)
   (declare (indent 1))
   (let ((res (memq (javaimp-scope-type scope) leaf-types)))
-(while (and res
-(setq scope (javaimp-scope-parent scope)))
-  (setq res (memq (javaimp-scope-type scope) parent-types)))
+(when parent-types
+  (while (and res
+  (setq scope (javaimp-scope-parent scope)))
+(setq res (memq (javaimp-scope-type scope) parent-types
 res))
 
 (defun javaimp-scope-defun-p (&optional include-also)
@@ -364,6 +379,8 @@ methods.  If INCLUDE-ALSO is t, include methods, as well as 
local
'(anon-class local-class
 (parent-types
  (if (eq include-also t)
+ ;; Anonymous / local classes may be inside non-defun
+ ;; scopes
  javaimp-scope-all-types
'(class interface enum
 (lambda (s)
@@ -426,11 +443,18 @@ brace.")
   ;; or there weren't any of them.
   (setq arglist (javaimp-parse--arglist keyword-end (point) t))
   (when (= (length arglist) 1)
-(make-javaimp-scope :type (intern
-   (buffer-substring-no-properties
-keyword-start keyword-end))
-:name (javaimp-parse--substr-before-< (caar 
arglist))
-:start keyword-start)
+(let* ((type (intern (buffer-substring-no-properties
+  keyword-start keyword-end)))
+   (attrs
+(when-let (((eq type 'class))
+   (decl-start (javaimp-parse--decl-prefix)))
+  (goto-char brace-pos)
+  (when (javaimp-parse--rsb-keyword "\\_" 
decl-start t)
+'(abstract t)
+  (make-javaimp-scope :type type
+  :name (javaimp-parse--substr-before-< (caar 
arglist))
+  :start keyword-start
+  :attrs attrs))
 
 (defun javaimp-parse--scope-simple-stmt (_brace-pos)
   "Attempts to parse `simple-statement' scope.  Currently block
@@ -449,7 +473,7 @@ lambdas are also recognized as such."
   :start (match-beginning 1)
 
 (defun javaimp-parse--scope-anon-class (brace-pos)
-  "Attempts to parse anonymous class scope."
+  "Attempts to parse `anon-class' scope."
   ;; skip arg-list and ws
   (when (and (progn
(javaimp-parse--skip-back-until)
@@ -464,9 +488,10 @@ lambdas are also recognized as such."
   arglist (javaimp-parse--arglist (match-end 0) end t))
 (when (= (length arglist) 1)
   (make-javaimp-scope :type 'anon-class
-  :name
-  (concat ""
-  (javaimp-parse--substr-before-< (caar 
arglist)))
+  :name (format "%s"
+brace-pos
+(javaimp-parse--substr-before-<
+ (caar arglist)))
   :start start))
 
 (defun javaimp-parse--scope-m

[elpa] externals/org 9fb9a2bdfb: org.el (org-format-latex-header): Put DEFAULT-PACKAGES before PACKAGES

2022-06-17 Thread ELPA Syncer
branch: externals/org
commit 9fb9a2bdfbff92d115a973db8c7760fe9f44b4b3
Author: Sébastien Miquel 
Commit: Ihor Radchenko 

org.el (org-format-latex-header): Put DEFAULT-PACKAGES before PACKAGES

* lisp/org.el (org-format-latex-header): Put DEFAULT-PACKAGES before
PACKAGES, as per org-latex-packages-alist's documentation.

`org-format-latex-header' is mostly used to generate in-buffer images
from LaTeX fragments.  For LaTeX document export, the header is
generated by `org-splice-latex-header' ond `org-latex-classes' instead
and the default and documented behaviour is to insert DEFAULT-PACKAGES
before PACKAGES.

See also

https://list.orgmode.org/877d5gg5rt.fsf@localhost/T/#m2ad2f3b1509e1af72016e8e6fad3557ff3083046
---
 lisp/org.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 5b034ae12b..32ce445ff3 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3248,8 +3248,8 @@ images at the same place."
 
 (defcustom org-format-latex-header "\\documentclass{article}
 \\usepackage[usenames]{color}
-\[PACKAGES]
 \[DEFAULT-PACKAGES]
+\[PACKAGES]
 \\pagestyle{empty} % do not remove
 % The settings below are copied from fullpage.sty
 \\setlength{\\textwidth}{\\paperwidth}



[nongnu] elpa/helm b36b285be5 3/4: Only 1 space seems enough in *M-x and *apropos transformers

2022-06-17 Thread ELPA Syncer
branch: elpa/helm
commit b36b285be52d5be2f555b3ed4c23abdc968043b4
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Only 1 space seems enough in *M-x and *apropos transformers
---
 helm-command.el | 6 +++---
 helm-elisp.el   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/helm-command.el b/helm-command.el
index ef0c0643b6..4e86124f88 100644
--- a/helm-command.el
+++ b/helm-command.el
@@ -158,7 +158,7 @@ algorithm."
  (cons (cond ((and (string-match "^M-x" key) local-key)
   (format "%s%s%s %s"
   disp
-  (if doc (make-string (+ 4 (- max-len (length 
cand))) ? ) "")
+  (if doc (make-string (+ 1 (- max-len (length 
cand))) ? ) "")
   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
   (propertize
" " 'display
@@ -166,11 +166,11 @@ algorithm."
  ((string-match "^M-x" key)
   (format "%s%s%s"
   disp
-  (if doc (make-string (+ 4 (- max-len (length 
cand))) ? ) "")
+  (if doc (make-string (+ 1 (- max-len (length 
cand))) ? ) "")
   (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")))
  (t (format "%s%s%s %s"
 disp
-(if doc (make-string (+ 4 (- max-len 
(length cand))) ? ) "")
+(if doc (make-string (+ 1 (- max-len 
(length cand))) ? ) "")
 (if doc (propertize doc 'face 
'helm-M-x-short-doc) "")
 (propertize
  " " 'display
diff --git a/helm-elisp.el b/helm-elisp.el
index 86af979c7b..b92028d669 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -530,7 +530,7 @@ is only used to test DEFAULT."
collect (cons (format "%s%s%s"
  cand
  (if doc
- (make-string (+ 4 (if (zerop max-len)
+ (make-string (+ 1 (if (zerop max-len)
max-len
  (- max-len 
(string-width cand
   ? )



[nongnu] elpa/helm ca2ebcc731 1/4: Add a message when toggling truncate lines

2022-06-17 Thread ELPA Syncer
branch: elpa/helm
commit ca2ebcc7317f9fd9c3435fe68053ad206dc47d46
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Add a message when toggling truncate lines
---
 helm-core.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/helm-core.el b/helm-core.el
index f552ba105b..654db246c2 100644
--- a/helm-core.el
+++ b/helm-core.el
@@ -7638,7 +7638,9 @@ help."
 (with-helm-buffer
   (setq truncate-lines (not truncate-lines))
   (when (helm-get-previous-header-pos)
-(helm-update (regexp-quote (helm-get-selection nil t)))
+(helm-update (regexp-quote (helm-get-selection nil t
+  (message "%sisplaying continuation lines"
+   (if truncate-lines "Not D" "D")
 (put 'helm-toggle-truncate-line 'helm-only t)
 
 



[nongnu] elpa/helm-core updated (a6df31a7cf -> 218fa70297)

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

  from  a6df31a7cf Merge branch 'master' of github.com:emacs-helm/helm
  adds  ca2ebcc731 Add a message when toggling truncate lines
  adds  0cc7a7cbc2 Truncate lines in helm-apropos when shortdoc is enabled
  adds  b36b285be5 Only 1 space seems enough in *M-x and *apropos 
transformers
  adds  218fa70297 Fix preselect regexp in *apropos

No new revisions were added by this update.

Summary of changes:
 helm-command.el | 6 +++---
 helm-core.el| 4 +++-
 helm-elisp.el   | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)



[nongnu] elpa/helm 218fa70297 4/4: Fix preselect regexp in *apropos

2022-06-17 Thread ELPA Syncer
branch: elpa/helm
commit 218fa70297128d09410b5702c582feadb7b2b31e
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Fix preselect regexp in *apropos
---
 helm-elisp.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helm-elisp.el b/helm-elisp.el
index b92028d669..ed892ea123 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -791,7 +791,7 @@ a string, i.e. the `symbol-name' of any existing symbol."
   helm-apropos-function-list)
   :history 'helm-apropos-history
   :buffer "*helm apropos*"
-  :preselect (and default (concat "\\_<" (regexp-quote default) 
"\\_>"))
+  :preselect (and default (concat "^\\_<" (regexp-quote default) 
"\\_>"))
   :truncate-lines helm-apropos-show-short-doc)))
 
 



[nongnu] elpa/helm 0cc7a7cbc2 2/4: Truncate lines in helm-apropos when shortdoc is enabled

2022-06-17 Thread ELPA Syncer
branch: elpa/helm
commit 0cc7a7cbc298c7a021d336647b25f1964dbae3e9
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Truncate lines in helm-apropos when shortdoc is enabled
---
 helm-elisp.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/helm-elisp.el b/helm-elisp.el
index 03a0d77eff..86af979c7b 100644
--- a/helm-elisp.el
+++ b/helm-elisp.el
@@ -791,7 +791,8 @@ a string, i.e. the `symbol-name' of any existing symbol."
   helm-apropos-function-list)
   :history 'helm-apropos-history
   :buffer "*helm apropos*"
-  :preselect (and default (concat "\\_<" (regexp-quote default) 
"\\_>")
+  :preselect (and default (concat "\\_<" (regexp-quote default) 
"\\_>"))
+  :truncate-lines helm-apropos-show-short-doc)))
 
 
 ;;; Advices



[nongnu] elpa/helm updated (a6df31a7cf -> 218fa70297)

2022-06-17 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  a6df31a7cf Merge branch 'master' of github.com:emacs-helm/helm
   new  ca2ebcc731 Add a message when toggling truncate lines
   new  0cc7a7cbc2 Truncate lines in helm-apropos when shortdoc is enabled
   new  b36b285be5 Only 1 space seems enough in *M-x and *apropos 
transformers
   new  218fa70297 Fix preselect regexp in *apropos


Summary of changes:
 helm-command.el | 6 +++---
 helm-core.el| 4 +++-
 helm-elisp.el   | 5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)



[elpa] externals/org updated (9fb9a2bdfb -> 9632401dc6)

2022-06-17 Thread ELPA Syncer
elpasync pushed a change to branch externals/org.

  from  9fb9a2bdfb org.el (org-format-latex-header): Put DEFAULT-PACKAGES 
before PACKAGES
   new  bfd63cc4f2 org: Improve org-todo handling of negative prefix args
   new  65e19a0812 org-table.el: Fix orgtbl-mode not remapping delete key
   new  9632401dc6 Auto-Upcase/downcase #+begin/#+end in structure templates


Summary of changes:
 etc/ORG-NEWS  |  5 +
 lisp/org-table.el |  1 +
 lisp/org-tempo.el | 13 ++---
 lisp/org.el   | 26 +-
 4 files changed, 33 insertions(+), 12 deletions(-)



[elpa] externals/org 65e19a0812 2/3: org-table.el: Fix orgtbl-mode not remapping delete key

2022-06-17 Thread ELPA Syncer
branch: externals/org
commit 65e19a0812413d77a159b21bf995657dff1b8cb2
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-table.el: Fix orgtbl-mode not remapping delete key

* lisp/org-table.el (orgtbl-setup): Remap `delete-forward-char' in
addition to `delete-char'.  The former is called in Emacs >26.

Partially fixes

https://orgmode.org/list/1ad1b9b7-5a15-4f86-9274-b04b83694...@misasa.okayama-u.ac.jp
---
 lisp/org-table.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index cbc2ce0617..c1ea8503dd 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -5290,6 +5290,7 @@ to execute outside of tables."
   (org-remap orgtbl-mode-map
 'self-insert-command 'orgtbl-self-insert-command
 'delete-char 'org-delete-char
+ 'delete-forward-char 'org-delete-char
 'delete-backward-char 'org-delete-backward-char)
   (org-defkey orgtbl-mode-map "|" 'org-force-self-insert))
 t))



[elpa] externals/org bfd63cc4f2 1/3: org: Improve org-todo handling of negative prefix args

2022-06-17 Thread ELPA Syncer
branch: externals/org
commit bfd63cc4f2ab12e45b3aeaa38b847b138107fd1a
Author: Allen Li 
Commit: Ihor Radchenko 

org: Improve org-todo handling of negative prefix args

* lisp/org.el (org-todo): Handle -1 prefix args consistently and error
on other negative args.
---
 lisp/org.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index 32ce445ff3..3e9e146b4f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8901,7 +8901,8 @@ When called through ELisp, arg is also interpreted in the 
following way:
 nil cl
 (when (org-invisible-p) (org-end-of-subtree nil t
 (when (equal arg '(16)) (setq arg 'nextset))
-(when (equal arg -1) (org-cancel-repeater) (setq arg nil))
+(when (equal (prefix-numeric-value arg) -1) (org-cancel-repeater) (setq 
arg nil))
+(when (< (prefix-numeric-value arg) -1) (user-error "Prefix argument %d 
not supported" arg))
 (let ((org-blocker-hook org-blocker-hook)
  commentp
  case-fold-search)



[elpa] externals/org 9632401dc6 3/3: Auto-Upcase/downcase #+begin/#+end in structure templates

2022-06-17 Thread ELPA Syncer
branch: externals/org
commit 9632401dc6affc09e573e4af7c8898990cd8f04c
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

Auto-Upcase/downcase #+begin/#+end in structure templates

* lisp/org-tempo.el (org-tempo-add-block):
* lisp/org.el (org-insert-structure-template): When inserting
 #+begin_type/#+end_type, follow type's case.  TYPE will become
 #+BEGIN_TYPE and type will become #+bein_type.

(org-insert-structure-template): Make sure that we use
case-insensitive match even when user changes case-fold-search value.

(org-structure-template-alist): Clarify selection of #+BEGIN/END
vs. #+begin/end in the docstring.

* etc/ORG-NEWS (Structure templates now respect case used in
~org-structure-template-alist~): Document the change.
---
 etc/ORG-NEWS  |  5 +
 lisp/org-tempo.el | 13 ++---
 lisp/org.el   | 23 +++
 3 files changed, 30 insertions(+), 11 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 198684b8fa..4702da9b5f 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -222,6 +222,11 @@ produce results superior to Minted or Listings.
 *** Support for =#+include=-ing URLs
 
 =#+include: FILE= will now accept URLs as the file.
+*** Structure templates now respect case used in 
~org-structure-template-alist~ 
+
+The block type in ~org-structure-template-alist~ is not case-sensitive.
+When the block type starts from the upper case, structure template
+will now insert =#+BEGIN_TYPE=.  Previously, lower-case =#+begin_type= was 
inserted unconditionally.
 
 ** New functions and changes in function arguments
 
diff --git a/lisp/org-tempo.el b/lisp/org-tempo.el
index ed71431751..f9a913ec2d 100644
--- a/lisp/org-tempo.el
+++ b/lisp/org-tempo.el
@@ -118,11 +118,18 @@ Go through `org-structure-template-alist' and
   "Add block entry from `org-structure-template-alist'."
   (let* ((key (format "<%s" (car entry)))
 (name (cdr entry))
-(special (member name '("src" "export"
+(special (member name '("src" "export")))
+ (upcase? (string= (car (split-string name))
+   (upcase (car (split-string name))
 (tempo-define-template (format "org-%s" (replace-regexp-in-string " " "-" 
name))
-  `(,(format "#+begin_%s%s" name (if special " " ""))
+  `(,(format "#+%s_%s%s"
+  (if upcase? "BEGIN" "begin")
+  name
+  (if special " " ""))
 ,(when special 'p) '> n ,(unless special 'p) n
-,(format "#+end_%s" (car (split-string name " ")))
+,(format "#+%s_%s"
+  (if upcase? "END" "end")
+  (car (split-string name " ")))
 >)
   key
   (format "Insert a %s block" name)
diff --git a/lisp/org.el b/lisp/org.el
index 3e9e146b4f..2005005675 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -8601,9 +8601,11 @@ keywords relative to each registered export back-end."
 ("s" . "src")
 ("v" . "verse"))
   "An alist of keys and block types.
-`org-insert-structure-template' will display a menu with this
-list of templates to choose from.  The block type is inserted,
-with \"#+BEGIN_\" and \"#+END_\" added automatically.
+`org-insert-structure-template' will display a menu with this list of
+templates to choose from.  The block type is inserted, with
+\"#+begin_\" and \"#+end_\" added automatically.  If the block type
+consists of just uppercase letters, \"#+BEGIN_\" and \"#+END_\" are
+added instead.
 
 The menu keys are defined by the car of each entry in this alist.
 If two entries have the keys \"a\" and \"aa\" respectively, the
@@ -8735,18 +8737,23 @@ If an element cannot be made unique, an error is 
raised."
 Select a block from `org-structure-template-alist' then type
 either RET, TAB or SPC to write the block type.  With an active
 region, wrap the region in the block.  Otherwise, insert an empty
-block."
+block.
+
+When foo is written as FOO, upcase the #+BEGIN/END as well."
   (interactive
(list (pcase (org--insert-structure-template-mks)
   (`("\t" . ,_) (read-string "Structure type: "))
   (`(,_ ,choice . ,_) choice
-  (let* ((region? (use-region-p))
+  (let* ((case-fold-search t) ; Make sure that matches are case-insensitive.
+ (region? (use-region-p))
 (region-start (and region? (region-beginning)))
 (region-end (and region? (copy-marker (region-end
 (extended? (string-match-p "\\`\\(src\\|export\\)\\'" type))
 (verbatim? (string-match-p
 (concat "\\`" (regexp-opt '("example" "export" "src")))
-type)))
+type))
+ (upcase? (string= (car (split-string type))
+