* [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el @ 2022-12-01 7:26 Bastien 2022-12-02 3:38 ` Kyle Meyer 0 siblings, 1 reply; 25+ messages in thread From: Bastien @ 2022-12-01 7:26 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 673 bytes --] Some users reported an (invalid-function org-assert-version) error when installing Org from ELPA: https://lists.sr.ht/~bzg/emacsfr/%3Cd091463e1615422eb00070727d6a094ec0ae3c73.camel%40adocentyn.io%3E https://www.reddit.com/r/emacs/comments/z7qulo/comment/iyd9vam/?context=3 This patch autoloads `org-assert-version'. It also removes the ;; generated-autoload-file: "org-loaddefs.el" footer in all files and let Make create org-autoloads.el instead. Before the patch, installing from ELPA creates both org-loaddefs.el and org-autoloads.el, which is confusing. Unless anyone objects, I'll install this patch in the bugfix branch tomorrow and release 9.6.1. -- Bastien [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Autoload-org-assert-version-and-remove-org-loaddefs..patch --] [-- Type: text/x-diff, Size: 23084 bytes --] From dab5768422ba1c3cf66cad5d2708d390be87e3d0 Mon Sep 17 00:00:00 2001 From: Bastien <bzg@gnu.org> Date: Thu, 1 Dec 2022 08:16:13 +0100 Subject: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el `org-assert-version' macro needs to be autoloaded for Org to be correctly initialized. Also, don't create a specific org-loaddefs.el file along the expected org-autoloads.el. --- Makefile | 2 +- doc/org-manual.org | 3 +-- lisp/Makefile | 4 ++-- lisp/ob-core.el | 4 ---- lisp/ob-lob.el | 4 ---- lisp/ob-tangle.el | 4 ---- lisp/ob.el | 4 ---- lisp/ol-bbdb.el | 4 ---- lisp/ol-irc.el | 4 ---- lisp/ol.el | 4 ---- lisp/org-archive.el | 4 ---- lisp/org-attach.el | 4 ---- lisp/org-clock.el | 1 - lisp/org-colview.el | 5 ----- lisp/org-compat.el | 5 +---- lisp/org-datetree.el | 4 ---- lisp/org-duration.el | 4 ---- lisp/org-element.el | 4 ---- lisp/org-feed.el | 4 ---- lisp/org-footnote.el | 5 ----- lisp/org-goto.el | 4 ---- lisp/org-id.el | 4 ---- lisp/org-indent.el | 4 ---- lisp/org-keys.el | 4 ---- lisp/org-lint.el | 4 ---- lisp/org-list.el | 4 ---- lisp/org-macs.el | 5 +---- lisp/org-mobile.el | 4 ---- lisp/org-num.el | 4 ---- lisp/org-plot.el | 4 ---- lisp/org-refile.el | 4 ---- lisp/org-table.el | 4 ---- lisp/org-timer.el | 4 ---- lisp/org.el | 10 +++++----- lisp/ox-ascii.el | 2 -- lisp/ox-beamer.el | 4 ---- lisp/ox-html.el | 5 ----- lisp/ox-icalendar.el | 5 ----- lisp/ox-latex.el | 5 ----- lisp/ox-md.el | 4 ---- lisp/ox-odt.el | 4 ---- lisp/ox-org.el | 5 ----- lisp/ox-publish.el | 4 ---- lisp/ox-texinfo.el | 4 ---- lisp/ox.el | 6 ------ mk/default.mk | 6 +++--- mk/org-fixup.el | 16 ++++++++-------- 47 files changed, 22 insertions(+), 188 deletions(-) diff --git a/Makefile b/Makefile index f476a3ea7..601f691eb 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ help helpall:: $(info make all - ditto) $(info make compile - build Org ELisp files) $(info make single - build Org ELisp files, single Emacs per source) - $(info make autoloads - create org-loaddefs.el to load Org in-place) + $(info make autoloads - create org-autoloads.el to load Org in-place) $(info make test - build Org ELisp files and run test suite) $(info make vanilla - run Emacs with this Org-mode and no personal config) helpall:: diff --git a/doc/org-manual.org b/doc/org-manual.org index 67b8b4dee..4041c7253 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -3,7 +3,6 @@ #+author: The Org Mode Developers #+language: en - #+texinfo: @insertcopying * Introduction @@ -128,7 +127,7 @@ $ make autoloads Note that in this case, =make autoloads= is mandatory: it defines Org's version in =org-version.el= and Org's autoloads in -=org-loaddefs.el=. +=org-autoloads.el=. Make sure you set the load path correctly in your Emacs init file: diff --git a/lisp/Makefile b/lisp/Makefile index f2a14b5d5..0bf4e3ddb 100644 --- a/lisp/Makefile +++ b/lisp/Makefile @@ -15,7 +15,7 @@ ifneq ($(ORG_ADD_CONTRIB),) endif LISPV := org-version.el -LISPI := org-loaddefs.el +LISPI := org-autoloads.el LISPA := $(LISPV) $(LISPI) LISPB := $(LISPA:%el=%elc) org-install.elc LISPF := $(filter-out $(LISPA),$(sort $(wildcard *.el) $(_ORG_ADD_EL_))) @@ -72,7 +72,7 @@ $(LISPV): $(LISPF) @$(MAKE_ORG_VERSION) $(LISPI): $(LISPV) $(LISPF) - @echo "org-loaddefs: $(ORGVERSION) ($(GITVERSION))" + @echo "org-autoloads: $(ORGVERSION) ($(GITVERSION))" @$(RM) $(@) @$(MAKE_ORG_INSTALL) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 5b78ee946..7bc3fbf59 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -3467,8 +3467,4 @@ Callers of this function will probably want to add an entry to (provide 'ob-core) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ob-core.el ends here diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el index fb2799755..ecbbe4fe3 100644 --- a/lisp/ob-lob.el +++ b/lisp/ob-lob.el @@ -167,8 +167,4 @@ see." (provide 'ob-lob) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ob-lob.el ends here diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index e86f4e528..b93becfe4 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -691,8 +691,4 @@ which enable the original code blocks to be found." (provide 'ob-tangle) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ob-tangle.el ends here diff --git a/lisp/ob.el b/lisp/ob.el index 83fc5b23e..56bf9693b 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -40,8 +40,4 @@ (provide 'ob) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ob.el ends here diff --git a/lisp/ol-bbdb.el b/lisp/ol-bbdb.el index ec1d755e8..72b115d03 100644 --- a/lisp/ol-bbdb.el +++ b/lisp/ol-bbdb.el @@ -542,8 +542,4 @@ END:VEVENT\n" (provide 'ol-bbdb) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ol-bbdb.el ends here diff --git a/lisp/ol-irc.el b/lisp/ol-irc.el index 25d11ca13..82f1fc799 100644 --- a/lisp/ol-irc.el +++ b/lisp/ol-irc.el @@ -265,8 +265,4 @@ FORMAT." (provide 'ol-irc) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ol-irc.el ends here diff --git a/lisp/ol.el b/lisp/ol.el index 0b4457b00..b6ff01593 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -2101,8 +2101,4 @@ Also refresh fontification if needed." (provide 'ol) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ol.el ends here diff --git a/lisp/org-archive.el b/lisp/org-archive.el index d08afa457..80dddc694 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -642,8 +642,4 @@ This command is set with the variable `org-archive-default-command'." (provide 'org-archive) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-archive.el ends here diff --git a/lisp/org-attach.el b/lisp/org-attach.el index f85811dc7..bd262edd6 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -830,8 +830,4 @@ Idea taken from `gnus-dired-attach'." (provide 'org-attach) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-attach.el ends here diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 2758aeed4..df4c519d2 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -3181,7 +3181,6 @@ This function is added to `kill-emacs-query-functions'." (provide 'org-clock) ;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" ;; coding: utf-8 ;; End: diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 20bf2b7e9..4c178b526 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -1732,11 +1732,6 @@ This will add overlays to the date lines, to show the summary for each day." (equal (nth 3 a) (nth 3 spec)))) (org-columns-compute prop)))))))))) - (provide 'org-colview) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-colview.el ends here diff --git a/lisp/org-compat.el b/lisp/org-compat.el index 2f29754f1..5382eb572 100644 --- a/lisp/org-compat.el +++ b/lisp/org-compat.el @@ -1610,10 +1610,7 @@ key." (make-obsolete-variable 'org-speed-commands-user "configure `org-speed-commands' instead." "9.5") -(provide 'org-compat) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: +(provide 'org-compat) ;;; org-compat.el ends here diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el index fb4df3cbe..7daca2ca9 100644 --- a/lisp/org-datetree.el +++ b/lisp/org-datetree.el @@ -265,8 +265,4 @@ before running this command, even though the command tries to be smart." (provide 'org-datetree) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-datetree.el ends here diff --git a/lisp/org-duration.el b/lisp/org-duration.el index 6d6b8b5cf..c037a5154 100644 --- a/lisp/org-duration.el +++ b/lisp/org-duration.el @@ -457,8 +457,4 @@ with \"H:MM:SS\" format, return `h:mm:ss'. Otherwise, return (provide 'org-duration) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-duration.el ends here diff --git a/lisp/org-element.el b/lisp/org-element.el index bc2fa0b98..c03d0ae59 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -8100,8 +8100,4 @@ end of ELEM-A." (provide 'org-element) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-element.el ends here diff --git a/lisp/org-feed.el b/lisp/org-feed.el index 3523a6c5b..b9889ce44 100644 --- a/lisp/org-feed.el +++ b/lisp/org-feed.el @@ -715,8 +715,4 @@ formatted as a string, not the original XML data." (provide 'org-feed) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-feed.el ends here diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index aedd41335..2f41e63bd 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -1016,11 +1016,6 @@ offer additional commands in a menu." (char (error "No such footnote command %c" char)))) (t (org-footnote-new))))) - (provide 'org-footnote) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-footnote.el ends here diff --git a/lisp/org-goto.el b/lisp/org-goto.el index 680130384..bf4f886f6 100644 --- a/lisp/org-goto.el +++ b/lisp/org-goto.el @@ -285,8 +285,4 @@ With a prefix argument, use the alternative interface: e.g., if (provide 'org-goto) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-goto.el ends here diff --git a/lisp/org-id.el b/lisp/org-id.el index 8cb5666a2..bfe341800 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -755,8 +755,4 @@ or filename if no title." (provide 'org-id) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-id.el ends here diff --git a/lisp/org-indent.el b/lisp/org-indent.el index de237415c..9c3c9eaca 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -430,8 +430,4 @@ This function is meant to be called by `after-change-functions'." (provide 'org-indent) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-indent.el ends here diff --git a/lisp/org-keys.el b/lisp/org-keys.el index 95f64a3f9..07aadb613 100644 --- a/lisp/org-keys.el +++ b/lisp/org-keys.el @@ -924,8 +924,4 @@ a-list placed behind the generic `org-babel-key-prefix'.") (provide 'org-keys) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-keys.el ends here diff --git a/lisp/org-lint.el b/lisp/org-lint.el index ff2999cb8..6eedf13df 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -1452,8 +1452,4 @@ Use \"export %s\" instead" (provide 'org-lint) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-lint.el ends here diff --git a/lisp/org-list.el b/lisp/org-list.el index 606bdb3d8..dd232dd86 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -3663,8 +3663,4 @@ overruling parameters for `org-list-to-generic'." (provide 'org-list) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-list.el ends here diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 918899900..76b8b58c8 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -36,6 +36,7 @@ ;;; Org version verification. +;;;###autoload (defmacro org-assert-version () "Assert compile time and runtime version match." ;; We intentionally use a more permissive `org-release' instead of @@ -1561,8 +1562,4 @@ Credit: https://stackoverflow.com/questions/11871245/knuth-multiplicative-hash#4 (provide 'org-macs) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-macs.el ends here diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index a95c4e476..4c37300cd 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -1137,8 +1137,4 @@ A and B must be strings or nil." (provide 'org-mobile) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-mobile.el ends here diff --git a/lisp/org-num.el b/lisp/org-num.el index 4a57e6a9e..fa603d51a 100644 --- a/lisp/org-num.el +++ b/lisp/org-num.el @@ -473,8 +473,4 @@ NUMBERING is a list of numbers." (provide 'org-num) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-num.el ends here diff --git a/lisp/org-plot.el b/lisp/org-plot.el index ef6b5aa05..bc728288d 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -735,8 +735,4 @@ line directly before or after the table." (provide 'org-plot) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-plot.el ends here diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 8c514b9d0..653bd73b8 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -758,8 +758,4 @@ this function appends the default value from (provide 'org-refile) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-refile.el ends here diff --git a/lisp/org-table.el b/lisp/org-table.el index 8e0e8e6cf..5df798b99 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -6368,8 +6368,4 @@ This function is generated by a call to the macro `org-define-lookup-function'." (provide 'org-table) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-table.el ends here diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 9741ac679..103cbc5e8 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -489,8 +489,4 @@ Try to use an Org header, otherwise use the buffer name." (provide 'org-timer) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; org-timer.el ends here diff --git a/lisp/org.el b/lisp/org.el index a05a28229..0ee5a1510 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -84,10 +84,10 @@ (condition-case nil (load (concat (file-name-directory load-file-name) - "org-loaddefs") + "org-autoloads") nil t nil t) (error - (message "WARNING: No org-loaddefs.el file could be found from where org.el is loaded.") + (message "WARNING: No org-autoloads.el file could be found from where org.el is loaded.") (sit-for 3) (message "You need to run \"make\" or \"make autoloads\" from Org lisp directory") (sit-for 3))) @@ -364,7 +364,7 @@ FULL is given." (save-load-suffixes load-suffixes) (load-suffixes (list ".el")) (org-install-dir - (ignore-errors (org-find-library-dir "org-loaddefs")))) + (ignore-errors (org-find-library-dir "org-autoloads")))) (unless (and (fboundp 'org-release) (fboundp 'org-git-version)) (org-load-noerror-mustsuffix (concat org-dir "org-version"))) (let* ((load-suffixes save-load-suffixes) @@ -380,7 +380,7 @@ FULL is given." org-install-dir " and " org-dir)) - "org-loaddefs.el can not be found!"))) + "org-autoloads.el can not be found!"))) (version1 (if full version release))) (when here (insert version1)) (when message (message "%s" version1)) @@ -18261,7 +18261,7 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (contrib-dir (or (org-find-library-dir "org-contribdir") org-dir)) (feature-re "^\\(org\\|ob\\|ox\\|ol\\|oc\\)\\(-.*\\)?") (remove-re (format "\\`%s\\'" - (regexp-opt '("org" "org-loaddefs" "org-version")))) + (regexp-opt '("org" "org-autoloads" "org-version")))) (feats (delete-dups (mapcar 'file-name-sans-extension (mapcar 'file-name-nondirectory diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 7e5ba104f..b3c98cdb5 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -2210,11 +2210,9 @@ Return output file name." (org-publish-org-to 'ascii filename ".txt" `(:ascii-charset utf-8 ,@plist) pub-dir)) - (provide 'ox-ascii) ;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" ;; coding: utf-8 ;; End: diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 51684448d..2a09f72db 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -1170,8 +1170,4 @@ Return output file name." (provide 'ox-beamer) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-beamer.el ends here diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 86b10cbf7..060c7053c 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -4018,11 +4018,6 @@ Return output file name." "html")) plist pub-dir)) - (provide 'ox-html) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-html.el ends here diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index f4c904da4..d0045f614 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -1065,11 +1065,6 @@ FILES is a list of files to build the calendar from." org-icalendar-combined-agenda-file)) (org-release-buffers org-agenda-new-buffers)))) - (provide 'ox-icalendar) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-icalendar.el ends here diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 46a348a68..fd92bb1a8 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -4348,11 +4348,6 @@ Return output file name." 'latex filename ".tex" plist (file-name-directory filename)))) pub-dir)) - (provide 'ox-latex) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-latex.el ends here diff --git a/lisp/ox-md.el b/lisp/ox-md.el index dee6dbf1f..0cadcbd88 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -802,8 +802,4 @@ Return output file name." (provide 'ox-md) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-md.el ends here diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index 402c75447..bd3f565ae 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -4350,8 +4350,4 @@ is non-nil then the newly converted file is opened using (provide 'ox-odt) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-odt.el ends here diff --git a/lisp/ox-org.el b/lisp/ox-org.el index 159a41b98..9b53136d5 100644 --- a/lisp/ox-org.el +++ b/lisp/ox-org.el @@ -350,11 +350,6 @@ Return output file name." ;; FIXME: Why? Which buffer is this supposed to apply to? (set-buffer-modified-p nil))) - (provide 'ox-org) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-org.el ends here diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index a5999ef7b..a3d8be517 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -1379,8 +1379,4 @@ does not exist." (provide 'ox-publish) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-publish.el ends here diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 73ba349b1..3edca9b94 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -2046,8 +2046,4 @@ Once computed, the results remain cached." (provide 'ox-texinfo) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox-texinfo.el ends here diff --git a/lisp/ox.el b/lisp/ox.el index 5c0a8f242..1daa97199 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -7248,12 +7248,6 @@ options as CDR." ;; Otherwise, enter sub-menu. (t (org-export--dispatch-ui options key expertp))))) - - (provide 'ox) -;; Local variables: -;; generated-autoload-file: "org-loaddefs.el" -;; End: - ;;; ox.el ends here diff --git a/mk/default.mk b/mk/default.mk index fa46661e8..d6e10b612 100644 --- a/mk/default.mk +++ b/mk/default.mk @@ -88,7 +88,7 @@ BTEST = $(BATCH) $(BTEST_INIT) \ $(lst-ob-lang)))) \ org-test-select-re "$(BTEST_RE)" \ )' \ - -l org-loaddefs.el \ + -l org-autoloads.el \ -l cl -l testing/org-test.el \ -l ert -l org -l ox -l ol \ $(foreach req,$(BTEST_EXTRA),$(req-extra)) \ @@ -136,11 +136,11 @@ MAKE_LOCAL_MK = $(BATCHO) \ BATCHL = $(BATCH) \ --eval '(add-to-list '"'"'load-path ".")' -# How to generate org-loaddefs.el +# How to generate org-autoloads.el MAKE_ORG_INSTALL = $(BATCHL) \ --eval '(load "org-compat.el")' \ --eval '(load "../mk/org-fixup.el")' \ - --eval '(org-make-org-loaddefs)' + --eval '(org-make-org-autoloads)' # How to generate org-version.el MAKE_ORG_VERSION = $(BATCHL) \ diff --git a/mk/org-fixup.el b/mk/org-fixup.el index 5989875a8..f1d21df15 100644 --- a/mk/org-fixup.el +++ b/mk/org-fixup.el @@ -80,27 +80,27 @@ Inserted by installing Org or when a release is made.\" (let ((inhibit-read-only t)) (write-file "org-version.el")))) -(defun org-make-org-loaddefs () - "Make the file org-loaddefs.el in the current directory. +(defun org-make-org-autoloads () + "Make the file org-autoloads.el in the current directory. This function is internally used by the build system and should be used by foreign build systems or installers to produce this file in the installation directory of Org mode. Org will not work correctly if this file is not up-to-date." (with-temp-buffer - (set-visited-file-name "org-loaddefs.el") - (insert ";;; org-loaddefs.el --- autogenerated file, do not edit\n;;\n;;; Code:\n") + (set-visited-file-name "org-autoloads.el") + (insert ";;; org-autoloads.el --- autogenerated file, do not edit\n;;\n;;; Code:\n") (let ((files (directory-files default-directory nil "^\\(org\\|ob\\|ox\\|ol\\|oc\\)\\(-.*\\)?\\.el$"))) (mapc (lambda (f) (generate-file-autoloads f)) files)) - (insert "\f\n(provide 'org-loaddefs)\n") + (insert "\f\n(provide 'org-autoloads)\n") (insert "\f\n;; Local Variables:\n;; version-control: never\n") (insert ";; no-byte-compile: t\n;; no-update-autoloads: t\n") - (insert ";; coding: utf-8\n;; End:\n;;; org-loaddefs.el ends here\n") + (insert ";; coding: utf-8\n;; End:\n;;; org-autoloads.el ends here\n") (let ((inhibit-read-only t)) (save-buffer)))) (defun org-make-autoloads (&optional compile force) - "Make the files org-loaddefs.el and org-version.el in the install directory. + "Make the files org-autoloads.el and org-version.el in the install directory. Finds the install directory by looking for library \"org\". Optionally byte-compile lisp files in the install directory or force re-compilation. This function is provided for easier @@ -112,7 +112,7 @@ manual install when the build system can't be used." (cd dirlisp) (org-fixup) (org-make-org-version (org-release) (org-git-version)) - (org-make-org-loaddefs) + (org-make-org-autoloads) (when compile (byte-recompile-directory dirlisp 0 force))) (cd origin)))) -- 2.37.2 ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-01 7:26 [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el Bastien @ 2022-12-02 3:38 ` Kyle Meyer 2022-12-02 7:44 ` Bastien 2022-12-06 3:00 ` David Masterson 0 siblings, 2 replies; 25+ messages in thread From: Kyle Meyer @ 2022-12-02 3:38 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode Bastien writes: > Some users reported an (invalid-function org-assert-version) error > when installing Org from ELPA: > > https://lists.sr.ht/~bzg/emacsfr/%3Cd091463e1615422eb00070727d6a094ec0ae3c73.camel%40adocentyn.io%3E > https://www.reddit.com/r/emacs/comments/z7qulo/comment/iyd9vam/?context=3 > > This patch autoloads `org-assert-version'. I don't understand the rationale behind this. Every spot that calls org-assert-version is preceded by a line that requires org-macs, so isn't this error likely due to a mixed installation/load-path issue where the wrong/older org-macs is taking precedence? > It also removes the ;; generated-autoload-file: "org-loaddefs.el" > footer in all files and let Make create org-autoloads.el instead. I'm worried with how this will play with the Org bundled with Emacs. The autoloads that are now written to lisp/org/org-loaddefs.el will instead pollute the top-level lisp/loaddefs.el. When I tested this out in the Emacs repo, running `make` shows many lines of WARNING: No org-autoloads.el file could be found from where org.el is loaded. and You need to run "make" or "make autoloads" from Org lisp directory during the build. And loading/using Org shows the same. > Before the patch, installing from ELPA creates both org-loaddefs.el > and org-autoloads.el, which is confusing. Hmm, isn't this in line with the lisp/org-loaddefs.el and lisp/loaddefs.el split that happens for the Emacs repo? A similar split is used other packages in the Emacs repo as well: $ find lisp | grep '\-loaddefs.el' | head lisp/ps-print-loaddefs.elc lisp/org/org-loaddefs.el lisp/org/org-loaddefs.elc lisp/net/tramp-loaddefs.el lisp/net/tramp-loaddefs.elc lisp/calc/calc-loaddefs.el lisp/calc/calc-loaddefs.elc lisp/textmodes/reftex-loaddefs.el lisp/textmodes/reftex-loaddefs.elc lisp/textmodes/texinfo-loaddefs.elc $ find lisp | grep -c '\-loaddefs.el' 29 $ find lisp | grep -c '\-autoloads.el' 0 And with the port of Emacs's 2682ea1b3 (Org commit 19c3969e7, 2022-10-04), there's also one spot that uses ;;;###org-autoload, which tells loaddefs-gen.el to direct the autoload to org-loaddefs.el. > Unless anyone objects, I'll install this patch in the bugfix branch > tomorrow and release 9.6.1. I think as is the patch would cause issues, and more generally I'm not convinced we should be moving away from having an org-loaddefs.el file. I'm also concerned about this sort of tree-wide change in a patch release that will be synced to the emacs-29 branch. Thanks for posting this for discussion, and please let me know if I'm mistaken about the interaction with the Emacs repo. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-02 3:38 ` Kyle Meyer @ 2022-12-02 7:44 ` Bastien 2022-12-03 4:18 ` Kyle Meyer ` (2 more replies) 2022-12-06 3:00 ` David Masterson 1 sibling, 3 replies; 25+ messages in thread From: Bastien @ 2022-12-02 7:44 UTC (permalink / raw) To: Kyle Meyer; +Cc: emacs-orgmode Kyle Meyer <kyle@kyleam.com> writes: >> This patch autoloads `org-assert-version'. > > I don't understand the rationale behind this. It was my naive attempt at fixing the "invalid-function org-assert-version" error several people reported. > Every spot that calls > org-assert-version is preceded by a line that requires org-macs, so > isn't this error likely due to a mixed installation/load-path issue > where the wrong/older org-macs is taking precedence? Yes: I thought `org-assert-version' job was to help catching mixed installations, so my reasoning was that, even when an old org-macs version has been loaded, autoloading `org-assert-version' would help report about mixed installation. Also you're right about org-loaddefs.el, we should keep it. That said, do you have any idea how to fix the bug people encounter when installing Org from ELPA and being bitten by "invalid-function org-assert-version"? -- Bastien ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-02 7:44 ` Bastien @ 2022-12-03 4:18 ` Kyle Meyer 2022-12-06 3:54 ` David Masterson 2022-12-07 11:43 ` Ihor Radchenko 2023-03-29 13:38 ` Ihor Radchenko 2 siblings, 1 reply; 25+ messages in thread From: Kyle Meyer @ 2022-12-03 4:18 UTC (permalink / raw) To: Bastien; +Cc: emacs-orgmode Bastien writes: > Kyle Meyer <kyle@kyleam.com> writes: [...] >> Every spot that calls org-assert-version is preceded by a line that >> requires org-macs, so isn't this error likely due to a mixed >> installation/load-path issue where the wrong/older org-macs is taking >> precedence? > > Yes: I thought `org-assert-version' job was to help catching mixed > installations, so my reasoning was that, even when an old org-macs > version has been loaded, autoloading `org-assert-version' would help > report about mixed installation. I see. So your goal isn't to resolve any errors due to mixed installation but instead to get the more informative error message from org-assert-version? I don't think autoloading will help because it will look in the org-macs file at the front of the load-path, and, in the bad case, that does not have the org-assert-version definition. Here's a minimal example: --8<---------------cut here---------------start------------->8--- #!/bin/sh set -eu tdir=$(mktemp -d "${TMPDIR:-/tmp}"/autoload-shadow-test-XXXXXXX) cd "$tdir" mkdir a cat<<'EOF' >a/foo.el (defun foo-do () (message "foo")) (provide 'foo) EOF mkdir b echo "(provide 'foo)" >b/foo.el cat<<'EOF' >test.el (add-to-list 'load-path (concat default-directory (file-name-as-directory "a"))) (add-to-list 'load-path (concat default-directory (file-name-as-directory "b"))) (autoload 'foo-do "foo") (foo-do) EOF emacs -Q --batch --load=test.el --8<---------------cut here---------------end--------------->8--- If I run that, I see: Debugger entered--Lisp error: (error "Autoloading file /tmp/autoload-shadow-test-gmlO35u...") (foo-do) load-with-code-conversion("/tmp/autoload-shadow-test-gmlO35u/test.el" "/tmp/autoload-shadow-test-gmlO35u/test.el" nil t) command-line-1(("--load=test.el")) command-line() normal-top-level() And commenting out the add-to-list call for b confirms that it works without the shadowing. > That said, do you have any idea how to fix the bug people encounter > when installing Org from ELPA and being bitten by "invalid-function > org-assert-version"? Sorry, I don't. Given a mixed installation where the org-macs at the front of load-path does _not_ have org-assert-version, I don't see a way to catch that. Not helpful at the moment, but I suppose the situation improves with time as Org versions that do not have org-assert-version become less abundant. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-03 4:18 ` Kyle Meyer @ 2022-12-06 3:54 ` David Masterson 2022-12-06 5:44 ` tomas 0 siblings, 1 reply; 25+ messages in thread From: David Masterson @ 2022-12-06 3:54 UTC (permalink / raw) To: Kyle Meyer; +Cc: Bastien, emacs-orgmode Kyle Meyer <kyle@kyleam.com> writes: > Bastien writes: > >> Kyle Meyer <kyle@kyleam.com> writes: > [...] > >>> Every spot that calls org-assert-version is preceded by a line that >>> requires org-macs, so isn't this error likely due to a mixed >>> installation/load-path issue where the wrong/older org-macs is taking >>> precedence? >> >> Yes: I thought `org-assert-version' job was to help catching mixed >> installations, so my reasoning was that, even when an old org-macs >> version has been loaded, autoloading `org-assert-version' would help >> report about mixed installation. > > I see. So your goal isn't to resolve any errors due to mixed > installation but instead to get the more informative error message from > org-assert-version? > > I don't think autoloading will help because it will look in the > org-macs file at the front of the load-path, and, in the bad case, that > does not have the org-assert-version definition. Question: which end of load-path is "front" if you look at load-path via describe-variable? It's been far too long since my days of Elisp hacking. Another typical use case is Org bundled with Emacs and you want to install a later version of Org via package-install. >> That said, do you have any idea how to fix the bug people encounter >> when installing Org from ELPA and being bitten by "invalid-function >> org-assert-version"? > > Sorry, I don't. Given a mixed installation where the org-macs at the > front of load-path does _not_ have org-assert-version, I don't see a way > to catch that. Not helpful at the moment, but I suppose the situation > improves with time as Org versions that do not have org-assert-version > become less abundant. Is Org the only thing that will call 'org-assert-version'? Then assume that a pre-built version of Emacs/Org is self-consistent. Then (perhaps?) patch an early spot in Org-9.6 to do: (if (and (featurep 'org) (< org-version 9.6)) (unload-feature 'org)) -- David Masterson ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-06 3:54 ` David Masterson @ 2022-12-06 5:44 ` tomas 2022-12-06 7:13 ` David Masterson 0 siblings, 1 reply; 25+ messages in thread From: tomas @ 2022-12-06 5:44 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 966 bytes --] On Mon, Dec 05, 2022 at 07:54:25PM -0800, David Masterson wrote: [...] > Question: which end of load-path is "front" if you look at load-path via > describe-variable? It's been far too long since my days of Elisp > hacking. This goes "left to right" when looking at it on a conventional display. The first hit "wins". My load path looks like this (well, a part of it, I don't want to bore everyone ;-) ( "~/.emacs.d/lisp" "/home/tomas/.emacs.d/elpa/geiser-0.10/" "/home/tomas/.emacs.d/elpa/geiser-0.10" "/home/tomas/.emacs.d/elpa/markdown-mode-2.1" ... "/usr/local/share/emacs/29.0.50/lisp/emacs-lisp" "/usr/local/share/emacs/29.0.50/lisp/cedet" ... ) meaning that Emacs first looks in my personal directories, then in the system local ones (I have a "locally" installed Emacs from the distribution's POV). The distribution's directories would go even later, were there any. Cheers -- t [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-06 5:44 ` tomas @ 2022-12-06 7:13 ` David Masterson 0 siblings, 0 replies; 25+ messages in thread From: David Masterson @ 2022-12-06 7:13 UTC (permalink / raw) To: tomas; +Cc: emacs-orgmode <tomas@tuxteam.de> writes: > On Mon, Dec 05, 2022 at 07:54:25PM -0800, David Masterson wrote: > >> Question: which end of load-path is "front" if you look at load-path via >> describe-variable? It's been far too long since my days of Elisp >> hacking. > > This goes "left to right" when looking at it on a conventional > display. The first hit "wins". So I did have it backwards. Hmm. > [...] > meaning that Emacs first looks in my personal directories, then > in the system local ones (I have a "locally" installed Emacs > from the distribution's POV). > > The distribution's directories would go even later, were there > any. But this is a matter of when things are added to load-path. If something from the distribution is loaded before you setup your load-path (before ,emacs), it gets very difficult to override it locally (somewhat by design). The load can also happen by dependency loads before you get to setting up your local (Org) package. I'll have to test when the distribution org is getting loaded. Thanks -- David Masterson ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-02 7:44 ` Bastien 2022-12-03 4:18 ` Kyle Meyer @ 2022-12-07 11:43 ` Ihor Radchenko 2022-12-07 14:08 ` Max Nikulin 2023-03-29 13:38 ` Ihor Radchenko 2 siblings, 1 reply; 25+ messages in thread From: Ihor Radchenko @ 2022-12-07 11:43 UTC (permalink / raw) To: Bastien; +Cc: Kyle Meyer, emacs-orgmode Bastien <bzg@gnu.org> writes: > That said, do you have any idea how to fix the bug people encounter > when installing Org from ELPA and being bitten by "invalid-function > org-assert-version"? I just asked Emacs devs as it does not look like we do anything wrong here. It is probably Emacs package.el doing something wrong. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882 That said, I find David Masterson's suggestion promising: (if (and (featurep 'org) (< org-version 9.6)) (unload-feature 'org)) We may force unloading the current Org version at the beginning of all the libraries. Another possibility could be (eval-when-compile (load-file "./org-macs.el")) instead of require. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-07 11:43 ` Ihor Radchenko @ 2022-12-07 14:08 ` Max Nikulin 0 siblings, 0 replies; 25+ messages in thread From: Max Nikulin @ 2022-12-07 14:08 UTC (permalink / raw) To: emacs-orgmode On 07/12/2022 18:43, Ihor Radchenko wrote: > That said, I find David Masterson's suggestion promising: > > (if (and (featurep 'org) (< org-version 9.6)) `version<'? Mixed install may be still a problem in the case of bug fix ("patch" component of the version) release. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-02 7:44 ` Bastien 2022-12-03 4:18 ` Kyle Meyer 2022-12-07 11:43 ` Ihor Radchenko @ 2023-03-29 13:38 ` Ihor Radchenko 2023-03-29 16:04 ` Max Nikulin 2 siblings, 1 reply; 25+ messages in thread From: Ihor Radchenko @ 2023-03-29 13:38 UTC (permalink / raw) To: Bastien; +Cc: Kyle Meyer, emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 867 bytes --] Bastien <bzg@gnu.org> writes: > That said, do you have any idea how to fix the bug people encounter > when installing Org from ELPA and being bitten by "invalid-function > org-assert-version"? Even though we identified that the problem is related to a combination of old Emacs version and OS-specific Emacs customization (https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882), no further progress is there on fixing the issue. Considering the mixed installation problem was less frequent compared to this new one, I suggest the attached workaround - simply not calling `org-assert-version' in Emacs <29, where built-in Org does not provide this macro. It should at least resolve the immediate pain for many people at the cost of possible mixed installation problems. Unless there are immediate concerns about the patch, I am going to install it soon onto bugfix. [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Work-around-org-assert-version-bug-on-older-Emacs.patch --] [-- Type: text/x-patch, Size: 44440 bytes --] From a4b25e0fc0844c48fd89cb76cc242fca08a66c02 Mon Sep 17 00:00:00 2001 Message-Id: <a4b25e0fc0844c48fd89cb76cc242fca08a66c02.1680096852.git.yantar92@posteo.net> From: Ihor Radchenko <yantar92@posteo.net> Date: Wed, 29 Mar 2023 15:27:50 +0200 Subject: [PATCH] Work around `org-assert-version' bug on older Emacs Do not use `org-assert-version' for Emacs builds where Org does not define this macro inside built-in Org. See Emacs bug#59882, where the problem is triggered by some unclear combination of OS-specific (at least Debian, Ubuntu, and Fedora) Emacs tweaks and built-in Org not definition `org-assert-version'. This is not a proper fix of the mixed installation problem that `org-assert-version' attempts to solve, but still better as `org-assert-version' triggers problems more consistently than mixed installation. --- lisp/ob-C.el | 3 ++- lisp/ob-R.el | 3 ++- lisp/ob-calc.el | 3 ++- lisp/ob-clojure.el | 3 ++- lisp/ob-comint.el | 3 ++- lisp/ob-core.el | 3 ++- lisp/ob-css.el | 3 ++- lisp/ob-ditaa.el | 3 ++- lisp/ob-dot.el | 3 ++- lisp/ob-emacs-lisp.el | 3 ++- lisp/ob-eshell.el | 3 ++- lisp/ob-eval.el | 3 ++- lisp/ob-exp.el | 3 ++- lisp/ob-forth.el | 3 ++- lisp/ob-fortran.el | 3 ++- lisp/ob-gnuplot.el | 3 ++- lisp/ob-groovy.el | 3 ++- lisp/ob-haskell.el | 3 ++- lisp/ob-java.el | 3 ++- lisp/ob-js.el | 3 ++- lisp/ob-julia.el | 3 ++- lisp/ob-latex.el | 3 ++- lisp/ob-lilypond.el | 3 ++- lisp/ob-lisp.el | 3 ++- lisp/ob-lob.el | 3 ++- lisp/ob-lua.el | 3 ++- lisp/ob-makefile.el | 3 ++- lisp/ob-matlab.el | 3 ++- lisp/ob-maxima.el | 3 ++- lisp/ob-ocaml.el | 3 ++- lisp/ob-octave.el | 3 ++- lisp/ob-org.el | 3 ++- lisp/ob-perl.el | 3 ++- lisp/ob-plantuml.el | 3 ++- lisp/ob-processing.el | 3 ++- lisp/ob-python.el | 3 ++- lisp/ob-ref.el | 3 ++- lisp/ob-ruby.el | 3 ++- lisp/ob-sass.el | 3 ++- lisp/ob-scheme.el | 3 ++- lisp/ob-screen.el | 3 ++- lisp/ob-sed.el | 3 ++- lisp/ob-shell.el | 3 ++- lisp/ob-sql.el | 3 ++- lisp/ob-sqlite.el | 3 ++- lisp/ob-table.el | 3 ++- lisp/ob-tangle.el | 3 ++- lisp/ob.el | 3 ++- lisp/oc-basic.el | 3 ++- lisp/oc-biblatex.el | 3 ++- lisp/oc-bibtex.el | 3 ++- lisp/oc-csl.el | 3 ++- lisp/oc-natbib.el | 3 ++- lisp/oc.el | 3 ++- lisp/ol-bbdb.el | 3 ++- lisp/ol-bibtex.el | 3 ++- lisp/ol-docview.el | 3 ++- lisp/ol-doi.el | 3 ++- lisp/ol-eshell.el | 3 ++- lisp/ol-eww.el | 3 ++- lisp/ol-gnus.el | 3 ++- lisp/ol-info.el | 3 ++- lisp/ol-irc.el | 3 ++- lisp/ol-man.el | 3 ++- lisp/ol-mhe.el | 3 ++- lisp/ol-rmail.el | 3 ++- lisp/ol-w3m.el | 3 ++- lisp/ol.el | 3 ++- lisp/org-agenda.el | 3 ++- lisp/org-archive.el | 3 ++- lisp/org-attach-git.el | 3 ++- lisp/org-attach.el | 3 ++- lisp/org-capture.el | 3 ++- lisp/org-clock.el | 3 ++- lisp/org-colview.el | 3 ++- lisp/org-crypt.el | 3 ++- lisp/org-ctags.el | 3 ++- lisp/org-cycle.el | 3 ++- lisp/org-datetree.el | 3 ++- lisp/org-duration.el | 3 ++- lisp/org-element.el | 3 ++- lisp/org-entities.el | 3 ++- lisp/org-faces.el | 3 ++- lisp/org-feed.el | 3 ++- lisp/org-fold-core.el | 3 ++- lisp/org-fold.el | 3 ++- lisp/org-footnote.el | 3 ++- lisp/org-goto.el | 3 ++- lisp/org-habit.el | 3 ++- lisp/org-id.el | 3 ++- lisp/org-indent.el | 3 ++- lisp/org-inlinetask.el | 3 ++- lisp/org-keys.el | 3 ++- lisp/org-lint.el | 3 ++- lisp/org-list.el | 3 ++- lisp/org-macro.el | 3 ++- lisp/org-mobile.el | 3 ++- lisp/org-mouse.el | 3 ++- lisp/org-num.el | 3 ++- lisp/org-pcomplete.el | 3 ++- lisp/org-persist.el | 3 ++- lisp/org-plot.el | 3 ++- lisp/org-protocol.el | 3 ++- lisp/org-refile.el | 3 ++- lisp/org-src.el | 3 ++- lisp/org-table.el | 3 ++- lisp/org-tempo.el | 3 ++- lisp/org-timer.el | 3 ++- lisp/org.el | 3 ++- lisp/ox-ascii.el | 3 ++- lisp/ox-beamer.el | 3 ++- lisp/ox-html.el | 3 ++- lisp/ox-icalendar.el | 3 ++- lisp/ox-koma-letter.el | 3 ++- lisp/ox-latex.el | 3 ++- lisp/ox-man.el | 3 ++- lisp/ox-md.el | 3 ++- lisp/ox-odt.el | 3 ++- lisp/ox-org.el | 3 ++- lisp/ox-publish.el | 3 ++- lisp/ox-texinfo.el | 3 ++- lisp/ox.el | 3 ++- 122 files changed, 244 insertions(+), 122 deletions(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index 3a6e99623..8ca9d68d3 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -34,7 +34,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cc-mode) (require 'ob) diff --git a/lisp/ob-R.el b/lisp/ob-R.el index 4ee091118..e7715c3da 100644 --- a/lisp/ob-R.el +++ b/lisp/ob-R.el @@ -30,7 +30,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ob) diff --git a/lisp/ob-calc.el b/lisp/ob-calc.el index 5572ce818..14e6f6e78 100644 --- a/lisp/ob-calc.el +++ b/lisp/ob-calc.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el index d993e0cb7..3082e2c55 100644 --- a/lisp/ob-clojure.el +++ b/lisp/ob-clojure.el @@ -47,7 +47,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-comint.el b/lisp/ob-comint.el index 54bf5127e..10034d467 100644 --- a/lisp/ob-comint.el +++ b/lisp/ob-comint.el @@ -32,7 +32,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob-core) (require 'org-compat) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 3f6696fce..7b41d8d5c 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -25,7 +25,8 @@ ;;; ob-core.el --- Working with Code Blocks -*- lexical-binding: t; -*- ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ob-eval) diff --git a/lisp/ob-css.el b/lisp/ob-css.el index f93c576fc..a4f5b4579 100644 --- a/lisp/ob-css.el +++ b/lisp/ob-css.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-ditaa.el b/lisp/ob-ditaa.el index 622000828..f054def8f 100644 --- a/lisp/ob-ditaa.el +++ b/lisp/ob-ditaa.el @@ -38,7 +38,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-compat) diff --git a/lisp/ob-dot.el b/lisp/ob-dot.el index ecef071a7..47acf6b4a 100644 --- a/lisp/ob-dot.el +++ b/lisp/ob-dot.el @@ -41,7 +41,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-emacs-lisp.el b/lisp/ob-emacs-lisp.el index f2111d649..ecbf4929e 100644 --- a/lisp/ob-emacs-lisp.el +++ b/lisp/ob-emacs-lisp.el @@ -28,7 +28,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob-core) diff --git a/lisp/ob-eshell.el b/lisp/ob-eshell.el index 95f5777ae..447d1f942 100644 --- a/lisp/ob-eshell.el +++ b/lisp/ob-eshell.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'eshell) diff --git a/lisp/ob-eval.el b/lisp/ob-eval.el index 07e530772..e8da607f9 100644 --- a/lisp/ob-eval.el +++ b/lisp/ob-eval.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (eval-when-compile (require 'subr-x)) ; For `string-empty-p', Emacs < 29 diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el index 4d1b084be..335ba1972 100644 --- a/lisp/ob-exp.el +++ b/lisp/ob-exp.el @@ -25,7 +25,8 @@ ;;; ob-exp.el --- Exportation of Babel Source Blocks -*- lexical-binding: t; -*- ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob-core) diff --git a/lisp/ob-forth.el b/lisp/ob-forth.el index e5dcad6d0..e63fbc0ed 100644 --- a/lisp/ob-forth.el +++ b/lisp/ob-forth.el @@ -34,7 +34,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-fortran.el b/lisp/ob-fortran.el index 2c050cb18..ed949ba23 100644 --- a/lisp/ob-fortran.el +++ b/lisp/ob-fortran.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-gnuplot.el b/lisp/ob-gnuplot.el index e3e42918c..f13358926 100644 --- a/lisp/ob-gnuplot.el +++ b/lisp/ob-gnuplot.el @@ -41,7 +41,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-groovy.el b/lisp/ob-groovy.el index c0da69fcb..df785ae0a 100644 --- a/lisp/ob-groovy.el +++ b/lisp/ob-groovy.el @@ -33,7 +33,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-haskell.el b/lisp/ob-haskell.el index 7185ed61f..bf931f1d4 100644 --- a/lisp/ob-haskell.el +++ b/lisp/ob-haskell.el @@ -41,7 +41,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-java.el b/lisp/ob-java.el index 893860526..5c66dbf15 100644 --- a/lisp/ob-java.el +++ b/lisp/ob-java.el @@ -30,7 +30,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-js.el b/lisp/ob-js.el index 910c11686..aaadd1ecf 100644 --- a/lisp/ob-js.el +++ b/lisp/ob-js.el @@ -40,7 +40,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el index cb5c7fa3b..06fe2a65d 100644 --- a/lisp/ob-julia.el +++ b/lisp/ob-julia.el @@ -33,7 +33,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ob) diff --git a/lisp/ob-latex.el b/lisp/ob-latex.el index ce39628d6..2cee7bfea 100644 --- a/lisp/ob-latex.el +++ b/lisp/ob-latex.el @@ -32,7 +32,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-lilypond.el b/lisp/ob-lilypond.el index 9693b89e2..1caba15ec 100644 --- a/lisp/ob-lilypond.el +++ b/lisp/ob-lilypond.el @@ -34,7 +34,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-lisp.el b/lisp/ob-lisp.el index 048ef883c..4f0b56826 100644 --- a/lisp/ob-lisp.el +++ b/lisp/ob-lisp.el @@ -38,7 +38,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-lob.el b/lisp/ob-lob.el index f77bda73d..2bcee3947 100644 --- a/lisp/ob-lob.el +++ b/lisp/ob-lob.el @@ -25,7 +25,8 @@ ;;; ob-lob.el --- Functions Supporting the Library of Babel -*- lexical-binding: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ob-core) diff --git a/lisp/ob-lua.el b/lisp/ob-lua.el index 81521d9e0..14c000e13 100644 --- a/lisp/ob-lua.el +++ b/lisp/ob-lua.el @@ -37,7 +37,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-makefile.el b/lisp/ob-makefile.el index 25306159b..f4a01eb34 100644 --- a/lisp/ob-makefile.el +++ b/lisp/ob-makefile.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-matlab.el b/lisp/ob-matlab.el index 43344495d..4ad76ab8f 100644 --- a/lisp/ob-matlab.el +++ b/lisp/ob-matlab.el @@ -37,7 +37,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'ob-octave) diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el index d1d7c7424..0815e92e5 100644 --- a/lisp/ob-maxima.el +++ b/lisp/ob-maxima.el @@ -33,7 +33,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-ocaml.el b/lisp/ob-ocaml.el index 09224b98b..d15afaa80 100644 --- a/lisp/ob-ocaml.el +++ b/lisp/ob-ocaml.el @@ -37,7 +37,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'comint) diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el index 1de263a52..3144a9780 100644 --- a/lisp/ob-octave.el +++ b/lisp/ob-octave.el @@ -31,7 +31,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-org.el b/lisp/ob-org.el index 1bf02b461..62d53107a 100644 --- a/lisp/ob-org.el +++ b/lisp/ob-org.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-perl.el b/lisp/ob-perl.el index c8cff5da5..4f1d72792 100644 --- a/lisp/ob-perl.el +++ b/lisp/ob-perl.el @@ -30,7 +30,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el index 3202c6e41..30760b2fd 100644 --- a/lisp/ob-plantuml.el +++ b/lisp/ob-plantuml.el @@ -36,7 +36,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-processing.el b/lisp/ob-processing.el index 4eeaf98e0..243784a26 100644 --- a/lisp/ob-processing.el +++ b/lisp/ob-processing.el @@ -53,7 +53,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'sha1) diff --git a/lisp/ob-python.el b/lisp/ob-python.el index c19af0ab3..142025fbe 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -30,7 +30,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-ref.el b/lisp/ob-ref.el index 2eae3690d..0cd7e71df 100644 --- a/lisp/ob-ref.el +++ b/lisp/ob-ref.el @@ -51,7 +51,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob-core) (require 'org-macs) diff --git a/lisp/ob-ruby.el b/lisp/ob-ruby.el index b94bc73dd..c43b80c1e 100644 --- a/lisp/ob-ruby.el +++ b/lisp/ob-ruby.el @@ -37,7 +37,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-sass.el b/lisp/ob-sass.el index 1498b931e..e2366c60b 100644 --- a/lisp/ob-sass.el +++ b/lisp/ob-sass.el @@ -40,7 +40,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-scheme.el b/lisp/ob-scheme.el index ef41a2ec4..6a7577e86 100644 --- a/lisp/ob-scheme.el +++ b/lisp/ob-scheme.el @@ -40,7 +40,8 @@ ;;; Requirements: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'geiser nil t) diff --git a/lisp/ob-screen.el b/lisp/ob-screen.el index 269538e79..0b75ccff1 100644 --- a/lisp/ob-screen.el +++ b/lisp/ob-screen.el @@ -36,7 +36,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-sed.el b/lisp/ob-sed.el index 6469901fd..92089717f 100644 --- a/lisp/ob-sed.el +++ b/lisp/ob-sed.el @@ -42,7 +42,8 @@ ;;; Usage: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-shell.el b/lisp/ob-shell.el index 2c30a2605..6875bf051 100644 --- a/lisp/ob-shell.el +++ b/lisp/ob-shell.el @@ -28,7 +28,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'org-macs) diff --git a/lisp/ob-sql.el b/lisp/ob-sql.el index f73e7003f..551273926 100644 --- a/lisp/ob-sql.el +++ b/lisp/ob-sql.el @@ -72,7 +72,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) diff --git a/lisp/ob-sqlite.el b/lisp/ob-sqlite.el index 526b73ebd..41a22fcf5 100644 --- a/lisp/ob-sqlite.el +++ b/lisp/ob-sqlite.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob) (require 'ob-sql) diff --git a/lisp/ob-table.el b/lisp/ob-table.el index 5c91f33f8..168517884 100644 --- a/lisp/ob-table.el +++ b/lisp/ob-table.el @@ -55,7 +55,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ob-core) (require 'org-macs) diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 27443fc2e..a1046c799 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -28,7 +28,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-src) diff --git a/lisp/ob.el b/lisp/ob.el index 4444ced58..23e651846 100644 --- a/lisp/ob.el +++ b/lisp/ob.el @@ -24,7 +24,8 @@ ;;; ob.el --- Working with Code Blocks in Org -*- lexical-binding: t; -*- ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'org-compat) diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el index 1c8c37aa9..62e93ebb8 100644 --- a/lisp/oc-basic.el +++ b/lisp/oc-basic.el @@ -67,7 +67,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'bibtex) (require 'json) diff --git a/lisp/oc-biblatex.el b/lisp/oc-biblatex.el index b2d31f0f6..1fe816a5d 100644 --- a/lisp/oc-biblatex.el +++ b/lisp/oc-biblatex.el @@ -64,7 +64,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'map) (require 'org-macs) diff --git a/lisp/oc-bibtex.el b/lisp/oc-bibtex.el index d5e5490ed..0bc9669c0 100644 --- a/lisp/oc-bibtex.el +++ b/lisp/oc-bibtex.el @@ -37,7 +37,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'oc) diff --git a/lisp/oc-csl.el b/lisp/oc-csl.el index 2b00cb599..85d5a15b5 100644 --- a/lisp/oc-csl.el +++ b/lisp/oc-csl.el @@ -113,7 +113,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'map) diff --git a/lisp/oc-natbib.el b/lisp/oc-natbib.el index 855be2a5c..791f29432 100644 --- a/lisp/oc-natbib.el +++ b/lisp/oc-natbib.el @@ -44,7 +44,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'oc) diff --git a/lisp/oc.el b/lisp/oc.el index 260a4d3e1..8919f6abd 100644 --- a/lisp/oc.el +++ b/lisp/oc.el @@ -62,7 +62,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-compat) (require 'org-macs) diff --git a/lisp/ol-bbdb.el b/lisp/ol-bbdb.el index 47bd9d98c..10d3285f6 100644 --- a/lisp/ol-bbdb.el +++ b/lisp/ol-bbdb.el @@ -94,7 +94,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-compat) diff --git a/lisp/ol-bibtex.el b/lisp/ol-bibtex.el index fd9517233..28fcba264 100644 --- a/lisp/ol-bibtex.el +++ b/lisp/ol-bibtex.el @@ -108,7 +108,8 @@ ;;; History: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'bibtex) (require 'cl-lib) diff --git a/lisp/ol-docview.el b/lisp/ol-docview.el index a9cd9b995..6428dfc05 100644 --- a/lisp/ol-docview.el +++ b/lisp/ol-docview.el @@ -43,7 +43,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'doc-view) (require 'ol) diff --git a/lisp/ol-doi.el b/lisp/ol-doi.el index 971b05087..676fd3388 100644 --- a/lisp/ol-doi.el +++ b/lisp/ol-doi.el @@ -27,7 +27,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ol) diff --git a/lisp/ol-eshell.el b/lisp/ol-eshell.el index b7d3baf38..97db1dbc0 100644 --- a/lisp/ol-eshell.el +++ b/lisp/ol-eshell.el @@ -24,7 +24,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'eshell) (require 'esh-mode) diff --git a/lisp/ol-eww.el b/lisp/ol-eww.el index ee970b6aa..cb52c2e24 100644 --- a/lisp/ol-eww.el +++ b/lisp/ol-eww.el @@ -46,7 +46,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ol) (require 'cl-lib) diff --git a/lisp/ol-gnus.el b/lisp/ol-gnus.el index 7c07ce045..42e1bc9e6 100644 --- a/lisp/ol-gnus.el +++ b/lisp/ol-gnus.el @@ -32,7 +32,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'gnus-sum) (require 'gnus-util) diff --git a/lisp/ol-info.el b/lisp/ol-info.el index ad9e4a12b..95e032479 100644 --- a/lisp/ol-info.el +++ b/lisp/ol-info.el @@ -31,7 +31,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ol) diff --git a/lisp/ol-irc.el b/lisp/ol-irc.el index 3760644e8..38de927b5 100644 --- a/lisp/ol-irc.el +++ b/lisp/ol-irc.el @@ -49,7 +49,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ol) diff --git a/lisp/ol-man.el b/lisp/ol-man.el index 40fdc8f92..fcf858331 100644 --- a/lisp/ol-man.el +++ b/lisp/ol-man.el @@ -25,7 +25,8 @@ ;;; ol-man.el --- Links to man pages -*- lexical-binding: t; -*- ;;; Commentary: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ol) diff --git a/lisp/ol-mhe.el b/lisp/ol-mhe.el index 403b5a254..0782afc29 100644 --- a/lisp/ol-mhe.el +++ b/lisp/ol-mhe.el @@ -31,7 +31,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'ol) diff --git a/lisp/ol-rmail.el b/lisp/ol-rmail.el index 287779828..a27797666 100644 --- a/lisp/ol-rmail.el +++ b/lisp/ol-rmail.el @@ -31,7 +31,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ol) diff --git a/lisp/ol-w3m.el b/lisp/ol-w3m.el index 6fb01a60d..3978f1f34 100644 --- a/lisp/ol-w3m.el +++ b/lisp/ol-w3m.el @@ -42,7 +42,8 @@ ;;; Acknowledgments: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ol) diff --git a/lisp/ol.el b/lisp/ol.el index 9ad191c8f..284df4c18 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -28,7 +28,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-compat) (require 'org-macs) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 2ec2f4c00..d9f9940d6 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -46,7 +46,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ol) diff --git a/lisp/org-archive.el b/lisp/org-archive.el index e74c59a51..b160f5a83 100644 --- a/lisp/org-archive.el +++ b/lisp/org-archive.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) (require 'cl-lib) diff --git a/lisp/org-attach-git.el b/lisp/org-attach-git.el index 4763aefd4..d0169bc3c 100644 --- a/lisp/org-attach-git.el +++ b/lisp/org-attach-git.el @@ -30,7 +30,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-attach) (require 'vc-git) diff --git a/lisp/org-attach.el b/lisp/org-attach.el index e8b27751e..3838d1bad 100644 --- a/lisp/org-attach.el +++ b/lisp/org-attach.el @@ -35,7 +35,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org) diff --git a/lisp/org-capture.el b/lisp/org-capture.el index a696c615b..52147a95b 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -48,7 +48,8 @@ ;;; TODO ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index f9daf3f14..657c4df09 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org) diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 92a3b473d..c8deead9e 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org) diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el index b5df115cf..f2a9e972a 100644 --- a/lisp/org-crypt.el +++ b/lisp/org-crypt.el @@ -55,7 +55,8 @@ ;;; Thanks: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'org-compat) diff --git a/lisp/org-ctags.el b/lisp/org-ctags.el index 5dd2bfd59..e29f09fce 100644 --- a/lisp/org-ctags.el +++ b/lisp/org-ctags.el @@ -136,7 +136,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (eval-when-compile (require 'cl-lib)) (require 'org) diff --git a/lisp/org-cycle.el b/lisp/org-cycle.el index 90fc95f41..bff572238 100644 --- a/lisp/org-cycle.el +++ b/lisp/org-cycle.el @@ -30,7 +30,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'org-fold) diff --git a/lisp/org-datetree.el b/lisp/org-datetree.el index 035ef047a..c1f469aec 100644 --- a/lisp/org-datetree.el +++ b/lisp/org-datetree.el @@ -31,7 +31,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) diff --git a/lisp/org-duration.el b/lisp/org-duration.el index 2919efd4c..3c91d7c3b 100644 --- a/lisp/org-duration.el +++ b/lisp/org-duration.el @@ -52,7 +52,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-macs) diff --git a/lisp/org-element.el b/lisp/org-element.el index 51729b3f3..df7c2298b 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -59,7 +59,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'avl-tree) (require 'ring) diff --git a/lisp/org-entities.el b/lisp/org-entities.el index 61083022b..3fc620d14 100644 --- a/lisp/org-entities.el +++ b/lisp/org-entities.el @@ -28,7 +28,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (declare-function org-mode "org" ()) (declare-function org-toggle-pretty-entities "org" ()) diff --git a/lisp/org-faces.el b/lisp/org-faces.el index 594c9a6e7..d0c5cba08 100644 --- a/lisp/org-faces.el +++ b/lisp/org-faces.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (defgroup org-faces nil "Faces in Org mode." diff --git a/lisp/org-feed.el b/lisp/org-feed.el index f0b294b4a..fe2e9a768 100644 --- a/lisp/org-feed.el +++ b/lisp/org-feed.el @@ -89,7 +89,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) (require 'sha1) diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el index 027ff9215..6ff8d8b2c 100644 --- a/lisp/org-fold-core.el +++ b/lisp/org-fold-core.el @@ -271,7 +271,8 @@ ;;; Performance considerations ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'org-compat) diff --git a/lisp/org-fold.el b/lisp/org-fold.el index 1b7ca22b0..b6239ff78 100644 --- a/lisp/org-fold.el +++ b/lisp/org-fold.el @@ -43,7 +43,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'org-fold-core) diff --git a/lisp/org-footnote.el b/lisp/org-footnote.el index 6bdd0b32f..935242844 100644 --- a/lisp/org-footnote.el +++ b/lisp/org-footnote.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) ;;;; Declarations diff --git a/lisp/org-goto.el b/lisp/org-goto.el index 00bf5d46a..9e06e3fab 100644 --- a/lisp/org-goto.el +++ b/lisp/org-goto.el @@ -23,7 +23,8 @@ ;;; org-goto.el --- Fast navigation in an Org buffer -*- lexical-binding: t; -* ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) (require 'org-refile) diff --git a/lisp/org-habit.el b/lisp/org-habit.el index fb6a48b5f..9ac2b2db2 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org) diff --git a/lisp/org-id.el b/lisp/org-id.el index 490e4ddee..0fdb0ee42 100644 --- a/lisp/org-id.el +++ b/lisp/org-id.el @@ -71,7 +71,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) (require 'org-refile) diff --git a/lisp/org-indent.el b/lisp/org-indent.el index fe5233878..569f02dcd 100644 --- a/lisp/org-indent.el +++ b/lisp/org-indent.el @@ -37,7 +37,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'org-compat) diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index cb7fdf88b..35d5bc5c5 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -79,7 +79,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) diff --git a/lisp/org-keys.el b/lisp/org-keys.el index 37a150bb7..553bf40cb 100644 --- a/lisp/org-keys.el +++ b/lisp/org-keys.el @@ -28,7 +28,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) diff --git a/lisp/org-lint.el b/lisp/org-lint.el index 0e2967b6c..397ac7b7d 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -86,7 +86,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ob) diff --git a/lisp/org-list.el b/lisp/org-list.el index 1fc99d070..1e35ad897 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -77,7 +77,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-macs) diff --git a/lisp/org-macro.el b/lisp/org-macro.el index 481e431c2..39900158b 100644 --- a/lisp/org-macro.el +++ b/lisp/org-macro.el @@ -48,7 +48,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-macs) diff --git a/lisp/org-mobile.el b/lisp/org-mobile.el index 01395a4b6..3e207c7ec 100644 --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -32,7 +32,8 @@ ;;; Commentary: ;; application that uses the same conventions could be used. (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org) diff --git a/lisp/org-mouse.el b/lisp/org-mouse.el index 3b2c4cba6..3afaa2879 100644 --- a/lisp/org-mouse.el +++ b/lisp/org-mouse.el @@ -137,7 +137,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) (require 'cl-lib) diff --git a/lisp/org-num.el b/lisp/org-num.el index cbe5e455e..47e60befe 100644 --- a/lisp/org-num.el +++ b/lisp/org-num.el @@ -62,7 +62,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-macs) diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el index 0567052c0..d8d9301f8 100644 --- a/lisp/org-pcomplete.el +++ b/lisp/org-pcomplete.el @@ -27,7 +27,8 @@ ;;; Code: ;;;; Require other packages (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-macs) (require 'org-compat) diff --git a/lisp/org-persist.el b/lisp/org-persist.el index 01078f459..90c611e70 100644 --- a/lisp/org-persist.el +++ b/lisp/org-persist.el @@ -150,7 +150,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org-compat) (require 'org-id) diff --git a/lisp/org-plot.el b/lisp/org-plot.el index fe61e9ace..248a6a9d3 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -32,7 +32,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 2b07a377e..2a95f5887 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -129,7 +129,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) (require 'ol) diff --git a/lisp/org-refile.el b/lisp/org-refile.el index 5a41c022f..a6d20a1a7 100644 --- a/lisp/org-refile.el +++ b/lisp/org-refile.el @@ -26,7 +26,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'org) diff --git a/lisp/org-src.el b/lisp/org-src.el index aadd8eba5..0296eca58 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -32,7 +32,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ob-comint) diff --git a/lisp/org-table.el b/lisp/org-table.el index 5116b1127..2aad9b850 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -35,7 +35,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-macs) diff --git a/lisp/org-tempo.el b/lisp/org-tempo.el index 81ec8fdcc..61dbca629 100644 --- a/lisp/org-tempo.el +++ b/lisp/org-tempo.el @@ -39,7 +39,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'tempo) (require 'cl-lib) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 919630e69..260ac550d 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -36,7 +36,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-clock) diff --git a/lisp/org.el b/lisp/org.el index af2cf93e2..394a9d044 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -72,7 +72,8 @@ (defvar org-inlinetask-min-level) ;;;; Require other packages (require 'org-compat) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) diff --git a/lisp/ox-ascii.el b/lisp/ox-ascii.el index 692dd216d..c59463d84 100644 --- a/lisp/ox-ascii.el +++ b/lisp/ox-ascii.el @@ -29,7 +29,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ox) (require 'ox-publish) diff --git a/lisp/ox-beamer.el b/lisp/ox-beamer.el index 689bf1559..72af13d80 100644 --- a/lisp/ox-beamer.el +++ b/lisp/ox-beamer.el @@ -31,7 +31,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ox-latex) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index b27254b8a..4af22ec1a 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -32,7 +32,8 @@ ;;; Code: ;;; Dependencies (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'format-spec) diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index 81a77a770..7419b9559 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -33,7 +33,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'org-agenda) diff --git a/lisp/ox-koma-letter.el b/lisp/ox-koma-letter.el index 33eb0597b..72d19ab2f 100644 --- a/lisp/ox-koma-letter.el +++ b/lisp/ox-koma-letter.el @@ -166,7 +166,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ox-latex) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 50a0950aa..134c8e417 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -28,7 +28,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ox) diff --git a/lisp/ox-man.el b/lisp/ox-man.el index bb716f7b9..3802f23a8 100644 --- a/lisp/ox-man.el +++ b/lisp/ox-man.el @@ -38,7 +38,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ox) diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 5be0ca22e..95fa40a8f 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -30,7 +30,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ox-html) diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el index cf217c9e7..b74d0c770 100644 --- a/lisp/ox-odt.el +++ b/lisp/ox-odt.el @@ -26,7 +26,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'format-spec) diff --git a/lisp/ox-org.el b/lisp/ox-org.el index ed72cf4f2..5d9655224 100644 --- a/lisp/ox-org.el +++ b/lisp/ox-org.el @@ -26,7 +26,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'ox) (declare-function htmlize-buffer "ext:htmlize" (&optional buffer)) diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index f9c3877d7..b751e144f 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -39,7 +39,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'format-spec) diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index f822f3d11..e13275806 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -27,7 +27,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ox) diff --git a/lisp/ox.el b/lisp/ox.el index 6f819def9..a5355f072 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -73,7 +73,8 @@ ;;; Commentary: ;;; Code: (require 'org-macs) -(org-assert-version) +(unless (version< emacs-version "29") + (org-assert-version)) (require 'cl-lib) (require 'ob-exp) -- 2.39.1 [-- Attachment #3: Type: text/plain, Size: 224 bytes --] -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply related [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-03-29 13:38 ` Ihor Radchenko @ 2023-03-29 16:04 ` Max Nikulin 2023-03-29 16:52 ` Ihor Radchenko 0 siblings, 1 reply; 25+ messages in thread From: Max Nikulin @ 2023-03-29 16:04 UTC (permalink / raw) To: emacs-orgmode On 29/03/2023 20:38, Ihor Radchenko wrote: > Even though we identified that the problem is related to a combination > of old Emacs version and OS-specific Emacs customization Ihor, who should notice improvement due to this patch? Is it related to Emacs-29.1 release? The issue is weird, but on the other hand I do not remember complains on the mailing list last months (besides some period close to the Org release). Sorry, I have not tried to compile Emacs myself and I am really puzzled why you was not able to reproduce the issue. So from my point of view it is unlikely related to distribution-specific configuration or patches. Changes related to `package--reload-previously-loaded` sound more reasonable for me. I am in doubts if emacs version should be checked or it should be e.g. (fboundp 'org-assert-version). Commit message: > tweaks and built-in Org not definition `org-assert-version'. Looks like a typo. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-03-29 16:04 ` Max Nikulin @ 2023-03-29 16:52 ` Ihor Radchenko 2023-04-01 14:44 ` Max Nikulin 2023-04-08 16:47 ` Max Nikulin 0 siblings, 2 replies; 25+ messages in thread From: Ihor Radchenko @ 2023-03-29 16:52 UTC (permalink / raw) To: Max Nikulin; +Cc: emacs-orgmode Max Nikulin <manikulin@gmail.com> writes: > On 29/03/2023 20:38, Ihor Radchenko wrote: >> Even though we identified that the problem is related to a combination >> of old Emacs version and OS-specific Emacs customization > > Ihor, who should notice improvement due to this patch? Is it related to > Emacs-29.1 release? The issue is weird, but on the other hand I do not > remember complains on the mailing list last months (besides some period > close to the Org release). > > Sorry, I have not tried to compile Emacs myself and I am really puzzled > why you was not able to reproduce the issue. So from my point of view it > is unlikely related to distribution-specific configuration or patches. > Changes related to `package--reload-previously-loaded` sound more > reasonable for me. I was able to reproduce on Debian using virtual machine. Also, several people were able to reproduce in Matrix when I asked them. And we got one report from Fedora user. + Several from Ubuntu users. Recently, there was also https://old.reddit.com/r/orgmode/comments/123qnqq/workaround_for_orgassertversion_problem_not/ It is natural that we are getting fewer reports away from the release, after most people upgraded Org. Now, most of the affected users are the new users trying to install Org after installing Emacs. These users are much less likely to report bugs. > I am in doubts if emacs version should be checked or it should be e.g. > (fboundp 'org-assert-version). It is indeed a cleaner approach. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-03-29 16:52 ` Ihor Radchenko @ 2023-04-01 14:44 ` Max Nikulin 2023-04-02 8:35 ` Ihor Radchenko 2023-04-08 16:47 ` Max Nikulin 1 sibling, 1 reply; 25+ messages in thread From: Max Nikulin @ 2023-04-01 14:44 UTC (permalink / raw) To: emacs-orgmode On 29/03/2023 23:52, Ihor Radchenko wrote: > Max Nikulin writes: >> Sorry, I have not tried to compile Emacs myself and I am really puzzled >> why you was not able to reproduce the issue. > > I was able to reproduce on Debian using virtual machine. To be precise, I am surprised that you are unable to reproduce the issue with older Emacs version compiled from source. > https://old.reddit.com/r/orgmode/comments/123qnqq/workaround_for_orgassertversion_problem_not/ I have no clue why your patch should help in this case. My hypothesis: the user has `use-package' org-roam in their init file. Attempt to update org caused compiling new org when old version is already loaded due to Emacs-27 does not contain fixes that reload package that is installed. Next time load of org failed because it is result of mixed version compilation. >> I am in doubts if emacs version should be checked or it should be e.g. >> (fboundp 'org-assert-version). > > It is indeed a cleaner approach. I am not sure. Perhaps it should be (or (fboundp 'org-assert-version) (new-package-management-code)). Since testing for private function is not a reliable solution, only version check is available. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-01 14:44 ` Max Nikulin @ 2023-04-02 8:35 ` Ihor Radchenko 2023-04-02 15:59 ` Max Nikulin 0 siblings, 1 reply; 25+ messages in thread From: Ihor Radchenko @ 2023-04-02 8:35 UTC (permalink / raw) To: Max Nikulin; +Cc: emacs-orgmode Max Nikulin <manikulin@gmail.com> writes: >> I was able to reproduce on Debian using virtual machine. > > To be precise, I am surprised that you are unable to reproduce the issue > with older Emacs version compiled from source. Does it mean that you are able to? I only tried on Gentoo, because my Debian-foo is not good enough to hunt all the required compile-time dependencies for Emacs. >> https://old.reddit.com/r/orgmode/comments/123qnqq/workaround_for_orgassertversion_problem_not/ > > I have no clue why your patch should help in this case. It won't, but the very reason that message appeared is the need to do that awkward workaround. It must not be needed - we are causing way too much inconvenience to users of Emacs versions we claim to support. >>> I am in doubts if emacs version should be checked or it should be e.g. >>> (fboundp 'org-assert-version). >> >> It is indeed a cleaner approach. > > I am not sure. Perhaps it should be (or (fboundp 'org-assert-version) > (new-package-management-code)). Since testing for private function is > not a reliable solution, only version check is available. May you elaborate? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-02 8:35 ` Ihor Radchenko @ 2023-04-02 15:59 ` Max Nikulin 2023-04-02 16:44 ` Ihor Radchenko 0 siblings, 1 reply; 25+ messages in thread From: Max Nikulin @ 2023-04-02 15:59 UTC (permalink / raw) To: emacs-orgmode On 02/04/2023 15:35, Ihor Radchenko wrote: >>> I was able to reproduce on Debian using virtual machine. >> >> To be precise, I am surprised that you are unable to reproduce the issue >> with older Emacs version compiled from source. > > Does it mean that you are able to? I reproduced the issue with packages available in Debian and Ubuntu, including -Q, so minimally affected by distribution-specific configuration, but I have not tried to compile Emacs myself. I am judging from changes in Emacs code made after release of version 28. > I only tried on Gentoo, because my Debian-foo is not good enough to hunt > all the required compile-time dependencies for Emacs. apt build-dep emacs and perhaps "apt install" for some …-dev packages for new features. However my surprise is namely dependence on specific packaging/distribution. My expectation that it should be reproducible in Gentoo as well. >>> https://old.reddit.com/r/orgmode/comments/123qnqq/workaround_for_orgassertversion_problem_not/ >> >> I have no clue why your patch should help in this case. > > It won't, but the very reason that message appeared is the need to do > that awkward workaround. It must not be needed - we are causing way too > much inconvenience to users of Emacs versions we claim to support. Either I missed your point or the issue will be just postponed. Patched variant will not prevent mixed version compilation, so users still may experience calls of undefined functions or incompatible argument types. >>>> I am in doubts if emacs version should be checked or it should be e.g. >>>> (fboundp 'org-assert-version). >>> >>> It is indeed a cleaner approach. >> >> I am not sure. Perhaps it should be (or (fboundp 'org-assert-version) >> (new-package-management-code)). Since testing for private function is >> not a reliable solution, only version check is available. > > May you elaborate? I do not think it is good idea to rely on (or (fboundp 'org-assert-version) (fboundp 'package--reload-previously-loaded)) I have not checked if some public function may be used for feature detection of code appeared in Emacs-29. That is why I would consider (when (or (fboundb 'org-assert-version) (version<= "29" emacs-version)) (org-assert-version)) However I am still in doubts if it is improvement in comparison to simple (org-assert-verions) without any conditions. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-02 15:59 ` Max Nikulin @ 2023-04-02 16:44 ` Ihor Radchenko 2023-04-04 12:08 ` Max Nikulin 0 siblings, 1 reply; 25+ messages in thread From: Ihor Radchenko @ 2023-04-02 16:44 UTC (permalink / raw) To: Max Nikulin; +Cc: emacs-orgmode Max Nikulin <manikulin@gmail.com> writes: >> Does it mean that you are able to? > > I reproduced the issue with packages available in Debian and Ubuntu, > including -Q, so minimally affected by distribution-specific > configuration, but I have not tried to compile Emacs myself. I am > judging from changes in Emacs code made after release of version 28. My attempts to reproduce with emacs -Q only worked on Debian. > apt build-dep emacs > > and perhaps "apt install" for some …-dev packages for new features. > However my surprise is namely dependence on specific > packaging/distribution. My expectation that it should be reproducible in > Gentoo as well. It is not, on my side. I tried multiple times. >> It won't, but the very reason that message appeared is the need to do >> that awkward workaround. It must not be needed - we are causing way too >> much inconvenience to users of Emacs versions we claim to support. > > Either I missed your point or the issue will be just postponed. Patched > variant will not prevent mixed version compilation, so users still may > experience calls of undefined functions or incompatible argument types. There are two issues here: 1. The old problem with mixed installation that manifests itself for some users 2. The new problem with org-assert-version, which appears to be even more frequent, despite trying preventing (1). So, we replace less frequent problem and more frequent, which is not useful. Better leave (1) as is until we support Emacs versions where org-assert-version does not cause issues. Of course, ideally we need to solve this issue with org-assert-version, but I see no good way. >>> I am not sure. Perhaps it should be (or (fboundp 'org-assert-version) >>> (new-package-management-code)). Since testing for private function is >>> not a reliable solution, only version check is available. >> >> May you elaborate? > > I do not think it is good idea to rely on > > (or (fboundp 'org-assert-version) > (fboundp 'package--reload-previously-loaded)) This is probably slightly better, but the gain appears to be marginal. We will still miss mixed installation caused by straight.el - much more frequent problem; and the reason I decided to write org-assert-version. > I have not checked if some public function may be used for feature > detection of code appeared in Emacs-29. That is why I would consider > > (when (or (fboundb 'org-assert-version) > (version<= "29" emacs-version)) > (org-assert-version)) > However I am still in doubts if it is improvement in comparison to > simple (org-assert-verions) without any conditions. This won't solve the problem I am trying to work around. Emacs 28 and Emacs 27 are what people use most, and it is where (on Debian) org-assert-version does not work with emacs -Q. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-02 16:44 ` Ihor Radchenko @ 2023-04-04 12:08 ` Max Nikulin 2023-04-04 13:29 ` Ihor Radchenko 0 siblings, 1 reply; 25+ messages in thread From: Max Nikulin @ 2023-04-04 12:08 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2692 bytes --] On 02/04/2023 23:44, Ihor Radchenko wrote: > 1. The old problem with mixed installation that manifests itself for > some users > 2. The new problem with org-assert-version, which appears to be even > more frequent, despite trying preventing (1). I leave decision up to you. My opinion that both cases are weird. With `org-assert-version' users become aware that Org is broken rather quickly, without it they have a time bomb that gives impression of bugs in Org. From my point of view the real issue is that in both cases error messages are not instructive. The downside of current implementation of `org-assert-version' is that Org does not work at all. The above is related to *mixed compilation*, attempt to compile when some files from old version is loaded. The result is that some files are compiled with old macro definitions, some files are not compiled at all. A different issue is *mixed load* when Org might be properly compiled, but at first some files from old version are loaded prior to adding the directory containing new version to load path. I am not familiar with straight.el. Ihor will you consider the issue as reproduced if I compile emacs from some tag in git repository on Debian or Ubuntu, not with provided binary packages? There are some funtoo LXC images, I never use it, so I have no idea how much time it will take to create build environment enough to build Emacs and how close it to Gentoo. Do you consider the following as similar to package install issue for Emacs < 29? See the attachment cd update-issue/ emacs -Q -l load-old-compile-new.el emacs -Q -l load-new.el ==> old/upissue.el <== (require 'upissue-macro) (defun upissue-example (x) x) (provide 'upissue) ==> old/upissue-macro.el <== (defun upissue-macro-example (x) x) (provide 'upissue-macro) ==> new/upissue.el <== (require 'upissue-macro) (upissue-macro-check) (defun upissue-example (x) x) (provide 'upissue) ==> new/upissue-macro.el <== (defmacro upissue-macro-check () (message "upissue-macro-check called")) (defun upissue-macro-example (x) x) (provide 'upissue-macro) ==> compile-new.el <== ;; Compile new version (add-to-list 'load-path (expand-file-name "new")) (byte-recompile-directory "new" 0 :force) ==> load-new.el <== ;; Load new version (setq debug-on-error t) (add-to-list 'load-path (expand-file-name "new")) (require 'upissue) ==> load-old-compile-new.el <== ;; Load old version (add-to-list 'load-path (expand-file-name "old")) (byte-recompile-directory "old" 0 :force) (kill-buffer "*Compile-Log*") (require 'upissue) ;; Compile new version (add-to-list 'load-path (expand-file-name "new")) (byte-recompile-directory "new" 0 :force) [-- Attachment #2: update-issue.tar.gz --] [-- Type: application/gzip, Size: 543 bytes --] ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-04 12:08 ` Max Nikulin @ 2023-04-04 13:29 ` Ihor Radchenko 2023-04-05 11:41 ` Max Nikulin 0 siblings, 1 reply; 25+ messages in thread From: Ihor Radchenko @ 2023-04-04 13:29 UTC (permalink / raw) To: Max Nikulin; +Cc: emacs-orgmode Max Nikulin <manikulin@gmail.com> writes: > On 02/04/2023 23:44, Ihor Radchenko wrote: >> 1. The old problem with mixed installation that manifests itself for >> some users >> 2. The new problem with org-assert-version, which appears to be even >> more frequent, despite trying preventing (1). > > I leave decision up to you. My opinion that both cases are weird. With > `org-assert-version' users become aware that Org is broken rather > quickly, without it they have a time bomb that gives impression of bugs > in Org. From my point of view the real issue is that in both cases error > messages are not instructive. The downside of current implementation of > `org-assert-version' is that Org does not work at all. I guess we might try to run a poll. My view on this bug is rather skewed as I saw it too many times. The true number of Org users affected may actually vary. > Ihor will you consider the issue as reproduced if I compile emacs from > some tag in git repository on Debian or Ubuntu, not with provided binary > packages? Sure. Anything Emacs devs can act on. If you can prove that the problem is in Emacs source code, we can report it in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882 and let Emacs devs fix things. Currently, it looks like Debian modifies certain aspects of Emacs loading. In such scenario, we cannot expect things to be fixed on Emacs side. > Do you consider the following as similar to package install issue for > Emacs < 29? See the attachment This looks like https://orgmode.org/list/jwvsfkv5s7l.fsf-monnier+emacs@gnu.org But Emacs >26 + package-install specifically arranges unloading the older version of the library. It should not suffer from this (in theory). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-04 13:29 ` Ihor Radchenko @ 2023-04-05 11:41 ` Max Nikulin 0 siblings, 0 replies; 25+ messages in thread From: Max Nikulin @ 2023-04-05 11:41 UTC (permalink / raw) To: emacs-orgmode Ihor, I am sorry, but I sent this message off-list at first. On 04/04/2023 20:29, Ihor Radchenko wrote: > > Sure. Anything Emacs devs can act on. If you can prove that the problem > is in Emacs source code, we can report it in > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882 and let Emacs devs > fix things. I do not expect any result that may be useful for Emacs dev. I hope, the code added to emacs-29 branch fixes the issue. Outcome may be helpful for choosing better variant of `org-assert-version' and for demystifying causes why you can not reproduce it in gentoo. > This looks like > https://orgmode.org/list/jwvsfkv5s7l.fsf-monnier+emacs@gnu.org I have not looked into make rules used in Emacs source tree, but I expect it is another issue. I do not like that elisp can not generate list of dependencies during compilation similar to "gcc -MD". Otherwise I do not see a way to implement incremental rebuild if stale .elc files are preferred to updated .el sources by `require'. > But Emacs >26 + package-install specifically arranges unloading the > older version of the library. What changes are you writing about? I mean `package--reload-previously-loaded' https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882#71 9dfd945a2c2 2021-11-07 01:28:47 +0100 dickmao: Fix byte compilation of package built-ins and I do not see similar changes even in Emacs-28. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-03-29 16:52 ` Ihor Radchenko 2023-04-01 14:44 ` Max Nikulin @ 2023-04-08 16:47 ` Max Nikulin 2023-04-09 8:29 ` Ihor Radchenko 1 sibling, 1 reply; 25+ messages in thread From: Max Nikulin @ 2023-04-08 16:47 UTC (permalink / raw) To: emacs-orgmode On 29/03/2023 23:52, Ihor Radchenko wrote: > I was able to reproduce on Debian using virtual machine. > Also, several people were able to reproduce in Matrix when I asked them. > And we got one report from Fedora user. + Several from Ubuntu users. > Recently, there was also > https://old.reddit.com/r/orgmode/comments/123qnqq/workaround_for_orgassertversion_problem_not/ I would consider adding to ELPA README and Org manual something like: If compiling of ELPA packages causes a lot of warnings related to `org-assert-version' then delete just installed Org package, start new Emacs session ensuring that Org is not loaded (-q?) and try to install from such clean state. I never expected that result of compiling may depend on whether the directory with built-in Org contains besides .elc files gzipped sources .el.gz (as after make install) or original .el files. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59882#134 (sorry, I sent this message without Cc to emacs-orgmode.) ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-08 16:47 ` Max Nikulin @ 2023-04-09 8:29 ` Ihor Radchenko 2023-04-10 6:13 ` Max Nikulin 0 siblings, 1 reply; 25+ messages in thread From: Ihor Radchenko @ 2023-04-09 8:29 UTC (permalink / raw) To: Max Nikulin; +Cc: emacs-orgmode Max Nikulin <manikulin@gmail.com> writes: > I would consider adding to ELPA README and Org manual something like: > > If compiling of ELPA packages causes a lot of warnings related to > `org-assert-version' then delete just installed Org package, start new > Emacs session ensuring that Org is not loaded (-q?) and try to install > from such clean state. What about creating org-assert-version.el file that will contain something like (if (fboundp 'org-assert-version) (org-assert-version) (warn "<workaround for compilation>")) Then, instead of (org-assert-version) call, we can put (load "org-assert-version.el") in Org libraries. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-09 8:29 ` Ihor Radchenko @ 2023-04-10 6:13 ` Max Nikulin 2023-04-10 16:58 ` Ihor Radchenko 0 siblings, 1 reply; 25+ messages in thread From: Max Nikulin @ 2023-04-10 6:13 UTC (permalink / raw) To: emacs-orgmode On 09/04/2023 15:29, Ihor Radchenko wrote: > Max Nikulin writes: > >> I would consider adding to ELPA README and Org manual something like: >> >> If compiling of ELPA packages causes a lot of warnings related to >> `org-assert-version' then delete just installed Org package, start new >> Emacs session ensuring that Org is not loaded (-q?) and try to install >> from such clean state. > > What about creating org-assert-version.el file that will contain > something like > > (if (fboundp 'org-assert-version) > (org-assert-version) > (warn "<workaround for compilation>")) > > Then, instead of (org-assert-version) call, we can put > (load "org-assert-version.el") in Org libraries. I believed that the only way to make `org-assert-version' effective is to put org version in every Org compiled .elc file, so you suggestion makes version check useless. An earlier idea was to put `org-assert-version' *definition* to a separate file keeping call in each file as one time workaround to ensure that `org-assert-version' is defined while compiling when an older Org version is loaded to Emacs < 29. Currently I do not understand: - Why presence of .el files in the same directory (old Org version) with .elc files affects result of compilation (at least for Emacs-28)? - Why even when the `org-assert-version' macro is defined, an error is signaled on attempt to load a compiled file with unexpanded (org-assert-version) call (a file compiled with warning "the function ‘org-assert-version’ is not known")? Unfortunately I did not bookmarked discussions containing details related to straight.el issues, so I am unsure if the problems are the same as for installing from ELPA by package.el. ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-10 6:13 ` Max Nikulin @ 2023-04-10 16:58 ` Ihor Radchenko 2023-06-04 10:58 ` Max Nikulin 0 siblings, 1 reply; 25+ messages in thread From: Ihor Radchenko @ 2023-04-10 16:58 UTC (permalink / raw) To: Max Nikulin; +Cc: emacs-orgmode Max Nikulin <manikulin@gmail.com> writes: >> What about creating org-assert-version.el file that will contain >> something like >> >> (if (fboundp 'org-assert-version) >> (org-assert-version) >> (warn "<workaround for compilation>")) >> >> Then, instead of (org-assert-version) call, we can put >> (load "org-assert-version.el") in Org libraries. > > I believed that the only way to make `org-assert-version' effective is > to put org version in every Org compiled .elc file, so you suggestion > makes version check useless. Hmm. Not completely useless - it will still effectively compare between Org version in org-version.el and org-assert-version.el. But indeed less accurate. > An earlier idea was to put > `org-assert-version' *definition* to a separate file keeping call in > each file as one time workaround to ensure that `org-assert-version' is > defined while compiling when an older Org version is loaded to Emacs < 29. Does it solve the problem with "make install" on Debian? > Currently I do not understand: > - Why presence of .el files in the same directory (old Org version) with > .elc files affects result of compilation (at least for Emacs-28)? I may be missing your point, but `load-prefer-newer' maybe? > - Why even when the `org-assert-version' macro is defined, an error is > signaled on attempt to load a compiled file with unexpanded > (org-assert-version) call (a file compiled with warning "the function > ‘org-assert-version’ is not known")? This is because `org-assert-version' was not defined in Emacs during compile time. During compilation, Emacs produces byte code calling a function. AFAIU, the byte code is equivalent to (funcall #'org-assert-version), which fails with error (try it with M-:). > Unfortunately I did not bookmarked discussions containing details > related to straight.el issues, so I am unsure if the problems are the > same as for installing from ELPA by package.el. straight.el has a special arrangement for compiling Org. See https://github.com/radian-software/straight.el/blob/master/straight.el#L3133 Basically, it spawns a child Emacs process and thus does not struggle with mixed compilation state. (I am not 100% sure about the "make install" issue you encountered). The main issue with straight.el is its design - straight.el has no equivalent of `package-selected-packages' and instead loads the packages as they appear in the init.el. It is a problem when some statement has (require 'org) early in the config, before straight sets up the newer Org version. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92> ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2023-04-10 16:58 ` Ihor Radchenko @ 2023-06-04 10:58 ` Max Nikulin 0 siblings, 0 replies; 25+ messages in thread From: Max Nikulin @ 2023-06-04 10:58 UTC (permalink / raw) To: emacs-orgmode On 10/04/2023 23:58, Ihor Radchenko wrote: > Max Nikulin writes: >> Currently I do not understand: >> - Why presence of .el files in the same directory (old Org version) with >> .elc files affects result of compilation (at least for Emacs-28)? > > I may be missing your point, but `load-prefer-newer' maybe? I mean installing ELPA Org package to Emacs < 29 when another Org version is loaded. The result is different when Emacs is running from source tree (raw org .el sources are available) or from install tree (lisp files are compressed to .el.gz). In the former case Org is compiled correctly. In the latter case compressed sources causes mixed-compilation issue with following failures to load Org. I think, it is a reason why you were unable to reproduce mixed-compilation issue on Gentoo. The following commit https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9dfd945a2c2 Fix byte compilation of package built-ins https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49708 (no discussion in the bug report) introduced `package--reload-previously-loaded` instead of `package--reload-previously-loaded` and `package--list-loaded-files' (A side note. I missed a public function that reloads subset of files from a given directory that are present in `load-path' to use it in `org-reload'). `package--list-of-conflicts' had a couple of bugs: 1. Looking up for loaded earlier files, composition of `file-name-sans-extension` and `find-library-name' strips just `.gz', not `.el.gz' thus comparing e.g. '/<path>/org.el' (.gz stripped) and '/<path>/org' (.elc stripped). As a result new .el Org files are not reloaded over Org .elc files from an older version. 2. A debian-specific issue when elpa-org deb package is installed: ls -l /usr/share/emacs/site-lisp/elpa/org-9.3.1/org.* lrwxrwxrwx 1 root root 53 Jan 29 2021 /usr/share/emacs/site-lisp/elpa/org-9.3.1/org.el -> /usr/share/emacs/site-lisp/elpa-src/org-9.3.1//org.el -rw-r--r-- 1 root root 710150 Jan 29 2021 /usr/share/emacs/site-lisp/elpa/org-9.3.1/org.elc Notice that .el files are symlinks to another directory. Due to `file-truename' in `package--list-of-conflicts' .el files are not reloaded because full paths are compared. So prior to version 29, Emacs had code that is intended to reload earlier loaded files when ELPA package is installed, but it was buggy. It seems both issues are fixed in new `package--reload-previously-loaded'. Now I understand what happens, but I have not figure out what is the best strategy to prevent failures. Of course, it should be clearly stated in the manual and in the README that Org should not be loaded yet when `package-install' is called. >> - Why even when the `org-assert-version' macro is defined, an error is >> signaled on attempt to load a compiled file with unexpanded >> (org-assert-version) call (a file compiled with warning "the function >> ‘org-assert-version’ is not known")? > > This is because `org-assert-version' was not defined in Emacs during > compile time. During compilation, Emacs produces byte code calling a > function. AFAIU, the byte code is equivalent to > (funcall #'org-assert-version), which fails with error (try it with M-:). You are right. I did not realized that actually 2 kinds of errors happens: - Invalid function: org-assert-version - Symbol’s function definition is void: org-assert-version (and compile Warning: the function ‘org-assert-version’ is not known to be defined. "void"/"not known" happens when old org-macs.el is loaded. "Invalid function" is the sign of mixed compilation. `org-assert-version' is defined, but it is a macro, so can not be called during loading of an .elc file since it was not expanded during compilation. So `fboundp' is not the correct way to generate meaningful message during loading result of mixed compilation. `macrop' is more selective (and `functionp' as well). Relevant section of the elisp manual - (info "(elisp) Function Cells") - (info "(elisp) Calling Functions") - (info "(elisp) What Is a Function") ^ permalink raw reply [flat|nested] 25+ messages in thread
* Re: [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el 2022-12-02 3:38 ` Kyle Meyer 2022-12-02 7:44 ` Bastien @ 2022-12-06 3:00 ` David Masterson 1 sibling, 0 replies; 25+ messages in thread From: David Masterson @ 2022-12-06 3:00 UTC (permalink / raw) To: Kyle Meyer; +Cc: Bastien, emacs-orgmode Kyle Meyer <kyle@kyleam.com> writes: > Bastien writes: > >> Some users reported an (invalid-function org-assert-version) error >> when installing Org from ELPA: >> >> https://lists.sr.ht/~bzg/emacsfr/%3Cd091463e1615422eb00070727d6a094ec0ae3c73.camel%40adocentyn.io%3E >> https://www.reddit.com/r/emacs/comments/z7qulo/comment/iyd9vam/?context=3 >> >> This patch autoloads `org-assert-version'. > > I don't understand the rationale behind this. Every spot that calls > org-assert-version is preceded by a line that requires org-macs, so > isn't this error likely due to a mixed installation/load-path issue > where the wrong/older org-macs is taking precedence? Bingo! This sounds like my problem -- installing/loading org-9.6 when org-9.3 was already loaded by the startup process (Debian pre-built Emacs 27.1) results in errors related to 'org=assert-version'. >> It also removes the ;; generated-autoload-file: "org-loaddefs.el" >> footer in all files and let Make create org-autoloads.el instead. > > I'm worried with how this will play with the Org bundled with Emacs. It doesn't play in my case. -- David Masterson ^ permalink raw reply [flat|nested] 25+ messages in thread
end of thread, other threads:[~2023-06-04 10:59 UTC | newest] Thread overview: 25+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-12-01 7:26 [PATCH] Autoload `org-assert-version' and remove org-loaddefs.el Bastien 2022-12-02 3:38 ` Kyle Meyer 2022-12-02 7:44 ` Bastien 2022-12-03 4:18 ` Kyle Meyer 2022-12-06 3:54 ` David Masterson 2022-12-06 5:44 ` tomas 2022-12-06 7:13 ` David Masterson 2022-12-07 11:43 ` Ihor Radchenko 2022-12-07 14:08 ` Max Nikulin 2023-03-29 13:38 ` Ihor Radchenko 2023-03-29 16:04 ` Max Nikulin 2023-03-29 16:52 ` Ihor Radchenko 2023-04-01 14:44 ` Max Nikulin 2023-04-02 8:35 ` Ihor Radchenko 2023-04-02 15:59 ` Max Nikulin 2023-04-02 16:44 ` Ihor Radchenko 2023-04-04 12:08 ` Max Nikulin 2023-04-04 13:29 ` Ihor Radchenko 2023-04-05 11:41 ` Max Nikulin 2023-04-08 16:47 ` Max Nikulin 2023-04-09 8:29 ` Ihor Radchenko 2023-04-10 6:13 ` Max Nikulin 2023-04-10 16:58 ` Ihor Radchenko 2023-06-04 10:58 ` Max Nikulin 2022-12-06 3:00 ` David Masterson
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).