From 92a40cf7a157dd379ea71f02bd83ea3a6d1029d6 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 26 Dec 2022 10:43:57 +0100 Subject: [PATCH 1/3] Backport commit 9292f595a from Emacs ; Fix typos 9292f595a71870eec1ffdfd187b859cc990c2f0b Stefan Kangas Sat Dec 31 12:43:32 2022 +0100 --- lisp/org-capture.el | 2 +- lisp/org-element.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index b26afeb03..4e6570631 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1700,7 +1700,7 @@ Expansion occurs in a temporary Org mode buffer." (condition-case error (insert-file-contents filename) (error - (insert (format "%%![couldn not insert %s: %s]" + (insert (format "%%![could not insert %s: %s]" filename error)))))))) ;; Mark %() embedded elisp for later evaluation. diff --git a/lisp/org-element.el b/lisp/org-element.el index ace1cc1a9..aa618a088 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -5299,7 +5299,7 @@ indentation removed from its contents." ;; mechanism is robust enough to preserve total order among elements ;; even when the tree is only partially synchronized. ;; -;; The cache code debuggin is fairly complex because cache request +;; The cache code debugging is fairly complex because cache request ;; state is often hard to reproduce. An extensive diagnostics ;; functionality is built into the cache code to assist hunting bugs. ;; See `org-element--cache-self-verify', `org-element--cache-self-verify-frequency', From 79e5e42e5040602fd368f08405b11c4c8637b917 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sun, 1 Jan 2023 15:53:20 +0300 Subject: [PATCH 2/3] test-ob-octave.el: Remove test clauses causing race condition * testing/lisp/test-ob-octave.el (ob-octave/graphics-file): (ob-octave/graphics-file-session): (ob-octave/graphics-file-space): Do not check the created image file size. This tests causes race condition between the test and Octave writing image to disk. Also, the correctness of image file is nothing of Org's business as long as ob-ocatave's Elisp implementation is concerned. --- testing/lisp/test-ob-octave.el | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el index 8b68150fb..4e9fea97b 100644 --- a/testing/lisp/test-ob-octave.el +++ b/testing/lisp/test-ob-octave.el @@ -79,12 +79,6 @@ sombrero; (org-babel-execute-src-block) (should (search-forward (format "[[file:%s]]" file) nil nil)) (should (file-readable-p file)) - (should (or (> (file-attribute-size (file-attributes file)) 0) - ;; Avoid race condition on slow machines. - ;; https://orgmode.org/list/87r0wk29dz.fsf@localhost - (progn - (sleep-for 1) - (> (file-attribute-size (file-attributes file)) 0)))) (should-not (get-buffer "*Org-Babel Error Output*"))) ;; clean-up (delete-file file) @@ -105,12 +99,6 @@ sombrero; (should (get-buffer "*Inferior Octave*")) (should (search-forward (format "[[file:%s]]" file) nil nil)) (should (file-readable-p file)) - (or (> (file-attribute-size (file-attributes file)) 0) - ;; Avoid race condition on slow machines. - ;; https://orgmode.org/list/87r0wk29dz.fsf@localhost - (progn - (sleep-for 1) - (> (file-attribute-size (file-attributes file)) 0))) (should-not (get-buffer "*Org-Babel Error Output*"))) ;; clean-up (delete-file file) @@ -131,12 +119,6 @@ sombrero; (org-babel-execute-src-block) (should (search-forward (format "[[file:%s]]" file) nil nil)) (should (file-readable-p file)) - (or (> (file-attribute-size (file-attributes file)) 0) - ;; Avoid race condition on slow machines. - ;; https://orgmode.org/list/87r0wk29dz.fsf@localhost - (progn - (sleep-for 1) - (> (file-attribute-size (file-attributes file)) 0))) (should-not (get-buffer "*Org-Babel Error Output*"))) ;; clean-up (delete-file file) From 9cee879b36189806d078dd448a82e91d97513500 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sun, 1 Jan 2023 15:57:22 +0300 Subject: [PATCH 3/3] org-assert-version: Small refactoring * lisp/org-macs.el (org-assert-version): Make quoting "'" in the message more readable. Thanks to Stefan Monnier for the suggestion. --- lisp/org-macs.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 3cf220822..d071cf6b3 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -74,13 +74,15 @@ Version mismatch is commonly encountered in the following situations: loading of the newer Org version. It is recommended to put - (straight-use-package %sorg) + + %s + early in the config. Ideally, right after the straight.el bootstrap. Moving `use-package' :straight declaration may not be sufficient if the corresponding `use-package' statement is deferring the loading." - "'" ; Avoid `warn' replacing "'" with "’" (see `format-message'). - ) + ;; Avoid `warn' replacing "'" with "’" (see `format-message'). + "(straight-use-package 'org)") (error "Org version mismatch. Make sure that correct `load-path' is set early in init.el"))) ;; We rely on org-macs when generating Org version. Checking Org