[elpa] externals/mct 527c437 3/3: Extend minibuffer file map only when necessary

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit 527c437bf58983f311368717be5f1846b49af931
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Extend minibuffer file map only when necessary
---
 mct.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mct.el b/mct.el
index 4c9e8d2..704f19b 100644
--- a/mct.el
+++ b/mct.el
@@ -1024,7 +1024,8 @@ region.")
 
 (defun mct--minibuffer-local-filename-completion-map ()
   "Hook to `minibuffer-setup-hook'."
-  (when (eq (mct--completion-category) 'file)
+  (when (and (eq (mct--completion-category) 'file)
+ (not (bound-and-true-p completion-in-region-mode)))
 (use-local-map
  (make-composed-keymap mct-minibuffer-local-filename-completion-map
(current-local-map)



[elpa] externals/mct a670316 2/3: Apply candidate highlight only when necessary

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit a670316950f75c474a5ea2c4113b2f46d0d32c70
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Apply candidate highlight only when necessary

This is a follow-up to commit a3e43e2.  It pertains to issue 10:
.
---
 mct.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mct.el b/mct.el
index 59dec7f..4c9e8d2 100644
--- a/mct.el
+++ b/mct.el
@@ -963,7 +963,8 @@ region.")
 
 (defun mct--completions-highlighting ()
   "Highlight the current completion in the Completions' buffer."
-  (add-hook 'post-command-hook #'mct--completions-candidate-highlight nil t))
+  (unless (mct--no-completion-p)
+(add-hook 'post-command-hook #'mct--completions-candidate-highlight nil 
t)))
 
 ; Keymaps
 



[elpa] externals/mct a3e43e2 1/3: Fix mct interference with completion-in-region

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit a3e43e20dfa8c9f5e289542fb00a1c0becf510d0
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Fix mct interference with completion-in-region

Thanks to Benjamin for the feedback in issue 10:
.
---
 mct.el | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/mct.el b/mct.el
index a40e9ba..59dec7f 100644
--- a/mct.el
+++ b/mct.el
@@ -204,6 +204,11 @@ NOTE that setting this option with `setq' requires a 
restart of
  isearch-forward-regexp isearch-backward-regexp)
   "List of functions that do not do completion.")
 
+(defun mct--no-completion-p ()
+  "Check whether it is appropriate to use Mct-mode."
+  (or (memq this-command mct--no-complete-functions)
+  (bound-and-true-p completion-in-region-mode)))
+  
 (define-obsolete-variable-alias
   'mct-hl-line 'mct-highlight-candidate "0.3.0")
 
@@ -296,7 +301,7 @@ Meant to be added to `after-change-functions'."
 
 (defun mct--setup-completions ()
   "Set up the completions' buffer."
-  (unless (memq this-command mct--no-complete-functions)
+  (unless (mct--no-completion-p)
 (cond
  ((memq this-command mct-completion-passlist)
   (setq-local mct-minimum-input 0)
@@ -1004,14 +1009,14 @@ region.")
 
 (defun mct--completion-list-mode-map ()
   "Hook to `completion-setup-hook'."
-  (unless (memq this-command mct--no-complete-functions)
+  (unless (mct--no-completion-p)
 (use-local-map
  (make-composed-keymap mct-completion-list-mode-map
(current-local-map)
 
 (defun mct--minibuffer-local-completion-map ()
   "Hook to `minibuffer-setup-hook'."
-  (unless (memq this-command mct--no-complete-functions)
+  (unless (mct--no-completion-p)
 (use-local-map
  (make-composed-keymap mct-minibuffer-local-completion-map
(current-local-map)



[elpa] externals/mct updated (f0d88e4 -> 527c437)

2021-11-30 Thread ELPA Syncer
elpasync pushed a change to branch externals/mct.

  from  f0d88e4   Update list of contributors
   new  a3e43e2   Fix mct interference with completion-in-region
   new  a670316   Apply candidate highlight only when necessary
   new  527c437   Extend minibuffer file map only when necessary


Summary of changes:
 mct.el | 17 -
 1 file changed, 12 insertions(+), 5 deletions(-)



[elpa] externals/org bb6f328: org-src: Implement native inline src fontification

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit bb6f32884767bec9b471ecf75d8b79c3b97dbf69
Author: TEC 
Commit: TEC 

org-src: Implement native inline src fontification

* lisp/org-src.el (org-fontify-inline-src-blocks,
org-fontify-inline-src-blocks-1): Create a function to search the buffer
up to a limit for inline src blocks.  Light fontification is applied to
matched inline src blocks.  When `org-src-fontify-natively' is
set, `org-src-font-lock-fontify-block' is applied to the content.

* lisp/org.el (org-set-font-lock-defaults): Add
`org-fontify-inline-src-blocks' to `org-font-lock-extra-keywords', which
is locally bound inside `org-set-font-lock-defaults'.

* lisp/org-faces.el: Introduce a new face `org-inline-src-block' which
inherits from `org-block' by default.
---
 lisp/org-faces.el |  4 
 lisp/org-src.el   | 44 
 lisp/org.el   |  1 +
 3 files changed, 49 insertions(+)

diff --git a/lisp/org-faces.el b/lisp/org-faces.el
index b151045..2727627 100644
--- a/lisp/org-faces.el
+++ b/lisp/org-faces.el
@@ -459,6 +459,10 @@ verse and quote blocks are fontified using the `org-verse' 
and
   "Face used for the line delimiting the end of source blocks."
   :group 'org-faces)
 
+(defface org-inline-src-block '((t (:inherit org-block)))
+  "Face used for inline source blocks as a whole."
+  :group 'org-faces)
+
 (defface org-verbatim '((t (:inherit (fixed-pitch shadow
   "Face for fixed-with text like code snippets."
   :group 'org-faces
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 51dde60..639a447 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -654,6 +654,50 @@ as `org-src-fontify-natively' is non-nil."
 '(font-lock-fontified t fontified t font-lock-multiline t))
(set-buffer-modified-p modified)
 
+(defun org-fontify-inline-src-blocks (limit)
+  "Try to apply `org-fontify-inline-src-blocks-1'."
+  (condition-case nil
+  (org-fontify-inline-src-blocks-1 limit)
+(error (message "Org mode fontification error in %S at %d"
+(current-buffer)
+(line-number-at-pos)
+
+(defun org-fontify-inline-src-blocks-1 (limit)
+  "Fontify inline src_LANG blocks, from `point' up to LIMIT."
+  (let ((case-fold-search t)
+(initial-point (point)))
+(while (re-search-forward "\\_

[elpa] externals/org updated (bb6f328 -> adadb5b)

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

  from  bb6f328   org-src: Implement native inline src fontification
   new  4a2cf81   org-element--cache-for-removal: Fix handling edits before 
first section
   new  d8a1f34   org-element--current-element: Use explicit regexp to 
match headline
   new  8868f0f   org-archive-subtree: Speed up archiving
   new  adadb5b   org-element--cachy-sync: Add exception for unregistered 
changes


Summary of changes:
 lisp/org-archive.el |  7 ++-
 lisp/org-element.el | 25 +
 2 files changed, 27 insertions(+), 5 deletions(-)



[elpa] externals/org adadb5b 4/4: org-element--cachy-sync: Add exception for unregistered changes

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit adadb5b55405013b182251607349020accea9400
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-element--cachy-sync: Add exception for unregistered changes

* lisp/org-element.el (org-element--cache-sync): Another special case
when Emacs <28 silently changes `buffer-chars-modified-tick'.

Fixes 
https://list.orgmode.org/so53mm$obe$1...@ciao.gmane.io/T/#mad982a75885b1eda669d8cf7decee15c3917957b
---
 lisp/org-element.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 6a20135..b784b47 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -5880,7 +5880,7 @@ updated before current modification are actually 
submitted."
 ;; Note: 4 is a footprint for
 ;; (let ((inhibit-modification-hooks t))
 ;; (insert "blah"))
-'(1 3 6 7
+'(1 3 6 7 8
   (and (boundp 'org-batch-test) org-batch-test))
   (org-element--cache-warn "Unregistered buffer modifications 
detected. Resetting.
 If this warning appears regularly, please report it to Org mode mailing list 
(M-x org-submit-bug-report).



[elpa] externals/org d8a1f34 2/4: org-element--current-element: Use explicit regexp to match headline

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit d8a1f34cf6ac55648181ca97e86231208112afc4
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-element--current-element: Use explicit regexp to match headline

* lisp/org-element.el (org-element--current-element): Do not call
`org-at-heading-p' to determine if we are at headline element.
`org-at-heading-p' calls `beginning-of-line' and may match
non-headlines as headlines.
---
 lisp/org-element.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 4543e30..0b4dd22 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -4191,7 +4191,7 @@ element it has to parse."
 ;; Node Property.
 ((eq mode 'node-property) (org-element-node-property-parser limit))
 ;; Headline.
-((org-with-limited-levels (org-at-heading-p))
+((org-with-limited-levels (looking-at-p org-outline-regexp-bol))
  (org-element-headline-parser limit raw-secondary-p))
 ;; Sections (must be checked after headline).
 ((eq mode 'section) (org-element-section-parser limit))



[elpa] externals/org 8868f0f 3/4: org-archive-subtree: Speed up archiving

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit 8868f0f38e2ccdda88e835e3730cb320be98
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-archive-subtree: Speed up archiving

* lisp/org-element.el 
(org-element--cache-avoid-synchronous-headline-re-parsing):
  New internal variable controlling latency of cache
  `after-change-functions'.

(org-element--cache-for-removal): Use
`org-element--cache-avoid-synchronous-headline-re-parsing' to decide
if we re-parse changed headlines immidiately.
* lisp/org-archive.el (org-archive-subtree): Let-bind
`org-element--cache-avoid-synchronous-headline-re-parsing' to t while
archiving for better speed.
---
 lisp/org-archive.el |  7 ++-
 lisp/org-element.el | 14 ++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/lisp/org-archive.el b/lisp/org-archive.el
index 0943869..8b4547a 100644
--- a/lisp/org-archive.el
+++ b/lisp/org-archive.el
@@ -35,6 +35,9 @@
 (declare-function org-datetree-find-date-create "org-datetree" (date &optional 
keep-restriction))
 (declare-function org-inlinetask-remove-END-maybe "org-inlinetask" ())
 
+;; From org-element.el
+(defvar org-element--cache-avoid-synchronous-headline-re-parsing)
+
 (defcustom org-archive-default-command 'org-archive-subtree
   "The default archiving command."
   :group 'org-archive
@@ -253,7 +256,9 @@ direct children of this heading."
  (if (local-variable-p 'org-odd-levels-only (current-buffer))
  org-odd-levels-only
tr-org-odd-levels-only))
-level datetree-date datetree-subheading-p)
+level datetree-date datetree-subheading-p
+ ;; Suppress on-the-fly headline updates.
+ (org-element--cache-avoid-synchronous-headline-re-parsing t))
(when (string-match "\\`datetree/\\(\\**\\)" heading)
  ;; "datetree/" corresponds to 3 levels of headings.
  (let ((nsub (length (match-string 1 heading
diff --git a/lisp/org-element.el b/lisp/org-element.el
index 0b4dd22..6a20135 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6583,6 +6583,19 @@ that range.  See `after-change-functions' for more 
information."
 ;; Activate a timer to process the request during idle time.
 (org-element--cache-set-timer (current-buffer))
 
+(defvar org-element--cache-avoid-synchronous-headline-re-parsing nil
+  "This variable controls how buffer changes are handled by the cache.
+
+By default (when this variable is nil), cache re-parses modified
+headlines immidiately after modification preserving all the unaffected
+elements inside the headline.
+
+The default behaviour works best when users types inside Org buffer of
+when buffer modifications are mixed with cache requests.  However,
+large automated edits inserting/deleting many headlines are somewhat
+slower by default (as in `org-archive-subtree').  Let-binding this
+variable to non-nil will reduce cache latency after every singular edit
+(`after-change-functions') at the cost of slower cache queries.")
 (defun org-element--cache-for-removal (beg end offset)
   "Return first element to remove from cache.
 
@@ -6674,6 +6687,7 @@ known element in cache (it may start after END)."
  ;; its boundaries could have extended to shrinked - we
  ;; will re-parent and shift them anyway.
  (and (eq 'headline (org-element-type up))
+  (not 
org-element--cache-avoid-synchronous-headline-re-parsing)
   ;; The change is not inside headline.  Not
   ;; updating here.
   (not (<= beg (org-element-property :begin up)))



[elpa] externals/org 4a2cf81 1/4: org-element--cache-for-removal: Fix handling edits before first section

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit 4a2cf81dfb7dc36a8da364a54662c62fbb4da15b
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-element--cache-for-removal: Fix handling edits before first section

* lisp/org-element.el (org-element--cache-for-removal): Consider edits
within blank before first section destructive and make cache delete
the section even though the edits are technically before its
beginning.
---
 lisp/org-element.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 6577971..4543e30 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -6688,8 +6688,11 @@ known element in cache (it may start after END)."
   t)))
  ;; If UP is org-data, the situation is similar to
  ;; headline case.  We just need to re-parse the
- ;; org-data itself.
- (when (eq 'org-data (org-element-type up))
+ ;; org-data itself, unless the change is made
+ ;; within blank lines at BOB (that could
+ ;; potentially alter first-section).
+ (when (and (eq 'org-data (org-element-type up))
+(>= beg (org-element-property :contents-begin 
up)))
(org-element-set-element up (org-with-point-at 1 
(org-element-org-data-parser)))
(org-element--cache-log-message "Found non-robust 
change invalidating org-data. Re-parsing: %S"
 (org-element--format-element up))



[elpa] externals/comint-mime 1431605: Encoding workaround for images

2021-11-30 Thread ELPA Syncer
branch: externals/comint-mime
commit 1431605940724318c403a6048049c6a32cc16b0e
Author: Augusto Stoffel 
Commit: Augusto Stoffel 

Encoding workaround for images

Following the code snipped in
https://ipython.readthedocs.io/en/stable/config/shell_mimerenderer.html

Fixes #8
---
 comint-mime.py | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/comint-mime.py b/comint-mime.py
index 323ef67..2033a55 100644
--- a/comint-mime.py
+++ b/comint-mime.py
@@ -12,9 +12,15 @@ def __COMINT_MIME_setup(types):
 from functools import partial
 from json import dumps as to_json
 
+def encoding_workaround(data):
+if isinstance(data, str):
+from base64 import decodebytes
+return decodebytes(data.encode())
+return data
+
 MIME_TYPES = {
-"image/png": None,
-"image/jpeg": None,
+"image/png": encoding_workaround,
+"image/jpeg": encoding_workaround,
 "text/latex": str.encode,
 "text/html": str.encode,
 "application/json": lambda d: to_json(d).encode(),



[elpa] externals/compat 22a40f3: Add make-directory-autoloads compatibility function

2021-11-30 Thread ELPA Syncer
branch: externals/compat
commit 22a40f3618b789cabb170bc4bfc5e1c6efd05583
Author: Philip Kaludercic 
Commit: Philip Kaludercic 

Add make-directory-autoloads compatibility function
---
 compat-28.1.el | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/compat-28.1.el b/compat-28.1.el
index f44b144..8ed040f 100644
--- a/compat-28.1.el
+++ b/compat-28.1.el
@@ -617,5 +617,27 @@ itself will be used instead as the function argument."
   'keymap button-map
   'action callback))
 
+ Defined in autoload.el
+
+(defvar generated-autoload-file)
+(compat-defun make-directory-autoloads (dir output-file)
+  "Update autoload definitions for Lisp files in the directories DIRS.
+DIR can be either a single directory or a list of
+directories.  (The latter usage is discouraged.)
+
+The autoloads will be written to OUTPUT-FILE.  If any Lisp file
+binds `generated-autoload-file' as a file-local variable, write
+its autoloads into the specified file instead.
+
+The function does NOT recursively descend into subdirectories of the
+directory or directories specified."
+  (let ((generated-autoload-file output-file))
+;; We intentionally don't sharp-quote
+;; `update-directory-autoloads', because it was deprecated in
+;; Emacs 28 and we don't want to trigger the byte compiler for
+;; newer versions.
+(apply 'update-directory-autoloads
+   (if (listp dir) dir (list dir)
+
 (provide 'compat-28.1)
 ;;; compat-28.1.el ends here



[elpa] externals/consult fec9fd3: Rename function in analogy to the Emacs 28 API

2021-11-30 Thread ELPA Syncer
branch: externals/consult
commit fec9fd36829849f54f287d156f3b1645c8e28018
Author: Daniel Mendler 
Commit: Daniel Mendler 

Rename function in analogy to the Emacs 28 API
---
 consult.el | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/consult.el b/consult.el
index 2540810..409188c 100644
--- a/consult.el
+++ b/consult.el
@@ -1187,7 +1187,7 @@ FACE is the cursor face."
   "Normalize PREVIEW-KEY, return alist of keys and debounce times."
   (let ((keys)
 (debounce 0))
-(setq preview-key (consult--to-list preview-key))
+(setq preview-key (consult--ensure-list preview-key))
 (while preview-key
   (if (eq (car preview-key) :debounce)
   (setq debounce (cadr preview-key)
@@ -1754,9 +1754,9 @@ The refresh happens after a DELAY, defaulting to 
`consult-async-refresh-delay'."
   "Filter candidates of ASYNC by FUN."
   (consult--async-transform async seq-filter fun))
 
-(defun consult--to-list (list)
+(defun consult--ensure-list (list)
   "Ensure that LIST is a list."
-  (if (listp list) list (list list)))
+  (if (listp list) list (list list))) ;; Emacs 28 ensure-list
 
 (defun consult--command-builder (builder)
   "Return command line builder given CMD.
@@ -1815,9 +1815,9 @@ ASYNC must be non-nil for async completion functions."
   (delete-dups
(append
 ;; the defaults are at the beginning of the future history
-(consult--to-list minibuffer-default)
+(consult--ensure-list minibuffer-default)
 ;; then our custom items
-(remove "" (remq nil (consult--to-list items)))
+(remove "" (remq nil (consult--ensure-list items)))
 ;; Add all the completions for non-async commands. For async commands this 
feature
 ;; is not useful, since if one selects a completion candidate, the async 
search is
 ;; restarted using that candidate string. This usually does not yield a 
desired
@@ -2066,7 +2066,7 @@ INHERIT-INPUT-METHOD, if non-nil the minibuffer inherits 
the input method."
(let ((key (if (plist-member src :preview-key)
   (plist-get src :preview-key)
 consult-preview-key)))
- (consult--to-list key)))
+ (consult--ensure-list key)))
  sources
 
 (defun consult--multi-lookup (sources _ candidates cand)
@@ -3828,7 +3828,7 @@ AS is a conversion function."
   (when sort
 (setq buffers (funcall (intern (format "consult--buffer-sort-%s" 
sort)) buffers)))
   (when (or filter mode as (stringp root))
-(let ((mode (consult--to-list mode))
+(let ((mode (consult--ensure-list mode))
   (exclude-re (consult--regexp-filter exclude))
   (include-re (consult--regexp-filter include)))
   (consult--keep! buffers



[elpa] externals/mct 799041d 1/8: Introduce mct--active variable, use advice for minibuffer setup

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit 799041d8652712376d8e6d744c5b9caaeedff680
Author: Daniel Mendler 
Commit: Protesilaos Stavrou 

Introduce mct--active variable, use advice for minibuffer setup

By using an advice we ensure that Mct is only setup in the scenarios
where we are sure that we want to enable it. Remove the problematic
`mct--no-complete-functions`.
---
 mct.el | 91 +++---
 1 file changed, 42 insertions(+), 49 deletions(-)

diff --git a/mct.el b/mct.el
index 704f19b..6e16075 100644
--- a/mct.el
+++ b/mct.el
@@ -196,19 +196,6 @@ NOTE that setting this option with `setq' requires a 
restart of
 
  Basics of intersection between minibuffer and Completions' buffer
 
-;; TODO 2021-11-16: Is there a better way to check that the current
-;; command does not do completion?  This is fragile.
-(defvar mct--no-complete-functions
-  '( eval-expression query-replace query-replace-regexp
- isearch-forward isearch-backward
- isearch-forward-regexp isearch-backward-regexp)
-  "List of functions that do not do completion.")
-
-(defun mct--no-completion-p ()
-  "Check whether it is appropriate to use Mct-mode."
-  (or (memq this-command mct--no-complete-functions)
-  (bound-and-true-p completion-in-region-mode)))
-  
 (define-obsolete-variable-alias
   'mct-hl-line 'mct-highlight-candidate "0.3.0")
 
@@ -301,18 +288,35 @@ Meant to be added to `after-change-functions'."
 
 (defun mct--setup-completions ()
   "Set up the completions' buffer."
-  (unless (mct--no-completion-p)
-(cond
- ((memq this-command mct-completion-passlist)
-  (setq-local mct-minimum-input 0)
-  (setq-local mct-live-update-delay 0)
-  (mct--show-completions)
-  (add-hook 'after-change-functions #'mct--live-completions nil t))
- ((null mct-live-completion))
- ((not (memq this-command mct-completion-blocklist))
-  (if (eq mct-live-completion 'visible)
-  (add-hook 'after-change-functions 
#'mct--live-completions-visible-timer nil t)
-(add-hook 'after-change-functions #'mct--live-completions-timer nil 
t))
+  (cond
+   ((memq this-command mct-completion-passlist)
+(setq-local mct-minimum-input 0)
+(setq-local mct-live-update-delay 0)
+(mct--show-completions)
+(add-hook 'after-change-functions #'mct--live-completions nil t))
+   ((null mct-live-completion))
+   ((not (memq this-command mct-completion-blocklist))
+(if (eq mct-live-completion 'visible)
+(add-hook 'after-change-functions 
#'mct--live-completions-visible-timer nil t)
+  (add-hook 'after-change-functions #'mct--live-completions-timer nil 
t)
+
+(defvar-local mct--active nil
+  "Minibuffer local variable, t if Mct is active.")
+
+(defun mct--active-p ()
+  "Return t if Mct is active."
+  (when-let* ((win (active-minibuffer-window))
+  (buf (window-buffer win)))
+  (buffer-local-value 'mct--active buf)))
+
+(defun mct--completing-read-advice (&rest app)
+  (minibuffer-with-setup-hook
+  (lambda ()
+(setq mct--active t)
+(mct--setup-completions)
+(mct--setup-keymap)
+(mct--setup-shadow-files))
+(apply app)))
 
 ; Alternating backgrounds (else "stripes")
 
@@ -901,8 +905,7 @@ ARGS."
  (overlay-end rfn-eshadow-overlay)
 
 (defun mct--setup-shadow-files ()
-  "Set up shadowed file name deletion.
-To be assigned to `minibuffer-setup-hook'."
+  "Set up shadowed file name deletion."
   (add-hook 'after-change-functions #'mct--shadow-filenames nil t))
 
 ; Highlight current candidate
@@ -963,7 +966,7 @@ region.")
 
 (defun mct--completions-highlighting ()
   "Highlight the current completion in the Completions' buffer."
-  (unless (mct--no-completion-p)
+  (when (mct--active-p)
 (add-hook 'post-command-hook #'mct--completions-candidate-highlight nil 
t)))
 
 ; Keymaps
@@ -1010,22 +1013,17 @@ region.")
 
 (defun mct--completion-list-mode-map ()
   "Hook to `completion-setup-hook'."
-  (unless (mct--no-completion-p)
+  (when (mct--active-p)
 (use-local-map
  (make-composed-keymap mct-completion-list-mode-map
(current-local-map)
 
-(defun mct--minibuffer-local-completion-map ()
-  "Hook to `minibuffer-setup-hook'."
-  (unless (mct--no-completion-p)
-(use-local-map
- (make-composed-keymap mct-minibuffer-local-completion-map
-   (current-local-map)
-
-(defun mct--minibuffer-local-filename-completion-map ()
-  "Hook to `minibuffer-setup-hook'."
-  (when (and (eq (mct--completion-category) 'file)
- (not (bound-and-true-p completion-in-region-mode)))
+(defun mct--setup-keymap ()
+  "Setup minibuffer keymaps."
+  (use-local-map
+   (make-composed-keymap mct-minibuffer-local-completion-map
+ (current-local-map)))
+  (when (eq (mct--completion-category) 'file)
 (use-local-map
  (make-composed-keymap mct-minibuffer-lo

[elpa] externals/mct updated (527c437 -> f30dddf)

2021-11-30 Thread ELPA Syncer
elpasync pushed a change to branch externals/mct.

  from  527c437   Extend minibuffer file map only when necessary
   new  799041d   Introduce mct--active variable, use advice for minibuffer 
setup
   new  1cee8df   Rename mct--setup-completions to 
mct--setup-live-completions
   new  6b19465   Unify completion list setup into a single function
   new  d0ac8aa   Avoid setting variables globally, restrict state to the 
buffers
   new  c77fb3f   Move mct--clean-completions to mct--setup-completion-list
   new  dea8ed0   Rename internal functions for consistency
   new  a5c4ba3   Do not affect completions-format global state
   new  f30dddf   Make sure the completions-format stays local


Summary of changes:
 README.org |   3 -
 mct.el | 192 ++---
 2 files changed, 82 insertions(+), 113 deletions(-)



[elpa] externals/mct 1cee8df 2/8: Rename mct--setup-completions to mct--setup-live-completions

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit 1cee8df0cbf41167d57efe1309839a8e4a0554f4
Author: Daniel Mendler 
Commit: Protesilaos Stavrou 

Rename mct--setup-completions to mct--setup-live-completions

Avoid similar names.
---
 mct.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mct.el b/mct.el
index 6e16075..55e103f 100644
--- a/mct.el
+++ b/mct.el
@@ -286,7 +286,7 @@ Meant to be added to `after-change-functions'."
   (when (window-live-p (mct--get-completion-window))
 (mct--live-completions-timer)))
 
-(defun mct--setup-completions ()
+(defun mct--setup-live-completions ()
   "Set up the completions' buffer."
   (cond
((memq this-command mct-completion-passlist)
@@ -313,7 +313,7 @@ Meant to be added to `after-change-functions'."
   (minibuffer-with-setup-hook
   (lambda ()
 (setq mct--active t)
-(mct--setup-completions)
+(mct--setup-live-completions)
 (mct--setup-keymap)
 (mct--setup-shadow-files))
 (apply app)))



[elpa] externals/mct 6b19465 3/8: Unify completion list setup into a single function

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit 6b194653e653545e768034fb8ca7739efbd992f9
Author: Daniel Mendler 
Commit: Protesilaos Stavrou 

Unify completion list setup into a single function

We check once that Mct is active and then setup all the
different modifications.
---
 mct.el | 37 +
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/mct.el b/mct.el
index 55e103f..a265a59 100644
--- a/mct.el
+++ b/mct.el
@@ -966,8 +966,7 @@ region.")
 
 (defun mct--completions-highlighting ()
   "Highlight the current completion in the Completions' buffer."
-  (when (mct--active-p)
-(add-hook 'post-command-hook #'mct--completions-candidate-highlight nil 
t)))
+  (add-hook 'post-command-hook #'mct--completions-candidate-highlight nil t))
 
 ; Keymaps
 
@@ -1013,10 +1012,9 @@ region.")
 
 (defun mct--completion-list-mode-map ()
   "Hook to `completion-setup-hook'."
-  (when (mct--active-p)
-(use-local-map
- (make-composed-keymap mct-completion-list-mode-map
-   (current-local-map)
+  (use-local-map
+   (make-composed-keymap mct-completion-list-mode-map
+ (current-local-map
 
 (defun mct--setup-keymap ()
   "Setup minibuffer keymaps."
@@ -1028,6 +1026,17 @@ region.")
  (make-composed-keymap mct-minibuffer-local-filename-completion-map
(current-local-map)
 
+(defun mct--setup-completion-list ()
+  (when (mct--active-p)
+;; TODO use a uniform naming scheme here?
+;; mct--setup-completions-* or mct--setup-*
+(mct--setup-completions-styles) ;; TODO this name is confusing, because of 
`completion-styles'
+(mct--completion-list-mode-map)
+(mct--truncate-lines-silently)
+(mct--completions-highlighting)
+(mct--display-line-numbers)
+(cursor-sensor-mode)))
+
 ; mct-mode declaration
 
 (declare-function minibuf-eldef-setup-minibuffer "minibuf-eldef")
@@ -1052,13 +1061,7 @@ region.")
   completion-show-help nil
   completion-auto-help t
   completions-format mct-completions-format)
-(let ((hook 'completion-list-mode-hook))
-  (add-hook hook #'mct--setup-completions-styles)
-  (add-hook hook #'mct--completion-list-mode-map)
-  (add-hook hook #'mct--truncate-lines-silently)
-  (add-hook hook #'mct--completions-highlighting)
-  (add-hook hook #'mct--display-line-numbers)
-  (add-hook hook #'cursor-sensor-mode))
+(add-hook 'completion-list-mode-hook #'mct--setup-completion-list)
 (add-hook 'completion-setup-hook #'mct--clean-completions)
 (dolist (fn '(exit-minibuffer
   choose-completion
@@ -1075,13 +1078,7 @@ region.")
   completion-show-help mct--completion-show-help
   completion-auto-help mct--completion-auto-help
   completions-format mct--completions-format)
-(let ((hook 'completion-list-mode-hook))
-  (remove-hook hook #'mct--setup-completions-styles)
-  (remove-hook hook #'mct--completion-list-mode-map)
-  (remove-hook hook #'mct--truncate-lines-silently)
-  (remove-hook hook #'mct--completions-highlighting)
-  (remove-hook hook #'mct--display-line-numbers)
-  (remove-hook hook #'cursor-sensor-mode))
+(remove-hook 'completion-list-mode-hook #'mct--setup-completion-list)
 (remove-hook 'completion-setup-hook #'mct--clean-completions)
 (dolist (fn '(exit-minibuffer
   choose-completion



[elpa] externals/mct d0ac8aa 4/8: Avoid setting variables globally, restrict state to the buffers

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit d0ac8aa9db6e0de00b8020ef0ff0ef352c61ebcb
Author: Daniel Mendler 
Commit: Protesilaos Stavrou 

Avoid setting variables globally, restrict state to the buffers

We restrict the tweaks to the buffers where Mct is active.
In particular we avoid the introduction of multiple variables
to retain the original state.
---
 mct.el | 21 -
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/mct.el b/mct.el
index a265a59..b5ce826 100644
--- a/mct.el
+++ b/mct.el
@@ -312,6 +312,8 @@ Meant to be added to `after-change-functions'."
 (defun mct--completing-read-advice (&rest app)
   (minibuffer-with-setup-hook
   (lambda ()
+(setq-local resize-mini-windows t
+completion-auto-help t)
 (setq mct--active t)
 (mct--setup-live-completions)
 (mct--setup-keymap)
@@ -1028,6 +1030,8 @@ region.")
 
 (defun mct--setup-completion-list ()
   (when (mct--active-p)
+(setq-local completion-show-help nil
+completions-format mct-completions-format)
 ;; TODO use a uniform naming scheme here?
 ;; mct--setup-completions-* or mct--setup-*
 (mct--setup-completions-styles) ;; TODO this name is confusing, because of 
`completion-styles'
@@ -1041,11 +1045,6 @@ region.")
 
 (declare-function minibuf-eldef-setup-minibuffer "minibuf-eldef")
 
-(defvar mct--resize-mini-windows nil)
-(defvar mct--completion-show-help nil)
-(defvar mct--completion-auto-help nil)
-(defvar mct--completions-format nil)
-
 ;;;###autoload
 (define-minor-mode mct-mode
   "Set up opinionated default completion UI."
@@ -1053,14 +1052,6 @@ region.")
   :group 'mct
   (if mct-mode
   (progn
-(setq mct--resize-mini-windows resize-mini-windows
-  mct--completion-show-help completion-show-help
-  mct--completion-auto-help completion-auto-help
-  mct--completions-format completions-format)
-(setq resize-mini-windows t
-  completion-show-help nil
-  completion-auto-help t
-  completions-format mct-completions-format)
 (add-hook 'completion-list-mode-hook #'mct--setup-completion-list)
 (add-hook 'completion-setup-hook #'mct--clean-completions)
 (dolist (fn '(exit-minibuffer
@@ -1074,10 +1065,6 @@ region.")
 (advice-add #'completing-read-multiple :filter-args 
#'mct--crm-indicator)
 (advice-add #'minibuffer-message :around #'mct--honor-inhibit-message)
 (advice-add #'minibuf-eldef-setup-minibuffer :around 
#'mct--stealthily))
-(setq resize-mini-windows mct--resize-mini-windows
-  completion-show-help mct--completion-show-help
-  completion-auto-help mct--completion-auto-help
-  completions-format mct--completions-format)
 (remove-hook 'completion-list-mode-hook #'mct--setup-completion-list)
 (remove-hook 'completion-setup-hook #'mct--clean-completions)
 (dolist (fn '(exit-minibuffer



[elpa] externals/mct a5c4ba3 7/8: Do not affect completions-format global state

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit a5c4ba36da4c146b4a2feece902fc8170961e94e
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Do not affect completions-format global state

Thanks to Daniel Mendler for the contributions that make this possible,
including the following patches:

c77fb3f 2021-11-30 Move mct--clean-completions to mct--setup-completion-list
d0ac8aa 2021-11-30 Avoid setting variables globally, restrict state to the 
buffers
6b19465 2021-11-30 Unify completion list setup into a single function
1cee8df 2021-11-30 Rename mct--setup-completions to 
mct--setup-live-completions
799041d 2021-11-30 Introduce mct--active variable, use advice for 
minibuffer setup

The upside of this change is that mct-completions-format can now be set
with 'setq' without the exception it had before of requiring a restart
of mct-mode.
---
 README.org |  3 ---
 mct.el | 21 +
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/README.org b/README.org
index 55a8a1d..e99fec9 100644
--- a/README.org
+++ b/README.org
@@ -408,9 +408,6 @@ And with more options:
 (setq mct-apply-completion-stripes t)
 (setq mct-minimum-input 3)
 (setq mct-live-update-delay 0.6)
-
-;; NOTE: setting this variable with `setq', requires `mct-mode' to be
-;; reloaded.
 (setq mct-completions-format 'one-column)
 
 ;; NOTE: `mct-completion-blocklist' can be used for commands with lots
diff --git a/mct.el b/mct.el
index a809366..72623bb 100644
--- a/mct.el
+++ b/mct.el
@@ -169,14 +169,7 @@ and/or the documentation string of `display-buffer'."
 
 (defcustom mct-completions-format 'one-column
   "The appearance and sorting used by `mct-mode'.
-See `completions-format' for possible values.
-
-NOTE that setting this option with `setq' requires a restart of
-`mct-mode'."
-  :set (lambda (var val)
- (when (bound-and-true-p mct-mode)
-   (setq completions-format val))
- (set var val))
+See `completions-format' for possible values."
   :type '(choice (const horizontal) (const vertical) (const one-column))
   :group 'mct)
 
@@ -308,6 +301,10 @@ Meant to be added to `after-change-functions'."
   (buf (window-buffer win)))
   (buffer-local-value 'mct--active buf)))
 
+(defun mct--display-completion-list-advice (&rest app)
+  (let ((completions-format mct-completions-format))
+(apply app)))
+
 (defun mct--completing-read-advice (&rest app)
   (minibuffer-with-setup-hook
   (lambda ()
@@ -384,8 +381,7 @@ Meant to be added to `after-change-functions'."
 ;; We need this to make things work on Emacs 27.
 (defun mct--one-column-p ()
   "Test if we have a one-column view available."
-  (and (eq completions-format 'one-column)
-   (eq mct-completions-format 'one-column)
+  (and (eq mct-completions-format 'one-column)
(>= emacs-major-version 28)))
 
 ; Focus minibuffer and/or show completions
@@ -1029,8 +1025,7 @@ region.")
 
 (defun mct--setup-completion-list ()
   (when (mct--active-p)
-(setq-local completion-show-help nil
-completions-format mct-completions-format)
+(setq-local completion-show-help nil)
 (mct--setup-clean-completions)
 (mct--setup-appearance)
 (mct--setup-completion-list-keymap)
@@ -1060,6 +1055,7 @@ region.")
 (advice-add #'completing-read-default :around 
#'mct--completing-read-advice)
 (advice-add #'completing-read-multiple :around 
#'mct--completing-read-advice)
 (advice-add #'completing-read-multiple :filter-args 
#'mct--crm-indicator)
+(advice-add #'display-completion-list :around 
#'mct--display-completion-list-advice)
 (advice-add #'minibuffer-message :around #'mct--honor-inhibit-message)
 (advice-add #'minibuf-eldef-setup-minibuffer :around 
#'mct--stealthily))
 (remove-hook 'completion-list-mode-hook #'mct--setup-completion-list)
@@ -1072,6 +1068,7 @@ region.")
 (advice-remove #'completing-read-default #'mct--completing-read-advice)
 (advice-remove #'completing-read-multiple #'mct--completing-read-advice)
 (advice-remove #'completing-read-multiple #'mct--crm-indicator)
+(advice-remove #'display-completion-list 
#'mct--display-completion-list-advice)
 (advice-remove #'minibuffer-message #'mct--honor-inhibit-message)
 (advice-remove #'minibuf-eldef-setup-minibuffer #'mct--stealthily)))
 



[elpa] externals/mct f30dddf 8/8: Make sure the completions-format stays local

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit f30dddf1eb61696c9efe215201059cd5652650dd
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Make sure the completions-format stays local
---
 mct.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mct.el b/mct.el
index 72623bb..5c419f9 100644
--- a/mct.el
+++ b/mct.el
@@ -302,7 +302,9 @@ Meant to be added to `after-change-functions'."
   (buffer-local-value 'mct--active buf)))
 
 (defun mct--display-completion-list-advice (&rest app)
-  (let ((completions-format mct-completions-format))
+  (if (mct--active-p)
+  (let ((completions-format mct-completions-format))
+(apply app))
 (apply app)))
 
 (defun mct--completing-read-advice (&rest app)



[elpa] externals/mct dea8ed0 6/8: Rename internal functions for consistency

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit dea8ed082d64b0c86d8f00ecb30e4dc8a79b0457
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Rename internal functions for consistency
---
 mct.el | 37 +
 1 file changed, 17 insertions(+), 20 deletions(-)

diff --git a/mct.el b/mct.el
index 60050a6..a809366 100644
--- a/mct.el
+++ b/mct.el
@@ -211,9 +211,8 @@ NOTE that setting this option with `setq' requires a 
restart of
 
 (declare-function display-line-numbers-mode "display-line-numbers")
 
-(defun mct--display-line-numbers ()
-  "Set up line numbers for the completions' buffer.
-Add this to `completion-list-mode-hook'."
+(defun mct--setup-line-numbers ()
+  "Set up line numbers for the completions' buffer."
   (when (and (derived-mode-p 'completion-list-mode)
  mct-show-completion-line-numbers)
 (display-line-numbers-mode 1)))
@@ -225,7 +224,7 @@ Add this to `completion-list-mode-hook'."
 ;; candidates could be found at point (e.g. it would break `embark-act'
 ;; as it could not read the topmost candidate when point was at the
 ;; beginning of the line, unless the point was moved forward).
-(defun mct--clean-completions ()
+(defun mct--setup-clean-completions ()
   "Keep only completion candidates in the Completions."
   (with-current-buffer standard-output
 (let ((inhibit-read-only t))
@@ -715,7 +714,7 @@ If ARG is supplied, move that many completion groups at a 
time."
   (mct-goto-line)
 (unwind-protect
 (progn
-  (mct--display-line-numbers)
+  (mct--setup-line-numbers)
   (mct-goto-line))
   (display-line-numbers-mode -1))
 
@@ -819,7 +818,7 @@ followed by exiting the minibuffer with that candidate."
 
 ; Miscellaneous commands
 
-;; This is needed to circumvent `mct--clean-completions' with regard to
+;; This is needed to circumvent `mct--setup-clean-completions' with regard to
 ;; `cursor-sensor-functions'.
 (defun mct-beginning-of-buffer ()
   "Go to the top of the Completions buffer."
@@ -876,15 +875,15 @@ ARGS."
   (let ((inhibit-modification-hooks t))
 (apply fn args)))
 
-(defun mct--setup-completions-styles ()
-  "Set up variables for default completions."
+(defun mct--setup-appearance ()
+  "Set up variables for the appearance of the Completions' buffer."
   (when mct-hide-completion-mode-line
 (setq-local mode-line-format nil))
   (if mct-apply-completion-stripes
   (mct--add-stripes)
 (mct--remove-stripes)))
 
-(defun mct--truncate-lines-silently ()
+(defun mct--setup-silent-line-truncation ()
   "Toggle line truncation without printing messages."
   (let ((inhibit-message t))
 (toggle-truncate-lines t)))
@@ -966,7 +965,7 @@ region.")
 (setq mct--highlight-overlay (mct--overlay-make)))
   (mct--overlay-move mct--highlight-overlay))
 
-(defun mct--completions-highlighting ()
+(defun mct--setup-highlighting ()
   "Highlight the current completion in the Completions' buffer."
   (add-hook 'post-command-hook #'mct--completions-candidate-highlight nil t))
 
@@ -1012,8 +1011,8 @@ region.")
 map)
   "Derivative of `minibuffer-local-filename-completion-map'.")
 
-(defun mct--completion-list-mode-map ()
-  "Hook to `completion-setup-hook'."
+(defun mct--setup-completion-list-keymap ()
+  "Set up completion list keymap."
   (use-local-map
(make-composed-keymap mct-completion-list-mode-map
  (current-local-map
@@ -1032,14 +1031,12 @@ region.")
   (when (mct--active-p)
 (setq-local completion-show-help nil
 completions-format mct-completions-format)
-(mct--clean-completions)
-;; TODO use a uniform naming scheme here?
-;; mct--setup-completions-* or mct--setup-*
-(mct--setup-completions-styles) ;; TODO this name is confusing, because of 
`completion-styles'
-(mct--completion-list-mode-map)
-(mct--truncate-lines-silently)
-(mct--completions-highlighting)
-(mct--display-line-numbers)
+(mct--setup-clean-completions)
+(mct--setup-appearance)
+(mct--setup-completion-list-keymap)
+(mct--setup-silent-line-truncation)
+(mct--setup-highlighting)
+(mct--setup-line-numbers)
 (cursor-sensor-mode)))
 
 ; mct-mode declaration



[elpa] externals/mct c77fb3f 5/8: Move mct--clean-completions to mct--setup-completion-list

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit c77fb3f3a2e07f9033316f0f85faebd9f68431f6
Author: Daniel Mendler 
Commit: Protesilaos Stavrou 

Move mct--clean-completions to mct--setup-completion-list

Avoid a global hook. mct--clean-completions can be called
in the completion-list-mode-hook instead.
---
 mct.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/mct.el b/mct.el
index b5ce826..60050a6 100644
--- a/mct.el
+++ b/mct.el
@@ -1032,6 +1032,7 @@ region.")
   (when (mct--active-p)
 (setq-local completion-show-help nil
 completions-format mct-completions-format)
+(mct--clean-completions)
 ;; TODO use a uniform naming scheme here?
 ;; mct--setup-completions-* or mct--setup-*
 (mct--setup-completions-styles) ;; TODO this name is confusing, because of 
`completion-styles'
@@ -1053,7 +1054,6 @@ region.")
   (if mct-mode
   (progn
 (add-hook 'completion-list-mode-hook #'mct--setup-completion-list)
-(add-hook 'completion-setup-hook #'mct--clean-completions)
 (dolist (fn '(exit-minibuffer
   choose-completion
   minibuffer-force-complete
@@ -1066,7 +1066,6 @@ region.")
 (advice-add #'minibuffer-message :around #'mct--honor-inhibit-message)
 (advice-add #'minibuf-eldef-setup-minibuffer :around 
#'mct--stealthily))
 (remove-hook 'completion-list-mode-hook #'mct--setup-completion-list)
-(remove-hook 'completion-setup-hook #'mct--clean-completions)
 (dolist (fn '(exit-minibuffer
   choose-completion
   minibuffer-force-complete



[elpa] externals/org 5d2e2cd 1/3: oc: Factor out string to cite export processor triplet conversion

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit 5d2e2cd1bc46ed065f4c3d1a3fb16a5d6c9fc9e8
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

oc: Factor out string to cite export processor triplet conversion

* lisp/oc.el (org-cite-read-processor-declaration): New function.
(org-cite-store-export-processor): Use new function.
* testing/lisp/test-oc.el (test-org-cite/read-processor-declaration):
New test.
---
 lisp/oc.el  | 67 ++---
 testing/lisp/test-oc.el | 35 ++
 2 files changed, 76 insertions(+), 26 deletions(-)

diff --git a/lisp/oc.el b/lisp/oc.el
index b31ee92..5735f54 100644
--- a/lisp/oc.el
+++ b/lisp/oc.el
@@ -792,6 +792,39 @@ INFO is a plist used as a communication channel."
   (cons (org-not-nil (car global))
 (or (cdr local) (cdr global)))
 
+(defun org-cite-read-processor-declaration (s)
+  "Read processor declaration from string S.
+
+Return (NAME BIBLIOGRAPHY-STYLE CITATION-STYLE) triplet, when
+NAME is the processor name, as a symbol, and both
+BIBLIOGRAPHY-STYLE and CITATION-STYLE are strings or nil.  Those
+strings may contain spaces if they are enclosed within double
+quotes.
+
+String S is expected to contain between 1 and 3 tokens.  The
+function raises an error when it contains too few or too many
+tokens.  Spurious spaces are ignored."
+  (with-temp-buffer
+(save-excursion (insert s))
+(let ((result (list (read (current-buffer)
+  (dotimes (_ 2)
+(skip-chars-forward " \t")
+(cond
+ ((eobp) (push nil result))
+ ((char-equal ?\" (char-after))
+  (push (org-not-nil (read (current-buffer)))
+result))
+ (t
+  (let ((origin (point)))
+(skip-chars-forward "^ \t")
+(push (org-not-nil (buffer-substring origin (point)))
+  result)
+  (skip-chars-forward " \t")
+  (unless (eobp)
+(error "Trailing garbage following cite export processor declaration 
%S"
+   s))
+  (nreverse result
+
 (defun org-cite-bibliography-style (info)
   "Return expected bibliography style.
 INFO is a plist used as a communication channel."
@@ -1194,40 +1227,22 @@ INFO is the communication channel, as a plist.  It is 
modified by side-effect."
 
 Export processor is stored as a triplet, or nil.
 
-When non-nil, it is defined as (NAME BIBLIOGRAPHY-STYLE CITATION-STYLE) where
-NAME is a symbol, whereas BIBLIOGRAPHY-STYLE and CITATION-STYLE are strings,
-or nil.
+When non-nil, it is defined as (NAME BIBLIOGRAPHY-STYLE
+CITATION-STYLE) where NAME is a symbol, whereas
+BIBLIOGRAPHY-STYLE and CITATION-STYLE are strings, or nil.
 
-INFO is the communication channel, as a plist.  It is modified by side-effect."
+INFO is the communication channel, as a plist.  It is modified by
+side-effect."
   (let* ((err
   (lambda (s)
-(user-error "Invalid cite export processor definition: %S" s)))
+(user-error "Invalid cite export processor declaration: %S" s)))
  (processor
   (pcase (plist-get info :cite-export)
 ((or "" `nil) nil)
 ;; Value is a string.  It comes from a "cite_export"
-;; keyword.  It may contain between 1 and 3 tokens, the
-;; first one being a symbol and the other (optional) two,
-;; strings.
+;; keyword.
 ((and (pred stringp) s)
- (with-temp-buffer
-   (save-excursion (insert s))
-   (let ((result (list (read (current-buffer)
- (dotimes (_ 2)
-   (skip-chars-forward " \t")
-   (cond
-((eobp) (push nil result))
-((char-equal ?\" (char-after))
- (condition-case _
- (push (org-not-nil (read (current-buffer))) result)
-   (error (funcall err s
-(t
- (let ((origin (point)))
-   (skip-chars-forward "^ \t")
-   (push (org-not-nil (buffer-substring origin (point)))
- result)
- (unless (eobp) (funcall err s))
- (nreverse result
+ (org-cite-read-processor-declaration s))
 ;; Value is an alist.  It must come from
 ;; `org-cite-export-processors' variable.  Find the most
 ;; appropriate processor according to current export
diff --git a/testing/lisp/test-oc.el b/testing/lisp/test-oc.el
index 8968703..722b0fb 100644
--- a/testing/lisp/test-oc.el
+++ b/testing/lisp/test-oc.el
@@ -763,6 +763,41 @@
   :export-citation (lambda (_ s _ _) (throw :exit s)))
 (org-export-as (org-export-create-backend
 
+(ert-deftest test-org-cite/read-processor-declaration ()
+  "Test `org-cite-read-processor-declaration'."
+  ;; Argument 

[elpa] externals/org updated (adadb5b -> 6766c45)

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

  from  adadb5b   org-element--cachy-sync: Add exception for unregistered 
changes
   new  5d2e2cd   oc: Factor out string to cite export processor triplet 
conversion
   new  3744713   oc: Make `org-cite-get-processor' public
   new  6766c45   org-lint: Add checkers for citations and related


Summary of changes:
 lisp/oc.el| 109 --
 lisp/org-lint.el  |  73 +++-
 testing/lisp/test-oc.el   |  35 ++
 testing/lisp/test-org-lint.el |  50 +++
 4 files changed, 219 insertions(+), 48 deletions(-)



[elpa] externals/org 6766c45 3/3: org-lint: Add checkers for citations and related

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit 6766c45bfd09d6cd2dee1e1400a80b137f65
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

org-lint: Add checkers for citations and related

* lisp/org-lint.el (org-lint--checkers): Register new checkers.
(org-lint-non-existent-bibliography):
(org-lint-missing-print-bibliography):
(org-lint-invalid-cite-export-declaration):
(org-lint-incomplete-citation): New functions.
* testing/lisp/test-org-lint.el (test-org-lint/non-existent-bibliography):
(test-org-lint/missing-print-bibliography):
(test-org-lint/invalid-cite-export-declaration):
(test-org-lint/incomplete-citation): New tests.
---
 lisp/org-lint.el  | 73 ++-
 testing/lisp/test-org-lint.el | 50 +
 2 files changed, 122 insertions(+), 1 deletion(-)

diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index da5e6ae..a35aed8 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -101,12 +101,17 @@
 ;;   - obsolete QUOTE section
 ;;   - obsolete "file+application" link
 ;;   - spurious colons in tags
+;;   - non-existent bibliography file
+;;   - missing "print_bibliography" keyword
+;;   - invalid "cite_export" value
+;;   - incomplete citation object
 
 
 ;;; Code:
 
 (require 'cl-lib)
 (require 'ob)
+(require 'oc)
 (require 'ol)
 (require 'org-attach)
 (require 'org-macro)
@@ -296,7 +301,24 @@
(make-org-lint-checker
 :name 'spurious-colons
 :description "Report spurious colons in tags"
-:categories '(tags)))
+:categories '(tags))
+   (make-org-lint-checker
+:name 'non-existent-bibliography
+:description "Report invalid bibliography file"
+:categories '(cite))
+   (make-org-lint-checker
+:name 'missing-print-bibliography
+:description "Report missing \"print_bibliography\" keyword"
+:categories '(cite))
+   (make-org-lint-checker
+:name 'invalid-cite-export-declaration
+:description "Report invalid value for \"cite_export\" keyword"
+:categories '(cite))
+   (make-org-lint-checker
+:name 'incomplete-citation
+:description "Report incomplete citation object"
+:categories '(cite)
+:trust 'low))
   "List of all available checkers.")
 
 (defun org-lint--collect-duplicates
@@ -1121,6 +1143,55 @@ Use \"export %s\" instead"
(list (org-element-property :begin h)
  "Tags contain a spurious colon")
 
+(defun org-lint-non-existent-bibliography (ast)
+  (org-element-map ast 'keyword
+(lambda (k)
+  (when (equal "BIBLIOGRAPHY" (org-element-property :key k))
+(let ((file (org-strip-quotes (org-element-property :value k
+  (and (not (file-remote-p file))
+  (not (file-exists-p file))
+  (list (org-element-property :begin k)
+(format "Non-existent bibliography %S" file
+
+(defun org-lint-missing-print-bibliography (ast)
+  (and (org-element-map ast 'citation #'identity nil t)
+   (not (org-element-map ast 'keyword
+  (lambda (k)
+(equal "PRINT_BIBLIOGRAPHY" (org-element-property :key k)))
+  nil t))
+   (list
+(list (point-max) "Possibly missing \"PRINT_BIBLIOGRAPHY\" keyword"
+
+(defun org-lint-invalid-cite-export-declaration (ast)
+  (org-element-map ast 'keyword
+(lambda (k)
+  (when (equal "CITE_EXPORT" (org-element-property :key k))
+(let ((value (org-element-property :value k))
+  (source (org-element-property :begin k)))
+  (if (equal value "")
+  (list source "Missing export processor name")
+(condition-case _
+(pcase (org-cite-read-processor-declaration value)
+  (`(,(and (pred symbolp) name)
+ ,(pred string-or-null-p)
+ ,(pred string-or-null-p))
+   (unless (org-cite-get-processor name)
+ (list source "Unknown cite export processor %S" name)))
+  (_
+   (list source "Invalid cite export processor declaration")))
+  (error
+   (list source "Invalid cite export processor 
declaration")
+
+(defun org-lint-incomplete-citation (ast)
+  (org-element-map ast 'plain-text
+(lambda (text)
+  (and (string-match-p org-element-citation-prefix-re text)
+   ;; XXX: The code below signals the error at the beginning
+   ;; of the paragraph containing the faulty object.  It is
+   ;; not very accurate but may be enough for now.
+   (list (org-element-property :contents-begin
+   (org-element-property :parent text))
+ "Possibly incomplete citation markup")
 
 
 ;;; Reports UI
diff --git a/testing/lisp/test-org-lint.el b/testing/lisp/test-org-lint.el
index e57993c..decef6e 100644
--- a/testing/lisp/test-org-lint.el
+++ b/testing/lisp/test-org-lint.el
@@ -573,6 +573,56 @@ SCHED

[elpa] externals/org 3744713 2/3: oc: Make `org-cite-get-processor' public

2021-11-30 Thread ELPA Syncer
branch: externals/org
commit 3744713b8a83eb815bcb97c8f376d60cf09ee528
Author: Nicolas Goaziou 
Commit: Nicolas Goaziou 

oc: Make `org-cite-get-processor' public

* lisp/oc.el (org-cite--get-processor): rename to...
(org-cite-get-processor): ... this.
(org-cite-unregister-processor):
(org-cite-processor-has-capability-p):
(org-cite-supported-styles):
(org-cite-activate):
(org-cite-store-export-processor):
(org-cite-export-citation):
(org-cite-export-bibliography):
(org-cite-finalize-export):
(org-cite-follow):
(org-cite-insert): Apply renaming.
---
 lisp/oc.el | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/lisp/oc.el b/lisp/oc.el
index 5735f54..867553b 100644
--- a/lisp/oc.el
+++ b/lisp/oc.el
@@ -323,15 +323,6 @@ place note numbers according to rules defined in 
`org-cite-note-rules'."
 See `org-cite-register-processor' for more information about
 processors.")
 
-(defun org-cite--get-processor (name)
-  "Return citation processor named after symbol NAME.
-Return nil if no such processor is found."
-  ;; Opportunistically try to load the library providing the
-  ;; processor.
-  (require (intern (concat "oc-" (symbol-name name))) nil t)
-  (seq-find (lambda (p) (eq name (org-cite-processor-name p)))
-   org-cite--processors))
-
 (defun org-cite-register-processor (name &rest body)
   "Mark citation processor NAME as available.
 
@@ -427,13 +418,22 @@ Return a non-nil value on a successful operation."
   (seq-remove (lambda (p) (eq name (org-cite-processor-name p)))
   org-cite--processors
 
+(defun org-cite-get-processor (name)
+  "Return citation processor named after symbol NAME.
+Return nil if no such processor is found."
+  ;; Opportunistically try to load the library providing the
+  ;; processor.
+  (require (intern (concat "oc-" (symbol-name name))) nil t)
+  (seq-find (lambda (p) (eq name (org-cite-processor-name p)))
+   org-cite--processors))
+
 (defun org-cite-unregister-processor (name)
   "Unregister citation processor NAME.
 NAME is a symbol.  Raise an error if processor is not registered.
 Return a non-nil value on a successful operation."
   (unless (and name (symbolp name))
 (error "Invalid processor name: %S" name))
-  (pcase (org-cite--get-processor name)
+  (pcase (org-cite-get-processor name)
 ('nil (error "Processor %S not registered" name))
 (processor
  (setq org-cite--processors (delete processor org-cite--processors
@@ -443,7 +443,7 @@ Return a non-nil value on a successful operation."
   "Return non-nil if PROCESSOR is able to handle CAPABILITY.
 PROCESSOR is the name of a cite processor, as a symbol.  CAPABILITY is
 `activate', `export', `follow', or `insert'."
-  (let ((p (org-cite--get-processor processor)))
+  (let ((p (org-cite-get-processor processor)))
 (pcase capability
   ((guard (not p)) nil) ;undefined processor
   ('activate (functionp (org-cite-processor-activate p)))
@@ -676,7 +676,7 @@ strings."
   (let ((collection
  (seq-mapcat
   (lambda (name)
-(org-cite-processor-cite-styles (org-cite--get-processor name)))
+(org-cite-processor-cite-styles (org-cite-get-processor name)))
   (or processors
   (mapcar (pcase-lambda (`(,_ . (,name . ,_))) name)
   org-cite-export-processors
@@ -1200,7 +1200,7 @@ from the processor set in `org-cite-activate-processor'."
  (activate
   (or (and name
(org-cite-processor-has-capability-p name 'activate)
-   (org-cite-processor-activate (org-cite--get-processor 
name)))
+   (org-cite-processor-activate (org-cite-get-processor name)))
   #'org-cite-fontify-default)))
 (when (re-search-forward org-element-citation-prefix-re limit t)
   (let ((cite (org-with-point-at (match-beginning 0)
@@ -1280,7 +1280,7 @@ side-effect."
   ('nil nil)
   (`(,name . ,_)
(cond
-((not (org-cite--get-processor name))
+((not (org-cite-get-processor name))
  (user-error "Unknown processor %S" name))
 ((not (org-cite-processor-has-capability-p name 'export))
  (user-error "Processor %S is unable to handle citation export" 
name)
@@ -1293,7 +1293,7 @@ selected citation processor."
   (pcase (plist-get info :cite-export)
 ('nil nil)
 (`(,p ,_ ,_)
- (funcall (org-cite-processor-export-citation (org-cite--get-processor p))
+ (funcall (org-cite-processor-export-citation (org-cite-get-processor p))
  citation
   (org-cite-citation-style citation info)
   (plist-get info :back-end)
@@ -1309,7 +1309,7 @@ used as a communication channel."
 (`(,p ,_ ,_)
  (let ((export-bibilography
 (org-cite-processor-export-bibliography
- (org-cite--get-pro

[elpa] externals/vertico updated (2b0415d -> b9170ca)

2021-11-30 Thread ELPA Syncer
elpasync pushed a change to branch externals/vertico.

  from  2b0415d   Delete consecutive duplicates (Fix #69)
   new  e6bd2e0   Distribute the extensions together with the Vertico 
package (Fix #83)
   new  b9170ca   README: Fix some typos


Summary of changes:
 README.org | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)



[elpa] externals/vertico b9170ca 2/2: README: Fix some typos

2021-11-30 Thread ELPA Syncer
branch: externals/vertico
commit b9170ca66464e8e8678655cd06e18e3b6b76dbc2
Author: Daniel Mendler 
Commit: Daniel Mendler 

README: Fix some typos
---
 README.org | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/README.org b/README.org
index 1210151..e1bf2ab 100644
--- a/README.org
+++ b/README.org
@@ -223,9 +223,10 @@
   We maintain small extension packages to Vertico in this repository in the
   subdirectory 
[[https://github.com/minad/vertico/tree/main/extensions][extensions/]]. The 
extensions are installed together with Vertico
   if you pull the package from ELPA. The extensions are of course inactive by
-  and must be enabled manually if desired. Furthermore it remains possible to
+  default and can be enabled manually if desired. Furthermore it is possible to
   install all of the files separately, both ~vertico.el~ and the ~vertico-*.el~
-  extensions. Currently the following extensions come with Vertico:
+  extensions. Currently the following extensions come with the Vertico ELPA
+  package:
 
   - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-buffer.el][vertico-buffer]]:
 =vertico-buffer-mode= to display Vertico in a separate buffer
   - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-directory.el][vertico-directory]]:
 Commands for Ido-like directory navigation
@@ -237,14 +238,14 @@
   - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-repeat.el][vertico-repeat]]:
 The command =vertico-repeat= repeats the last completion session
   - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-reverse.el][vertico-reverse]]:
 =vertico-reverse-mode= to reverse the display
 
-  With these extensions it is possible to adapt Vertico heavily such that it
-  matches your preference or behaves similar to familiar UIs. For example, the
+  With these extensions it is possible to adapt Vertico such that it matches
+  your preference or behaves similar to other familiar UIs. For example, the
   combination =vertico-flat= plus =vertico-directory= resembles Ido in look and
   feel. For an interface similar to Helm, the extension =vertico-buffer= allows
   you to configure more freely where the completion buffer opens, instead of
   growing the minibuffer.
 
-  Configuration example for =vertico-directory.el=:
+  Configuration example for =vertico-directory=:
 
   #+begin_src emacs-lisp
 ;; Configure directory extension.



[elpa] externals/vertico e6bd2e0 1/2: Distribute the extensions together with the Vertico package (Fix #83)

2021-11-30 Thread ELPA Syncer
branch: externals/vertico
commit e6bd2e0dfa9c345e91e1ebd4ff7a9a548cac4cef
Author: Daniel Mendler 
Commit: Daniel Mendler 

Distribute the extensions together with the Vertico package (Fix #83)

This is the easiest approach in the long term. The extensions are still 
separate
from the main `vertico` feature and it will remain possible to manually 
install
`vertico.el` separately if only this file is desired. It turned out that
extensions are relatively robust, so there are essentially no downsides if
we distribute them together with the package.

(ELPA does not yet distribute the extensions with the vertio package as of 
2021-11-30,
but the next release will include them.)
---
 README.org | 33 -
 1 file changed, 16 insertions(+), 17 deletions(-)

diff --git a/README.org b/README.org
index 35deb79..1210151 100644
--- a/README.org
+++ b/README.org
@@ -220,23 +220,22 @@
   :custom_id: extensions
   :end:
 
-  *NOTE*: The extensions currently require manual installation, e.g., via
-  ~package-install-file~. Please ensure that you are using the /newest/ Vertico
-  commit when using extensions.
-
   We maintain small extension packages to Vertico in this repository in the
-  subdirectory 
[[https://github.com/minad/vertico/tree/main/extensions][extensions/]]. The 
extensions can be installed additionally to
-  Vertico. Currently these extensions are available:
-
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-buffer.el][vertico-buffer.el]]:
 =vertico-buffer-mode= to display Vertico in a separate buffer
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-directory.el][vertico-directory.el]]:
 Commands for Ido-like directory navigation
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-flat.el][vertico-flat.el]]:
 =vertico-flat-mode= to enable a flat, horizontal display
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-grid.el][vertico-grid.el]]:
 =vertico-grid-mode= to enable a grid display
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-indexed.el][vertico-indexed.el]]:
 =vertico-indexed-mode= to select indexed candidates with prefix arguments
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-mouse.el][vertico-mouse.el]]:
 =vertico-mouse-mode= to support for scrolling and candidate selection
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-quick.el][vertico-quick.el]]:
 Commands to select using Avy-style quick keys
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-repeat.el][vertico-repeat.el]]:
 The command =vertico-repeat= repeats the last completion session
-  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-reverse.el][vertico-reverse.el]]:
 =vertico-reverse-mode= to reverse the display
+  subdirectory 
[[https://github.com/minad/vertico/tree/main/extensions][extensions/]]. The 
extensions are installed together with Vertico
+  if you pull the package from ELPA. The extensions are of course inactive by
+  and must be enabled manually if desired. Furthermore it remains possible to
+  install all of the files separately, both ~vertico.el~ and the ~vertico-*.el~
+  extensions. Currently the following extensions come with Vertico:
+
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-buffer.el][vertico-buffer]]:
 =vertico-buffer-mode= to display Vertico in a separate buffer
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-directory.el][vertico-directory]]:
 Commands for Ido-like directory navigation
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-flat.el][vertico-flat]]:
 =vertico-flat-mode= to enable a flat, horizontal display
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-grid.el][vertico-grid]]:
 =vertico-grid-mode= to enable a grid display
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-indexed.el][vertico-indexed]]:
 =vertico-indexed-mode= to select indexed candidates with prefix arguments
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-mouse.el][vertico-mouse]]:
 =vertico-mouse-mode= to support for scrolling and candidate selection
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-quick.el][vertico-quick]]:
 Commands to select using Avy-style quick keys
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-repeat.el][vertico-repeat]]:
 The command =vertico-repeat= repeats the last completion session
+  - 
[[https://github.com/minad/vertico/blob/main/extensions/vertico-reverse.el][vertico-reverse]]:
 =vertico-reverse-mode= to reverse the display
 
   With these extensions it is possible to adapt Vertico heavily such that it
   matches your preference or behaves similar to familiar UIs. For example, the
@@ -249,8 +248,8 @@
 
   #+begin_src emacs-lisp
 ;; Configure directory extension.
-;; NOTE

[elpa] externals/csv-mode 7d37f3c: Mention `set-variable' in csv-separators doc string

2021-11-30 Thread Lars Ingebrigtsen
branch: externals/csv-mode
commit 7d37f3ca6cb0108cce1396e922985c81856bbca5
Author: Lars Ingebrigtsen 
Commit: Lars Ingebrigtsen 

Mention `set-variable' in csv-separators doc string

* csv-mode.el (csv-separators): Mention that you have to use
`set-variable'.
---
 csv-mode.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/csv-mode.el b/csv-mode.el
index a4bdb47..63abfe2 100644
--- a/csv-mode.el
+++ b/csv-mode.el
@@ -4,7 +4,7 @@
 
 ;; Author: "Francis J. Wright" 
 ;; Maintainer: emacs-de...@gnu.org
-;; Version: 1.16
+;; Version: 1.17
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: convenience
 
@@ -146,7 +146,10 @@ Set by customizing `csv-separators' -- do not set 
directly!")
 For example: (\",\"), the default, or (\",\" \";\" \":\").
 Neighbouring fields may be separated by any one of these characters.
 The first is used when inserting a field separator into the buffer.
-All must be different from the field quote characters, `csv-field-quotes'."
+All must be different from the field quote characters, `csv-field-quotes'.
+
+Changing this variable with `setq' won't affect the current Emacs
+session.  Use `set-variable' instead if that is required."
   ;; Suggested by Eckhard Neber 
   :type '(repeat string)
   ;; FIXME: Character would be better, but in Emacs 21.3 does not display



[elpa] externals/csv-mode f6bf2b4: Fix previous csv-separators doc string change

2021-11-30 Thread Lars Ingebrigtsen
branch: externals/csv-mode
commit f6bf2b47a7a6945b2c755de94846839070c6fd85
Author: Lars Ingebrigtsen 
Commit: Lars Ingebrigtsen 

Fix previous csv-separators doc string change

* csv-mode.el (csv-separators): Fix previous change.
---
 csv-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/csv-mode.el b/csv-mode.el
index 63abfe2..e47983a 100644
--- a/csv-mode.el
+++ b/csv-mode.el
@@ -149,7 +149,7 @@ The first is used when inserting a field separator into the 
buffer.
 All must be different from the field quote characters, `csv-field-quotes'.
 
 Changing this variable with `setq' won't affect the current Emacs
-session.  Use `set-variable' instead if that is required."
+session.  Use `customize-set-variable' instead if that is required."
   ;; Suggested by Eckhard Neber 
   :type '(repeat string)
   ;; FIXME: Character would be better, but in Emacs 21.3 does not display



[elpa] externals/eev 81c4615: Rewrote (find-eev-exercises-intro).

2021-11-30 Thread ELPA Syncer
branch: externals/eev
commit 81c4615a6b12dff0ede29d38f2f2df86214ac2f3
Author: Eduardo Ochs 
Commit: Eduardo Ochs 

Rewrote (find-eev-exercises-intro).
---
 ChangeLog |  21 
 VERSION   |   4 +-
 eev-elinks.el |   7 +-
 eev-intro.el  | 293 +-
 eev-tlinks.el |  62 +++-
 eev-videolinks.el |  52 --
 eev.el|   2 +-
 7 files changed, 360 insertions(+), 81 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 125b053..63e6bee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2021-12-01  Eduardo Ochs  
+
+   * eev-intro.el (find-eev-exercises-intro): rewritten.
+
+2021-11-28  Eduardo Ochs  
+
+   * eev-elinks.el (ee-1stclassvideo-around-point-ask): new function.
+
+   * eev-tlinks.el (find-1stclassvideo-links): use
+   `ee-1stclassvideo-around-point-ask'.
+
+   * eev-videolinks.el (ee-1stclassvideos-mp4stem)
+   (ee-1stclassvideos-hash): new functions.
+
+2021-11-27  Eduardo Ochs  
+
+   * eev-videolinks.el (ee-1stclassvideos-field): new function.
+
+   * eev-tlinks.el (find-1stclassvideo-links): use
+   `ee-1stclassvideos-field'.
+
 2021-11-26  Eduardo Ochs  
 
* eev-tlinks.el (ee-youtubedl-command): added another suggestion
diff --git a/VERSION b/VERSION
index 6fb6b05..fc366eb 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-Sat Nov 27 07:44:42 GMT 2021
-Sat Nov 27 04:44:42 -03 2021
+Wed Dec  1 06:27:08 GMT 2021
+Wed Dec  1 03:27:08 -03 2021
diff --git a/eev-elinks.el b/eev-elinks.el
index 848d066..f1080d7 100644
--- a/eev-elinks.el
+++ b/eev-elinks.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20211104
+;; Version:20211128
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-elinks.el>
@@ -149,6 +149,11 @@ This function is not very smart - it doesn't understand 
section names."
   (read-string (or prompt "Manpage: ")
   (ee-manpagename-around-point)))
 
+(defun ee-1stclassvideo-around-point-ask (&optional prompt)
+"Ask for the name of a first-class video; the default is a string around 
point."
+  (let ((str (read-string (or prompt "Stem (\"c\") of the video: ")
+ (ee-stuff-around-point "A-Za-z0-9"
+(replace-regexp-in-string "video$" "" str)))
 
 
 
diff --git a/eev-intro.el b/eev-intro.el
index dc60b45..2f173c4 100644
--- a/eev-intro.el
+++ b/eev-intro.el
@@ -19,7 +19,7 @@
 ;;
 ;; Author: Eduardo Ochs 
 ;; Maintainer: Eduardo Ochs 
-;; Version:20211125
+;; Version:20211130
 ;; Keywords:   e-scripts
 ;;
 ;; Latest version: <http://angg.twu.net/eev-current/eev-intro.el>
@@ -10737,6 +10737,12 @@ at one example in details. Try:
 
 All these sexps \"work\" - they point to meaningful places.
 
+The data about these first-class videos is kept in the variable
+`ee-1stclassvideos-info', that is defined here:
+
+  (find-eev \"eev-videolinks.el\" \"ee-1stclassvideos-info\")
+
+
 
 
 10. Second-class videos
@@ -12517,6 +12523,13 @@ because when it was created it pointed to the commit 
with message
  \\  /
   A
 
+Here's a video showing the script above in action:
+
+  http://angg.twu.net/eev-videos/2020-doubt-about-merging.mp4
+  (code-eevvideo \"merg\" \"2020-doubt-about-merging\")
+(find-mergvideo \"0:00\")
+(find-mergvideo \"0:20\")
+
 NEXT STEPS: explain how to use git merge both from the command
 line and from magit; explain HEAD, master, and tags. Point to man
 pages in man and text format and to sections in Scott Chacon's
@@ -13298,55 +13311,251 @@ It is meant as both a tutorial and a sandbox.
 
 
 
-
-0. Introduction
-===
-This is a set of exercises that I am preparing for this series of
-workshops:
+This is a set of exercises that I am preparing for this workshop:
 
   http://angg.twu.net/2021-workshop.html
-  http://angg.twu.net/2021-oficina.html
 
-At this moment - 2021nov14 - they are in a very draftish stage
-and they haven't yet been tested by people who are learning eev.
+THIS IS A WORK AND PROGRESS AND CURRENTLY A MESS.
 
-I will suppose that the people trying to do these exercises know
-the material in these sections of the two most basic tutorials,
 
-  (find-eev-quick-intro)
-  (find-eev-quick-intro \"1. Installing eev\")
-  (find-eev-quick-intro \"2. Evaluating Lisp\")
-  (find-eev-quick-intro \"3. Elisp hyperlinks\")
-  (find-eev-quick-intro \"4. Creating Elisp Hyperlinks\")
-  (find-eev-quick-intro \"4.1. `find-here-links'\")
-  (find-eev-quick-intro \"4.2. `find-ekey-links' and friends\")
-  (find-eev-quick-intro \"5. Links to Em

[elpa] externals/mct 1762cb9: Stop binding minibuffer-force-complete

2021-11-30 Thread ELPA Syncer
branch: externals/mct
commit 1762cb93205689087653e6157b6db4fd0e6a5daa
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Stop binding minibuffer-force-complete

This is something that users should do in their personal configurations.
For the purposes of mct, it is better to adhere to the default behaviour
whenever that does not contradict the goals of the package.
---
 README.org | 17 -
 mct.el |  1 -
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/README.org b/README.org
index e99fec9..469a178 100644
--- a/README.org
+++ b/README.org
@@ -231,15 +231,14 @@ provides sample code).
 There are several ways to select a completion candidate.
 
 1. Suppose that you are typing =mod= with the intent to select the
-   =modus-themes.el= buffer.  To force complete the first candidate follow
-   up =mod= with the =TAB= key (~minibuffer-force-complete~).  This does not
-   exit the minibuffer, meaning that it does not confirm your choice.
-   It just expands your input to the first likely candidate.  To confirm
-   your choice, use =RET=.  If done fast enough, no completions will be
-   shown (depending on your minimum input threshold and the live-update
-   delay).  If you made a mistake, just use ~undo~.  If the candidates
-   meet the ~completion-cycle-threshold~ hit =TAB= again to switch between
-   them.
+   =modus-themes.el= buffer.  To complete the candidate follow up =mod= with
+   the =TAB= key (~minibuffer-complete~).  If the match is unique, the text
+   will be expanded.  Otherwise the =*Completions*= buffer will appear.
+   This does not exit the minibuffer, meaning that it does not confirm
+   your choice.  To confirm your choice, use =RET=.  If you ever make a
+   mistake and expand the wrong candidate, just use ~undo~.  Lastly note
+   that if the candidates meet the ~completion-cycle-threshold~ hitting
+   =TAB= again will switch between them.
 
#+findex: mct-choose-completion-exit
 2. While cycling through the completions' buffer, type =RET= to select and
diff --git a/mct.el b/mct.el
index 5c419f9..7756c6d 100644
--- a/mct.el
+++ b/mct.el
@@ -991,7 +991,6 @@ region.")
 (defvar mct-minibuffer-local-completion-map
   (let ((map (make-sparse-keymap)))
 (define-key map (kbd "C-j") #'exit-minibuffer)
-(define-key map (kbd "") #'minibuffer-force-complete)
 (define-key map [remap goto-line] #'mct-choose-completion-number)
 (define-key map (kbd "M-e") #'mct-edit-completion)
 (define-key map (kbd "") #'mct-complete-and-exit)