Assert all the Org files to load the same Org version

* lisp/org-compat.el (org-assert-version): New macro comparing Org
version at compile time and laod time.

Add `org-assert-version' call to all files:

* lisp/org-macs.el:
* lisp/org-crypt.el:
* lisp/org-ctags.el:
* lisp/org-cycle.el:
* lisp/org-datetree.el:
* lisp/org-duration.el:
* lisp/org-element.el (avl-tree):
* lisp/org-entities.el:
* lisp/org-faces.el:
* lisp/org-feed.el:
* lisp/org-fold-core.el:
* lisp/org-fold.el:
* lisp/org-footnote.el:
* lisp/org-goto.el:
* lisp/org-habit.el:
* lisp/org-id.el:
* lisp/org-indent.el:
* lisp/org-inlinetask.el:
* lisp/org-keys.el:
* lisp/org-lint.el:
* lisp/org-list.el:
* lisp/org-macro.el:
* lisp/org-mobile.el:
* lisp/org-mouse.el:
* lisp/org-num.el:
* lisp/org-pcomplete.el:
* lisp/org-persist.el:
* lisp/org-plot.el:
* lisp/org-protocol.el:
* lisp/org-refile.el:
* lisp/org-src.el:
* lisp/org-table.el:
* lisp/org-tempo.el:
* lisp/org-timer.el:
* lisp/org.el:
* lisp/ox-ascii.el:
* lisp/ox-beamer.el:
* lisp/ox-html.el:
* lisp/ox-icalendar.el:
* lisp/ox-koma-letter.el:
* lisp/ox-latex.el:
* lisp/ox-man.el:
* lisp/ox-md.el:
* lisp/ox-odt.el:
* lisp/ox-org.el:
* lisp/ox-publish.el:
* lisp/ox-texinfo.el:
* lisp/ox.el:
This commit is contained in:
Ihor Radchenko 2022-08-04 21:53:05 +08:00
parent 1f1d8f909a
commit e81a094383
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
125 changed files with 460 additions and 0 deletions

View File

@ -33,6 +33,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cc-mode)
(require 'ob)
(require 'org-macs)

View File

@ -29,6 +29,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'ob)

View File

@ -32,6 +32,10 @@
;; which will be passed to the awk process through STDIN
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-compat)

View File

@ -27,6 +27,10 @@
;; Org-Babel support for evaluating calc code
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)
(require 'calc)

View File

@ -42,6 +42,10 @@
;; web page: https://technomancy.us/126
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(declare-function cider-current-connection "ext:cider-client" (&optional type))

View File

@ -30,6 +30,10 @@
;; org-babel at large.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob-core)
(require 'org-compat)
(require 'comint)

View File

@ -23,6 +23,10 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'ob-eval)
(require 'org-macs)

View File

@ -27,6 +27,10 @@
;; CSS from Org files.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-default-header-args:css '())

View File

@ -36,6 +36,10 @@
;; 4) there are no variables (at least for now)
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-compat)

View File

@ -39,6 +39,10 @@
;; 4) there are no variables (at least for now)
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-default-header-args:dot

View File

@ -27,6 +27,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob-core)
(declare-function org-babel--get-vars "ob" (params))

View File

@ -27,6 +27,10 @@
;; Org Babel support for evaluating Eshell source code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'eshell)

View File

@ -27,7 +27,9 @@
;; shell commands.
;;; Code:
(require 'org-macs)
(org-assert-version)
(defvar org-babel-error-buffer-name "*Org-Babel Error Output*")
(declare-function org-babel-temp-file "ob-core" (prefix &optional suffix))

View File

@ -23,6 +23,10 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob-core)
(declare-function org-babel-lob-get-info "ob-lob" (&optional datum))

View File

@ -32,6 +32,10 @@
;; `forth-mode' which is distributed with gforth (in gforth.el).
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)

View File

@ -27,6 +27,10 @@
;; Org-Babel support for evaluating fortran code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)
(require 'cc-mode)

View File

@ -39,6 +39,10 @@
;; - gnuplot-mode :: you can search the web for the latest active one.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)

View File

@ -31,6 +31,10 @@
;; https://github.com/russel/Emacs-Groovy-Mode
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-tangle-lang-exts) ;; Autoloaded

View File

@ -39,6 +39,10 @@
;; - (optionally) lhs2tex: https://people.cs.uu.nl/andres/lhs2tex/
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)
(require 'comint)

View File

@ -28,6 +28,10 @@
;; Org-Babel support for evaluating java source code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-tangle-lang-exts)

View File

@ -38,6 +38,10 @@
;; configuration instructions
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(declare-function run-mozilla "ext:moz" (arg))

View File

@ -31,6 +31,10 @@
;; Julia packages.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'ob)

View File

@ -30,6 +30,10 @@
;; be created directly form the latex source code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)

View File

@ -32,6 +32,10 @@
;; This depends on epstopdf --- See https://www.ctan.org/pkg/epstopdf.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(declare-function org-fold-show-all "org-fold" (&optional types))

View File

@ -36,6 +36,10 @@
;; - https://common-lisp.net/project/slime/
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)

View File

@ -23,6 +23,10 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'ob-core)
(require 'ob-table)

View File

@ -35,6 +35,10 @@
;; However, sessions are not yet working.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)
(require 'cl-lib)

View File

@ -27,6 +27,10 @@
;; This file exists solely for tangling a Makefile from Org files.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-default-header-args:makefile '())

View File

@ -35,6 +35,10 @@
;; http://matlab-emacs.sourceforge.net/
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'ob-octave)

View File

@ -31,6 +31,10 @@
;; 2) we are adding the "cmdline" header argument
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-tangle-lang-exts)

View File

@ -35,6 +35,10 @@
;; - tuareg-mode :: https://elpa.nongnu.org/nongnu/tuareg.html
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'comint)
(require 'org-macs)

View File

@ -29,6 +29,10 @@
;; octave-mode.el and octave-inf.el come with GNU emacs
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)

View File

@ -27,6 +27,10 @@
;; contents of the code block are returned in a raw result.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(declare-function org-export-string-as "ox"

View File

@ -28,6 +28,10 @@
;; Org-Babel support for evaluating perl source code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-tangle-lang-exts)

View File

@ -34,6 +34,10 @@
;; plantuml.jar | `org-plantuml-jar-path' should point to the jar file (when exec mode is `jar')
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-default-header-args:plantuml

View File

@ -51,6 +51,10 @@
;; - Processing.js module :: https://processingjs.org/
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'sha1)

View File

@ -28,6 +28,10 @@
;; Org-Babel support for evaluating python source code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)
(require 'python)

View File

@ -49,6 +49,10 @@
;; #+end_src
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob-core)
(require 'org-macs)
(require 'cl-lib)

View File

@ -36,6 +36,10 @@
;; https://github.com/eschulte/rinari/raw/master/util/inf-ruby.el
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)

View File

@ -38,6 +38,10 @@
;; - sass-mode :: https://github.com/nex3/haml/blob/master/extra/sass-mode.el
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-default-header-args:sass '())

View File

@ -38,6 +38,10 @@
;; ELPA.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'geiser nil t)
(require 'geiser-impl nil t)

View File

@ -34,6 +34,10 @@
;; M-x org-babel-screen-test RET
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-screen-location "screen"

View File

@ -40,6 +40,10 @@
;; tell Org Babel which file the sed script to act on.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(defvar org-babel-sed-command "sed"

View File

@ -26,6 +26,10 @@
;; Org-Babel support for evaluating shell source code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'org-macs)
(require 'shell)

View File

@ -69,6 +69,10 @@
;;
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(declare-function org-table-import "org-table" (file arg))

View File

@ -27,6 +27,10 @@
;; Org-Babel support for evaluating sqlite source code.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob)
(require 'ob-sql)

View File

@ -53,6 +53,10 @@
;; are optional.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ob-core)
(require 'org-macs)

View File

@ -27,6 +27,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org-src)
(require 'org-macs)

View File

@ -22,6 +22,10 @@
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-macs)
(require 'org-compat)
(require 'org-keys)

View File

@ -66,6 +66,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'bibtex)
(require 'json)
(require 'map)

View File

@ -62,6 +62,10 @@
;; #+print_bibliography: :keyword abc,xyz :title "Primary Sources"
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'map)
(require 'org-macs)
(require 'oc)

View File

@ -35,6 +35,10 @@
;; Bibliography should consist of ".bib" files only.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'oc)
(declare-function org-element-property "org-element" (property element))

View File

@ -111,6 +111,10 @@
;; Many thanks to him!
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'map)
(require 'bibtex)

View File

@ -42,6 +42,10 @@
;; Bibliography accepts any style supported by "natbib" package.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'oc)
(declare-function org-element-property "org-element" (property element))

View File

@ -61,6 +61,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-compat)
(require 'org-macs)
(require 'seq)

View File

@ -93,6 +93,9 @@
;;
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org-compat)
(require 'org-macs)

View File

@ -107,6 +107,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'bibtex)
(require 'cl-lib)
(require 'org-compat)

View File

@ -42,6 +42,8 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'doc-view)
(require 'ol)

View File

@ -26,6 +26,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ol)
(defcustom org-link-doi-server-url "https://doi.org/"

View File

@ -23,6 +23,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'eshell)
(require 'esh-mode)
(require 'ol)

View File

@ -44,6 +44,10 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ol)
(require 'cl-lib)
(require 'eww)

View File

@ -31,6 +31,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'gnus-sum)
(require 'gnus-util)
(require 'nnheader)

View File

@ -31,6 +31,9 @@
;;; Code:
(require 'subr-x) ; `string-trim', `string-remove-prefix'
(require 'org-macs)
(org-assert-version)
(require 'ol)
;; Declare external functions and variables

View File

@ -48,6 +48,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ol)
(declare-function erc-buffer-filter "erc" (predicate &optional proc))

View File

@ -24,6 +24,9 @@
;;
;;; Commentary:
(require 'org-macs)
(org-assert-version)
(require 'ol)
(org-link-set-parameters "man"

View File

@ -30,6 +30,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-macs)
(require 'ol)

View File

@ -30,6 +30,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ol)
;; Declare external functions and variables

View File

@ -41,6 +41,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'ol)
(defvar w3m-current-url)

View File

@ -27,6 +27,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-compat)
(require 'org-macs)
(require 'org-fold)

View File

@ -45,6 +45,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'ol)
(require 'org-fold-core)

View File

@ -28,6 +28,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org)
(require 'cl-lib)

View File

@ -29,6 +29,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-attach)
(require 'vc-git)

View File

@ -34,6 +34,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org)
(require 'ol)

View File

@ -47,6 +47,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org)
(require 'org-refile)

View File

@ -28,6 +28,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org)

View File

@ -28,6 +28,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org)

View File

@ -29,10 +29,13 @@
;;; Code:
(require 'cl-lib)
(require 'seq)
(require 'org-macs)
(org-assert-version)
(declare-function org-agenda-diary-entry "org-agenda")
(declare-function org-agenda-maybe-redo "org-agenda" ())
(declare-function org-agenda-set-restriction-lock "org-agenda" (&optional type))

View File

@ -54,6 +54,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-macs)
(require 'org-compat)

View File

@ -137,6 +137,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(eval-when-compile (require 'cl-lib))
(require 'org)

View File

@ -29,6 +29,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-macs)
(require 'org-fold)

View File

@ -30,6 +30,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org)
(defvar org-datetree-base-level 1

View File

@ -51,6 +51,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org-macs)

View File

@ -58,6 +58,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'avl-tree)
(require 'ring)
(require 'cl-lib)

View File

@ -27,6 +27,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(declare-function org-mode "org" ())
(declare-function org-toggle-pretty-entities "org" ())
(declare-function org-table-align "org-table" ())

View File

@ -28,6 +28,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(defgroup org-faces nil
"Faces in Org mode."
:tag "Org Faces"

View File

@ -88,6 +88,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org)
(require 'sha1)

View File

@ -270,6 +270,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-macs)
(require 'org-compat)

View File

@ -42,6 +42,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-macs)
(require 'org-fold-core)

View File

@ -28,6 +28,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
;;;; Declarations
(require 'cl-lib)

View File

@ -22,6 +22,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org)
(require 'org-refile)

View File

@ -28,6 +28,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org)
(require 'org-agenda)

View File

@ -70,6 +70,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org)
(require 'org-refile)
(require 'ol)

View File

@ -36,6 +36,9 @@
;;
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org-macs)
(require 'org-compat)
(require 'org)

View File

@ -78,6 +78,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'org)
(defgroup org-inlinetask nil

View File

@ -27,6 +27,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(defvar org-outline-regexp)

View File

@ -85,6 +85,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'ob)
(require 'oc)

View File

@ -76,6 +76,9 @@
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org-macs)
(require 'org-compat)

View File

@ -46,6 +46,10 @@
;; {{{email}}} and {{{title}}} macros.
;;; Code:
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org-macs)
(require 'org-compat)

View File

@ -34,6 +34,47 @@
(require 'cl-lib)
(require 'format-spec)
;;; Org version verification.
(defmacro org-assert-version ()
"Assert compile time and runtime verstion match."
`(unless (equal (org-git-version) ,(org-git-version))
(warn "Org version mismatch. Make sure that correct `load-path' is set early in init.el
This warning usually appears when a built-in Org version is loaded
prior to the more recent Org version.
Version mismatch is commonly encountered in the following situations:
1. Emacs is loaded using literate Org config and more recent Org
version is loaded inside the file loaded by `org-babel-load-file'.
`org-babel-load-file' triggers the built-in Org version clashing
the newer Org version attempted to be loaded later.
It is recommended to move the Org loading code before the
`org-babel-load-file' call.
2. New Org version is loaded manually by setting `load-path', but some
other package depending on Org is loaded before the `load-path' is
configured.
This \"other package\" is triggering built-in Org version, again
causing the version mismatch.
It is recommended to set `load-path' as early in the config as
possible.
3. New Org version is loaded using straight.el package manager and
other package depending on Org is loaded before straight triggers
loading of the newer Org version.
It is recommended to put
(straight-use-package 'org)
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.")
(error "Org version mismatch. Make sure that correct `load-path' is set early in init.el")))
(org-assert-version)
(declare-function org-mode "org" ())
(declare-function org-agenda-files "org" (&optional unrestricted archives))
(declare-function org-fold-show-context "org-fold" (&optional key))

View File

@ -31,6 +31,9 @@
;; iPhone and Android - any external viewer/flagging/editing
;; application that uses the same conventions could be used.
(require 'org-macs)
(org-assert-version)
(require 'cl-lib)
(require 'org)
(require 'org-agenda)

Some files were not shown because too many files have changed in this diff Show More