]> git.eshelyaron.com Git - emacs.git/commitdiff
Update to Org 9.5.1-25-g9ca3bc
authorKyle Meyer <kyle@kyleam.com>
Sat, 11 Dec 2021 17:31:13 +0000 (12:31 -0500)
committerKyle Meyer <kyle@kyleam.com>
Sat, 11 Dec 2021 17:31:13 +0000 (12:31 -0500)
13 files changed:
lisp/org/oc-basic.el
lisp/org/oc-csl.el
lisp/org/oc.el
lisp/org/org-keys.el
lisp/org/org-macro.el
lisp/org/org-version.el
lisp/org/org.el
lisp/org/ox-beamer.el
lisp/org/ox-icalendar.el
lisp/org/ox-koma-letter.el
lisp/org/ox-man.el
lisp/org/ox-texinfo.el
lisp/org/ox.el

index 7b09db5f8b4e60b436abdca80a11673d346a6bea..7c83bdc27c0b61f8c17505a15dc387eef0481c64 100644 (file)
@@ -68,6 +68,7 @@
 
 (require 'bibtex)
 (require 'json)
+(require 'map)
 (require 'oc)
 (require 'seq)
 
@@ -704,11 +705,18 @@ Return chosen style as a string."
 
 (defun org-cite-basic--key-completion-table ()
   "Return completion table for cite keys, as a hash table.
-In this hash table, keys are a strings with author, date, and title of the
-reference.  Values are the cite key."
-  (let ((cache-key (mapcar #'car org-cite-basic--bibliography-cache)))
-    (if (gethash cache-key org-cite-basic--completion-cache)
-        org-cite-basic--completion-cache
+
+In this hash table, keys are a strings with author, date, and
+title of the reference.  Values are the cite keys.
+
+Return nil if there are no bibliography files or no entries."
+  ;; Populate bibliography cache.
+  (let ((entries (org-cite-basic--parse-bibliography)))
+    (cond
+     ((null entries) nil)               ;no bibliography files
+     ((gethash entries org-cite-basic--completion-cache)
+      org-cite-basic--completion-cache)
+     (t
       (clrhash org-cite-basic--completion-cache)
       (dolist (key (org-cite-basic--all-keys))
         (let ((completion
@@ -725,14 +733,16 @@ reference.  Values are the cite key."
                 org-cite-basic-column-separator
                 (org-cite-basic--get-field 'title key nil t))))
           (puthash completion key org-cite-basic--completion-cache)))
-      (puthash cache-key t org-cite-basic--completion-cache)
-      org-cite-basic--completion-cache)))
+      (unless (map-empty-p org-cite-basic--completion-cache) ;no key
+        (puthash entries t org-cite-basic--completion-cache)
+        org-cite-basic--completion-cache)))))
 
 (defun org-cite-basic--complete-key (&optional multiple)
   "Prompt for a reference key and return a citation reference string.
 
-When optional argument MULTIPLE is non-nil, prompt for multiple keys, until one
-of them is nil.  Then return the list of reference strings selected.
+When optional argument MULTIPLE is non-nil, prompt for multiple
+keys, until one of them is nil.  Then return the list of
+reference strings selected.
 
 Raise an error when no bibliography is set in the buffer."
   (let* ((table
@@ -748,9 +758,9 @@ Raise an error when no bibliography is set in the buffer."
              (build-prompt
               (lambda ()
                 (if keys
-                    (format "Key (\"\" to exit) %s: "
+                    (format "Key (empty input exits) %s: "
                             (mapconcat #'identity (reverse keys) ";"))
-                  "Key (\"\" to exit): "))))
+                  "Key (empty input exits): "))))
         (let ((key (funcall prompt (funcall build-prompt))))
           (while (org-string-nw-p key)
             (push (gethash key table) keys)
index 7f078d139b1dabf3fe2d942d2a9f1f1f9c6fcce8..a92ea8a63e8731d978e8e809bc7b9d2866359d60 100644 (file)
@@ -605,10 +605,10 @@ property list."
     (with-temp-buffer
       (save-excursion (insert output))
       (when (search-forward "\\begin{document}" nil t)
-        ;; Ensure that \citeprocitem is defined for citeproc-el
+        (goto-char (match-beginning 0))
+        ;; Ensure that \citeprocitem is defined for citeproc-el.
         (insert "\\makeatletter\n\\newcommand{\\citeprocitem}[2]{\\hyper@linkstart{cite}{citeproc_bib_item_#1}#2\\hyper@linkend}\n\\makeatother\n\n")
         ;; Ensure there is a \usepackage{hanging} somewhere or add one.
-        (goto-char (match-beginning 0))
         (let ((re (rx "\\usepackage" (opt "[" (*? nonl) "]") "{hanging}")))
           (unless (re-search-backward re nil t)
             (insert "\\usepackage[notquote]{hanging}\n"))))
index 427c087c03640fa0b971ffc62ba4820b3e094596..a77daa7e12248441ccbea5934a8b776675dbdc05 100644 (file)
@@ -1540,7 +1540,7 @@ The generated function inserts or edit a citation at point.  More specifically,
 
   On a citation reference:
 
-    - on the prefix or right before th \"@\" character, insert a new reference
+    - on the prefix or right before the \"@\" character, insert a new reference
       before the current one,
     - on the suffix, insert it after the reference,
     - otherwise, update the cite key, preserving both affixes.
index a10db7e6667aa7b50ed2514b11bbef8c304eb680..a3d95768278b3d3d27f8bd8619c216fd06c96b33 100644 (file)
@@ -444,7 +444,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
 
 ;;;; TAB key with modifiers
 (org-defkey org-mode-map (kbd "TAB") #'org-cycle)
-(org-defkey org-mode-map (kbd "C-c C-TAB") #'org-force-cycle-archived)
+(org-defkey org-mode-map (kbd "C-c C-<tab>") #'org-force-cycle-archived)
 ;; Override text-mode binding to expose `complete-symbol' for
 ;; pcomplete functionality.
 (org-defkey org-mode-map (kbd "M-TAB") nil)
index c38a07b69afefdaab3b9bec1bc2b18b8a4489f59..c0287a25a552d2b7ad97818bbbb9f210c2f451c0 100644 (file)
@@ -368,7 +368,7 @@ Return value as a string."
            date)
        (unwind-protect
            (progn
-             (vc-call print-log file buf nil nil 1)
+             (vc-call print-log (list file) buf nil nil 1)
              (with-current-buffer buf
                (vc-exec-after
                 (lambda ()
index de75519ec61acc3d91671d217c63040efc9c036c..b009b9691fd646046aa55e4f2e9786e5c62a065c 100644 (file)
@@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made."
 (defun org-git-version ()
   "The Git version of Org mode.
 Inserted by installing Org or when a release is made."
-   (let ((org-git-version "release_9.5.1-15-gdb4805"))
+   (let ((org-git-version "release_9.5.1-25-g9ca3bc"))
      org-git-version))
 \f
 (provide 'org-version)
index df79d57f2c69450bb386f4f55686eb403b84c39c..00bbc0768811a7b80e2f02a264fc06f331f04883 100644 (file)
@@ -11323,13 +11323,14 @@ or a character."
            (setq
             new
             (if nump
-                 (let ((msg (format "Priority %s-%s, SPC to remove: "
-                                   (number-to-string org-priority-highest)
-                                   (number-to-string org-priority-lowest))))
-                   (if (< 9 org-priority-lowest)
-                      (string-to-number (read-string msg))
-                     (message msg)
-                     (string-to-number (char-to-string (read-char-exclusive)))))
+                 (let* ((msg (format "Priority %s-%s, SPC to remove: "
+                                     (number-to-string org-priority-highest)
+                                     (number-to-string org-priority-lowest)))
+                        (s (if (< 9 org-priority-lowest)
+                               (read-string msg)
+                             (message msg)
+                             (char-to-string (read-char-exclusive)))))
+                   (if (equal s " ") ?\s (string-to-number s)))
               (progn (message "Priority %c-%c, SPC to remove: "
                               org-priority-highest org-priority-lowest)
                      (save-match-data
index ca0f1c71ab3ce07c3fdf14be14f5c5a8cef196cb..77de0aa5bfeeedbc13508358ea0cb23f40e74d27 100644 (file)
@@ -1059,7 +1059,7 @@ Return PDF file's name."
   (let ((file (org-export-output-file-name ".tex" subtreep)))
     (org-export-to-file 'beamer file
       async subtreep visible-only body-only ext-plist
-      (lambda (file) (org-latex-compile file)))))
+      #'org-latex-compile)))
 
 ;;;###autoload
 (defun org-beamer-select-environment ()
index 081a28317f69073dd5ae9bb82a0ba24793b355ab..16c3dc9a02993dbb79b0a1e5119f16dc327ad87c 100644 (file)
@@ -888,8 +888,8 @@ Return ICS file name."
     (org-export-to-file 'icalendar outfile
       async subtreep visible-only body-only
       '(:ascii-charset utf-8 :ascii-links-to-notes nil)
-      (lambda (file)
-       (run-hook-with-args 'org-icalendar-after-save-hook file) nil))))
+      '(lambda (file)
+        (run-hook-with-args 'org-icalendar-after-save-hook file) nil))))
 
 ;;;###autoload
 (defun org-icalendar-export-agenda-files (&optional async)
index 6a895a6a24d7f8956930908ec31873cb8026e832..978e4e41f56b67a781bc40a2e0f223b5329d71c6 100644 (file)
@@ -982,7 +982,7 @@ Return PDF file's name."
         (org-koma-letter-special-contents))
     (org-export-to-file 'koma-letter file
       async subtreep visible-only body-only ext-plist
-      (lambda (file) (org-latex-compile file)))))
+      #'org-latex-compile)))
 
 
 (provide 'ox-koma-letter)
index 6d3476cdae5915c9fa12b825544d1c7b7575b93d..9a1f00f352b51f7272337cd424d025b05d75e395 100644 (file)
@@ -1117,7 +1117,7 @@ Return PDF file's name."
   (let ((outfile (org-export-output-file-name ".man" subtreep)))
     (org-export-to-file 'man outfile
       async subtreep visible-only body-only ext-plist
-      (lambda (file) (org-latex-compile file)))))
+      #'org-latex-compile)))
 
 (defun org-man-compile (file)
   "Compile a Groff file.
index 8b949b361aa13a5c16b10bdff62e10775a68c4b5..46077ece4b855e5220a12ef4bbaf2f5ca624aa54 100644 (file)
@@ -1701,7 +1701,7 @@ Return INFO file's name."
        (org-export-coding-system org-texinfo-coding-system))
     (org-export-to-file 'texinfo outfile
       async subtreep visible-only body-only ext-plist
-      (lambda (file) (org-texinfo-compile file)))))
+      #'org-texinfo-compile)))
 
 ;;;###autoload
 (defun org-texinfo-publish-to-texinfo (plist filename pub-dir)
index b27ec56c08ceb69fea94e92f141dbf143e0d3dd6..80202b085001d2b6aa22141304980d925f62f7bd 100644 (file)
@@ -6373,7 +6373,11 @@ use it to set a major mode there, e.g,
     (&optional async subtreep visible-only body-only ext-plist)
     (interactive)
     (org-export-to-buffer \\='latex \"*Org LATEX Export*\"
-      async subtreep visible-only body-only ext-plist (lambda () (LaTeX-mode))))
+      async subtreep visible-only body-only ext-plist
+      #'LaTeX-mode))
+
+When expressed as an anonymous function, using `lambda',
+POST-PROCESS needs to be quoted.
 
 This function returns BUFFER."
   (declare (indent 2))
@@ -6436,7 +6440,10 @@ to send the output file through additional processing, e.g,
     (let ((outfile (org-export-output-file-name \".tex\" subtreep)))
       (org-export-to-file \\='latex outfile
         async subtreep visible-only body-only ext-plist
-        (lambda (file) (org-latex-compile file)))
+        #'org-latex-compile)))
+
+When expressed as an anonymous function, using `lambda',
+POST-PROCESS needs to be quoted.
 
 The function returns either a file name returned by POST-PROCESS,
 or FILE."