From cea02637849b8f17b0cd547f80789acd2e94cbd2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 22 Apr 2022 16:17:22 +0200 Subject: [PATCH 1/5] Backport commit bbf389ea6 from Emacs * lisp/ox-publish.el (org-publish-find-property): * lisp/ox-html.el (org-html--unlabel-latex-environment): * lisp/org-table.el (org-table-collapse-header): * lisp/org-plot.el (org--plot/prime-factors): * lisp/org-agenda.el (org-agenda--mark-blocked-entry): (org-agenda-set-restriction-lock): * lisp/ob-lua.el (org-babel-lua-read-string): * lisp/ob-julia.el (org-babel-julia-evaluate-external-process): (org-babel-julia-evaluate-session): * lisp/ob-core.el (org-babel-default-header-args): Fix quoting in doc strings. In code examples, the ' character is quoted with \\=, and regularize 'foo to `foo', and quote strings like "foo" instead of 'foo'. Audit quoting the quote character in doc strings bbf389ea6deab229ba18dc519fe712ec982609d1 Lars Ingebrigtsen Fri Apr 22 16:17:22 2022 +0200 [km] Org's bugfix branch is currently receiving commits from emacs-28, but this commit comes from Emacs's master branch. I'm porting it because it has conflicts with bugfix's 01b0fb14b (Backport from main: Escape single left quotes in docstrings, 2022-07-24) and only touches docstrings. --- lisp/ob-core.el | 2 +- lisp/ob-julia.el | 8 ++++---- lisp/ob-lua.el | 2 +- lisp/org-agenda.el | 4 ++-- lisp/org-plot.el | 2 +- lisp/org-table.el | 2 +- lisp/ox-html.el | 2 +- lisp/ox-publish.el | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 23ef162a7..04af84d2e 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -480,7 +480,7 @@ value. The value can either be a string or a closure that evaluates to a string. The closure is evaluated when the source block is being evaluated (e.g. during execution or export), with point at the source block. It is not possible to use an -arbitrary function symbol (e.g. 'some-func), since org uses +arbitrary function symbol (e.g. `some-func'), since org uses lexical binding. To achieve the same functionality, call the function within a closure (e.g. (lambda () (some-func))). diff --git a/lisp/ob-julia.el b/lisp/ob-julia.el index abddca361..50a44bcf4 100644 --- a/lisp/ob-julia.el +++ b/lisp/ob-julia.el @@ -250,8 +250,8 @@ end") (defun org-babel-julia-evaluate-external-process (body result-type result-params column-names-p) "Evaluate BODY in external julia process. -If RESULT-TYPE equals 'output then return standard output as a -string. If RESULT-TYPE equals 'value then return the value of the +If RESULT-TYPE equals `output' then return standard output as a +string. If RESULT-TYPE equals `value' then return the value of the last statement in BODY, as elisp." (cl-case result-type (value @@ -274,8 +274,8 @@ last statement in BODY, as elisp." (defun org-babel-julia-evaluate-session (session body result-type result-params column-names-p) "Evaluate BODY in SESSION. -If RESULT-TYPE equals 'output then return standard output as a -string. If RESULT-TYPE equals 'value then return the value of the +If RESULT-TYPE equals `output' then return standard output as a +string. If RESULT-TYPE equals `value' then return the value of the last statement in BODY, as elisp." (cl-case result-type (value diff --git a/lisp/ob-lua.el b/lisp/ob-lua.el index 48de0dbad..b6e78fb7f 100644 --- a/lisp/ob-lua.el +++ b/lisp/ob-lua.el @@ -395,7 +395,7 @@ fd:close()" (org-babel-lua-table-or-string results))))) (defun org-babel-lua-read-string (string) - "Strip 's from around Lua string." + "Strip \\=' characters from around Lua string." (org-unbracket-string "'" "'" string)) (provide 'ob-lua) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 71aac271f..dfd5d829d 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -4124,7 +4124,7 @@ dimming them." ;FIXME: The arg isn't used, actually! If the header at `org-hd-marker' is blocked according to `org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is -'invisible and the header is not blocked by checkboxes, set the +`invisible' and the header is not blocked by checkboxes, set the text property `org-todo-blocked' to `invisible', otherwise set it to t." (when (get-text-property 0 'todo-state entry) @@ -7399,7 +7399,7 @@ Argument ARG is the prefix argument." When in a restricted subtree, remove it. The restriction will span over the entire file if TYPE is `file', -or if type is '(4), or if the cursor is before the first headline +or if type is \\='(4), or if the cursor is before the first headline in the file. Otherwise, only apply the restriction to the current subtree." (interactive "P") diff --git a/lisp/org-plot.el b/lisp/org-plot.el index bf84c99e0..4507fbe7d 100644 --- a/lisp/org-plot.el +++ b/lisp/org-plot.el @@ -280,7 +280,7 @@ When NORMALISE is non-nil, the count is divided by the number of values." collect (cons n (/ (length m) normaliser))))) (defun org--plot/prime-factors (value) - "Return the prime decomposition of VALUE, e.g. for 12, '(3 2 2)." + "Return the prime decomposition of VALUE, e.g. for 12, \\='(3 2 2)." (let ((factors '(1)) (i 1)) (while (/= 1 value) (setq i (1+ i)) diff --git a/lisp/org-table.el b/lisp/org-table.el index 860fd6e56..c301bc6af 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -5465,7 +5465,7 @@ The table is taken from the parameter TXT, or from the buffer at point." (nreverse table))))) (defun org-table-collapse-header (table &optional separator max-header-lines) - "Collapse the lines before 'hline into a single header. + "Collapse the lines before `hline' into a single header. The given TABLE is a list of lists as returned by `org-table-to-lisp'. The leading lines before the first `hline' symbol are considered diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 81ef002a0..9cf9125ae 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2909,7 +2909,7 @@ Starred and \"displaymath\" environments are not numbered." (defun org-html--unlabel-latex-environment (latex-frag) "Change environment in LATEX-FRAG string to an unnumbered one. -For instance, change an 'equation' environment to 'equation*'." +For instance, change an `equation' environment to `equation*'." (replace-regexp-in-string "\\`[ \t]*\\\\begin{\\([^*]+?\\)}" "\\1*" diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index 636bd0d2a..51e2352b4 100644 --- a/lisp/ox-publish.el +++ b/lisp/ox-publish.el @@ -839,7 +839,7 @@ in `org-export-options-alist' or in export back-ends. In the latter case, optional argument BACKEND has to be set to the back-end where the option is defined, e.g., - (org-publish-find-property file :subtitle 'latex) + (org-publish-find-property file :subtitle \\='latex) Return value may be a string or a list, depending on the type of PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'." From 5fdbf159f27243147983147caae0f2060ba6b097 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 22 Apr 2022 17:16:42 +0200 Subject: [PATCH 2/5] Backport commit 2d71fd3b0 from Emacs * lisp/ob-table.el (org-sbe): Further quoting fixes in doc strings. Further doc string quoting fixes 2d71fd3b041506c68b5f1cd1e409e09e25778c34 Lars Ingebrigtsen Fri Apr 22 17:16:42 2022 +0200 [km] Org's bugfix branch is currently receiving commits from emacs-28, but this commit comes from Emacs's master branch. I'm porting it because it has conflicts with bugfix's 01b0fb14b (Backport from main: Escape single left quotes in docstrings, 2022-07-24) and only touches docstrings. --- lisp/ob-table.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-table.el b/lisp/ob-table.el index 2f092998d..f6729e0ec 100644 --- a/lisp/ob-table.el +++ b/lisp/ob-table.el @@ -84,7 +84,7 @@ is the equivalent of the following source code block: #+end_src NOTE: The quotation marks around the function name, -'source-block', are optional. +`source-block', are optional. NOTE: By default, string variable names are interpreted as references to source-code blocks, to force interpretation of a From 9d29de23cf957c56cbda09e8a4714997609ca6c1 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 24 May 2022 13:17:53 +0200 Subject: [PATCH 3/5] Backport commit b2bce107b from Emacs * lisp/org.el (org-latex-to-html-convert-command): * lisp/org-agenda.el (org-agenda-sorting-strategy): Audit use of various single quotes in Lisp doc strings. Further audits of single quotes in Lisp doc strings b2bce107b15d6e0c2b773704179c6bf463525459 Lars Ingebrigtsen Tue May 24 13:17:53 2022 +0200 [km] Org's bugfix branch is currently receiving commits from emacs-28, but this commit comes from Emacs's master branch. I'm porting it because it has conflicts with bugfix's 01b0fb14b (Backport from main: Escape single left quotes in docstrings, 2022-07-24) and only touches docstrings. --- lisp/org-agenda.el | 2 +- lisp/org.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index dfd5d829d..a43b083d5 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1615,7 +1615,7 @@ alpha-down Sort headlines alphabetically, reversed. The different possibilities will be tried in sequence, and testing stops if one comparison returns a \"not-equal\". For example, the default - '(time-up category-keep priority-down) + `(time-up category-keep priority-down)' means: Pull out all entries having a specified time of day and sort them, in order to make a time schedule for the current day the first thing in the agenda listing for the day. Of the entries without a time indication, keep diff --git a/lisp/org.el b/lisp/org.el index 06af12339..5387ea2f0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -3301,7 +3301,7 @@ Replace format-specifiers in the command as noted below and use %i: The LaTeX fragment to be converted. For example, this could be used with LaTeXML as -\"latexmlc 'literal:%i' --profile=math --preload=siunitx.sty 2>/dev/null\"." +\"latexmlc \\='literal:%i\\=' --profile=math --preload=siunitx.sty 2>/dev/null\"." :group 'org-latex :package-version '(Org . "9.4") :type '(choice From 745bdebe73d4ebbd254fe45d33b230f82b6baa72 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 13 Jul 2022 13:00:31 +0200 Subject: [PATCH 4/5] Backport commit ba0871bef from Emacs ; Fix typos: prefer American spelling ba0871bef1e7d321f1124a6ad20e9be158a976dd Stefan Kangas Wed Jul 13 13:04:22 2022 +0200 --- doc/org-manual.org | 4 ++-- etc/ORG-NEWS | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/org-manual.org b/doc/org-manual.org index f3f273ad6..23d4007d2 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -2866,12 +2866,12 @@ For more information and examples see the [[https://orgmode.org/worg/org-tutoria - transpose :: When =y=, =yes=, or =t= attempt to transpose the table data before - plotting. Also recognises the shorthand option =trans=. + plotting. Also recognizes the shorthand option =trans=. - =type= :: Specify the type of the plot, by default one of =2d=, =3d=, =radar=, or =grid=. - Available types can be customised with ~org-plot/preset-plot-types~. + Available types can be customized with ~org-plot/preset-plot-types~. - =with= :: diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 37a39131d..3c164b128 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -293,7 +293,7 @@ with width equal to the pixel-width of the buffer text multiplied by 0.7. This functionality is implemented in a new function, ~org-display-inline-image--width~ which contains the width determination logic previously in ~org-display-inline-images~ and the -new behaviour. +new behavior. ** New options *** Option ~org-hidden-keywords~ now also applies to #+SUBTITLE: @@ -311,7 +311,7 @@ descriptions. *** New option ~org-id-ts-format~ Earlier, IDs generated using =ts= method had a hard-coded format (i.e. =20200923T160237.891616=). -The new option allows user to customise the format. +The new option allows user to customize the format. Defaults are unchanged. *** New argument for ~file-desc~ babel header @@ -503,16 +503,16 @@ heading, except return nil. *** Faces of all the heading text elements now conform to the headline face -In the past, faces of todo keywords, emphasised text, tags, and +In the past, faces of todo keywords, emphasized text, tags, and priority cookies inherited =default= face. The resulting headline fontification was not always consistent, as discussed in [[msg::87h7sawubl.fsf@protesilaos.com][this bug report]]. Now, the relevant faces adapt to face used to fontify the current headline level. -Users who prefer to keep the old behaviour should change their face -customisation explicitly stating that =default= face is inherited. +Users who prefer to keep the old behavior should change their face +customization explicitly stating that =default= face is inherited. -Example of old face customisation: +Example of old face customization: #+begin_src emacs-lisp (setq org-todo-keyword-faces '(("TODO" @@ -520,7 +520,7 @@ Example of old face customisation: :height 0.75))) #+end_src -To preserve the old behaviour the above customisation should be +To preserve the old behavior the above customization should be changed to #+begin_src emacs-lisp @@ -543,7 +543,7 @@ The function does not allow for a third optional parameter anymore. *** LaTeX environment =#+results= are now removed If a babel src block produces a raw LaTeX environment, it will now be -recognised as a result, and so replaced when re-evaluated. +recognized as a result, and so replaced when re-evaluated. *** Tag completion now uses =completing-read-multiple= @@ -681,7 +681,7 @@ enabled, and point is neither in a table nor on a timestamp or a link: - =C-j= (bound to the new command ~org-return-and-maybe-indent~) merely inserts a newline. -To get the previous behaviour back, disable ~electric-indent-mode~ +To get the previous behavior back, disable ~electric-indent-mode~ explicitly: #+begin_src emacs-lisp @@ -1029,7 +1029,7 @@ Previously all session names had ~org-babel-session-~ prepended. *** Forward/backward paragraph functions in line with the rest of Emacs ~org-forward-paragraph~ and ~org-backward-paragraph~, bound to -~~ and ~~ functions mimic more closely behaviour of +~~ and ~~ functions mimic more closely behavior of ~forward-paragraph~ and ~backward-paragraph~ functions when available. From 6e991f4bb9f922963cc82e7718daa9ce77e3b15c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 14 Jul 2022 17:33:46 +0200 Subject: [PATCH 5/5] Backport commit 10b691987 from Emacs ; Fix typos 10b69198708105655c49b62ac7d6185abb7e02a7 Stefan Kangas Sat Jul 16 10:07:38 2022 +0200 --- lisp/ol.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ol.el b/lisp/ol.el index a03d85f61..f9816a187 100644 --- a/lisp/ol.el +++ b/lisp/ol.el @@ -937,7 +937,7 @@ characters that should be escaped." (defun org-link-decode (s) "Decode percent-encoded parts in string S. -E.g. \"%C3%B6\" becomes the german o-Umlaut." +E.g. \"%C3%B6\" becomes the German o-Umlaut." (replace-regexp-in-string "\\(%[0-9A-Za-z]\\{2\\}\\)+" #'org-link--decode-compound s t t))