org-mode/lisp
Max Nikulin deb1517fe9
org-macs.el: Do not compare wall time and file modification time
* lisp/org-macs.el (org-file-newer-than-p): Recommend passing file
modification time instead of wall time to avoid truncation of timestamp
precision for the sake of filesystems with coarse time resolution.
(org-compile-file): Store file modification time instead of system clock
for later comparison by `org-file-newer-than-p'.
* lisp/org.el (org-babel-load-file): Use `file-newer-than-file-p'
instead of `org-file-newer-than-p' since the former is more suitable
for target-prerequisite relation in the case of equal timestamps.
Improve error reporting when source file does not exist.
Update timestamp after tangling of an org file, not before it.

This is assumed to be a better fix of the problem with change of time
representation in Emacs-29. The problem was reported by Mark Barton
<mbarton98@gmail.com> in
https://list.orgmode.org/BF5B9308-3FEF-4DC6-98C9-BFF36F19D36C@gmail.com
Paul Eggert <eggert@cs.ucla.edu> committed another variant to Emacs
as 3abb3681b5.  It was ported to Org as commit 56ba22b9df several months
later.

Unchanged timestamp of a file means failure of `org-compile-file' but in
`org-babel-load-file' the target may be considered as up to date if its
timestamp is equal to the one for the prerequisite.
So `org-file-newer-than-p' is not suitable for both cases.  The
difference matters for filesystems with coarse timestamp resolution, for
example HFS+.

Earlier call of `org-babel-load-file' for a non-existing .org file
caused "Bad bounding indices: 0, 2" error.

Update file timestamp (introduced by the commit 1525a5a64e)
after tangling of the file.  Change caused by conflict resolution during
rebasing of the initial version of the patch.  See
https://list.orgmode.org/t75efi$9pv$1@ciao.gmane.io for an argument
in support of such change.
2022-10-21 11:22:34 +08:00
..
Makefile Move link-related core functions out of "org.el" 2019-03-10 18:00:27 +01:00
ob-C.el ob-C: do not swallow double quotes on raw output 2022-09-27 16:20:57 +02:00
ob-R.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-awk.el Begin messages about executing code blocks with a capital letter 2022-10-07 13:51:35 +08:00
ob-calc.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-clojure.el lisp/ob-clojure.el: Fix :backend override not work with `org-babel-clojure-backend' 2022-10-13 10:51:19 +08:00
ob-comint.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
ob-core.el org-babel-get-src-block-info: Rename light argument 2022-10-19 14:55:53 +08:00
ob-css.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-ditaa.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-dot.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-emacs-lisp.el ob-emacs-lisp: Don't print arguments of post-process arguments to stdout 2022-10-07 13:50:21 +08:00
ob-eshell.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-eval.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-exp.el org-babel-lob-get-info: Add no-eval argument 2022-10-19 14:55:52 +08:00
ob-forth.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-fortran.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-gnuplot.el org-babel: Fix usage of `org-babel-temporary-directory' 2022-10-09 12:30:00 +08:00
ob-groovy.el Begin messages about executing code blocks with a capital letter 2022-10-07 13:51:35 +08:00
ob-haskell.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-java.el org-babel: Fix usage of `org-babel-temporary-directory' 2022-10-09 12:30:00 +08:00
ob-js.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-julia.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-latex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-lilypond.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
ob-lisp.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-lob.el org-babel-get-src-block-info: Rename light argument 2022-10-19 14:55:53 +08:00
ob-lua.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-makefile.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-matlab.el Merge branch 'km/from-emacs-master' 2022-10-16 17:43:29 -04:00
ob-maxima.el Begin messages about executing code blocks with a capital letter 2022-10-07 13:51:35 +08:00
ob-ocaml.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-octave.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
ob-org.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-perl.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-plantuml.el Merge branch 'km/from-emacs-master' 2022-10-16 17:43:29 -04:00
ob-processing.el org-babel: Fix usage of `org-babel-temporary-directory' 2022-10-09 12:30:00 +08:00
ob-python.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-ref.el org-babel-lob-get-info: Add no-eval argument 2022-10-19 14:55:52 +08:00
ob-ruby.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-sass.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-scheme.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-screen.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-sed.el Begin messages about executing code blocks with a capital letter 2022-10-07 13:51:35 +08:00
ob-shell.el ob-shell: Use `process-file' when stdin or cmdline 2022-09-05 18:31:39 +08:00
ob-sql.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-sqlite.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-table.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ob-tangle.el org-babel-get-src-block-info: Rename light argument 2022-10-19 14:55:53 +08:00
ob.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-basic.el Backport commit 48aacbf29 from Emacs 2022-10-04 17:18:04 -04:00
oc-biblatex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-bibtex.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-csl.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc-natbib.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
oc.el org-cite-insert: Allow citations at the beginning of empty heading 2022-10-20 11:22:05 +08:00
ol-bbdb.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-bibtex.el Fix Emacs 29 compiler warnings 2022-09-06 20:50:59 +08:00
ol-docview.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-doi.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
ol-eshell.el ol-eshell: Make recently ported change compatible with Emacs < 29 2022-10-04 18:38:25 -04:00
ol-eww.el Backport commit cc8b6101f from Emacs 2022-10-04 17:10:50 -04:00
ol-gnus.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-info.el ol-info: Use org function instead of subr-x 2022-09-05 14:33:32 +08:00
ol-irc.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
ol-man.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
ol-mhe.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-rmail.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ol-w3m.el Backport commit cc8b6101f from Emacs 2022-10-04 17:10:50 -04:00
ol.el org-store-link: Fix for sticky agenda buffers 2022-10-16 16:22:38 +08:00
org-agenda.el agenda: Clean up spacing to pass Emacs's pre-commit check 2022-10-16 17:45:57 -04:00
org-archive.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-attach-git.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-attach.el lisp/ox.el: Rename abnormal hook names to end with "-functions" 2022-09-06 21:42:11 +08:00
org-capture.el org-capture: Add template hook properties 2022-10-07 13:38:52 +08:00
org-clock.el org-clock.el: resolve running clock after being idle only once 2022-10-16 13:13:26 +08:00
org-colview.el Backport commit 8ef37913d from Emacs 2022-10-04 16:59:15 -04:00
org-compat.el compat: Load subr-x for Emacs < 28 compatibility 2022-10-08 01:40:07 -04:00
org-crypt.el org-crypt-key-for-heading: Handle CRYPTKEY nil value 2022-10-14 10:16:47 +08:00
org-ctags.el Merge branch 'km/from-emacs-master' 2022-10-16 17:43:29 -04:00
org-cycle.el org-cycle-set-visibility-according-to-property: Do not change ancestor visibility 2022-10-12 13:47:41 +08:00
org-datetree.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-duration.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-element.el lisp/org-element: Add a parameters-line property to special blocks 2022-10-20 17:39:55 +08:00
org-entities.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-faces.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-feed.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
org-fold-core.el Clean up spacing to pass Emacs's pre-commit check 2022-10-03 17:57:03 -04:00
org-fold.el org-fold-hide-entry: Fix on empty heading with a child. 2022-10-17 21:04:31 +08:00
org-footnote.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-goto.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-habit.el Backport commit b7e867b84 from Emacs 2022-10-04 17:18:04 -04:00
org-id.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
org-indent.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-inlinetask.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
org-keys.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-lint.el compat: Use org- wrapper for string-equal-ignore-case compatibility 2022-10-04 18:38:25 -04:00
org-list.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
org-macro.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
org-macs.el org-macs.el: Do not compare wall time and file modification time 2022-10-21 11:22:34 +08:00
org-mobile.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
org-mouse.el org-mouse: Make recently ported change compatible with Emacs < 29 2022-10-04 18:38:25 -04:00
org-num.el org-num-mode: Clear remaining num overlays before activation 2022-10-20 12:50:41 +08:00
org-pcomplete.el org-babel-get-src-block-info: Rename light argument 2022-10-19 14:55:53 +08:00
org-persist.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-plot.el Merge branch 'km/from-emacs-master' 2022-10-04 18:37:42 -04:00
org-protocol.el Merge branch 'km/from-emacs-master' 2022-10-16 17:43:29 -04:00
org-refile.el compat: Add compatibility wrapper for format-prompt 2022-10-04 18:38:25 -04:00
org-src.el org-babel-get-src-block-info: Rename light argument 2022-10-19 14:55:53 +08:00
org-table.el org-export: Suppress cache persistence in buffer copies during export 2022-10-07 13:15:17 +08:00
org-tempo.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org-timer.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
org.el org-macs.el: Do not compare wall time and file modification time 2022-10-21 11:22:34 +08:00
ox-ascii.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-beamer.el ox-latex: Remove unused argument 2022-09-17 18:29:55 +08:00
ox-html.el org-export-with-buffer-copy: Allow safe reusable buffer copy 2022-10-10 17:36:10 +08:00
ox-icalendar.el ox-icalendar: Fix time zone construct from recently ported commit 2022-10-04 18:38:25 -04:00
ox-koma-letter.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-latex.el ox-latex: Allow markup objects inside %D spec 2022-10-20 12:19:09 +08:00
ox-man.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-md.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-odt.el ox-odt: Allow id: links to files 2022-10-19 18:33:44 +08:00
ox-org.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-publish.el Assert all the Org files to load the same Org version 2022-09-04 12:24:55 +08:00
ox-texinfo.el ox-texinfo: Include LaTeX in Texinfo exports 2022-09-21 15:29:50 +08:00
ox.el org-export-with-buffer-copy: Allow safe reusable buffer copy 2022-10-10 17:36:10 +08:00