emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 ba70d0f77c: Update to Org 9.5.4-17-g6e991f


From: Kyle Meyer
Subject: emacs-28 ba70d0f77c: Update to Org 9.5.4-17-g6e991f
Date: Sun, 24 Jul 2022 16:58:52 -0400 (EDT)

branch: emacs-28
commit ba70d0f77c52d471bceb2ad2cc7bc172db348abb
Author: Kyle Meyer <kyle@kyleam.com>
Commit: Kyle Meyer <kyle@kyleam.com>

    Update to Org 9.5.4-17-g6e991f
---
 lisp/org/ob-core.el     |  2 +-
 lisp/org/ob-julia.el    |  8 ++++----
 lisp/org/ob-lua.el      |  2 +-
 lisp/org/ob-table.el    |  2 +-
 lisp/org/ob-tangle.el   |  5 ++++-
 lisp/org/oc-basic.el    |  1 +
 lisp/org/org-agenda.el  |  6 +++---
 lisp/org/org-compat.el  |  5 +++++
 lisp/org/org-plot.el    |  9 +++++----
 lisp/org/org-src.el     |  4 ++--
 lisp/org/org-table.el   |  2 +-
 lisp/org/org-version.el |  2 +-
 lisp/org/org.el         |  4 ++--
 lisp/org/ox-ascii.el    | 18 ++++++++++++------
 lisp/org/ox-html.el     |  2 +-
 lisp/org/ox-md.el       | 10 +++++-----
 lisp/org/ox-publish.el  |  2 +-
 lisp/org/ox.el          |  6 ++++--
 18 files changed, 54 insertions(+), 36 deletions(-)

diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el
index 23ef162a7f..04af84d2e4 100644
--- a/lisp/org/ob-core.el
+++ b/lisp/org/ob-core.el
@@ -480,7 +480,7 @@ value.  The value can either be a string or a closure that
 evaluates to a string.  The closure is evaluated when the source
 block is being evaluated (e.g. during execution or export), with
 point at the source block.  It is not possible to use an
-arbitrary function symbol (e.g. 'some-func), since org uses
+arbitrary function symbol (e.g. `some-func'), since org uses
 lexical binding.  To achieve the same functionality, call the
 function within a closure (e.g. (lambda () (some-func))).
 
diff --git a/lisp/org/ob-julia.el b/lisp/org/ob-julia.el
index abddca3613..50a44bcf44 100644
--- a/lisp/org/ob-julia.el
+++ b/lisp/org/ob-julia.el
@@ -250,8 +250,8 @@ end")
 (defun org-babel-julia-evaluate-external-process
     (body result-type result-params column-names-p)
   "Evaluate BODY in external julia process.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals `output' then return standard output as a
+string.  If RESULT-TYPE equals `value' then return the value of the
 last statement in BODY, as elisp."
   (cl-case result-type
     (value
@@ -274,8 +274,8 @@ last statement in BODY, as elisp."
 (defun org-babel-julia-evaluate-session
     (session body result-type result-params column-names-p)
   "Evaluate BODY in SESSION.
-If RESULT-TYPE equals 'output then return standard output as a
-string.  If RESULT-TYPE equals 'value then return the value of the
+If RESULT-TYPE equals `output' then return standard output as a
+string.  If RESULT-TYPE equals `value' then return the value of the
 last statement in BODY, as elisp."
   (cl-case result-type
     (value
diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el
index 48de0dbad0..b6e78fb7fd 100644
--- a/lisp/org/ob-lua.el
+++ b/lisp/org/ob-lua.el
@@ -395,7 +395,7 @@ fd:close()"
         (org-babel-lua-table-or-string results)))))
 
 (defun org-babel-lua-read-string (string)
-  "Strip 's from around Lua string."
+  "Strip \\=' characters from around Lua string."
   (org-unbracket-string "'" "'" string))
 
 (provide 'ob-lua)
diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el
index 2f092998d8..f6729e0ece 100644
--- a/lisp/org/ob-table.el
+++ b/lisp/org/ob-table.el
@@ -84,7 +84,7 @@ is the equivalent of the following source code block:
  #+end_src
 
 NOTE: The quotation marks around the function name,
-'source-block', are optional.
+`source-block', are optional.
 
 NOTE: By default, string variable names are interpreted as
 references to source-code blocks, to force interpretation of a
diff --git a/lisp/org/ob-tangle.el b/lisp/org/ob-tangle.el
index 566258eba4..525d27bc07 100644
--- a/lisp/org/ob-tangle.el
+++ b/lisp/org/ob-tangle.el
@@ -581,7 +581,10 @@ which enable the original code blocks to be found."
          (error "Not in tangled code"))
         (setq body (buffer-substring body-start end)))
       ;; Go to the beginning of the relative block in Org file.
-      (org-link-open-from-string link)
+      ;; Explicitly allow fuzzy search even if user customized
+      ;; otherwise.
+      (let (org-link-search-must-match-exact-headline)
+        (org-link-open-from-string link))
       (setq target-buffer (current-buffer))
       (if (string-match "[^ \t\n\r]:\\([[:digit:]]+\\)" block-name)
           (let ((n (string-to-number (match-string 1 block-name))))
diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el
index 9ed1b810fa..8c76e200e4 100644
--- a/lisp/org/oc-basic.el
+++ b/lisp/org/oc-basic.el
@@ -73,6 +73,7 @@
 (require 'seq)
 
 (declare-function org-open-at-point "org" (&optional arg))
+(declare-function org-open-file "org" (path &optional in-emacs line search))
 
 (declare-function org-element-interpret-data "org-element" (data))
 (declare-function org-element-property "org-element" (property element))
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 71aac271f7..a43b083d53 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -1615,7 +1615,7 @@ alpha-down         Sort headlines alphabetically, 
reversed.
 
 The different possibilities will be tried in sequence, and testing stops
 if one comparison returns a \"not-equal\".  For example, the default
-    '(time-up category-keep priority-down)
+    `(time-up category-keep priority-down)'
 means: Pull out all entries having a specified time of day and sort them,
 in order to make a time schedule for the current day the first thing in the
 agenda listing for the day.  Of the entries without a time indication, keep
@@ -4124,7 +4124,7 @@ dimming them."                   ;FIXME: The arg isn't 
used, actually!
 
 If the header at `org-hd-marker' is blocked according to
 `org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is
-'invisible and the header is not blocked by checkboxes, set the
+`invisible' and the header is not blocked by checkboxes, set the
 text property `org-todo-blocked' to `invisible', otherwise set it
 to t."
   (when (get-text-property 0 'todo-state entry)
@@ -7399,7 +7399,7 @@ Argument ARG is the prefix argument."
 When in a restricted subtree, remove it.
 
 The restriction will span over the entire file if TYPE is `file',
-or if type is '(4), or if the cursor is before the first headline
+or if type is \\='(4), or if the cursor is before the first headline
 in the file.  Otherwise, only apply the restriction to the current
 subtree."
   (interactive "P")
diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el
index c26eb6f10a..da544a567d 100644
--- a/lisp/org/org-compat.el
+++ b/lisp/org/org-compat.el
@@ -113,6 +113,11 @@ the symbol of the calling function, for example."
 
 ;;; Emacs < 27.1 compatibility
 
+(if (version< emacs-version "27.1")
+    (defsubst org-replace-buffer-contents (source &optional _max-secs 
_max-costs)
+      (replace-buffer-contents source))
+  (defalias 'org-replace-buffer-contents #'replace-buffer-contents))
+
 (unless (fboundp 'proper-list-p)
   ;; `proper-list-p' was added in Emacs 27.1.  The function below is
   ;; taken from Emacs subr.el 200195e824b^.
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el
index bf84c99e04..7958ffd58d 100644
--- a/lisp/org/org-plot.el
+++ b/lisp/org/org-plot.el
@@ -280,7 +280,7 @@ When NORMALISE is non-nil, the count is divided by the 
number of values."
             collect (cons n (/ (length m) normaliser)))))
 
 (defun org--plot/prime-factors (value)
-  "Return the prime decomposition of VALUE, e.g. for 12, '(3 2 2)."
+  "Return the prime decomposition of VALUE, e.g. for 12, \\='(3 2 2)."
   (let ((factors '(1)) (i 1))
     (while (/= 1 value)
       (setq i (1+ i))
@@ -682,9 +682,10 @@ line directly before or after the table."
                                  (looking-at "[[:space:]]*#\\+"))
                        (setf params (org-plot/collect-options params))))
       ;; Dump table to datafile
-      (if-let ((dump-func (plist-get type :data-dump)))
-         (funcall dump-func table data-file num-cols params)
-       (org-plot/gnuplot-to-data table data-file params))
+      (let ((dump-func (plist-get type :data-dump)))
+        (if dump-func
+           (funcall dump-func table data-file num-cols params)
+         (org-plot/gnuplot-to-data table data-file params)))
       ;; Check type of ind column (timestamp? text?)
       (when (plist-get params :check-ind-type)
        (let* ((ind (1- (plist-get params :ind)))
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el
index 54f901252f..89d0c28a43 100644
--- a/lisp/org/org-src.el
+++ b/lisp/org/org-src.el
@@ -1235,7 +1235,7 @@ Throw an error if there is no such buffer."
                   (insert (with-current-buffer write-back-buf 
(buffer-string))))
          (save-restriction
            (narrow-to-region beg end)
-           (replace-buffer-contents write-back-buf 0.1 nil)
+           (org-replace-buffer-contents write-back-buf 0.1 nil)
            (goto-char (point-max))))
        (when (and expecting-bol (not (bolp))) (insert "\n")))
       (kill-buffer write-back-buf)
@@ -1283,7 +1283,7 @@ Throw an error if there is no such buffer."
                               (buffer-string))))
           (save-restriction
             (narrow-to-region beg end)
-            (replace-buffer-contents write-back-buf 0.1 nil)
+            (org-replace-buffer-contents write-back-buf 0.1 nil)
             (goto-char (point-max))))
         (when (and expecting-bol (not (bolp))) (insert "\n")))))
     (when write-back-buf (kill-buffer write-back-buf))
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 860fd6e560..c301bc6af1 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -5465,7 +5465,7 @@ The table is taken from the parameter TXT, or from the 
buffer at point."
         (nreverse table)))))
 
 (defun org-table-collapse-header (table &optional separator max-header-lines)
-  "Collapse the lines before 'hline into a single header.
+  "Collapse the lines before `hline' into a single header.
 
 The given TABLE is a list of lists as returned by `org-table-to-lisp'.
 The leading lines before the first `hline' symbol are considered
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 2a500fe510..915c3f63c7 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -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.4-3-g6dc785"))
+   (let ((org-git-version "release_9.5.4-17-g6e991f"))
      org-git-version))
 
 (provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 06af12339e..a6155c1382 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -1694,7 +1694,7 @@ OK to kill that hidden subtree.  When nil, kill without 
remorse."
          (const :tag "Never kill a hidden subtree with C-k" error)))
 
 (defcustom org-special-ctrl-o t
-  "Non-nil means, make `C-o' insert a row in tables."
+  "Non-nil means, make `open-line' (\\[open-line]) insert a row in tables."
   :group 'org-edit-structure
   :type 'boolean)
 
@@ -3301,7 +3301,7 @@ Replace format-specifiers in the command as noted below 
and use
 %i:     The LaTeX fragment to be converted.
 
 For example, this could be used with LaTeXML as
-\"latexmlc 'literal:%i' --profile=math --preload=siunitx.sty 2>/dev/null\"."
+\"latexmlc \\='literal:%i\\=' --profile=math --preload=siunitx.sty 
2>/dev/null\"."
   :group 'org-latex
   :package-version '(Org . "9.4")
   :type '(choice
diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el
index 38b2a5772c..76a1a71fab 100644
--- a/lisp/org/ox-ascii.el
+++ b/lisp/org/ox-ascii.el
@@ -948,12 +948,18 @@ channel."
         (when description
           (let ((dest (if (equal type "fuzzy")
                           (org-export-resolve-fuzzy-link link info)
-                        (org-export-resolve-id-link link info))))
-            (concat
-             (org-ascii--fill-string
-              (format "[%s] %s" anchor (org-ascii--describe-datum dest info))
-              width info)
-             "\n\n"))))
+                         ;; Ignore broken links.  On broken link,
+                         ;; `org-export-resolve-id-link' will throw an
+                         ;; error and we will return nil.
+                        (condition-case nil
+                             (org-export-resolve-id-link link info)
+                           (org-link-broken nil)))))
+             (when dest
+              (concat
+               (org-ascii--fill-string
+                (format "[%s] %s" anchor (org-ascii--describe-datum dest info))
+                width info)
+               "\n\n")))))
        ;; Do not add a link that cannot be resolved and doesn't have
        ;; any description: destination is already visible in the
        ;; paragraph.
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el
index 81ef002a05..9cf9125aeb 100644
--- a/lisp/org/ox-html.el
+++ b/lisp/org/ox-html.el
@@ -2909,7 +2909,7 @@ Starred and \"displaymath\" environments are not 
numbered."
 
 (defun org-html--unlabel-latex-environment (latex-frag)
   "Change environment in LATEX-FRAG string to an unnumbered one.
-For instance, change an 'equation' environment to 'equation*'."
+For instance, change an `equation' environment to `equation*'."
   (replace-regexp-in-string
    "\\`[ \t]*\\\\begin{\\([^*]+?\\)}"
    "\\1*"
diff --git a/lisp/org/ox-md.el b/lisp/org/ox-md.el
index ad684d8033..3551e4184e 100644
--- a/lisp/org/ox-md.el
+++ b/lisp/org/ox-md.el
@@ -193,11 +193,11 @@ of contents can refer to headlines."
      ;; A link refers internally to HEADLINE.
      (org-element-map (plist-get info :parse-tree) 'link
        (lambda (link)
-        (eq headline
-            (pcase (org-element-property :type link)
-              ((or "custom-id" "id") (org-export-resolve-id-link link info))
-              ("fuzzy" (org-export-resolve-fuzzy-link link info))
-              (_ nil))))
+        (equal headline
+                ;; Ignore broken links.
+                (condition-case nil
+                    (org-export-resolve-id-link link info)
+                  (org-link-broken nil))))
        info t))))
 
 (defun org-md--headline-title (style level title &optional anchor tags)
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el
index 636bd0d2ae..51e2352b4e 100644
--- a/lisp/org/ox-publish.el
+++ b/lisp/org/ox-publish.el
@@ -839,7 +839,7 @@ in `org-export-options-alist' or in export back-ends.  In 
the
 latter case, optional argument BACKEND has to be set to the
 back-end where the option is defined, e.g.,
 
-  (org-publish-find-property file :subtitle 'latex)
+  (org-publish-find-property file :subtitle \\='latex)
 
 Return value may be a string or a list, depending on the type of
 PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'."
diff --git a/lisp/org/ox.el b/lisp/org/ox.el
index 2a3edaa500..a6209ee98f 100644
--- a/lisp/org/ox.el
+++ b/lisp/org/ox.el
@@ -1908,8 +1908,10 @@ Return a string."
                           (org-element-property :archivedp data)))
                  (let ((transcoder (org-export-transcoder data info)))
                    (or (and (functionp transcoder)
-                            (broken-link-handler
-                             (funcall transcoder data nil info)))
+                             (if (eq type 'link)
+                                (broken-link-handler
+                                 (funcall transcoder data nil info))
+                               (funcall transcoder data nil info)))
                        ;; Export snippets never return a nil value so
                        ;; that white spaces following them are never
                        ;; ignored.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]