org-mode/lisp
Ihor Radchenko fefaadc2d5
org-element: Optimize working with match data and Emacs regexps
* lisp/org-element.el: Add commentary explaining some regexp-related
optimizations useful for the parser.

Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63225
(org-element--headline-deferred):
(org-element-item-parser):
(org-element-item-interpreter):
(org-element--list-struct):
(org-element-plain-list-parser):
(org-element-example-block-parser):
(org-element-fixed-width-interpreter):
(org-element-paragraph-parser):
(org-element-src-block-parser):
(org-element-table-parser):
(org-element--parse-generic-emphasis):
(org-element-export-snippet-interpreter):
(org-element-link-parser):
(org-element--current-element):
(org-element--collect-affiliated-keywords):
(org-element-parse-buffer):
(org-element-normalize-string):
(org-element-normalize-contents):
(org-element--parse-to):
(org-element--cache-before-change):
(org-element--cache-for-removal):
(org-element-context): Avoid storing match data unless strictly
necessary.  Explain the necessity in places where we have to use
`save-match-data'.  Prefer `looking-at-p' (does not alter match data)
to `looking-at'.  Simplify regexps.  Update docstrings clearly
indicating when match data might be modified.
* lisp/org.el:
(org-offer-links-in-entry):
* lisp/ob-exp.el (org-babel-exp-process-buffer):
* lisp/org-agenda.el: Fix places where we need to protect match data.
2023-07-01 14:35:53 +03:00
..
Makefile * lisp/Makefile: Remove references to org-contrib 2023-03-16 13:34:34 +01: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-R.el * lisp/ob-R.el: Fix ESS compatibility 2023-04-17 20:20:58 +02:00
ob-awk.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05: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 org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03: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-element: Optimize working with match data and Emacs regexps 2023-07-01 14:35:53 +03: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 Use `org-element-type-p' 2023-07-01 14:35:35 +03: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-ref.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03: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-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
ob.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
oc-basic.el Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
oc-biblatex.el Rename `org-export-get-parent' to `org-element-parent' 2023-07-01 14:35:41 +03:00
oc-bibtex.el Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
oc-csl.el Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
oc-natbib.el Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
oc.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03: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 org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-agenda.el org-element: Optimize working with match data and Emacs regexps 2023-07-01 14:35:53 +03:00
org-archive.el Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
org-attach-git.el Backport commit cae528457 from Emacs 2023-01-01 12:44:47 -05:00
org-attach.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-capture.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-clock.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-colview.el Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
org-compat.el Remove 'org-category text property cache 2023-07-01 14:35:51 +03: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-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03: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 org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +03:00
org-element.el org-element: Optimize working with match data and Emacs regexps 2023-07-01 14:35:53 +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-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-footnote.el org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +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 Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
org-lint.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-list.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-macro.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-macs.el org-with-point-at: Accept syntax node as POM 2023-07-01 14:35:46 +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 org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03: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 org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
org-table.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03: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 org-element: Optimize working with match data and Emacs regexps 2023-07-01 14:35:53 +03:00
ox-ascii.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
ox-beamer.el org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +03:00
ox-html.el org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +03:00
ox-icalendar.el Use `org-element-type-p' 2023-07-01 14:35:35 +03:00
ox-koma-letter.el Prefer "timestamp" over "time-stamp" 2023-04-30 13:48:52 +02:00
ox-latex.el org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +03:00
ox-man.el Rename `org-export-get-parent' to `org-element-parent' 2023-07-01 14:35:41 +03:00
ox-md.el ox.el: Rename `org-element-get-parent-element' and move to org-element 2023-07-01 14:35:42 +03:00
ox-odt.el org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +03:00
ox-org.el org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +03:00
ox-publish.el org-element-lineage: Allow TYPES to be a symbol 2023-07-01 14:35:43 +03:00
ox-texinfo.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00
ox.el org-element: New `org-element-*property*' functions 2023-07-01 14:35:43 +03:00