org-mode/lisp
Ihor Radchenko 1260f61830
Refactor org-element API for abstract syntax tree
Major changes:
1. Property values can now deferred and computed next time when the
   value is requested.
2. Some properties are stored in an array instead of plist.  The
   functions are inlined to turn the propery queries into direct
   `aref' and `aset' calls to the plist, when applicable.
3. Secondary strings are now considered of `anonymous' type, in
   backwards-compatible way.
4. New functions to map over and/or resolve deferred values of element
   properties.
5. Docstrings and code consistently use "node" for generic syntax tree
   elements, to not confuse the element/object terminology we use in
   the parser.

* lisp/org-element-ast.el (org-element-deferred): New type user to
store deferred values.
(org-element--deferred-resolve-once):
(org-element--deferred-resolve):
(org-element--deferred-resolve-force):
(org-element--deferred-resolve-list): Helper functions used to resolve
the deferred values.
(org-element--standard-properties):
(org-element--standard-properties-idxs):
(org-element--property-idx):
(org-element--parray):
(org-element--plist-property): Store most commonly used properties in
vector for faster access.  Implement inliner helpers to transform
property keywords into array indices.
(org-element-property-1): New function to retrieve property without
resolving deferred value.
(org-element--put-parray):
(org-element-put-property): Refactor, using the new property vector
when applicable.
(org-element--property): New helper function.
(org-element-property): Refactor, using the new property vector and
deferred value resolution.  Add new optional arguments DFLT and
FORCE-UNDEFER.  Define setters.
(org-element-set-contents): Handle anonymous nodes.
(org-element-set):
(org-element-adopt):
(org-element-extract): Rename from `org-element-set-elements',
`org-element-adopt-elements', and `org-element-extract-elements' and
keep backward-compatible alias.  This is to reduce the confusion about
"node" vs. "element" vs. "object".
(org-element-create): Initialize property array correctly.
(org-element-copy): Allow copying secondary strings.  Add new optional
argument KEEP-CONTENTS.
(org-element-lineage): Clarify the limitation when cache is disabled.
(org-element-type): New optional argument to identify anonymous nodes
instead of returning nil for both anonymous nodes and everything not
matching other element types.
2023-07-01 14:35:17 +03:00
..
Makefile * lisp/Makefile: Remove references to org-contrib 2023-03-16 13:34:34 +01:00
ob-awk.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-C.el lisp/ob-C.el: replace %f with %s to prevent unneeded rounding 2023-06-02 10:23:58 +03:00
ob-calc.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-clojure.el ob-clojure.el: Reword docstring for ob-clojure-eval-with-cider 2023-03-23 13:25:15 +01:00
ob-comint.el org-babel-comint-with-output: Fix edge case for partial prompts 2023-04-02 12:15:10 +02:00
ob-core.el fixup! org-babel-common-header-args-w-values: Add docstring 2023-05-03 19:51:33 +02:00
ob-css.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-ditaa.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-dot.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-emacs-lisp.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-eshell.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-eval.el org-babel-eval: Clarify the purpose of 4a751709b in code 2023-02-01 15:03:50 +03:00
ob-exp.el org-export: Display warning when code block results cannot be computed 2023-04-02 17:04:43 +02:00
ob-forth.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ob-fortran.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-gnuplot.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ob-groovy.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-haskell.el Consistently allow null character in block and drawer bodies 2023-04-25 21:06:50 +02:00
ob-java.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-js.el Merge branch 'bugfix' 2023-04-17 13:12:22 +02:00
ob-julia.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ob-latex.el * lisp/ob-latex.el: Fix command injection vulnerability 2023-03-12 12:23:46 +01:00
ob-lilypond.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-lisp.el lisp/ob-lisp: fix `org-babel-execute:lisp' for use with Sly 2023-05-02 14:09:37 +02:00
ob-lob.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-lua.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-makefile.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-matlab.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-maxima.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-ocaml.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ob-octave.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ob-org.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-perl.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-plantuml.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-processing.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ob-python.el ob-python: Allow working with externally started sessions again 2023-03-31 09:11:42 -07:00
ob-R.el * lisp/ob-R.el: Fix ESS compatibility 2023-04-17 20:20:58 +02:00
ob-ref.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-ruby.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ob-sass.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-scheme.el org-babel-expand-body:scheme: define header arg vars using define 2023-04-25 14:25:30 +02:00
ob-screen.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-sed.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-shell.el ob-shell.el: Add async evaluation 2023-03-22 14:55:11 -04:00
ob-sql.el lisp/ob-sql.el: allow string in sql-connection-alist 2023-02-01 14:58:03 +03:00
ob-sqlite.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ob-table.el org-sbe: Allow quoting string values 2023-02-23 12:29:18 +03:00
ob-tangle.el org-babel-tangle-single-block: Fix compiler warning 2023-06-24 15:34:22 +03:00
ob.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
oc-basic.el Prefer "backend" over "back-end" 2023-04-20 14:11:19 +02:00
oc-biblatex.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
oc-bibtex.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
oc-csl.el Prefer "backend" over "back-end" 2023-04-20 14:11:19 +02:00
oc-natbib.el oc-natbib: Provide a fallback bibliography style 2023-02-20 16:48:48 +03:00
oc.el org-cite-list-bibliography-files: Preserve relative bibliography paths 2023-05-02 14:47:56 +02:00
ol-bbdb.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
ol-bibtex.el Fix BibTeX spelled as Bibtex 2023-03-07 14:06:01 +01:00
ol-docview.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-doi.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-eshell.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-eww.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-gnus.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-info.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-irc.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-man.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-mhe.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-rmail.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol-w3m.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
ol.el Prefer "backend" over "back-end" 2023-04-20 14:11:19 +02:00
org-agenda.el Use `calendar-buffer' constant to refer to calendar buffers 2023-05-02 13:35:12 +02:00
org-archive.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
org-attach-git.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-attach.el org-attach-tag: Work around error when before first heading 2023-04-28 12:52:09 +02:00
org-capture.el Inhibit error when saving bookmarks with `debug-on-error' set to non-nil 2023-06-24 15:05:12 +03:00
org-clock.el Prefer `condition-case-unless-debug' where possible 2023-06-01 15:05:22 +03:00
org-colview.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
org-compat.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
org-crypt.el org-crypt-decrypt-entry: Apply initial visibility upon decryption 2023-05-15 15:35:56 +02:00
org-ctags.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-cycle.el org-crypt-decrypt-entry: Apply initial visibility upon decryption 2023-05-15 15:35:56 +02:00
org-datetree.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
org-duration.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-element-ast.el Refactor org-element API for abstract syntax tree 2023-07-01 14:35:17 +03:00
org-element.el org-element-cache: Reduce memory footprint in indirect buffers 2023-06-13 13:08:48 +03:00
org-entities.el org-entities: Treat ¶ similarly to § 2023-04-13 09:02:58 +02:00
org-faces.el Define the face `org-agenda-calendar-daterange' 2023-01-21 11:27:38 +03:00
org-feed.el Consistently allow null character in block and drawer bodies 2023-04-25 21:06:50 +02:00
org-fold-core.el Merge branch 'bugfix' 2023-06-15 12:39:12 +03:00
org-fold.el org-fold--reveal-headline-at-point: Fix edge case with invisible subtree 2023-05-14 14:04:41 +02:00
org-footnote.el org-compat: Work around Emacs bug#60467 2023-02-10 14:37:09 +03:00
org-goto.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-habit.el lisp/org-habit.el: Inherit habit style property 2023-06-23 13:47:51 +03:00
org-id.el org-macs.el: Move UUID related code 2023-03-22 14:08:08 -04:00
org-indent.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-inlinetask.el Merge branch 'bugfix' 2023-01-01 13:15:12 -05:00
org-keys.el lisp/org.el: allow org-return to call org-open-at-point on citations 2023-05-25 14:21:20 +02:00
org-lint.el org-lint: Add new linter for ambiguous literal $ 2023-07-01 13:03:11 +03:00
org-list.el org-element--current-element: Micro optimizations 2023-05-18 15:22:44 +02:00
org-macro.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-macs.el Revert "org-replace-escapes: Fix compiler warning" 2023-06-26 13:43:44 +03:00
org-mobile.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-mouse.el Merge branch 'bugfix' 2023-06-24 15:36:34 +03:00
org-num.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-pcomplete.el Prefer "backend" over "back-end" 2023-04-20 14:11:19 +02:00
org-persist.el Revert "org-persist-gc: GC collections without persist file" 2023-05-06 17:50:18 +02:00
org-plot.el Provide a uniform way to inform users about missing third-party packages 2023-02-17 17:09:23 +03:00
org-protocol.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-refile.el org-refile: Fix typo in 94c2c8d92 2023-06-30 15:49:57 +03:00
org-src.el Prefer `condition-case-unless-debug' where possible 2023-06-01 15:05:22 +03:00
org-table.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
org-tempo.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-timer.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org.el Merge branch 'bugfix' 2023-07-01 13:26:08 +03:00
ox-ascii.el Create aliases for export region functions 2023-06-29 21:18:01 +02:00
ox-beamer.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
ox-html.el Create aliases for export region functions 2023-06-29 21:18:01 +02:00
ox-icalendar.el ox-icalendar: Add support for unscheduled and repeating TODOs 2023-06-18 06:51:47 -07:00
ox-koma-letter.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
ox-latex.el Create aliases for export region functions 2023-06-29 21:18:01 +02:00
ox-man.el Prefer "backend" over "back-end" 2023-04-20 14:11:19 +02:00
ox-md.el Create aliases for export region functions 2023-06-29 21:18:01 +02:00
ox-odt.el Prefer `condition-case-unless-debug' where possible 2023-06-01 15:05:22 +03:00
ox-org.el Consistently allow null character in block and drawer bodies 2023-04-25 21:06:50 +02:00
ox-publish.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
ox-texinfo.el Create aliases for export region functions 2023-06-29 21:18:01 +02:00
ox.el ox.el: Add more customizable `org-export-dispatch' options 2023-05-14 16:16:01 +02:00