diff options
| author | Michael Heerdegen | 2018-11-26 13:39:26 +0100 |
|---|---|---|
| committer | Michael Heerdegen | 2018-11-26 21:43:23 +0100 |
| commit | d28118940ccdd8772b948880011dd4158ed20463 (patch) | |
| tree | 5a9eba9723808489b63930368058de97708b0bfc | |
| parent | 038b425cf0fe6efea615e01c4828304721b99c75 (diff) | |
| download | emacs-d28118940ccdd8772b948880011dd4158ed20463.tar.gz emacs-d28118940ccdd8772b948880011dd4158ed20463.zip | |
Revert "Replace insignificant backquotes" for Org files
Revert everything of commit 1808d254a5 "Replace insignificant
backquotes" that touches Org source files since these should not have
been changed.
* lisp/org/ob-C.el:
* lisp/org/ob-core.el:
* lisp/org/ob-exp.el:
* lisp/org/ob-groovy.el:
* lisp/org/ob-haskell.el:
* lisp/org/ob-io.el:
* lisp/org/ob-lisp.el:
* lisp/org/ob-lob.el:
* lisp/org/ob-lua.el:
* lisp/org/ob-octave.el:
* lisp/org/ob-perl.el:
* lisp/org/ob-python.el:
* lisp/org/ob-ref.el:
* lisp/org/ob-ruby.el:
* lisp/org/ob-sql.el:
* lisp/org/org-agenda.el:
* lisp/org/org-capture.el:
* lisp/org/org-clock.el:
* lisp/org/org-colview.el:
* lisp/org/org-duration.el:
* lisp/org/org-element.el:
* lisp/org/org-entities.el:
* lisp/org/org-gnus.el:
* lisp/org/org-indent.el:
* lisp/org/org-info.el:
* lisp/org/org-inlinetask.el:
* lisp/org/org-lint.el:
* lisp/org/org-list.el:
* lisp/org/org-mouse.el:
* lisp/org/org-plot.el:
* lisp/org/org-src.el:
* lisp/org/org-table.el:
* lisp/org/org.el:
* lisp/org/ox-ascii.el:
* lisp/org/ox-html.el:
* lisp/org/ox-latex.el:
* lisp/org/ox-man.el:
* lisp/org/ox-md.el:
* lisp/org/ox-org.el:
* lisp/org/ox-publish.el:
* lisp/org/ox-texinfo.el:
* lisp/org/ox.el: Undo changes made by commit "Replace insignificant
backquotes".
42 files changed, 374 insertions, 374 deletions
diff --git a/lisp/org/ob-C.el b/lisp/org/ob-C.el index a99f0fcb85e..ff5be349676 100644 --- a/lisp/org/ob-C.el +++ b/lisp/org/ob-C.el | |||
| @@ -136,7 +136,7 @@ or `org-babel-execute:C++' or `org-babel-execute:D'." | |||
| 136 | (let* ((tmp-src-file (org-babel-temp-file | 136 | (let* ((tmp-src-file (org-babel-temp-file |
| 137 | "C-src-" | 137 | "C-src-" |
| 138 | (pcase org-babel-c-variant | 138 | (pcase org-babel-c-variant |
| 139 | ('c ".c") ('cpp ".cpp") ('d ".d")))) | 139 | (`c ".c") (`cpp ".cpp") (`d ".d")))) |
| 140 | (tmp-bin-file ;not used for D | 140 | (tmp-bin-file ;not used for D |
| 141 | (org-babel-process-file-name | 141 | (org-babel-process-file-name |
| 142 | (org-babel-temp-file "C-bin-" org-babel-exeext))) | 142 | (org-babel-temp-file "C-bin-" org-babel-exeext))) |
| @@ -154,29 +154,29 @@ or `org-babel-execute:C++' or `org-babel-execute:D'." | |||
| 154 | " ")) | 154 | " ")) |
| 155 | (full-body | 155 | (full-body |
| 156 | (pcase org-babel-c-variant | 156 | (pcase org-babel-c-variant |
| 157 | ('c (org-babel-C-expand-C body params)) | 157 | (`c (org-babel-C-expand-C body params)) |
| 158 | ('cpp (org-babel-C-expand-C++ body params)) | 158 | (`cpp (org-babel-C-expand-C++ body params)) |
| 159 | ('d (org-babel-C-expand-D body params))))) | 159 | (`d (org-babel-C-expand-D body params))))) |
| 160 | (with-temp-file tmp-src-file (insert full-body)) | 160 | (with-temp-file tmp-src-file (insert full-body)) |
| 161 | (pcase org-babel-c-variant | 161 | (pcase org-babel-c-variant |
| 162 | ((or 'c 'cpp) | 162 | ((or `c `cpp) |
| 163 | (org-babel-eval | 163 | (org-babel-eval |
| 164 | (format "%s -o %s %s %s %s" | 164 | (format "%s -o %s %s %s %s" |
| 165 | (pcase org-babel-c-variant | 165 | (pcase org-babel-c-variant |
| 166 | ('c org-babel-C-compiler) | 166 | (`c org-babel-C-compiler) |
| 167 | ('cpp org-babel-C++-compiler)) | 167 | (`cpp org-babel-C++-compiler)) |
| 168 | tmp-bin-file | 168 | tmp-bin-file |
| 169 | flags | 169 | flags |
| 170 | (org-babel-process-file-name tmp-src-file) | 170 | (org-babel-process-file-name tmp-src-file) |
| 171 | libs) | 171 | libs) |
| 172 | "")) | 172 | "")) |
| 173 | ('d nil)) ;; no separate compilation for D | 173 | (`d nil)) ;; no separate compilation for D |
| 174 | (let ((results | 174 | (let ((results |
| 175 | (org-babel-eval | 175 | (org-babel-eval |
| 176 | (pcase org-babel-c-variant | 176 | (pcase org-babel-c-variant |
| 177 | ((or 'c 'cpp) | 177 | ((or `c `cpp) |
| 178 | (concat tmp-bin-file cmdline)) | 178 | (concat tmp-bin-file cmdline)) |
| 179 | ('d | 179 | (`d |
| 180 | (format "%s %s %s %s" | 180 | (format "%s %s %s %s" |
| 181 | org-babel-D-compiler | 181 | org-babel-D-compiler |
| 182 | flags | 182 | flags |
| @@ -323,9 +323,9 @@ FORMAT can be either a format string or a function which is called with VAL." | |||
| 323 | (let* ((basetype (org-babel-C-val-to-base-type val)) | 323 | (let* ((basetype (org-babel-C-val-to-base-type val)) |
| 324 | (type | 324 | (type |
| 325 | (pcase basetype | 325 | (pcase basetype |
| 326 | ('integerp '("int" "%d")) | 326 | (`integerp '("int" "%d")) |
| 327 | ('floatp '("double" "%f")) | 327 | (`floatp '("double" "%f")) |
| 328 | ('stringp | 328 | (`stringp |
| 329 | (list | 329 | (list |
| 330 | (if (eq org-babel-c-variant 'd) "string" "const char*") | 330 | (if (eq org-babel-c-variant 'd) "string" "const char*") |
| 331 | "\"%s\"")) | 331 | "\"%s\"")) |
| @@ -373,11 +373,11 @@ FORMAT can be either a format string or a function which is called with VAL." | |||
| 373 | (let ((type nil)) | 373 | (let ((type nil)) |
| 374 | (mapc (lambda (v) | 374 | (mapc (lambda (v) |
| 375 | (pcase (org-babel-C-val-to-base-type v) | 375 | (pcase (org-babel-C-val-to-base-type v) |
| 376 | ('stringp (setq type 'stringp)) | 376 | (`stringp (setq type 'stringp)) |
| 377 | ('floatp | 377 | (`floatp |
| 378 | (if (or (not type) (eq type 'integerp)) | 378 | (if (or (not type) (eq type 'integerp)) |
| 379 | (setq type 'floatp))) | 379 | (setq type 'floatp))) |
| 380 | ('integerp | 380 | (`integerp |
| 381 | (unless type (setq type 'integerp))))) | 381 | (unless type (setq type 'integerp))))) |
| 382 | val) | 382 | val) |
| 383 | type)) | 383 | type)) |
| @@ -420,7 +420,7 @@ of the same value." | |||
| 420 | "Generate a utility function to convert a column name | 420 | "Generate a utility function to convert a column name |
| 421 | into a column number." | 421 | into a column number." |
| 422 | (pcase org-babel-c-variant | 422 | (pcase org-babel-c-variant |
| 423 | ((or 'c 'cpp) | 423 | ((or `c `cpp) |
| 424 | "int get_column_num (int nbcols, const char** header, const char* column) | 424 | "int get_column_num (int nbcols, const char** header, const char* column) |
| 425 | { | 425 | { |
| 426 | int c; | 426 | int c; |
| @@ -430,7 +430,7 @@ into a column number." | |||
| 430 | return -1; | 430 | return -1; |
| 431 | } | 431 | } |
| 432 | ") | 432 | ") |
| 433 | ('d | 433 | (`d |
| 434 | "int get_column_num (string[] header, string column) | 434 | "int get_column_num (string[] header, string column) |
| 435 | { | 435 | { |
| 436 | foreach (c, h; header) | 436 | foreach (c, h; header) |
| @@ -448,18 +448,18 @@ specifying a variable with the name of the table." | |||
| 448 | (concat | 448 | (concat |
| 449 | (format | 449 | (format |
| 450 | (pcase org-babel-c-variant | 450 | (pcase org-babel-c-variant |
| 451 | ((or 'c 'cpp) "const char* %s_header[%d] = {%s};") | 451 | ((or `c `cpp) "const char* %s_header[%d] = {%s};") |
| 452 | ('d "string %s_header[%d] = [%s];")) | 452 | (`d "string %s_header[%d] = [%s];")) |
| 453 | table | 453 | table |
| 454 | (length headers) | 454 | (length headers) |
| 455 | (mapconcat (lambda (h) (format "%S" h)) headers ",")) | 455 | (mapconcat (lambda (h) (format "%S" h)) headers ",")) |
| 456 | "\n" | 456 | "\n" |
| 457 | (pcase org-babel-c-variant | 457 | (pcase org-babel-c-variant |
| 458 | ((or 'c 'cpp) | 458 | ((or `c `cpp) |
| 459 | (format | 459 | (format |
| 460 | "const char* %s_h (int row, const char* col) { return %s[row][get_column_num(%d,%s_header,col)]; }" | 460 | "const char* %s_h (int row, const char* col) { return %s[row][get_column_num(%d,%s_header,col)]; }" |
| 461 | table table (length headers) table)) | 461 | table table (length headers) table)) |
| 462 | ('d | 462 | (`d |
| 463 | (format | 463 | (format |
| 464 | "string %s_h (size_t row, string col) { return %s[row][get_column_num(%s_header,col)]; }" | 464 | "string %s_h (size_t row, string col) { return %s[row][get_column_num(%s_header,col)]; }" |
| 465 | table table table)))))) | 465 | table table table)))))) |
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index ddf756c9157..a5449fe35e9 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el | |||
| @@ -283,9 +283,9 @@ environment, to override this check." | |||
| 283 | (name (nth 4 info)) | 283 | (name (nth 4 info)) |
| 284 | (name-string (if name (format " (%s) " name) " "))) | 284 | (name-string (if name (format " (%s) " name) " "))) |
| 285 | (pcase evalp | 285 | (pcase evalp |
| 286 | ('nil nil) | 286 | (`nil nil) |
| 287 | ('t t) | 287 | (`t t) |
| 288 | ('query (or | 288 | (`query (or |
| 289 | (and (not (bound-and-true-p | 289 | (and (not (bound-and-true-p |
| 290 | org-babel-confirm-evaluate-answer-no)) | 290 | org-babel-confirm-evaluate-answer-no)) |
| 291 | (yes-or-no-p | 291 | (yes-or-no-p |
| @@ -1991,7 +1991,7 @@ to HASH." | |||
| 1991 | (catch :found | 1991 | (catch :found |
| 1992 | (org-with-wide-buffer | 1992 | (org-with-wide-buffer |
| 1993 | (pcase (org-element-type context) | 1993 | (pcase (org-element-type context) |
| 1994 | ((or 'inline-babel-call 'inline-src-block) | 1994 | ((or `inline-babel-call `inline-src-block) |
| 1995 | ;; Results for inline objects are located right after them. | 1995 | ;; Results for inline objects are located right after them. |
| 1996 | ;; There is no RESULTS line to insert either. | 1996 | ;; There is no RESULTS line to insert either. |
| 1997 | (let ((limit (org-element-property | 1997 | (let ((limit (org-element-property |
| @@ -2013,7 +2013,7 @@ to HASH." | |||
| 2013 | (skip-chars-backward " \t") | 2013 | (skip-chars-backward " \t") |
| 2014 | (point))) | 2014 | (point))) |
| 2015 | (point)))))))) | 2015 | (point)))))))) |
| 2016 | ((or 'babel-call 'src-block) | 2016 | ((or `babel-call `src-block) |
| 2017 | (let* ((name (org-element-property :name context)) | 2017 | (let* ((name (org-element-property :name context)) |
| 2018 | (named-results (and name (org-babel-find-named-result name)))) | 2018 | (named-results (and name (org-babel-find-named-result name)))) |
| 2019 | (goto-char (or named-results (org-element-property :end context))) | 2019 | (goto-char (or named-results (org-element-property :end context))) |
| @@ -2067,20 +2067,20 @@ Return nil if ELEMENT cannot be read." | |||
| 2067 | (org-with-wide-buffer | 2067 | (org-with-wide-buffer |
| 2068 | (goto-char (org-element-property :post-affiliated element)) | 2068 | (goto-char (org-element-property :post-affiliated element)) |
| 2069 | (pcase (org-element-type element) | 2069 | (pcase (org-element-type element) |
| 2070 | ('fixed-width | 2070 | (`fixed-width |
| 2071 | (let ((v (org-trim (org-element-property :value element)))) | 2071 | (let ((v (org-trim (org-element-property :value element)))) |
| 2072 | (or (org-babel--string-to-number v) v))) | 2072 | (or (org-babel--string-to-number v) v))) |
| 2073 | ('table (org-babel-read-table)) | 2073 | (`table (org-babel-read-table)) |
| 2074 | ('plain-list (org-babel-read-list)) | 2074 | (`plain-list (org-babel-read-list)) |
| 2075 | ('example-block | 2075 | (`example-block |
| 2076 | (let ((v (org-element-property :value element))) | 2076 | (let ((v (org-element-property :value element))) |
| 2077 | (if (or org-src-preserve-indentation | 2077 | (if (or org-src-preserve-indentation |
| 2078 | (org-element-property :preserve-indent element)) | 2078 | (org-element-property :preserve-indent element)) |
| 2079 | v | 2079 | v |
| 2080 | (org-remove-indentation v)))) | 2080 | (org-remove-indentation v)))) |
| 2081 | ('export-block | 2081 | (`export-block |
| 2082 | (org-remove-indentation (org-element-property :value element))) | 2082 | (org-remove-indentation (org-element-property :value element))) |
| 2083 | ('paragraph | 2083 | (`paragraph |
| 2084 | ;; Treat paragraphs containing a single link specially. | 2084 | ;; Treat paragraphs containing a single link specially. |
| 2085 | (skip-chars-forward " \t") | 2085 | (skip-chars-forward " \t") |
| 2086 | (if (and (looking-at org-bracket-link-regexp) | 2086 | (if (and (looking-at org-bracket-link-regexp) |
| @@ -2093,7 +2093,7 @@ Return nil if ELEMENT cannot be read." | |||
| 2093 | (buffer-substring-no-properties | 2093 | (buffer-substring-no-properties |
| 2094 | (org-element-property :contents-begin element) | 2094 | (org-element-property :contents-begin element) |
| 2095 | (org-element-property :contents-end element)))) | 2095 | (org-element-property :contents-end element)))) |
| 2096 | ((or 'center-block 'quote-block 'verse-block 'special-block) | 2096 | ((or `center-block `quote-block `verse-block `special-block) |
| 2097 | (org-remove-indentation | 2097 | (org-remove-indentation |
| 2098 | (buffer-substring-no-properties | 2098 | (buffer-substring-no-properties |
| 2099 | (org-element-property :contents-begin element) | 2099 | (org-element-property :contents-begin element) |
diff --git a/lisp/org/ob-exp.el b/lisp/org/ob-exp.el index bb4ef1b77f0..264dc0ed067 100644 --- a/lisp/org/ob-exp.el +++ b/lisp/org/ob-exp.el | |||
| @@ -175,7 +175,7 @@ this template." | |||
| 175 | ;; | 175 | ;; |
| 176 | ;; #+name: call_src | 176 | ;; #+name: call_src |
| 177 | ;; #+begin_src ... | 177 | ;; #+begin_src ... |
| 178 | ((and (or 'babel-call 'src-block) (guard object?)) | 178 | ((and (or `babel-call `src-block) (guard object?)) |
| 179 | nil) | 179 | nil) |
| 180 | (type type))) | 180 | (type type))) |
| 181 | (begin | 181 | (begin |
| @@ -187,7 +187,7 @@ this template." | |||
| 187 | (skip-chars-backward " \r\t\n") | 187 | (skip-chars-backward " \r\t\n") |
| 188 | (point))))) | 188 | (point))))) |
| 189 | (pcase type | 189 | (pcase type |
| 190 | ('inline-src-block | 190 | (`inline-src-block |
| 191 | (let* ((info | 191 | (let* ((info |
| 192 | (org-babel-get-src-block-info nil element)) | 192 | (org-babel-get-src-block-info nil element)) |
| 193 | (params (nth 2 info))) | 193 | (params (nth 2 info))) |
| @@ -215,7 +215,7 @@ this template." | |||
| 215 | ;; insert value. | 215 | ;; insert value. |
| 216 | (delete-region begin end) | 216 | (delete-region begin end) |
| 217 | (insert replacement))))) | 217 | (insert replacement))))) |
| 218 | ((or 'babel-call 'inline-babel-call) | 218 | ((or `babel-call `inline-babel-call) |
| 219 | (org-babel-exp-do-export (org-babel-lob-get-info element) | 219 | (org-babel-exp-do-export (org-babel-lob-get-info element) |
| 220 | 'lob) | 220 | 'lob) |
| 221 | (let ((rep | 221 | (let ((rep |
| @@ -242,7 +242,7 @@ this template." | |||
| 242 | (goto-char begin) | 242 | (goto-char begin) |
| 243 | (delete-region begin end) | 243 | (delete-region begin end) |
| 244 | (insert rep)))) | 244 | (insert rep)))) |
| 245 | ('src-block | 245 | (`src-block |
| 246 | (let ((match-start (copy-marker (match-beginning 0))) | 246 | (let ((match-start (copy-marker (match-beginning 0))) |
| 247 | (ind (org-get-indentation))) | 247 | (ind (org-get-indentation))) |
| 248 | ;; Take care of matched block: compute | 248 | ;; Take care of matched block: compute |
| @@ -394,14 +394,14 @@ inhibit insertion of results into the buffer." | |||
| 394 | (nth 2 info) | 394 | (nth 2 info) |
| 395 | `((:results . ,(if silent "silent" "replace"))))))) | 395 | `((:results . ,(if silent "silent" "replace"))))))) |
| 396 | (pcase type | 396 | (pcase type |
| 397 | ('block (org-babel-execute-src-block nil info)) | 397 | (`block (org-babel-execute-src-block nil info)) |
| 398 | ('inline | 398 | (`inline |
| 399 | ;; Position the point on the inline source block | 399 | ;; Position the point on the inline source block |
| 400 | ;; allowing `org-babel-insert-result' to check that the | 400 | ;; allowing `org-babel-insert-result' to check that the |
| 401 | ;; block is inline. | 401 | ;; block is inline. |
| 402 | (goto-char (nth 5 info)) | 402 | (goto-char (nth 5 info)) |
| 403 | (org-babel-execute-src-block nil info)) | 403 | (org-babel-execute-src-block nil info)) |
| 404 | ('lob | 404 | (`lob |
| 405 | (save-excursion | 405 | (save-excursion |
| 406 | (goto-char (nth 5 info)) | 406 | (goto-char (nth 5 info)) |
| 407 | (let (org-confirm-babel-evaluate) | 407 | (let (org-confirm-babel-evaluate) |
diff --git a/lisp/org/ob-groovy.el b/lisp/org/ob-groovy.el index 44470dd1a19..565b09754ba 100644 --- a/lisp/org/ob-groovy.el +++ b/lisp/org/ob-groovy.el | |||
| @@ -83,12 +83,12 @@ If RESULT-TYPE equals `value' then return the value of the last statement | |||
| 83 | in BODY as elisp." | 83 | in BODY as elisp." |
| 84 | (when session (error "Sessions are not (yet) supported for Groovy")) | 84 | (when session (error "Sessions are not (yet) supported for Groovy")) |
| 85 | (pcase result-type | 85 | (pcase result-type |
| 86 | ('output | 86 | (`output |
| 87 | (let ((src-file (org-babel-temp-file "groovy_"))) | 87 | (let ((src-file (org-babel-temp-file "groovy_"))) |
| 88 | (progn (with-temp-file src-file (insert body)) | 88 | (progn (with-temp-file src-file (insert body)) |
| 89 | (org-babel-eval | 89 | (org-babel-eval |
| 90 | (concat org-babel-groovy-command " " src-file) "")))) | 90 | (concat org-babel-groovy-command " " src-file) "")))) |
| 91 | ('value | 91 | (`value |
| 92 | (let* ((src-file (org-babel-temp-file "groovy_")) | 92 | (let* ((src-file (org-babel-temp-file "groovy_")) |
| 93 | (wrapper (format org-babel-groovy-wrapper-method body))) | 93 | (wrapper (format org-babel-groovy-wrapper-method body))) |
| 94 | (with-temp-file src-file (insert wrapper)) | 94 | (with-temp-file src-file (insert wrapper)) |
diff --git a/lisp/org/ob-haskell.el b/lisp/org/ob-haskell.el index ba1b4d00fc1..e607ee0c55b 100644 --- a/lisp/org/ob-haskell.el +++ b/lisp/org/ob-haskell.el | |||
| @@ -89,8 +89,8 @@ | |||
| 89 | (org-babel-reassemble-table | 89 | (org-babel-reassemble-table |
| 90 | (let ((result | 90 | (let ((result |
| 91 | (pcase result-type | 91 | (pcase result-type |
| 92 | ('output (mapconcat #'identity (reverse (cdr results)) "\n")) | 92 | (`output (mapconcat #'identity (reverse (cdr results)) "\n")) |
| 93 | ('value (car results))))) | 93 | (`value (car results))))) |
| 94 | (org-babel-result-cond (cdr (assq :result-params params)) | 94 | (org-babel-result-cond (cdr (assq :result-params params)) |
| 95 | result (org-babel-script-escape result))) | 95 | result (org-babel-script-escape result))) |
| 96 | (org-babel-pick-name (cdr (assq :colname-names params)) | 96 | (org-babel-pick-name (cdr (assq :colname-names params)) |
diff --git a/lisp/org/ob-io.el b/lisp/org/ob-io.el index 07746aaac7e..4f407cc52c3 100644 --- a/lisp/org/ob-io.el +++ b/lisp/org/ob-io.el | |||
| @@ -74,14 +74,14 @@ If RESULT-TYPE equals `value' then return the value of the last statement | |||
| 74 | in BODY as elisp." | 74 | in BODY as elisp." |
| 75 | (when session (error "Sessions are not (yet) supported for Io")) | 75 | (when session (error "Sessions are not (yet) supported for Io")) |
| 76 | (pcase result-type | 76 | (pcase result-type |
| 77 | ('output | 77 | (`output |
| 78 | (if (member "repl" result-params) | 78 | (if (member "repl" result-params) |
| 79 | (org-babel-eval org-babel-io-command body) | 79 | (org-babel-eval org-babel-io-command body) |
| 80 | (let ((src-file (org-babel-temp-file "io-"))) | 80 | (let ((src-file (org-babel-temp-file "io-"))) |
| 81 | (progn (with-temp-file src-file (insert body)) | 81 | (progn (with-temp-file src-file (insert body)) |
| 82 | (org-babel-eval | 82 | (org-babel-eval |
| 83 | (concat org-babel-io-command " " src-file) ""))))) | 83 | (concat org-babel-io-command " " src-file) ""))))) |
| 84 | ('value (let* ((src-file (org-babel-temp-file "io-")) | 84 | (`value (let* ((src-file (org-babel-temp-file "io-")) |
| 85 | (wrapper (format org-babel-io-wrapper-method body))) | 85 | (wrapper (format org-babel-io-wrapper-method body))) |
| 86 | (with-temp-file src-file (insert wrapper)) | 86 | (with-temp-file src-file (insert wrapper)) |
| 87 | (let ((raw (org-babel-eval | 87 | (let ((raw (org-babel-eval |
diff --git a/lisp/org/ob-lisp.el b/lisp/org/ob-lisp.el index 8fc691ed616..b846138f7a3 100644 --- a/lisp/org/ob-lisp.el +++ b/lisp/org/ob-lisp.el | |||
| @@ -87,8 +87,8 @@ current directory string." | |||
| 87 | BODY is the contents of the block, as a string. PARAMS is | 87 | BODY is the contents of the block, as a string. PARAMS is |
| 88 | a property list containing the parameters of the block." | 88 | a property list containing the parameters of the block." |
| 89 | (require (pcase org-babel-lisp-eval-fn | 89 | (require (pcase org-babel-lisp-eval-fn |
| 90 | ('slime-eval 'slime) | 90 | (`slime-eval 'slime) |
| 91 | ('sly-eval 'sly))) | 91 | (`sly-eval 'sly))) |
| 92 | (org-babel-reassemble-table | 92 | (org-babel-reassemble-table |
| 93 | (let ((result | 93 | (let ((result |
| 94 | (funcall (if (member "output" (cdr (assq :result-params params))) | 94 | (funcall (if (member "output" (cdr (assq :result-params params))) |
diff --git a/lisp/org/ob-lob.el b/lisp/org/ob-lob.el index 6668ccd8bab..6af6bf07e84 100644 --- a/lisp/org/ob-lob.el +++ b/lisp/org/ob-lob.el | |||
| @@ -105,8 +105,8 @@ after REF in the Library of Babel." | |||
| 105 | (when (equal name (org-element-property :name element)) | 105 | (when (equal name (org-element-property :name element)) |
| 106 | (throw :found | 106 | (throw :found |
| 107 | (pcase (org-element-type element) | 107 | (pcase (org-element-type element) |
| 108 | ('src-block (org-babel-get-src-block-info t element)) | 108 | (`src-block (org-babel-get-src-block-info t element)) |
| 109 | ('babel-call (org-babel-lob-get-info element)) | 109 | (`babel-call (org-babel-lob-get-info element)) |
| 110 | ;; Non-executable data found. Since names | 110 | ;; Non-executable data found. Since names |
| 111 | ;; are supposed to be unique throughout | 111 | ;; are supposed to be unique throughout |
| 112 | ;; a document, bail out. | 112 | ;; a document, bail out. |
diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el index 7750afdffcb..6ae72c7e565 100644 --- a/lisp/org/ob-lua.el +++ b/lisp/org/ob-lua.el | |||
| @@ -290,10 +290,10 @@ string. If RESULT-TYPE equals 'value then return the value of the | |||
| 290 | last statement in BODY, as elisp." | 290 | last statement in BODY, as elisp." |
| 291 | (let ((raw | 291 | (let ((raw |
| 292 | (pcase result-type | 292 | (pcase result-type |
| 293 | ('output (org-babel-eval org-babel-lua-command | 293 | (`output (org-babel-eval org-babel-lua-command |
| 294 | (concat (if preamble (concat preamble "\n")) | 294 | (concat (if preamble (concat preamble "\n")) |
| 295 | body))) | 295 | body))) |
| 296 | ('value (let ((tmp-file (org-babel-temp-file "lua-"))) | 296 | (`value (let ((tmp-file (org-babel-temp-file "lua-"))) |
| 297 | (org-babel-eval | 297 | (org-babel-eval |
| 298 | org-babel-lua-command | 298 | org-babel-lua-command |
| 299 | (concat | 299 | (concat |
| @@ -364,7 +364,7 @@ fd:close()" | |||
| 364 | (funcall send-wait))) | 364 | (funcall send-wait))) |
| 365 | (results | 365 | (results |
| 366 | (pcase result-type | 366 | (pcase result-type |
| 367 | ('output | 367 | (`output |
| 368 | (mapconcat | 368 | (mapconcat |
| 369 | #'org-trim | 369 | #'org-trim |
| 370 | (butlast | 370 | (butlast |
| @@ -375,7 +375,7 @@ fd:close()" | |||
| 375 | (insert org-babel-lua-eoe-indicator) | 375 | (insert org-babel-lua-eoe-indicator) |
| 376 | (funcall send-wait)) | 376 | (funcall send-wait)) |
| 377 | 2) "\n")) | 377 | 2) "\n")) |
| 378 | ('value | 378 | (`value |
| 379 | (let ((tmp-file (org-babel-temp-file "lua-"))) | 379 | (let ((tmp-file (org-babel-temp-file "lua-"))) |
| 380 | (org-babel-comint-with-output | 380 | (org-babel-comint-with-output |
| 381 | (session org-babel-lua-eoe-indicator nil body) | 381 | (session org-babel-lua-eoe-indicator nil body) |
diff --git a/lisp/org/ob-octave.el b/lisp/org/ob-octave.el index f19b6ccf25b..c7339cf992d 100644 --- a/lisp/org/ob-octave.el +++ b/lisp/org/ob-octave.el | |||
| @@ -178,14 +178,14 @@ value of the last statement in BODY, as elisp." | |||
| 178 | org-babel-matlab-shell-command | 178 | org-babel-matlab-shell-command |
| 179 | org-babel-octave-shell-command))) | 179 | org-babel-octave-shell-command))) |
| 180 | (pcase result-type | 180 | (pcase result-type |
| 181 | ('output (org-babel-eval cmd body)) | 181 | (`output (org-babel-eval cmd body)) |
| 182 | ('value (let ((tmp-file (org-babel-temp-file "octave-"))) | 182 | (`value (let ((tmp-file (org-babel-temp-file "octave-"))) |
| 183 | (org-babel-eval | 183 | (org-babel-eval |
| 184 | cmd | 184 | cmd |
| 185 | (format org-babel-octave-wrapper-method body | 185 | (format org-babel-octave-wrapper-method body |
| 186 | (org-babel-process-file-name tmp-file 'noquote) | 186 | (org-babel-process-file-name tmp-file 'noquote) |
| 187 | (org-babel-process-file-name tmp-file 'noquote))) | 187 | (org-babel-process-file-name tmp-file 'noquote))) |
| 188 | (org-babel-octave-import-elisp-from-file tmp-file)))))) | 188 | (org-babel-octave-import-elisp-from-file tmp-file)))))) |
| 189 | 189 | ||
| 190 | (defun org-babel-octave-evaluate-session | 190 | (defun org-babel-octave-evaluate-session |
| 191 | (session body result-type &optional matlabp) | 191 | (session body result-type &optional matlabp) |
| @@ -194,11 +194,11 @@ value of the last statement in BODY, as elisp." | |||
| 194 | (wait-file (org-babel-temp-file "matlab-emacs-link-wait-signal-")) | 194 | (wait-file (org-babel-temp-file "matlab-emacs-link-wait-signal-")) |
| 195 | (full-body | 195 | (full-body |
| 196 | (pcase result-type | 196 | (pcase result-type |
| 197 | ('output | 197 | (`output |
| 198 | (mapconcat | 198 | (mapconcat |
| 199 | #'org-babel-chomp | 199 | #'org-babel-chomp |
| 200 | (list body org-babel-octave-eoe-indicator) "\n")) | 200 | (list body org-babel-octave-eoe-indicator) "\n")) |
| 201 | ('value | 201 | (`value |
| 202 | (if (and matlabp org-babel-matlab-with-emacs-link) | 202 | (if (and matlabp org-babel-matlab-with-emacs-link) |
| 203 | (concat | 203 | (concat |
| 204 | (format org-babel-matlab-emacs-link-wrapper-method | 204 | (format org-babel-matlab-emacs-link-wrapper-method |
| @@ -232,9 +232,9 @@ value of the last statement in BODY, as elisp." | |||
| 232 | t full-body) | 232 | t full-body) |
| 233 | (insert full-body) (comint-send-input nil t)))) results) | 233 | (insert full-body) (comint-send-input nil t)))) results) |
| 234 | (pcase result-type | 234 | (pcase result-type |
| 235 | ('value | 235 | (`value |
| 236 | (org-babel-octave-import-elisp-from-file tmp-file)) | 236 | (org-babel-octave-import-elisp-from-file tmp-file)) |
| 237 | ('output | 237 | (`output |
| 238 | (setq results | 238 | (setq results |
| 239 | (if matlabp | 239 | (if matlabp |
| 240 | (cdr (reverse (delq "" (mapcar | 240 | (cdr (reverse (delq "" (mapcar |
diff --git a/lisp/org/ob-perl.el b/lisp/org/ob-perl.el index adb62ce50b9..85806fd5330 100644 --- a/lisp/org/ob-perl.el +++ b/lisp/org/ob-perl.el | |||
| @@ -136,12 +136,12 @@ return the value of the last statement in BODY, as elisp." | |||
| 136 | tmp-file 'noquote))) | 136 | tmp-file 'noquote))) |
| 137 | (let ((results | 137 | (let ((results |
| 138 | (pcase result-type | 138 | (pcase result-type |
| 139 | ('output | 139 | (`output |
| 140 | (with-temp-file tmp-file | 140 | (with-temp-file tmp-file |
| 141 | (insert | 141 | (insert |
| 142 | (org-babel-eval org-babel-perl-command body)) | 142 | (org-babel-eval org-babel-perl-command body)) |
| 143 | (buffer-string))) | 143 | (buffer-string))) |
| 144 | ('value | 144 | (`value |
| 145 | (org-babel-eval org-babel-perl-command | 145 | (org-babel-eval org-babel-perl-command |
| 146 | (format org-babel-perl-wrapper-method | 146 | (format org-babel-perl-wrapper-method |
| 147 | body tmp-babel-file)))))) | 147 | body tmp-babel-file)))))) |
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el index 3f1bbf1cb3d..9f1234bac52 100644 --- a/lisp/org/ob-python.el +++ b/lisp/org/ob-python.el | |||
| @@ -265,10 +265,10 @@ string. If RESULT-TYPE equals `value' then return the value of the | |||
| 265 | last statement in BODY, as elisp." | 265 | last statement in BODY, as elisp." |
| 266 | (let ((raw | 266 | (let ((raw |
| 267 | (pcase result-type | 267 | (pcase result-type |
| 268 | ('output (org-babel-eval org-babel-python-command | 268 | (`output (org-babel-eval org-babel-python-command |
| 269 | (concat (if preamble (concat preamble "\n")) | 269 | (concat (if preamble (concat preamble "\n")) |
| 270 | body))) | 270 | body))) |
| 271 | ('value (let ((tmp-file (org-babel-temp-file "python-"))) | 271 | (`value (let ((tmp-file (org-babel-temp-file "python-"))) |
| 272 | (org-babel-eval | 272 | (org-babel-eval |
| 273 | org-babel-python-command | 273 | org-babel-python-command |
| 274 | (concat | 274 | (concat |
| @@ -314,7 +314,7 @@ last statement in BODY, as elisp." | |||
| 314 | (funcall send-wait))) | 314 | (funcall send-wait))) |
| 315 | (results | 315 | (results |
| 316 | (pcase result-type | 316 | (pcase result-type |
| 317 | ('output | 317 | (`output |
| 318 | (let ((body (if (string-match-p ".\n+." body) ; Multiline | 318 | (let ((body (if (string-match-p ".\n+." body) ; Multiline |
| 319 | (let ((tmp-src-file (org-babel-temp-file | 319 | (let ((tmp-src-file (org-babel-temp-file |
| 320 | "python-"))) | 320 | "python-"))) |
| @@ -332,7 +332,7 @@ last statement in BODY, as elisp." | |||
| 332 | (insert org-babel-python-eoe-indicator) | 332 | (insert org-babel-python-eoe-indicator) |
| 333 | (funcall send-wait)) | 333 | (funcall send-wait)) |
| 334 | 2) "\n"))) | 334 | 2) "\n"))) |
| 335 | ('value | 335 | (`value |
| 336 | (let ((tmp-file (org-babel-temp-file "python-"))) | 336 | (let ((tmp-file (org-babel-temp-file "python-"))) |
| 337 | (org-babel-comint-with-output | 337 | (org-babel-comint-with-output |
| 338 | (session org-babel-python-eoe-indicator nil body) | 338 | (session org-babel-python-eoe-indicator nil body) |
diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el index 88a93294dbe..3efa17f9601 100644 --- a/lisp/org/ob-ref.el +++ b/lisp/org/ob-ref.el | |||
| @@ -166,11 +166,11 @@ Emacs Lisp representation of the value of the variable." | |||
| 166 | (goto-char | 166 | (goto-char |
| 167 | (org-element-property :post-affiliated e)) | 167 | (org-element-property :post-affiliated e)) |
| 168 | (pcase (org-element-type e) | 168 | (pcase (org-element-type e) |
| 169 | ('babel-call | 169 | (`babel-call |
| 170 | (throw :found | 170 | (throw :found |
| 171 | (org-babel-execute-src-block | 171 | (org-babel-execute-src-block |
| 172 | nil (org-babel-lob-get-info e) params))) | 172 | nil (org-babel-lob-get-info e) params))) |
| 173 | ('src-block | 173 | (`src-block |
| 174 | (throw :found | 174 | (throw :found |
| 175 | (org-babel-execute-src-block | 175 | (org-babel-execute-src-block |
| 176 | nil nil | 176 | nil nil |
diff --git a/lisp/org/ob-ruby.el b/lisp/org/ob-ruby.el index bb06b008a69..7686ac4e807 100644 --- a/lisp/org/ob-ruby.el +++ b/lisp/org/ob-ruby.el | |||
| @@ -200,8 +200,8 @@ return the value of the last statement in BODY, as elisp." | |||
| 200 | (if (not buffer) | 200 | (if (not buffer) |
| 201 | ;; external process evaluation | 201 | ;; external process evaluation |
| 202 | (pcase result-type | 202 | (pcase result-type |
| 203 | ('output (org-babel-eval org-babel-ruby-command body)) | 203 | (`output (org-babel-eval org-babel-ruby-command body)) |
| 204 | ('value (let ((tmp-file (org-babel-temp-file "ruby-"))) | 204 | (`value (let ((tmp-file (org-babel-temp-file "ruby-"))) |
| 205 | (org-babel-eval | 205 | (org-babel-eval |
| 206 | org-babel-ruby-command | 206 | org-babel-ruby-command |
| 207 | (format (if (member "pp" result-params) | 207 | (format (if (member "pp" result-params) |
| @@ -211,7 +211,7 @@ return the value of the last statement in BODY, as elisp." | |||
| 211 | (org-babel-eval-read-file tmp-file)))) | 211 | (org-babel-eval-read-file tmp-file)))) |
| 212 | ;; comint session evaluation | 212 | ;; comint session evaluation |
| 213 | (pcase result-type | 213 | (pcase result-type |
| 214 | ('output | 214 | (`output |
| 215 | (let ((eoe-string (format "puts \"%s\"" org-babel-ruby-eoe-indicator))) | 215 | (let ((eoe-string (format "puts \"%s\"" org-babel-ruby-eoe-indicator))) |
| 216 | ;; Force the session to be ready before the actual session | 216 | ;; Force the session to be ready before the actual session |
| 217 | ;; code is run. There is some problem in comint that will | 217 | ;; code is run. There is some problem in comint that will |
| @@ -238,7 +238,7 @@ return the value of the last statement in BODY, as elisp." | |||
| 238 | "conf.prompt_mode=_org_prompt_mode;conf.echo=true" | 238 | "conf.prompt_mode=_org_prompt_mode;conf.echo=true" |
| 239 | eoe-string))) | 239 | eoe-string))) |
| 240 | "\n") "[\r\n]") 4) "\n"))) | 240 | "\n") "[\r\n]") 4) "\n"))) |
| 241 | ('value | 241 | (`value |
| 242 | (let* ((tmp-file (org-babel-temp-file "ruby-")) | 242 | (let* ((tmp-file (org-babel-temp-file "ruby-")) |
| 243 | (ppp (or (member "code" result-params) | 243 | (ppp (or (member "code" result-params) |
| 244 | (member "pp" result-params)))) | 244 | (member "pp" result-params)))) |
diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index cdedf7edfb8..959ede3decc 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el | |||
| @@ -175,16 +175,16 @@ This function is called by `org-babel-execute-src-block'." | |||
| 175 | (org-babel-temp-file "sql-out-"))) | 175 | (org-babel-temp-file "sql-out-"))) |
| 176 | (header-delim "") | 176 | (header-delim "") |
| 177 | (command (pcase (intern engine) | 177 | (command (pcase (intern engine) |
| 178 | ('dbi (format "dbish --batch %s < %s | sed '%s' > %s" | 178 | (`dbi (format "dbish --batch %s < %s | sed '%s' > %s" |
| 179 | (or cmdline "") | 179 | (or cmdline "") |
| 180 | (org-babel-process-file-name in-file) | 180 | (org-babel-process-file-name in-file) |
| 181 | "/^+/d;s/^|//;s/(NULL)/ /g;$d" | 181 | "/^+/d;s/^|//;s/(NULL)/ /g;$d" |
| 182 | (org-babel-process-file-name out-file))) | 182 | (org-babel-process-file-name out-file))) |
| 183 | ('monetdb (format "mclient -f tab %s < %s > %s" | 183 | (`monetdb (format "mclient -f tab %s < %s > %s" |
| 184 | (or cmdline "") | 184 | (or cmdline "") |
| 185 | (org-babel-process-file-name in-file) | 185 | (org-babel-process-file-name in-file) |
| 186 | (org-babel-process-file-name out-file))) | 186 | (org-babel-process-file-name out-file))) |
| 187 | ('mssql (format "sqlcmd %s -s \"\t\" %s -i %s -o %s" | 187 | (`mssql (format "sqlcmd %s -s \"\t\" %s -i %s -o %s" |
| 188 | (or cmdline "") | 188 | (or cmdline "") |
| 189 | (org-babel-sql-dbstring-mssql | 189 | (org-babel-sql-dbstring-mssql |
| 190 | dbhost dbuser dbpassword database) | 190 | dbhost dbuser dbpassword database) |
| @@ -192,14 +192,14 @@ This function is called by `org-babel-execute-src-block'." | |||
| 192 | (org-babel-process-file-name in-file)) | 192 | (org-babel-process-file-name in-file)) |
| 193 | (org-babel-sql-convert-standard-filename | 193 | (org-babel-sql-convert-standard-filename |
| 194 | (org-babel-process-file-name out-file)))) | 194 | (org-babel-process-file-name out-file)))) |
| 195 | ('mysql (format "mysql %s %s %s < %s > %s" | 195 | (`mysql (format "mysql %s %s %s < %s > %s" |
| 196 | (org-babel-sql-dbstring-mysql | 196 | (org-babel-sql-dbstring-mysql |
| 197 | dbhost dbport dbuser dbpassword database) | 197 | dbhost dbport dbuser dbpassword database) |
| 198 | (if colnames-p "" "-N") | 198 | (if colnames-p "" "-N") |
| 199 | (or cmdline "") | 199 | (or cmdline "") |
| 200 | (org-babel-process-file-name in-file) | 200 | (org-babel-process-file-name in-file) |
| 201 | (org-babel-process-file-name out-file))) | 201 | (org-babel-process-file-name out-file))) |
| 202 | ('postgresql (format | 202 | (`postgresql (format |
| 203 | "%spsql --set=\"ON_ERROR_STOP=1\" %s -A -P \ | 203 | "%spsql --set=\"ON_ERROR_STOP=1\" %s -A -P \ |
| 204 | footer=off -F \"\t\" %s -f %s -o %s %s" | 204 | footer=off -F \"\t\" %s -f %s -o %s %s" |
| 205 | (if dbpassword | 205 | (if dbpassword |
| @@ -211,7 +211,7 @@ footer=off -F \"\t\" %s -f %s -o %s %s" | |||
| 211 | (org-babel-process-file-name in-file) | 211 | (org-babel-process-file-name in-file) |
| 212 | (org-babel-process-file-name out-file) | 212 | (org-babel-process-file-name out-file) |
| 213 | (or cmdline ""))) | 213 | (or cmdline ""))) |
| 214 | ('sqsh (format "sqsh %s %s -i %s -o %s -m csv" | 214 | (`sqsh (format "sqsh %s %s -i %s -o %s -m csv" |
| 215 | (or cmdline "") | 215 | (or cmdline "") |
| 216 | (org-babel-sql-dbstring-sqsh | 216 | (org-babel-sql-dbstring-sqsh |
| 217 | dbhost dbuser dbpassword database) | 217 | dbhost dbuser dbpassword database) |
| @@ -219,13 +219,13 @@ footer=off -F \"\t\" %s -f %s -o %s %s" | |||
| 219 | (org-babel-process-file-name in-file)) | 219 | (org-babel-process-file-name in-file)) |
| 220 | (org-babel-sql-convert-standard-filename | 220 | (org-babel-sql-convert-standard-filename |
| 221 | (org-babel-process-file-name out-file)))) | 221 | (org-babel-process-file-name out-file)))) |
| 222 | ('vertica (format "vsql %s -f %s -o %s %s" | 222 | (`vertica (format "vsql %s -f %s -o %s %s" |
| 223 | (org-babel-sql-dbstring-vertica | 223 | (org-babel-sql-dbstring-vertica |
| 224 | dbhost dbport dbuser dbpassword database) | 224 | dbhost dbport dbuser dbpassword database) |
| 225 | (org-babel-process-file-name in-file) | 225 | (org-babel-process-file-name in-file) |
| 226 | (org-babel-process-file-name out-file) | 226 | (org-babel-process-file-name out-file) |
| 227 | (or cmdline ""))) | 227 | (or cmdline ""))) |
| 228 | ('oracle (format | 228 | (`oracle (format |
| 229 | "sqlplus -s %s < %s > %s" | 229 | "sqlplus -s %s < %s > %s" |
| 230 | (org-babel-sql-dbstring-oracle | 230 | (org-babel-sql-dbstring-oracle |
| 231 | dbhost dbport dbuser dbpassword database) | 231 | dbhost dbport dbuser dbpassword database) |
| @@ -235,8 +235,8 @@ footer=off -F \"\t\" %s -f %s -o %s %s" | |||
| 235 | (with-temp-file in-file | 235 | (with-temp-file in-file |
| 236 | (insert | 236 | (insert |
| 237 | (pcase (intern engine) | 237 | (pcase (intern engine) |
| 238 | ('dbi "/format partbox\n") | 238 | (`dbi "/format partbox\n") |
| 239 | ('oracle "SET PAGESIZE 50000 | 239 | (`oracle "SET PAGESIZE 50000 |
| 240 | SET NEWPAGE 0 | 240 | SET NEWPAGE 0 |
| 241 | SET TAB OFF | 241 | SET TAB OFF |
| 242 | SET SPACE 0 | 242 | SET SPACE 0 |
| @@ -249,10 +249,10 @@ SET MARKUP HTML OFF SPOOL OFF | |||
| 249 | SET COLSEP '|' | 249 | SET COLSEP '|' |
| 250 | 250 | ||
| 251 | ") | 251 | ") |
| 252 | ((or 'mssql 'sqsh) "SET NOCOUNT ON | 252 | ((or `mssql `sqsh) "SET NOCOUNT ON |
| 253 | 253 | ||
| 254 | ") | 254 | ") |
| 255 | ('vertica "\\a\n") | 255 | (`vertica "\\a\n") |
| 256 | (_ "")) | 256 | (_ "")) |
| 257 | (org-babel-expand-body:sql body params) | 257 | (org-babel-expand-body:sql body params) |
| 258 | ;; "sqsh" requires "go" inserted at EOF. | 258 | ;; "sqsh" requires "go" inserted at EOF. |
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index d92fbaf8977..98e89eb1c4e 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el | |||
| @@ -6213,12 +6213,12 @@ scheduled items with an hour specification like [h]h:mm." | |||
| 6213 | (or (not (memq (line-beginning-position 0) deadline-pos)) | 6213 | (or (not (memq (line-beginning-position 0) deadline-pos)) |
| 6214 | habitp)) | 6214 | habitp)) |
| 6215 | nil) | 6215 | nil) |
| 6216 | ('repeated-after-deadline | 6216 | (`repeated-after-deadline |
| 6217 | (let ((deadline (time-to-days | 6217 | (let ((deadline (time-to-days |
| 6218 | (org-get-deadline-time (point))))) | 6218 | (org-get-deadline-time (point))))) |
| 6219 | (and (<= schedule deadline) (> current deadline)))) | 6219 | (and (<= schedule deadline) (> current deadline)))) |
| 6220 | ('not-today pastschedp) | 6220 | (`not-today pastschedp) |
| 6221 | ('t t) | 6221 | (`t t) |
| 6222 | (_ nil)) | 6222 | (_ nil)) |
| 6223 | (throw :skip nil)) | 6223 | (throw :skip nil)) |
| 6224 | ;; Skip habits if `org-habit-show-habits' is nil, or if we | 6224 | ;; Skip habits if `org-habit-show-habits' is nil, or if we |
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index f51eee56b7d..3de386c69d6 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el | |||
| @@ -1042,7 +1042,7 @@ Store them in the capture property list." | |||
| 1042 | (org-capture-put :exact-position (point)) | 1042 | (org-capture-put :exact-position (point)) |
| 1043 | (setq target-entry-p | 1043 | (setq target-entry-p |
| 1044 | (and (derived-mode-p 'org-mode) (org-at-heading-p)))) | 1044 | (and (derived-mode-p 'org-mode) (org-at-heading-p)))) |
| 1045 | ('(clock) | 1045 | (`(clock) |
| 1046 | (if (and (markerp org-clock-hd-marker) | 1046 | (if (and (markerp org-clock-hd-marker) |
| 1047 | (marker-buffer org-clock-hd-marker)) | 1047 | (marker-buffer org-clock-hd-marker)) |
| 1048 | (progn (set-buffer (marker-buffer org-clock-hd-marker)) | 1048 | (progn (set-buffer (marker-buffer org-clock-hd-marker)) |
| @@ -1101,11 +1101,11 @@ may have been stored before." | |||
| 1101 | (goto-char (org-capture-get :pos)) | 1101 | (goto-char (org-capture-get :pos)) |
| 1102 | (setq-local outline-level 'org-outline-level) | 1102 | (setq-local outline-level 'org-outline-level) |
| 1103 | (pcase (org-capture-get :type) | 1103 | (pcase (org-capture-get :type) |
| 1104 | ((or 'nil 'entry) (org-capture-place-entry)) | 1104 | ((or `nil `entry) (org-capture-place-entry)) |
| 1105 | ('table-line (org-capture-place-table-line)) | 1105 | (`table-line (org-capture-place-table-line)) |
| 1106 | ('plain (org-capture-place-plain-text)) | 1106 | (`plain (org-capture-place-plain-text)) |
| 1107 | ('item (org-capture-place-item)) | 1107 | (`item (org-capture-place-item)) |
| 1108 | ('checkitem (org-capture-place-item))) | 1108 | (`checkitem (org-capture-place-item))) |
| 1109 | (org-capture-mode 1) | 1109 | (org-capture-mode 1) |
| 1110 | (setq-local org-capture-current-plist org-capture-plist)) | 1110 | (setq-local org-capture-current-plist org-capture-plist)) |
| 1111 | 1111 | ||
| @@ -1791,7 +1791,7 @@ The template may still contain \"%?\" for cursor positioning." | |||
| 1791 | (let ((insert-fun (if (equal key "C") #'insert | 1791 | (let ((insert-fun (if (equal key "C") #'insert |
| 1792 | (lambda (s) (org-insert-link 0 s))))) | 1792 | (lambda (s) (org-insert-link 0 s))))) |
| 1793 | (pcase org-capture--clipboards | 1793 | (pcase org-capture--clipboards |
| 1794 | ('nil nil) | 1794 | (`nil nil) |
| 1795 | (`(,value) (funcall insert-fun value)) | 1795 | (`(,value) (funcall insert-fun value)) |
| 1796 | (`(,first-value . ,_) | 1796 | (`(,first-value . ,_) |
| 1797 | (funcall insert-fun | 1797 | (funcall insert-fun |
| @@ -1811,7 +1811,7 @@ The template may still contain \"%?\" for cursor positioning." | |||
| 1811 | time (or org-time-was-given upcase?) | 1811 | time (or org-time-was-given upcase?) |
| 1812 | (member key '("u" "U")) | 1812 | (member key '("u" "U")) |
| 1813 | nil nil (list org-end-time-was-given)))) | 1813 | nil nil (list org-end-time-was-given)))) |
| 1814 | ('nil | 1814 | (`nil |
| 1815 | ;; Load history list for current prompt. | 1815 | ;; Load history list for current prompt. |
| 1816 | (setq org-capture--prompt-history | 1816 | (setq org-capture--prompt-history |
| 1817 | (gethash prompt org-capture--prompt-history-table)) | 1817 | (gethash prompt org-capture--prompt-history-table)) |
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 0940c121473..9be0d5bc1ff 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el | |||
| @@ -1692,11 +1692,11 @@ Optional argument N tells to change by that many units." | |||
| 1692 | (org-timestamp-change | 1692 | (org-timestamp-change |
| 1693 | (round (/ (float-time tdiff) | 1693 | (round (/ (float-time tdiff) |
| 1694 | (pcase timestamp? | 1694 | (pcase timestamp? |
| 1695 | ('minute 60) | 1695 | (`minute 60) |
| 1696 | ('hour 3600) | 1696 | (`hour 3600) |
| 1697 | ('day (* 24 3600)) | 1697 | (`day (* 24 3600)) |
| 1698 | ('month (* 24 3600 31)) | 1698 | (`month (* 24 3600 31)) |
| 1699 | ('year (* 24 3600 365.2))))) | 1699 | (`year (* 24 3600 365.2))))) |
| 1700 | timestamp? 'updown))))))) | 1700 | timestamp? 'updown))))))) |
| 1701 | 1701 | ||
| 1702 | ;;;###autoload | 1702 | ;;;###autoload |
| @@ -2045,7 +2045,7 @@ in the buffer and update it." | |||
| 2045 | (org-find-dblock "clocktable") | 2045 | (org-find-dblock "clocktable") |
| 2046 | (org-show-entry)) | 2046 | (org-show-entry)) |
| 2047 | (pcase (org-in-clocktable-p) | 2047 | (pcase (org-in-clocktable-p) |
| 2048 | ('nil | 2048 | (`nil |
| 2049 | (org-create-dblock | 2049 | (org-create-dblock |
| 2050 | (org-combine-plists | 2050 | (org-combine-plists |
| 2051 | (list :scope (if (org-before-first-heading-p) 'file 'subtree)) | 2051 | (list :scope (if (org-before-first-heading-p) 'file 'subtree)) |
| @@ -2194,21 +2194,21 @@ have priority." | |||
| 2194 | (error "Looking forward with quarters isn't implemented")))) | 2194 | (error "Looking forward with quarters isn't implemented")))) |
| 2195 | (when (= shift 0) | 2195 | (when (= shift 0) |
| 2196 | (pcase key | 2196 | (pcase key |
| 2197 | ('yesterday (setq key 'today shift -1)) | 2197 | (`yesterday (setq key 'today shift -1)) |
| 2198 | ('lastweek (setq key 'week shift -1)) | 2198 | (`lastweek (setq key 'week shift -1)) |
| 2199 | ('lastmonth (setq key 'month shift -1)) | 2199 | (`lastmonth (setq key 'month shift -1)) |
| 2200 | ('lastyear (setq key 'year shift -1)) | 2200 | (`lastyear (setq key 'year shift -1)) |
| 2201 | ('lastq (setq key 'quarter shift -1)))) | 2201 | (`lastq (setq key 'quarter shift -1)))) |
| 2202 | ;; Prepare start and end times depending on KEY's type. | 2202 | ;; Prepare start and end times depending on KEY's type. |
| 2203 | (pcase key | 2203 | (pcase key |
| 2204 | ((or 'day 'today) (setq m 0 h 0 h1 24 d (+ d shift))) | 2204 | ((or `day `today) (setq m 0 h 0 h1 24 d (+ d shift))) |
| 2205 | ((or 'week 'thisweek) | 2205 | ((or `week `thisweek) |
| 2206 | (let* ((ws (or wstart 1)) | 2206 | (let* ((ws (or wstart 1)) |
| 2207 | (diff (+ (* -7 shift) (if (= dow 0) (- 7 ws) (- dow ws))))) | 2207 | (diff (+ (* -7 shift) (if (= dow 0) (- 7 ws) (- dow ws))))) |
| 2208 | (setq m 0 h 0 d (- d diff) d1 (+ 7 d)))) | 2208 | (setq m 0 h 0 d (- d diff) d1 (+ 7 d)))) |
| 2209 | ((or 'month 'thismonth) | 2209 | ((or `month `thismonth) |
| 2210 | (setq h 0 m 0 d (or mstart 1) month (+ month shift) month1 (1+ month))) | 2210 | (setq h 0 m 0 d (or mstart 1) month (+ month shift) month1 (1+ month))) |
| 2211 | ((or 'quarter 'thisq) | 2211 | ((or `quarter `thisq) |
| 2212 | ;; Compute if this shift remains in this year. If not, compute | 2212 | ;; Compute if this shift remains in this year. If not, compute |
| 2213 | ;; how many years and quarters we have to shift (via floor*) and | 2213 | ;; how many years and quarters we have to shift (via floor*) and |
| 2214 | ;; compute the shifted years, months and quarters. | 2214 | ;; compute the shifted years, months and quarters. |
| @@ -2231,13 +2231,13 @@ have priority." | |||
| 2231 | (setq shiftedy y) | 2231 | (setq shiftedy y) |
| 2232 | (let ((qshift (* 3 (1- (+ q shift))))) | 2232 | (let ((qshift (* 3 (1- (+ q shift))))) |
| 2233 | (setq m 0 h 0 d 1 month (+ 1 qshift) month1 (+ 4 qshift)))))) | 2233 | (setq m 0 h 0 d 1 month (+ 1 qshift) month1 (+ 4 qshift)))))) |
| 2234 | ((or 'year 'thisyear) | 2234 | ((or `year `thisyear) |
| 2235 | (setq m 0 h 0 d 1 month 1 y (+ y shift) y1 (1+ y))) | 2235 | (setq m 0 h 0 d 1 month 1 y (+ y shift) y1 (1+ y))) |
| 2236 | ((or 'interactive 'untilnow)) ; Special cases, ignore them. | 2236 | ((or `interactive `untilnow)) ; Special cases, ignore them. |
| 2237 | (_ (user-error "No such time block %s" key))) | 2237 | (_ (user-error "No such time block %s" key))) |
| 2238 | ;; Format start and end times according to AS-STRINGS. | 2238 | ;; Format start and end times according to AS-STRINGS. |
| 2239 | (let* ((start (pcase key | 2239 | (let* ((start (pcase key |
| 2240 | ('interactive (org-read-date nil t nil "Range start? ")) | 2240 | (`interactive (org-read-date nil t nil "Range start? ")) |
| 2241 | ;; In theory, all clocks started after the dawn of | 2241 | ;; In theory, all clocks started after the dawn of |
| 2242 | ;; humanity. However, the platform's clock | 2242 | ;; humanity. However, the platform's clock |
| 2243 | ;; support might not go back that far. Choose the | 2243 | ;; support might not go back that far. Choose the |
| @@ -2246,15 +2246,15 @@ have priority." | |||
| 2246 | ;; that works, otherwise 0 (1970). Going back | 2246 | ;; that works, otherwise 0 (1970). Going back |
| 2247 | ;; billions of years would loop forever on Mac OS | 2247 | ;; billions of years would loop forever on Mac OS |
| 2248 | ;; X 10.6 with Emacs 26 and earlier (Bug#27736). | 2248 | ;; X 10.6 with Emacs 26 and earlier (Bug#27736). |
| 2249 | ('untilnow | 2249 | (`untilnow |
| 2250 | (let ((old 0)) | 2250 | (let ((old 0)) |
| 2251 | (dolist (older '((-32768 0) (-33554432 0)) old) | 2251 | (dolist (older '((-32768 0) (-33554432 0)) old) |
| 2252 | (when (ignore-errors (decode-time older)) | 2252 | (when (ignore-errors (decode-time older)) |
| 2253 | (setq old older))))) | 2253 | (setq old older))))) |
| 2254 | (_ (encode-time 0 m h d month y)))) | 2254 | (_ (encode-time 0 m h d month y)))) |
| 2255 | (end (pcase key | 2255 | (end (pcase key |
| 2256 | ('interactive (org-read-date nil t nil "Range end? ")) | 2256 | (`interactive (org-read-date nil t nil "Range end? ")) |
| 2257 | ('untilnow (current-time)) | 2257 | (`untilnow (current-time)) |
| 2258 | (_ (encode-time 0 | 2258 | (_ (encode-time 0 |
| 2259 | (or m1 m) | 2259 | (or m1 m) |
| 2260 | (or h1 h) | 2260 | (or h1 h) |
| @@ -2263,15 +2263,15 @@ have priority." | |||
| 2263 | (or y1 y))))) | 2263 | (or y1 y))))) |
| 2264 | (text | 2264 | (text |
| 2265 | (pcase key | 2265 | (pcase key |
| 2266 | ((or 'day 'today) (format-time-string "%A, %B %d, %Y" start)) | 2266 | ((or `day `today) (format-time-string "%A, %B %d, %Y" start)) |
| 2267 | ((or 'week 'thisweek) (format-time-string "week %G-W%V" start)) | 2267 | ((or `week `thisweek) (format-time-string "week %G-W%V" start)) |
| 2268 | ((or 'month 'thismonth) (format-time-string "%B %Y" start)) | 2268 | ((or `month `thismonth) (format-time-string "%B %Y" start)) |
| 2269 | ((or 'year 'thisyear) (format-time-string "the year %Y" start)) | 2269 | ((or `year `thisyear) (format-time-string "the year %Y" start)) |
| 2270 | ((or 'quarter 'thisq) | 2270 | ((or `quarter `thisq) |
| 2271 | (concat (org-count-quarter shiftedq) | 2271 | (concat (org-count-quarter shiftedq) |
| 2272 | " quarter of " (number-to-string shiftedy))) | 2272 | " quarter of " (number-to-string shiftedy))) |
| 2273 | ('interactive "(Range interactively set)") | 2273 | (`interactive "(Range interactively set)") |
| 2274 | ('untilnow "now")))) | 2274 | (`untilnow "now")))) |
| 2275 | (if (not as-strings) (list start end text) | 2275 | (if (not as-strings) (list start end text) |
| 2276 | (let ((f (cdr org-time-stamp-formats))) | 2276 | (let ((f (cdr org-time-stamp-formats))) |
| 2277 | (list (format-time-string f start) | 2277 | (list (format-time-string f start) |
| @@ -2375,11 +2375,11 @@ the currently selected interval size." | |||
| 2375 | (catch 'exit | 2375 | (catch 'exit |
| 2376 | (let* ((scope (plist-get params :scope)) | 2376 | (let* ((scope (plist-get params :scope)) |
| 2377 | (files (pcase scope | 2377 | (files (pcase scope |
| 2378 | ('agenda | 2378 | (`agenda |
| 2379 | (org-agenda-files t)) | 2379 | (org-agenda-files t)) |
| 2380 | ('agenda-with-archives | 2380 | (`agenda-with-archives |
| 2381 | (org-add-archive-files (org-agenda-files t))) | 2381 | (org-add-archive-files (org-agenda-files t))) |
| 2382 | ('file-with-archives | 2382 | (`file-with-archives |
| 2383 | (and buffer-file-name | 2383 | (and buffer-file-name |
| 2384 | (org-add-archive-files (list buffer-file-name)))) | 2384 | (org-add-archive-files (list buffer-file-name)))) |
| 2385 | ((pred functionp) (funcall scope)) | 2385 | ((pred functionp) (funcall scope)) |
| @@ -2502,7 +2502,7 @@ from the dynamic block definition." | |||
| 2502 | (setq narrow (intern (format "%d!" narrow)))) | 2502 | (setq narrow (intern (format "%d!" narrow)))) |
| 2503 | 2503 | ||
| 2504 | (pcase narrow | 2504 | (pcase narrow |
| 2505 | ((or 'nil (pred integerp)) nil) ;nothing to do | 2505 | ((or `nil (pred integerp)) nil) ;nothing to do |
| 2506 | ((and (pred symbolp) | 2506 | ((and (pred symbolp) |
| 2507 | (guard (string-match-p "\\`[0-9]+!\\'" (symbol-name narrow)))) | 2507 | (guard (string-match-p "\\`[0-9]+!\\'" (symbol-name narrow)))) |
| 2508 | (setq narrow-cut-p t) | 2508 | (setq narrow-cut-p t) |
diff --git a/lisp/org/org-colview.el b/lisp/org/org-colview.el index e6464ab8a14..cb5c091d0a3 100644 --- a/lisp/org/org-colview.el +++ b/lisp/org/org-colview.el | |||
| @@ -1379,8 +1379,8 @@ PARAMS is a property list of parameters: | |||
| 1379 | (let ((id (plist-get params :id)) | 1379 | (let ((id (plist-get params :id)) |
| 1380 | view-file view-pos) | 1380 | view-file view-pos) |
| 1381 | (pcase id | 1381 | (pcase id |
| 1382 | ('global nil) | 1382 | (`global nil) |
| 1383 | ((or 'local 'nil) (setq view-pos (point))) | 1383 | ((or `local `nil) (setq view-pos (point))) |
| 1384 | ((and (let id-string (format "%s" id)) | 1384 | ((and (let id-string (format "%s" id)) |
| 1385 | (guard (string-match "^file:\\(.*\\)" id-string))) | 1385 | (guard (string-match "^file:\\(.*\\)" id-string))) |
| 1386 | (setq view-file (match-string-no-properties 1 id-string)) | 1386 | (setq view-file (match-string-no-properties 1 id-string)) |
diff --git a/lisp/org/org-duration.el b/lisp/org/org-duration.el index fed864a5454..1c962ba94e0 100644 --- a/lisp/org/org-duration.el +++ b/lisp/org/org-duration.el | |||
| @@ -316,10 +316,10 @@ When optional argument CANONICAL is non-nil, ignore | |||
| 316 | 316 | ||
| 317 | Raise an error if expected format is unknown." | 317 | Raise an error if expected format is unknown." |
| 318 | (pcase (or fmt org-duration-format) | 318 | (pcase (or fmt org-duration-format) |
| 319 | ('h:mm | 319 | (`h:mm |
| 320 | (let ((minutes (floor minutes))) | 320 | (let ((minutes (floor minutes))) |
| 321 | (format "%d:%02d" (/ minutes 60) (mod minutes 60)))) | 321 | (format "%d:%02d" (/ minutes 60) (mod minutes 60)))) |
| 322 | ('h:mm:ss | 322 | (`h:mm:ss |
| 323 | (let* ((whole-minutes (floor minutes)) | 323 | (let* ((whole-minutes (floor minutes)) |
| 324 | (seconds (floor (* 60 (- minutes whole-minutes))))) | 324 | (seconds (floor (* 60 (- minutes whole-minutes))))) |
| 325 | (format "%s:%02d" | 325 | (format "%s:%02d" |
| @@ -328,7 +328,7 @@ Raise an error if expected format is unknown." | |||
| 328 | ((pred atom) (error "Invalid duration format specification: %S" fmt)) | 328 | ((pred atom) (error "Invalid duration format specification: %S" fmt)) |
| 329 | ;; Mixed format. Call recursively the function on both parts. | 329 | ;; Mixed format. Call recursively the function on both parts. |
| 330 | ((and duration-format | 330 | ((and duration-format |
| 331 | (let `(special . ,(and mode (or 'h:mm:ss 'h:mm))) | 331 | (let `(special . ,(and mode (or `h:mm:ss `h:mm))) |
| 332 | (assq 'special duration-format))) | 332 | (assq 'special duration-format))) |
| 333 | (let* ((truncated-format | 333 | (let* ((truncated-format |
| 334 | ;; Remove "special" mode from duration format in order to | 334 | ;; Remove "special" mode from duration format in order to |
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 09840cc44f2..b8f14670226 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el | |||
| @@ -588,9 +588,9 @@ is cleared and contents are removed in the process." | |||
| 588 | (when datum | 588 | (when datum |
| 589 | (let ((type (org-element-type datum))) | 589 | (let ((type (org-element-type datum))) |
| 590 | (pcase type | 590 | (pcase type |
| 591 | ('org-data (list 'org-data nil)) | 591 | (`org-data (list 'org-data nil)) |
| 592 | ('plain-text (substring-no-properties datum)) | 592 | (`plain-text (substring-no-properties datum)) |
| 593 | ('nil (copy-sequence datum)) | 593 | (`nil (copy-sequence datum)) |
| 594 | (_ | 594 | (_ |
| 595 | (list type (plist-put (copy-sequence (nth 1 datum)) :parent nil))))))) | 595 | (list type (plist-put (copy-sequence (nth 1 datum)) :parent nil))))))) |
| 596 | 596 | ||
| @@ -1285,9 +1285,9 @@ CONTENTS is the contents of the element." | |||
| 1285 | bullet | 1285 | bullet |
| 1286 | (and counter (format "[@%d] " counter)) | 1286 | (and counter (format "[@%d] " counter)) |
| 1287 | (pcase checkbox | 1287 | (pcase checkbox |
| 1288 | ('on "[X] ") | 1288 | (`on "[X] ") |
| 1289 | ('off "[ ] ") | 1289 | (`off "[ ] ") |
| 1290 | ('trans "[-] ") | 1290 | (`trans "[-] ") |
| 1291 | (_ nil)) | 1291 | (_ nil)) |
| 1292 | (and tag (format "%s :: " tag)) | 1292 | (and tag (format "%s :: " tag)) |
| 1293 | (when contents | 1293 | (when contents |
| @@ -3185,13 +3185,13 @@ CONTENTS is the contents of the object, or nil." | |||
| 3185 | ;; a format string, escape percent signs | 3185 | ;; a format string, escape percent signs |
| 3186 | ;; in description. | 3186 | ;; in description. |
| 3187 | (replace-regexp-in-string "%" "%%" contents))) | 3187 | (replace-regexp-in-string "%" "%%" contents))) |
| 3188 | ((or 'bracket | 3188 | ((or `bracket |
| 3189 | 'nil | 3189 | `nil |
| 3190 | (guard (member type '("coderef" "custom-id" "fuzzy")))) | 3190 | (guard (member type '("coderef" "custom-id" "fuzzy")))) |
| 3191 | "[[%s]]") | 3191 | "[[%s]]") |
| 3192 | ;; Otherwise, just obey to `:format'. | 3192 | ;; Otherwise, just obey to `:format'. |
| 3193 | ('angle "<%s>") | 3193 | (`angle "<%s>") |
| 3194 | ('plain "%s") | 3194 | (`plain "%s") |
| 3195 | (f (error "Wrong `:format' value: %s" f))))) | 3195 | (f (error "Wrong `:format' value: %s" f))))) |
| 3196 | (format fmt | 3196 | (format fmt |
| 3197 | (pcase type | 3197 | (pcase type |
| @@ -3581,19 +3581,19 @@ Assume point is at the beginning of the timestamp." | |||
| 3581 | (let* ((repeat-string | 3581 | (let* ((repeat-string |
| 3582 | (concat | 3582 | (concat |
| 3583 | (pcase (org-element-property :repeater-type timestamp) | 3583 | (pcase (org-element-property :repeater-type timestamp) |
| 3584 | ('cumulate "+") ('catch-up "++") ('restart ".+")) | 3584 | (`cumulate "+") (`catch-up "++") (`restart ".+")) |
| 3585 | (let ((val (org-element-property :repeater-value timestamp))) | 3585 | (let ((val (org-element-property :repeater-value timestamp))) |
| 3586 | (and val (number-to-string val))) | 3586 | (and val (number-to-string val))) |
| 3587 | (pcase (org-element-property :repeater-unit timestamp) | 3587 | (pcase (org-element-property :repeater-unit timestamp) |
| 3588 | ('hour "h") ('day "d") ('week "w") ('month "m") ('year "y")))) | 3588 | (`hour "h") (`day "d") (`week "w") (`month "m") (`year "y")))) |
| 3589 | (warning-string | 3589 | (warning-string |
| 3590 | (concat | 3590 | (concat |
| 3591 | (pcase (org-element-property :warning-type timestamp) | 3591 | (pcase (org-element-property :warning-type timestamp) |
| 3592 | ('first "--") ('all "-")) | 3592 | (`first "--") (`all "-")) |
| 3593 | (let ((val (org-element-property :warning-value timestamp))) | 3593 | (let ((val (org-element-property :warning-value timestamp))) |
| 3594 | (and val (number-to-string val))) | 3594 | (and val (number-to-string val))) |
| 3595 | (pcase (org-element-property :warning-unit timestamp) | 3595 | (pcase (org-element-property :warning-unit timestamp) |
| 3596 | ('hour "h") ('day "d") ('week "w") ('month "m") ('year "y")))) | 3596 | (`hour "h") (`day "d") (`week "w") (`month "m") (`year "y")))) |
| 3597 | (build-ts-string | 3597 | (build-ts-string |
| 3598 | ;; Build an Org timestamp string from TIME. ACTIVEP is | 3598 | ;; Build an Org timestamp string from TIME. ACTIVEP is |
| 3599 | ;; non-nil when time stamp is active. If WITH-TIME-P is | 3599 | ;; non-nil when time stamp is active. If WITH-TIME-P is |
| @@ -3622,7 +3622,7 @@ Assume point is at the beginning of the timestamp." | |||
| 3622 | ts))) | 3622 | ts))) |
| 3623 | (type (org-element-property :type timestamp))) | 3623 | (type (org-element-property :type timestamp))) |
| 3624 | (pcase type | 3624 | (pcase type |
| 3625 | ((or 'active 'inactive) | 3625 | ((or `active `inactive) |
| 3626 | (let* ((minute-start (org-element-property :minute-start timestamp)) | 3626 | (let* ((minute-start (org-element-property :minute-start timestamp)) |
| 3627 | (minute-end (org-element-property :minute-end timestamp)) | 3627 | (minute-end (org-element-property :minute-end timestamp)) |
| 3628 | (hour-start (org-element-property :hour-start timestamp)) | 3628 | (hour-start (org-element-property :hour-start timestamp)) |
| @@ -3642,7 +3642,7 @@ Assume point is at the beginning of the timestamp." | |||
| 3642 | (and hour-start minute-start) | 3642 | (and hour-start minute-start) |
| 3643 | (and time-range-p hour-end) | 3643 | (and time-range-p hour-end) |
| 3644 | (and time-range-p minute-end)))) | 3644 | (and time-range-p minute-end)))) |
| 3645 | ((or 'active-range 'inactive-range) | 3645 | ((or `active-range `inactive-range) |
| 3646 | (let ((minute-start (org-element-property :minute-start timestamp)) | 3646 | (let ((minute-start (org-element-property :minute-start timestamp)) |
| 3647 | (minute-end (org-element-property :minute-end timestamp)) | 3647 | (minute-end (org-element-property :minute-end timestamp)) |
| 3648 | (hour-start (org-element-property :hour-start timestamp)) | 3648 | (hour-start (org-element-property :hour-start timestamp)) |
| @@ -4227,17 +4227,17 @@ otherwise. Modes can be either `first-section', `item', | |||
| 4227 | `table-row' or nil." | 4227 | `table-row' or nil." |
| 4228 | (if parentp | 4228 | (if parentp |
| 4229 | (pcase type | 4229 | (pcase type |
| 4230 | ('headline 'section) | 4230 | (`headline 'section) |
| 4231 | ('inlinetask 'planning) | 4231 | (`inlinetask 'planning) |
| 4232 | ('plain-list 'item) | 4232 | (`plain-list 'item) |
| 4233 | ('property-drawer 'node-property) | 4233 | (`property-drawer 'node-property) |
| 4234 | ('section 'planning) | 4234 | (`section 'planning) |
| 4235 | ('table 'table-row)) | 4235 | (`table 'table-row)) |
| 4236 | (pcase type | 4236 | (pcase type |
| 4237 | ('item 'item) | 4237 | (`item 'item) |
| 4238 | ('node-property 'node-property) | 4238 | (`node-property 'node-property) |
| 4239 | ('planning 'property-drawer) | 4239 | (`planning 'property-drawer) |
| 4240 | ('table-row 'table-row)))) | 4240 | (`table-row 'table-row)))) |
| 4241 | 4241 | ||
| 4242 | (defun org-element--parse-elements | 4242 | (defun org-element--parse-elements |
| 4243 | (beg end mode structure granularity visible-only acc) | 4243 | (beg end mode structure granularity visible-only acc) |
| @@ -5018,8 +5018,8 @@ the cache." | |||
| 5018 | lower element | 5018 | lower element |
| 5019 | upper element))))) | 5019 | upper element))))) |
| 5020 | (pcase side | 5020 | (pcase side |
| 5021 | ('both (cons lower upper)) | 5021 | (`both (cons lower upper)) |
| 5022 | ('nil lower) | 5022 | (`nil lower) |
| 5023 | (_ upper)))) | 5023 | (_ upper)))) |
| 5024 | 5024 | ||
| 5025 | (defun org-element--cache-put (element) | 5025 | (defun org-element--cache-put (element) |
| @@ -5513,8 +5513,8 @@ that range. See `after-change-functions' for more information." | |||
| 5513 | ;; case for headline editing: if a headline is modified but | 5513 | ;; case for headline editing: if a headline is modified but |
| 5514 | ;; not removed, do not extend. | 5514 | ;; not removed, do not extend. |
| 5515 | (when (pcase org-element--cache-change-warning | 5515 | (when (pcase org-element--cache-change-warning |
| 5516 | ('t t) | 5516 | (`t t) |
| 5517 | ('headline | 5517 | (`headline |
| 5518 | (not (and (org-with-limited-levels (org-at-heading-p)) | 5518 | (not (and (org-with-limited-levels (org-at-heading-p)) |
| 5519 | (= (line-end-position) bottom)))) | 5519 | (= (line-end-position) bottom)))) |
| 5520 | (_ | 5520 | (_ |
diff --git a/lisp/org/org-entities.el b/lisp/org/org-entities.el index 0dae8495111..e291b521f90 100644 --- a/lisp/org/org-entities.el +++ b/lisp/org/org-entities.el | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | (defun org-entities--user-safe-p (v) | 38 | (defun org-entities--user-safe-p (v) |
| 39 | "Non-nil if V is a safe value for `org-entities-user'." | 39 | "Non-nil if V is a safe value for `org-entities-user'." |
| 40 | (pcase v | 40 | (pcase v |
| 41 | ('nil t) | 41 | (`nil t) |
| 42 | (`(,(and (pred stringp) | 42 | (`(,(and (pred stringp) |
| 43 | (pred (string-match-p "\\`[a-zA-Z][a-zA-Z0-9]*\\'"))) | 43 | (pred (string-match-p "\\`[a-zA-Z][a-zA-Z0-9]*\\'"))) |
| 44 | ,(pred stringp) ,(pred booleanp) ,(pred stringp) | 44 | ,(pred stringp) ,(pred booleanp) ,(pred stringp) |
diff --git a/lisp/org/org-gnus.el b/lisp/org/org-gnus.el index 34087bf21be..a53b343efb4 100644 --- a/lisp/org/org-gnus.el +++ b/lisp/org/org-gnus.el | |||
| @@ -126,14 +126,14 @@ If `org-store-link' was called with a prefix arg the meaning of | |||
| 126 | (defun org-gnus-store-link () | 126 | (defun org-gnus-store-link () |
| 127 | "Store a link to a Gnus folder or message." | 127 | "Store a link to a Gnus folder or message." |
| 128 | (pcase major-mode | 128 | (pcase major-mode |
| 129 | ('gnus-group-mode | 129 | (`gnus-group-mode |
| 130 | (let ((group (gnus-group-group-name))) | 130 | (let ((group (gnus-group-group-name))) |
| 131 | (when group | 131 | (when group |
| 132 | (org-store-link-props :type "gnus" :group group) | 132 | (org-store-link-props :type "gnus" :group group) |
| 133 | (let ((description (org-gnus-group-link group))) | 133 | (let ((description (org-gnus-group-link group))) |
| 134 | (org-add-link-props :link description :description description) | 134 | (org-add-link-props :link description :description description) |
| 135 | description)))) | 135 | description)))) |
| 136 | ((or 'gnus-summary-mode 'gnus-article-mode) | 136 | ((or `gnus-summary-mode `gnus-article-mode) |
| 137 | (let* ((group | 137 | (let* ((group |
| 138 | (pcase (gnus-find-method-for-group gnus-newsgroup-name) | 138 | (pcase (gnus-find-method-for-group gnus-newsgroup-name) |
| 139 | (`(nnvirtual . ,_) | 139 | (`(nnvirtual . ,_) |
| @@ -176,7 +176,7 @@ If `org-store-link' was called with a prefix arg the meaning of | |||
| 176 | (description (org-email-link-description))) | 176 | (description (org-email-link-description))) |
| 177 | (org-add-link-props :link link :description description) | 177 | (org-add-link-props :link link :description description) |
| 178 | link))) | 178 | link))) |
| 179 | ('message-mode | 179 | (`message-mode |
| 180 | (setq org-store-link-plist nil) ;reset | 180 | (setq org-store-link-plist nil) ;reset |
| 181 | (save-excursion | 181 | (save-excursion |
| 182 | (save-restriction | 182 | (save-restriction |
diff --git a/lisp/org/org-indent.el b/lisp/org/org-indent.el index a0bf7b7379f..bf4e998199e 100644 --- a/lisp/org/org-indent.el +++ b/lisp/org/org-indent.el | |||
| @@ -301,8 +301,8 @@ When optional argument HEADING is non-nil, assume line is at | |||
| 301 | a heading. Moreover, if is is `inlinetask', the first star will | 301 | a heading. Moreover, if is is `inlinetask', the first star will |
| 302 | have `org-warning' face." | 302 | have `org-warning' face." |
| 303 | (let* ((line (aref (pcase heading | 303 | (let* ((line (aref (pcase heading |
| 304 | ('nil org-indent--text-line-prefixes) | 304 | (`nil org-indent--text-line-prefixes) |
| 305 | ('inlinetask org-indent--inlinetask-line-prefixes) | 305 | (`inlinetask org-indent--inlinetask-line-prefixes) |
| 306 | (_ org-indent--heading-line-prefixes)) | 306 | (_ org-indent--heading-line-prefixes)) |
| 307 | level)) | 307 | level)) |
| 308 | (wrap | 308 | (wrap |
diff --git a/lisp/org/org-info.el b/lisp/org/org-info.el index 390db209d30..6dde36ceba1 100644 --- a/lisp/org/org-info.el +++ b/lisp/org/org-info.el | |||
| @@ -133,12 +133,12 @@ See `org-link-parameters' for details about PATH, DESC and FORMAT." | |||
| 133 | (manual (car parts)) | 133 | (manual (car parts)) |
| 134 | (node (or (nth 1 parts) "Top"))) | 134 | (node (or (nth 1 parts) "Top"))) |
| 135 | (pcase format | 135 | (pcase format |
| 136 | ('html | 136 | (`html |
| 137 | (format "<a href=\"%s#%s\">%s</a>" | 137 | (format "<a href=\"%s#%s\">%s</a>" |
| 138 | (org-info-map-html-url manual) | 138 | (org-info-map-html-url manual) |
| 139 | (org-info--expand-node-name node) | 139 | (org-info--expand-node-name node) |
| 140 | (or desc path))) | 140 | (or desc path))) |
| 141 | ('texinfo | 141 | (`texinfo |
| 142 | (let ((title (or desc ""))) | 142 | (let ((title (or desc ""))) |
| 143 | (format "@ref{%s,%s,,%s,}" node title manual))) | 143 | (format "@ref{%s,%s,,%s,}" node title manual))) |
| 144 | (_ nil)))) | 144 | (_ nil)))) |
diff --git a/lisp/org/org-inlinetask.el b/lisp/org/org-inlinetask.el index 8604e28e22e..08fc268d0d7 100644 --- a/lisp/org/org-inlinetask.el +++ b/lisp/org/org-inlinetask.el | |||
| @@ -325,14 +325,14 @@ If the task has an end part, also demote it." | |||
| 325 | "Hide inline tasks in buffer when STATE is `contents' or `children'. | 325 | "Hide inline tasks in buffer when STATE is `contents' or `children'. |
| 326 | This function is meant to be used in `org-cycle-hook'." | 326 | This function is meant to be used in `org-cycle-hook'." |
| 327 | (pcase state | 327 | (pcase state |
| 328 | ('contents | 328 | (`contents |
| 329 | (let ((regexp (org-inlinetask-outline-regexp))) | 329 | (let ((regexp (org-inlinetask-outline-regexp))) |
| 330 | (save-excursion | 330 | (save-excursion |
| 331 | (goto-char (point-min)) | 331 | (goto-char (point-min)) |
| 332 | (while (re-search-forward regexp nil t) | 332 | (while (re-search-forward regexp nil t) |
| 333 | (org-inlinetask-toggle-visibility) | 333 | (org-inlinetask-toggle-visibility) |
| 334 | (org-inlinetask-goto-end))))) | 334 | (org-inlinetask-goto-end))))) |
| 335 | ('children | 335 | (`children |
| 336 | (save-excursion | 336 | (save-excursion |
| 337 | (while | 337 | (while |
| 338 | (or (org-inlinetask-at-task-p) | 338 | (or (org-inlinetask-at-task-p) |
diff --git a/lisp/org/org-lint.el b/lisp/org/org-lint.el index e719ef8a5b2..9fcb17a2db6 100644 --- a/lisp/org/org-lint.el +++ b/lisp/org/org-lint.el | |||
| @@ -427,7 +427,7 @@ instead" | |||
| 427 | (lambda (datum) | 427 | (lambda (datum) |
| 428 | (let ((key (org-element-property :key datum))) | 428 | (let ((key (org-element-property :key datum))) |
| 429 | (pcase (org-element-type datum) | 429 | (pcase (org-element-type datum) |
| 430 | ('keyword | 430 | (`keyword |
| 431 | (let ((value (org-element-property :value datum))) | 431 | (let ((value (org-element-property :value datum))) |
| 432 | (and (string= key "PROPERTY") | 432 | (and (string= key "PROPERTY") |
| 433 | (string-match deprecated-re value) | 433 | (string-match deprecated-re value) |
| @@ -435,7 +435,7 @@ instead" | |||
| 435 | (format "Deprecated syntax for \"%s\". \ | 435 | (format "Deprecated syntax for \"%s\". \ |
| 436 | Use header-args instead" | 436 | Use header-args instead" |
| 437 | (match-string-no-properties 1 value)))))) | 437 | (match-string-no-properties 1 value)))))) |
| 438 | ('node-property | 438 | (`node-property |
| 439 | (and (member-ignore-case key deprecated-babel-properties) | 439 | (and (member-ignore-case key deprecated-babel-properties) |
| 440 | (list | 440 | (list |
| 441 | (org-element-property :begin datum) | 441 | (org-element-property :begin datum) |
| @@ -789,11 +789,11 @@ Use \"export %s\" instead" | |||
| 789 | (let ((name (org-trim (match-string-no-properties 0))) | 789 | (let ((name (org-trim (match-string-no-properties 0))) |
| 790 | (element (org-element-at-point))) | 790 | (element (org-element-at-point))) |
| 791 | (pcase (org-element-type element) | 791 | (pcase (org-element-type element) |
| 792 | ((or 'drawer 'property-drawer) | 792 | ((or `drawer `property-drawer) |
| 793 | (goto-char (org-element-property :end element)) | 793 | (goto-char (org-element-property :end element)) |
| 794 | nil) | 794 | nil) |
| 795 | ((or 'comment-block 'example-block 'export-block 'src-block | 795 | ((or `comment-block `example-block `export-block `src-block |
| 796 | 'verse-block) | 796 | `verse-block) |
| 797 | nil) | 797 | nil) |
| 798 | (_ | 798 | (_ |
| 799 | (push (list (line-beginning-position) | 799 | (push (list (line-beginning-position) |
| @@ -920,7 +920,7 @@ Use \"export %s\" instead" | |||
| 920 | node-property src-block) | 920 | node-property src-block) |
| 921 | (lambda (datum) | 921 | (lambda (datum) |
| 922 | (pcase (org-element-type datum) | 922 | (pcase (org-element-type datum) |
| 923 | ((or 'babel-call 'inline-babel-call) | 923 | ((or `babel-call `inline-babel-call) |
| 924 | (funcall verify | 924 | (funcall verify |
| 925 | datum | 925 | datum |
| 926 | nil | 926 | nil |
| @@ -928,13 +928,13 @@ Use \"export %s\" instead" | |||
| 928 | (list | 928 | (list |
| 929 | (org-element-property :inside-header datum) | 929 | (org-element-property :inside-header datum) |
| 930 | (org-element-property :end-header datum))))) | 930 | (org-element-property :end-header datum))))) |
| 931 | ('inline-src-block | 931 | (`inline-src-block |
| 932 | (funcall verify | 932 | (funcall verify |
| 933 | datum | 933 | datum |
| 934 | (org-element-property :language datum) | 934 | (org-element-property :language datum) |
| 935 | (org-babel-parse-header-arguments | 935 | (org-babel-parse-header-arguments |
| 936 | (org-element-property :parameters datum)))) | 936 | (org-element-property :parameters datum)))) |
| 937 | ('keyword | 937 | (`keyword |
| 938 | (when (string= (org-element-property :key datum) "PROPERTY") | 938 | (when (string= (org-element-property :key datum) "PROPERTY") |
| 939 | (let ((value (org-element-property :value datum))) | 939 | (let ((value (org-element-property :value datum))) |
| 940 | (when (string-match "\\`header-args\\(?::\\(\\S-+\\)\\)?\\+? *" | 940 | (when (string-match "\\`header-args\\(?::\\(\\S-+\\)\\)?\\+? *" |
| @@ -944,7 +944,7 @@ Use \"export %s\" instead" | |||
| 944 | (match-string 1 value) | 944 | (match-string 1 value) |
| 945 | (org-babel-parse-header-arguments | 945 | (org-babel-parse-header-arguments |
| 946 | (substring value (match-end 0)))))))) | 946 | (substring value (match-end 0)))))))) |
| 947 | ('node-property | 947 | (`node-property |
| 948 | (let ((key (org-element-property :key datum))) | 948 | (let ((key (org-element-property :key datum))) |
| 949 | (when (let ((case-fold-search t)) | 949 | (when (let ((case-fold-search t)) |
| 950 | (string-match "\\`HEADER-ARGS\\(?::\\(\\S-+\\)\\)?\\+?" | 950 | (string-match "\\`HEADER-ARGS\\(?::\\(\\S-+\\)\\)?\\+?" |
| @@ -954,7 +954,7 @@ Use \"export %s\" instead" | |||
| 954 | (match-string 1 key) | 954 | (match-string 1 key) |
| 955 | (org-babel-parse-header-arguments | 955 | (org-babel-parse-header-arguments |
| 956 | (org-element-property :value datum)))))) | 956 | (org-element-property :value datum)))))) |
| 957 | ('src-block | 957 | (`src-block |
| 958 | (funcall verify | 958 | (funcall verify |
| 959 | datum | 959 | datum |
| 960 | (org-element-property :language datum) | 960 | (org-element-property :language datum) |
| @@ -980,13 +980,13 @@ Use \"export %s\" instead" | |||
| 980 | (org-babel-parse-header-arguments | 980 | (org-babel-parse-header-arguments |
| 981 | (org-trim | 981 | (org-trim |
| 982 | (pcase type | 982 | (pcase type |
| 983 | ('src-block | 983 | (`src-block |
| 984 | (mapconcat | 984 | (mapconcat |
| 985 | #'identity | 985 | #'identity |
| 986 | (cons (org-element-property :parameters datum) | 986 | (cons (org-element-property :parameters datum) |
| 987 | (org-element-property :header datum)) | 987 | (org-element-property :header datum)) |
| 988 | " ")) | 988 | " ")) |
| 989 | ('inline-src-block | 989 | (`inline-src-block |
| 990 | (or (org-element-property :parameters datum) "")) | 990 | (or (org-element-property :parameters datum) "")) |
| 991 | (_ | 991 | (_ |
| 992 | (concat | 992 | (concat |
| @@ -1065,9 +1065,9 @@ Use \"export %s\" instead" | |||
| 1065 | \\{org-lint--report-mode-map}" | 1065 | \\{org-lint--report-mode-map}" |
| 1066 | (setf tabulated-list-format | 1066 | (setf tabulated-list-format |
| 1067 | `[("Line" 6 | 1067 | `[("Line" 6 |
| 1068 | ,(lambda (a b) | 1068 | (lambda (a b) |
| 1069 | (< (string-to-number (aref (cadr a) 0)) | 1069 | (< (string-to-number (aref (cadr a) 0)) |
| 1070 | (string-to-number (aref (cadr b) 0)))) | 1070 | (string-to-number (aref (cadr b) 0)))) |
| 1071 | :right-align t) | 1071 | :right-align t) |
| 1072 | ("Trust" 5 t) | 1072 | ("Trust" 5 t) |
| 1073 | ("Warning" 0 t)]) | 1073 | ("Warning" 0 t)]) |
| @@ -1207,8 +1207,8 @@ ARG can also be a list of checker names, as symbols, to run." | |||
| 1207 | (message "Org linting process starting...")) | 1207 | (message "Org linting process starting...")) |
| 1208 | (let ((checkers | 1208 | (let ((checkers |
| 1209 | (pcase arg | 1209 | (pcase arg |
| 1210 | ('nil org-lint--checkers) | 1210 | (`nil org-lint--checkers) |
| 1211 | ('(4) | 1211 | (`(4) |
| 1212 | (let ((category | 1212 | (let ((category |
| 1213 | (completing-read | 1213 | (completing-read |
| 1214 | "Checker category: " | 1214 | "Checker category: " |
| @@ -1218,7 +1218,7 @@ ARG can also be a list of checker names, as symbols, to run." | |||
| 1218 | (lambda (c) | 1218 | (lambda (c) |
| 1219 | (assoc-string (org-lint-checker-categories c) category)) | 1219 | (assoc-string (org-lint-checker-categories c) category)) |
| 1220 | org-lint--checkers))) | 1220 | org-lint--checkers))) |
| 1221 | ('(16) | 1221 | (`(16) |
| 1222 | (list | 1222 | (list |
| 1223 | (let ((name (completing-read | 1223 | (let ((name (completing-read |
| 1224 | "Checker name: " | 1224 | "Checker name: " |
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el index b54d4aa2e5d..1f51809f1ce 100644 --- a/lisp/org/org-list.el +++ b/lisp/org/org-list.el | |||
| @@ -3438,15 +3438,15 @@ PARAMS is a plist used to tweak the behavior of the transcoder." | |||
| 3438 | (start (and (not splice) | 3438 | (start (and (not splice) |
| 3439 | (org-list--generic-eval | 3439 | (org-list--generic-eval |
| 3440 | (pcase type | 3440 | (pcase type |
| 3441 | ('ordered ostart) | 3441 | (`ordered ostart) |
| 3442 | ('unordered ustart) | 3442 | (`unordered ustart) |
| 3443 | (_ dstart)) | 3443 | (_ dstart)) |
| 3444 | depth))) | 3444 | depth))) |
| 3445 | (end (and (not splice) | 3445 | (end (and (not splice) |
| 3446 | (org-list--generic-eval | 3446 | (org-list--generic-eval |
| 3447 | (pcase type | 3447 | (pcase type |
| 3448 | ('ordered oend) | 3448 | (`ordered oend) |
| 3449 | ('unordered uend) | 3449 | (`unordered uend) |
| 3450 | (_ dend)) | 3450 | (_ dend)) |
| 3451 | depth)))) | 3451 | depth)))) |
| 3452 | ;; Make sure trailing newlines in END appear in the output by | 3452 | ;; Make sure trailing newlines in END appear in the output by |
| @@ -3485,7 +3485,7 @@ PARAMS is a plist used to tweak the behavior of the transcoder." | |||
| 3485 | (separator (and (org-export-get-next-element item info) | 3485 | (separator (and (org-export-get-next-element item info) |
| 3486 | (org-list--generic-eval isep type depth))) | 3486 | (org-list--generic-eval isep type depth))) |
| 3487 | (closing (pcase (org-list--generic-eval iend type depth) | 3487 | (closing (pcase (org-list--generic-eval iend type depth) |
| 3488 | ((or 'nil "") "\n") | 3488 | ((or `nil "") "\n") |
| 3489 | ((and (guard separator) s) | 3489 | ((and (guard separator) s) |
| 3490 | (if (equal (substring s -1) "\n") s (concat s "\n"))) | 3490 | (if (equal (substring s -1) "\n") s (concat s "\n"))) |
| 3491 | (s s)))) | 3491 | (s s)))) |
| @@ -3510,9 +3510,9 @@ PARAMS is a plist used to tweak the behavior of the transcoder." | |||
| 3510 | (or dtstart dtend ddstart ddend))) | 3510 | (or dtstart dtend ddstart ddend))) |
| 3511 | (concat | 3511 | (concat |
| 3512 | (pcase (org-element-property :checkbox item) | 3512 | (pcase (org-element-property :checkbox item) |
| 3513 | ('on cbon) | 3513 | (`on cbon) |
| 3514 | ('off cboff) | 3514 | (`off cboff) |
| 3515 | ('trans cbtrans)) | 3515 | (`trans cbtrans)) |
| 3516 | (and tag | 3516 | (and tag |
| 3517 | (concat dtstart | 3517 | (concat dtstart |
| 3518 | (if backend | 3518 | (if backend |
| @@ -3582,8 +3582,8 @@ with overruling parameters for `org-list-to-generic'." | |||
| 3582 | LIST is as returned by `org-list-to-lisp'. PARAMS is a property | 3582 | LIST is as returned by `org-list-to-lisp'. PARAMS is a property |
| 3583 | list with overruling parameters for `org-list-to-generic'." | 3583 | list with overruling parameters for `org-list-to-generic'." |
| 3584 | (let* ((blank (pcase (cdr (assq 'heading org-blank-before-new-entry)) | 3584 | (let* ((blank (pcase (cdr (assq 'heading org-blank-before-new-entry)) |
| 3585 | ('t t) | 3585 | (`t t) |
| 3586 | ('auto (save-excursion | 3586 | (`auto (save-excursion |
| 3587 | (org-with-limited-levels (outline-previous-heading)) | 3587 | (org-with-limited-levels (outline-previous-heading)) |
| 3588 | (org-previous-line-empty-p))))) | 3588 | (org-previous-line-empty-p))))) |
| 3589 | (level (org-reduced-level (or (org-current-level) 0))) | 3589 | (level (org-reduced-level (or (org-current-level) 0))) |
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 74de498e88e..5a10b59b1eb 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el | |||
| @@ -416,7 +416,7 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" | |||
| 416 | (let ((kwds org-todo-keywords-1)) | 416 | (let ((kwds org-todo-keywords-1)) |
| 417 | (org-mouse-keyword-menu | 417 | (org-mouse-keyword-menu |
| 418 | kwds | 418 | kwds |
| 419 | (lambda (kwd) (org-todo kwd)) | 419 | `(lambda (kwd) (org-todo kwd)) |
| 420 | (lambda (kwd) (equal state kwd)))))) | 420 | (lambda (kwd) (equal state kwd)))))) |
| 421 | 421 | ||
| 422 | (defun org-mouse-tag-menu () ;todo | 422 | (defun org-mouse-tag-menu () ;todo |
| @@ -461,11 +461,11 @@ SCHEDULED: or DEADLINE: or ANYTHINGLIKETHIS:" | |||
| 461 | 461 | ||
| 462 | (defun org-mouse-agenda-type (type) | 462 | (defun org-mouse-agenda-type (type) |
| 463 | (pcase type | 463 | (pcase type |
| 464 | ('tags "Tags: ") | 464 | (`tags "Tags: ") |
| 465 | ('todo "TODO: ") | 465 | (`todo "TODO: ") |
| 466 | ('tags-tree "Tags tree: ") | 466 | (`tags-tree "Tags tree: ") |
| 467 | ('todo-tree "TODO tree: ") | 467 | (`todo-tree "TODO tree: ") |
| 468 | ('occur-tree "Occur tree: ") | 468 | (`occur-tree "Occur tree: ") |
| 469 | (_ "Agenda command ???"))) | 469 | (_ "Agenda command ???"))) |
| 470 | 470 | ||
| 471 | (defun org-mouse-list-options-menu (alloptions &optional function) | 471 | (defun org-mouse-list-options-menu (alloptions &optional function) |
diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index 38a81f68b11..ebd7af42a85 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el | |||
| @@ -200,9 +200,9 @@ manner suitable for prepending to a user-specified script." | |||
| 200 | (y-labels (plist-get params :ylabels)) | 200 | (y-labels (plist-get params :ylabels)) |
| 201 | (plot-str "'%s' using %s%d%s with %s title '%s'") | 201 | (plot-str "'%s' using %s%d%s with %s title '%s'") |
| 202 | (plot-cmd (pcase type | 202 | (plot-cmd (pcase type |
| 203 | ('2d "plot") | 203 | (`2d "plot") |
| 204 | ('3d "splot") | 204 | (`3d "splot") |
| 205 | ('grid "splot"))) | 205 | (`grid "splot"))) |
| 206 | (script "reset") | 206 | (script "reset") |
| 207 | ;; ats = add-to-script | 207 | ;; ats = add-to-script |
| 208 | (ats (lambda (line) (setf script (concat script "\n" line)))) | 208 | (ats (lambda (line) (setf script (concat script "\n" line)))) |
| @@ -211,9 +211,9 @@ manner suitable for prepending to a user-specified script." | |||
| 211 | (funcall ats (format "set term %s" (file-name-extension file))) | 211 | (funcall ats (format "set term %s" (file-name-extension file))) |
| 212 | (funcall ats (format "set output '%s'" file))) | 212 | (funcall ats (format "set output '%s'" file))) |
| 213 | (pcase type ; type | 213 | (pcase type ; type |
| 214 | ('2d ()) | 214 | (`2d ()) |
| 215 | ('3d (when map (funcall ats "set map"))) | 215 | (`3d (when map (funcall ats "set map"))) |
| 216 | ('grid (funcall ats (if map "set pm3d map" "set pm3d")))) | 216 | (`grid (funcall ats (if map "set pm3d map" "set pm3d")))) |
| 217 | (when title (funcall ats (format "set title '%s'" title))) ; title | 217 | (when title (funcall ats (format "set title '%s'" title))) ; title |
| 218 | (mapc ats lines) ; line | 218 | (mapc ats lines) ; line |
| 219 | (dolist (el sets) (funcall ats (format "set %s" el))) ; set | 219 | (dolist (el sets) (funcall ats (format "set %s" el))) ; set |
| @@ -239,7 +239,7 @@ manner suitable for prepending to a user-specified script." | |||
| 239 | "%Y-%m-%d-%H:%M:%S") "\""))) | 239 | "%Y-%m-%d-%H:%M:%S") "\""))) |
| 240 | (unless preface | 240 | (unless preface |
| 241 | (pcase type ; plot command | 241 | (pcase type ; plot command |
| 242 | ('2d (dotimes (col num-cols) | 242 | (`2d (dotimes (col num-cols) |
| 243 | (unless (and (eq type '2d) | 243 | (unless (and (eq type '2d) |
| 244 | (or (and ind (equal (1+ col) ind)) | 244 | (or (and ind (equal (1+ col) ind)) |
| 245 | (and deps (not (member (1+ col) deps))))) | 245 | (and deps (not (member (1+ col) deps))))) |
| @@ -255,10 +255,10 @@ manner suitable for prepending to a user-specified script." | |||
| 255 | (or (nth col col-labels) | 255 | (or (nth col col-labels) |
| 256 | (format "%d" (1+ col)))) | 256 | (format "%d" (1+ col)))) |
| 257 | plot-lines))))) | 257 | plot-lines))))) |
| 258 | ('3d | 258 | (`3d |
| 259 | (setq plot-lines (list (format "'%s' matrix with %s title ''" | 259 | (setq plot-lines (list (format "'%s' matrix with %s title ''" |
| 260 | data-file with)))) | 260 | data-file with)))) |
| 261 | ('grid | 261 | (`grid |
| 262 | (setq plot-lines (list (format "'%s' with %s title ''" | 262 | (setq plot-lines (list (format "'%s' with %s title ''" |
| 263 | data-file with))))) | 263 | data-file with))))) |
| 264 | (funcall ats | 264 | (funcall ats |
| @@ -303,9 +303,9 @@ line directly before or after the table." | |||
| 303 | (setf params (org-plot/collect-options params)))) | 303 | (setf params (org-plot/collect-options params)))) |
| 304 | ;; Dump table to datafile (very different for grid). | 304 | ;; Dump table to datafile (very different for grid). |
| 305 | (pcase (plist-get params :plot-type) | 305 | (pcase (plist-get params :plot-type) |
| 306 | ('2d (org-plot/gnuplot-to-data table data-file params)) | 306 | (`2d (org-plot/gnuplot-to-data table data-file params)) |
| 307 | ('3d (org-plot/gnuplot-to-data table data-file params)) | 307 | (`3d (org-plot/gnuplot-to-data table data-file params)) |
| 308 | ('grid (let ((y-labels (org-plot/gnuplot-to-grid-data | 308 | (`grid (let ((y-labels (org-plot/gnuplot-to-grid-data |
| 309 | table data-file params))) | 309 | table data-file params))) |
| 310 | (when y-labels (plist-put params :ylabels y-labels))))) | 310 | (when y-labels (plist-put params :ylabels y-labels))))) |
| 311 | ;; Check for timestamp ind column. | 311 | ;; Check for timestamp ind column. |
diff --git a/lisp/org/org-src.el b/lisp/org/org-src.el index cf746a48bc7..829354c0d56 100644 --- a/lisp/org/org-src.el +++ b/lisp/org/org-src.el | |||
| @@ -742,24 +742,24 @@ If BUFFER is non-nil, test it instead." | |||
| 742 | 742 | ||
| 743 | (defun org-src-switch-to-buffer (buffer context) | 743 | (defun org-src-switch-to-buffer (buffer context) |
| 744 | (pcase org-src-window-setup | 744 | (pcase org-src-window-setup |
| 745 | ('current-window (pop-to-buffer-same-window buffer)) | 745 | (`current-window (pop-to-buffer-same-window buffer)) |
| 746 | ('other-window | 746 | (`other-window |
| 747 | (switch-to-buffer-other-window buffer)) | 747 | (switch-to-buffer-other-window buffer)) |
| 748 | ('other-frame | 748 | (`other-frame |
| 749 | (pcase context | 749 | (pcase context |
| 750 | ('exit | 750 | (`exit |
| 751 | (let ((frame (selected-frame))) | 751 | (let ((frame (selected-frame))) |
| 752 | (switch-to-buffer-other-frame buffer) | 752 | (switch-to-buffer-other-frame buffer) |
| 753 | (delete-frame frame))) | 753 | (delete-frame frame))) |
| 754 | ('save | 754 | (`save |
| 755 | (kill-buffer (current-buffer)) | 755 | (kill-buffer (current-buffer)) |
| 756 | (pop-to-buffer-same-window buffer)) | 756 | (pop-to-buffer-same-window buffer)) |
| 757 | (_ (switch-to-buffer-other-frame buffer)))) | 757 | (_ (switch-to-buffer-other-frame buffer)))) |
| 758 | ('reorganize-frame | 758 | (`reorganize-frame |
| 759 | (when (eq context 'edit) (delete-other-windows)) | 759 | (when (eq context 'edit) (delete-other-windows)) |
| 760 | (org-switch-to-buffer-other-window buffer) | 760 | (org-switch-to-buffer-other-window buffer) |
| 761 | (when (eq context 'exit) (delete-other-windows))) | 761 | (when (eq context 'exit) (delete-other-windows))) |
| 762 | ('switch-invisibly (set-buffer buffer)) | 762 | (`switch-invisibly (set-buffer buffer)) |
| 763 | (_ | 763 | (_ |
| 764 | (message "Invalid value %s for `org-src-window-setup'" | 764 | (message "Invalid value %s for `org-src-window-setup'" |
| 765 | org-src-window-setup) | 765 | org-src-window-setup) |
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index f8559d04ef8..dcf74303637 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el | |||
| @@ -5127,7 +5127,7 @@ information." | |||
| 5127 | ;; Make sure that contents are exported as Org data when :raw | 5127 | ;; Make sure that contents are exported as Org data when :raw |
| 5128 | ;; parameter is non-nil. | 5128 | ;; parameter is non-nil. |
| 5129 | ,(when (and backend (plist-get params :raw)) | 5129 | ,(when (and backend (plist-get params :raw)) |
| 5130 | '(setq contents | 5130 | `(setq contents |
| 5131 | ;; Since we don't know what are the pseudo object | 5131 | ;; Since we don't know what are the pseudo object |
| 5132 | ;; types defined in backend, we cannot pass them to | 5132 | ;; types defined in backend, we cannot pass them to |
| 5133 | ;; `org-element-interpret-data'. As a consequence, | 5133 | ;; `org-element-interpret-data'. As a consequence, |
diff --git a/lisp/org/org.el b/lisp/org/org.el index 4ead31b499c..873ae6b8209 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -5236,12 +5236,12 @@ When optional argument SKIP-KEY is non-nil, skip selection keys | |||
| 5236 | next to tags." | 5236 | next to tags." |
| 5237 | (mapconcat (lambda (token) | 5237 | (mapconcat (lambda (token) |
| 5238 | (pcase token | 5238 | (pcase token |
| 5239 | ('(:startgroup) "{") | 5239 | (`(:startgroup) "{") |
| 5240 | ('(:endgroup) "}") | 5240 | (`(:endgroup) "}") |
| 5241 | ('(:startgrouptag) "[") | 5241 | (`(:startgrouptag) "[") |
| 5242 | ('(:endgrouptag) "]") | 5242 | (`(:endgrouptag) "]") |
| 5243 | ('(:grouptags) ":") | 5243 | (`(:grouptags) ":") |
| 5244 | ('(:newline) "\\n") | 5244 | (`(:newline) "\\n") |
| 5245 | ((and | 5245 | ((and |
| 5246 | (guard (not skip-key)) | 5246 | (guard (not skip-key)) |
| 5247 | `(,(and tag (pred stringp)) . ,(and key (pred characterp)))) | 5247 | `(,(and tag (pred stringp)) . ,(and key (pred characterp)))) |
| @@ -5266,7 +5266,7 @@ a string, summarizing TAGS, as a list of strings." | |||
| 5266 | (when (eq group-status 'append) | 5266 | (when (eq group-status 'append) |
| 5267 | (push (nreverse current-group) groups)) | 5267 | (push (nreverse current-group) groups)) |
| 5268 | (setq group-status nil current-group nil)) | 5268 | (setq group-status nil current-group nil)) |
| 5269 | ('(:grouptags) (setq group-status 'append)) | 5269 | (`(:grouptags) (setq group-status 'append)) |
| 5270 | ((and `(,tag . ,_) (guard group-status)) | 5270 | ((and `(,tag . ,_) (guard group-status)) |
| 5271 | (if (eq group-status 'append) (push tag current-group) | 5271 | (if (eq group-status 'append) (push tag current-group) |
| 5272 | (setq current-group (list tag)))) | 5272 | (setq current-group (list tag)))) |
| @@ -7744,7 +7744,7 @@ When NEXT is non-nil, check the next line instead." | |||
| 7744 | When optional argument PARENT is non-nil, consider parent | 7744 | When optional argument PARENT is non-nil, consider parent |
| 7745 | headline instead of current one." | 7745 | headline instead of current one." |
| 7746 | (pcase (assq 'heading org-blank-before-new-entry) | 7746 | (pcase (assq 'heading org-blank-before-new-entry) |
| 7747 | ('(heading . auto) | 7747 | (`(heading . auto) |
| 7748 | (save-excursion | 7748 | (save-excursion |
| 7749 | (org-with-limited-levels | 7749 | (org-with-limited-levels |
| 7750 | (unless (and (org-before-first-heading-p) | 7750 | (unless (and (org-before-first-heading-p) |
| @@ -7884,7 +7884,7 @@ When NO-COMMENT is non-nil, don't include COMMENT string." | |||
| 7884 | (let ((todo (and (not no-todo) (match-string 2))) | 7884 | (let ((todo (and (not no-todo) (match-string 2))) |
| 7885 | (priority (and (not no-priority) (match-string 3))) | 7885 | (priority (and (not no-priority) (match-string 3))) |
| 7886 | (headline (pcase (match-string 4) | 7886 | (headline (pcase (match-string 4) |
| 7887 | ('nil "") | 7887 | (`nil "") |
| 7888 | ((and (guard no-comment) h) | 7888 | ((and (guard no-comment) h) |
| 7889 | (replace-regexp-in-string | 7889 | (replace-regexp-in-string |
| 7890 | (eval-when-compile | 7890 | (eval-when-compile |
| @@ -8768,7 +8768,7 @@ with the original repeater." | |||
| 8768 | (template (buffer-substring beg end)) | 8768 | (template (buffer-substring beg end)) |
| 8769 | (shift-n (and doshift (string-to-number (match-string 1 shift)))) | 8769 | (shift-n (and doshift (string-to-number (match-string 1 shift)))) |
| 8770 | (shift-what (pcase (and doshift (match-string 2 shift)) | 8770 | (shift-what (pcase (and doshift (match-string 2 shift)) |
| 8771 | ('nil nil) | 8771 | (`nil nil) |
| 8772 | ("d" 'day) | 8772 | ("d" 'day) |
| 8773 | ("w" (setq shift-n (* 7 shift-n)) 'day) | 8773 | ("w" (setq shift-n (* 7 shift-n)) 'day) |
| 8774 | ("m" 'month) | 8774 | ("m" 'month) |
| @@ -9690,7 +9690,7 @@ active region." | |||
| 9690 | (push (cons f (copy-sequence org-store-link-plist)) | 9690 | (push (cons f (copy-sequence org-store-link-plist)) |
| 9691 | results-alist))) | 9691 | results-alist))) |
| 9692 | (pcase results-alist | 9692 | (pcase results-alist |
| 9693 | ('nil nil) | 9693 | (`nil nil) |
| 9694 | (`((,_ . ,_)) t) ;single choice: nothing to do | 9694 | (`((,_ . ,_)) t) ;single choice: nothing to do |
| 9695 | (`((,name . ,_) . ,_) | 9695 | (`((,name . ,_) . ,_) |
| 9696 | ;; Reinstate link plist associated to the chosen | 9696 | ;; Reinstate link plist associated to the chosen |
| @@ -11552,13 +11552,13 @@ order.") | |||
| 11552 | #'identity | 11552 | #'identity |
| 11553 | (append | 11553 | (append |
| 11554 | (pcase org-refile-use-outline-path | 11554 | (pcase org-refile-use-outline-path |
| 11555 | ('file (list (file-name-nondirectory | 11555 | (`file (list (file-name-nondirectory |
| 11556 | (buffer-file-name | 11556 | (buffer-file-name |
| 11557 | (buffer-base-buffer))))) | 11557 | (buffer-base-buffer))))) |
| 11558 | ('full-file-path | 11558 | (`full-file-path |
| 11559 | (list (buffer-file-name | 11559 | (list (buffer-file-name |
| 11560 | (buffer-base-buffer)))) | 11560 | (buffer-base-buffer)))) |
| 11561 | ('buffer-name | 11561 | (`buffer-name |
| 11562 | (list (buffer-name | 11562 | (list (buffer-name |
| 11563 | (buffer-base-buffer)))) | 11563 | (buffer-base-buffer)))) |
| 11564 | (_ nil)) | 11564 | (_ nil)) |
| @@ -13251,14 +13251,14 @@ TYPE is either `deadline' or `scheduled'. See `org-deadline' or | |||
| 13251 | old-date) | 13251 | old-date) |
| 13252 | (match-string 1 old-date))))) | 13252 | (match-string 1 old-date))))) |
| 13253 | (pcase arg | 13253 | (pcase arg |
| 13254 | ('(4) | 13254 | (`(4) |
| 13255 | (when (and old-date log) | 13255 | (when (and old-date log) |
| 13256 | (org-add-log-setup (if deadline? 'deldeadline 'delschedule) | 13256 | (org-add-log-setup (if deadline? 'deldeadline 'delschedule) |
| 13257 | nil old-date log)) | 13257 | nil old-date log)) |
| 13258 | (org-remove-timestamp-with-keyword keyword) | 13258 | (org-remove-timestamp-with-keyword keyword) |
| 13259 | (message (if deadline? "Item no longer has a deadline." | 13259 | (message (if deadline? "Item no longer has a deadline." |
| 13260 | "Item is no longer scheduled."))) | 13260 | "Item is no longer scheduled."))) |
| 13261 | ('(16) | 13261 | (`(16) |
| 13262 | (save-excursion | 13262 | (save-excursion |
| 13263 | (org-back-to-heading t) | 13263 | (org-back-to-heading t) |
| 13264 | (let ((regexp (if deadline? org-deadline-time-regexp | 13264 | (let ((regexp (if deadline? org-deadline-time-regexp |
| @@ -14779,8 +14779,8 @@ If ONOFF is `on' or `off', don't toggle but set to this state." | |||
| 14779 | (nreverse (org-split-string tags ":"))))) | 14779 | (nreverse (org-split-string tags ":"))))) |
| 14780 | res) | 14780 | res) |
| 14781 | (pcase onoff | 14781 | (pcase onoff |
| 14782 | ('off (setq current (delete tag current))) | 14782 | (`off (setq current (delete tag current))) |
| 14783 | ((or 'on (guard (not (member tag current)))) | 14783 | ((or `on (guard (not (member tag current)))) |
| 14784 | (setq res t) | 14784 | (setq res t) |
| 14785 | (cl-pushnew tag current :test #'equal)) | 14785 | (cl-pushnew tag current :test #'equal)) |
| 14786 | (_ (setq current (delete tag current)))) | 14786 | (_ (setq current (delete tag current)))) |
| @@ -14830,7 +14830,7 @@ If DATA is nil or the empty string, all tags are removed." | |||
| 14830 | (interactive "sTags: ") | 14830 | (interactive "sTags: ") |
| 14831 | (let ((data | 14831 | (let ((data |
| 14832 | (pcase (if (stringp data) (org-trim data) data) | 14832 | (pcase (if (stringp data) (org-trim data) data) |
| 14833 | ((or 'nil "") nil) | 14833 | ((or `nil "") nil) |
| 14834 | ((pred listp) (format ":%s:" (mapconcat #'identity data ":"))) | 14834 | ((pred listp) (format ":%s:" (mapconcat #'identity data ":"))) |
| 14835 | ((pred stringp) | 14835 | ((pred stringp) |
| 14836 | (format ":%s:" | 14836 | (format ":%s:" |
| @@ -17207,9 +17207,9 @@ The internal representation needed by the calendar is (month day year). | |||
| 17207 | This is a wrapper to handle the brain-dead convention in calendar that | 17207 | This is a wrapper to handle the brain-dead convention in calendar that |
| 17208 | user function argument order change dependent on argument order." | 17208 | user function argument order change dependent on argument order." |
| 17209 | (pcase calendar-date-style | 17209 | (pcase calendar-date-style |
| 17210 | ('american (list arg1 arg2 arg3)) | 17210 | (`american (list arg1 arg2 arg3)) |
| 17211 | ('european (list arg2 arg1 arg3)) | 17211 | (`european (list arg2 arg1 arg3)) |
| 17212 | ('iso (list arg2 arg3 arg1)))) | 17212 | (`iso (list arg2 arg3 arg1)))) |
| 17213 | 17213 | ||
| 17214 | (defun org-eval-in-calendar (form &optional keepdate) | 17214 | (defun org-eval-in-calendar (form &optional keepdate) |
| 17215 | "Eval FORM in the calendar window and return to current window. | 17215 | "Eval FORM in the calendar window and return to current window. |
| @@ -18015,14 +18015,14 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays like \"--2d\"." | |||
| 18015 | (pcase origin-cat | 18015 | (pcase origin-cat |
| 18016 | ;; `day' category ends before `hour' if any, or at the end | 18016 | ;; `day' category ends before `hour' if any, or at the end |
| 18017 | ;; of the day name. | 18017 | ;; of the day name. |
| 18018 | ('day (min (or (match-beginning 7) (1- (match-end 5))) origin)) | 18018 | (`day (min (or (match-beginning 7) (1- (match-end 5))) origin)) |
| 18019 | ('hour (min (match-end 7) origin)) | 18019 | (`hour (min (match-end 7) origin)) |
| 18020 | ('minute (min (1- (match-end 8)) origin)) | 18020 | (`minute (min (1- (match-end 8)) origin)) |
| 18021 | ((pred integerp) (min (1- (match-end 0)) origin)) | 18021 | ((pred integerp) (min (1- (match-end 0)) origin)) |
| 18022 | ;; Point was right after the time-stamp. However, the | 18022 | ;; Point was right after the time-stamp. However, the |
| 18023 | ;; time-stamp length might have changed, so refer to | 18023 | ;; time-stamp length might have changed, so refer to |
| 18024 | ;; (match-end 0) instead. | 18024 | ;; (match-end 0) instead. |
| 18025 | ('after (match-end 0)) | 18025 | (`after (match-end 0)) |
| 18026 | ;; `year' and `month' have both fixed size: point couldn't | 18026 | ;; `year' and `month' have both fixed size: point couldn't |
| 18027 | ;; have moved into another part. | 18027 | ;; have moved into another part. |
| 18028 | (_ origin)))) | 18028 | (_ origin)))) |
| @@ -20709,7 +20709,7 @@ Otherwise, return a user error." | |||
| 20709 | (let ((element (org-element-at-point))) | 20709 | (let ((element (org-element-at-point))) |
| 20710 | (barf-if-buffer-read-only) | 20710 | (barf-if-buffer-read-only) |
| 20711 | (pcase (org-element-type element) | 20711 | (pcase (org-element-type element) |
| 20712 | ('src-block | 20712 | (`src-block |
| 20713 | (if (not arg) (org-edit-src-code) | 20713 | (if (not arg) (org-edit-src-code) |
| 20714 | (let* ((info (org-babel-get-src-block-info)) | 20714 | (let* ((info (org-babel-get-src-block-info)) |
| 20715 | (lang (nth 0 info)) | 20715 | (lang (nth 0 info)) |
| @@ -20722,7 +20722,7 @@ Otherwise, return a user error." | |||
| 20722 | (switch-to-buffer | 20722 | (switch-to-buffer |
| 20723 | (funcall (intern (concat "org-babel-prep-session:" lang)) | 20723 | (funcall (intern (concat "org-babel-prep-session:" lang)) |
| 20724 | session params)))))) | 20724 | session params)))))) |
| 20725 | ('keyword | 20725 | (`keyword |
| 20726 | (if (member (org-element-property :key element) '("INCLUDE" "SETUPFILE")) | 20726 | (if (member (org-element-property :key element) '("INCLUDE" "SETUPFILE")) |
| 20727 | (org-open-link-from-string | 20727 | (org-open-link-from-string |
| 20728 | (format "[[%s]]" | 20728 | (format "[[%s]]" |
| @@ -20738,24 +20738,24 @@ Otherwise, return a user error." | |||
| 20738 | (match-string 0 value)) | 20738 | (match-string 0 value)) |
| 20739 | (t (user-error "No valid file specified"))))))) | 20739 | (t (user-error "No valid file specified"))))))) |
| 20740 | (user-error "No special environment to edit here"))) | 20740 | (user-error "No special environment to edit here"))) |
| 20741 | ('table | 20741 | (`table |
| 20742 | (if (eq (org-element-property :type element) 'table.el) | 20742 | (if (eq (org-element-property :type element) 'table.el) |
| 20743 | (org-edit-table.el) | 20743 | (org-edit-table.el) |
| 20744 | (call-interactively 'org-table-edit-formulas))) | 20744 | (call-interactively 'org-table-edit-formulas))) |
| 20745 | ;; Only Org tables contain `table-row' type elements. | 20745 | ;; Only Org tables contain `table-row' type elements. |
| 20746 | ('table-row (call-interactively 'org-table-edit-formulas)) | 20746 | (`table-row (call-interactively 'org-table-edit-formulas)) |
| 20747 | ('example-block (org-edit-src-code)) | 20747 | (`example-block (org-edit-src-code)) |
| 20748 | ('export-block (org-edit-export-block)) | 20748 | (`export-block (org-edit-export-block)) |
| 20749 | ('fixed-width (org-edit-fixed-width-region)) | 20749 | (`fixed-width (org-edit-fixed-width-region)) |
| 20750 | ('latex-environment (org-edit-latex-environment)) | 20750 | (`latex-environment (org-edit-latex-environment)) |
| 20751 | (_ | 20751 | (_ |
| 20752 | ;; No notable element at point. Though, we may be at a link or | 20752 | ;; No notable element at point. Though, we may be at a link or |
| 20753 | ;; a footnote reference, which are objects. Thus, scan deeper. | 20753 | ;; a footnote reference, which are objects. Thus, scan deeper. |
| 20754 | (let ((context (org-element-context element))) | 20754 | (let ((context (org-element-context element))) |
| 20755 | (pcase (org-element-type context) | 20755 | (pcase (org-element-type context) |
| 20756 | ('footnote-reference (org-edit-footnote-reference)) | 20756 | (`footnote-reference (org-edit-footnote-reference)) |
| 20757 | ('inline-src-block (org-edit-inline-src-code)) | 20757 | (`inline-src-block (org-edit-inline-src-code)) |
| 20758 | ('link (call-interactively #'ffap)) | 20758 | (`link (call-interactively #'ffap)) |
| 20759 | (_ (user-error "No special environment to edit here")))))))) | 20759 | (_ (user-error "No special environment to edit here")))))))) |
| 20760 | 20760 | ||
| 20761 | (defvar org-table-coordinate-overlays) ; defined in org-table.el | 20761 | (defvar org-table-coordinate-overlays) ; defined in org-table.el |
| @@ -20842,7 +20842,7 @@ This command does many different things, depending on context: | |||
| 20842 | ;; a src block. Hence, we first check if point is in such | 20842 | ;; a src block. Hence, we first check if point is in such |
| 20843 | ;; a block and then if it is at a blank line. | 20843 | ;; a block and then if it is at a blank line. |
| 20844 | (pcase type | 20844 | (pcase type |
| 20845 | ((or 'inline-src-block 'src-block) | 20845 | ((or `inline-src-block `src-block) |
| 20846 | (unless org-babel-no-eval-on-ctrl-c-ctrl-c | 20846 | (unless org-babel-no-eval-on-ctrl-c-ctrl-c |
| 20847 | (org-babel-eval-wipe-error-buffer) | 20847 | (org-babel-eval-wipe-error-buffer) |
| 20848 | (org-babel-execute-src-block | 20848 | (org-babel-execute-src-block |
| @@ -20852,22 +20852,22 @@ This command does many different things, depending on context: | |||
| 20852 | (user-error | 20852 | (user-error |
| 20853 | (substitute-command-keys | 20853 | (substitute-command-keys |
| 20854 | "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here")))) | 20854 | "`\\[org-ctrl-c-ctrl-c]' can do nothing useful here")))) |
| 20855 | ((or 'babel-call 'inline-babel-call) | 20855 | ((or `babel-call `inline-babel-call) |
| 20856 | (let ((info (org-babel-lob-get-info context))) | 20856 | (let ((info (org-babel-lob-get-info context))) |
| 20857 | (when info (org-babel-execute-src-block nil info)))) | 20857 | (when info (org-babel-execute-src-block nil info)))) |
| 20858 | ('clock (org-clock-update-time-maybe)) | 20858 | (`clock (org-clock-update-time-maybe)) |
| 20859 | ('dynamic-block | 20859 | (`dynamic-block |
| 20860 | (save-excursion | 20860 | (save-excursion |
| 20861 | (goto-char (org-element-property :post-affiliated context)) | 20861 | (goto-char (org-element-property :post-affiliated context)) |
| 20862 | (org-update-dblock))) | 20862 | (org-update-dblock))) |
| 20863 | ('footnote-definition | 20863 | (`footnote-definition |
| 20864 | (goto-char (org-element-property :post-affiliated context)) | 20864 | (goto-char (org-element-property :post-affiliated context)) |
| 20865 | (call-interactively 'org-footnote-action)) | 20865 | (call-interactively 'org-footnote-action)) |
| 20866 | ('footnote-reference (call-interactively #'org-footnote-action)) | 20866 | (`footnote-reference (call-interactively #'org-footnote-action)) |
| 20867 | ((or 'headline 'inlinetask) | 20867 | ((or `headline `inlinetask) |
| 20868 | (save-excursion (goto-char (org-element-property :begin context)) | 20868 | (save-excursion (goto-char (org-element-property :begin context)) |
| 20869 | (call-interactively #'org-set-tags))) | 20869 | (call-interactively #'org-set-tags))) |
| 20870 | ('item | 20870 | (`item |
| 20871 | ;; At an item: `C-u C-u' sets checkbox to "[-]" | 20871 | ;; At an item: `C-u C-u' sets checkbox to "[-]" |
| 20872 | ;; unconditionally, whereas `C-u' will toggle its presence. | 20872 | ;; unconditionally, whereas `C-u' will toggle its presence. |
| 20873 | ;; Without a universal argument, if the item has a checkbox, | 20873 | ;; Without a universal argument, if the item has a checkbox, |
| @@ -20905,7 +20905,7 @@ This command does many different things, depending on context: | |||
| 20905 | (when block-item | 20905 | (when block-item |
| 20906 | (message "Checkboxes were removed due to empty box at line %d" | 20906 | (message "Checkboxes were removed due to empty box at line %d" |
| 20907 | (org-current-line block-item)))))) | 20907 | (org-current-line block-item)))))) |
| 20908 | ('keyword | 20908 | (`keyword |
| 20909 | (let ((org-inhibit-startup-visibility-stuff t) | 20909 | (let ((org-inhibit-startup-visibility-stuff t) |
| 20910 | (org-startup-align-all-tables nil)) | 20910 | (org-startup-align-all-tables nil)) |
| 20911 | (when (boundp 'org-table-coordinate-overlays) | 20911 | (when (boundp 'org-table-coordinate-overlays) |
| @@ -20913,7 +20913,7 @@ This command does many different things, depending on context: | |||
| 20913 | (setq org-table-coordinate-overlays nil)) | 20913 | (setq org-table-coordinate-overlays nil)) |
| 20914 | (org-save-outline-visibility 'use-markers (org-mode-restart))) | 20914 | (org-save-outline-visibility 'use-markers (org-mode-restart))) |
| 20915 | (message "Local setup has been refreshed")) | 20915 | (message "Local setup has been refreshed")) |
| 20916 | ('plain-list | 20916 | (`plain-list |
| 20917 | ;; At a plain list, with a double C-u argument, set | 20917 | ;; At a plain list, with a double C-u argument, set |
| 20918 | ;; checkboxes of each item to "[-]", whereas a single one | 20918 | ;; checkboxes of each item to "[-]", whereas a single one |
| 20919 | ;; will toggle their presence according to the state of the | 20919 | ;; will toggle their presence according to the state of the |
| @@ -20946,13 +20946,13 @@ This command does many different things, depending on context: | |||
| 20946 | struct (org-list-parents-alist struct) old-struct) | 20946 | struct (org-list-parents-alist struct) old-struct) |
| 20947 | (org-update-checkbox-count-maybe) | 20947 | (org-update-checkbox-count-maybe) |
| 20948 | (save-excursion (goto-char beginm) (org-list-send-list 'maybe)))) | 20948 | (save-excursion (goto-char beginm) (org-list-send-list 'maybe)))) |
| 20949 | ((or 'property-drawer 'node-property) | 20949 | ((or `property-drawer `node-property) |
| 20950 | (call-interactively #'org-property-action)) | 20950 | (call-interactively #'org-property-action)) |
| 20951 | ('radio-target | 20951 | (`radio-target |
| 20952 | (call-interactively #'org-update-radio-target-regexp)) | 20952 | (call-interactively #'org-update-radio-target-regexp)) |
| 20953 | ('statistics-cookie | 20953 | (`statistics-cookie |
| 20954 | (call-interactively #'org-update-statistics-cookies)) | 20954 | (call-interactively #'org-update-statistics-cookies)) |
| 20955 | ((or 'table 'table-cell 'table-row) | 20955 | ((or `table `table-cell `table-row) |
| 20956 | ;; At a table, recalculate every field and align it. Also | 20956 | ;; At a table, recalculate every field and align it. Also |
| 20957 | ;; send the table if necessary. If the table has | 20957 | ;; send the table if necessary. If the table has |
| 20958 | ;; a `table.el' type, just give up. At a table row or cell, | 20958 | ;; a `table.el' type, just give up. At a table row or cell, |
| @@ -20975,9 +20975,9 @@ Use `\\[org-edit-special]' to edit table.el tables")) | |||
| 20975 | (cond (arg (call-interactively #'org-table-recalculate)) | 20975 | (cond (arg (call-interactively #'org-table-recalculate)) |
| 20976 | ((org-table-maybe-recalculate-line)) | 20976 | ((org-table-maybe-recalculate-line)) |
| 20977 | (t (org-table-align)))))) | 20977 | (t (org-table-align)))))) |
| 20978 | ((or 'timestamp (and 'planning (guard (org-at-timestamp-p 'lax)))) | 20978 | ((or `timestamp (and `planning (guard (org-at-timestamp-p 'lax)))) |
| 20979 | (org-timestamp-change 0 'day)) | 20979 | (org-timestamp-change 0 'day)) |
| 20980 | ((and 'nil (guard (org-at-heading-p))) | 20980 | ((and `nil (guard (org-at-heading-p))) |
| 20981 | ;; When point is on an unsupported object type, we can miss | 20981 | ;; When point is on an unsupported object type, we can miss |
| 20982 | ;; the fact that it also is at a heading. Handle it here. | 20982 | ;; the fact that it also is at a heading. Handle it here. |
| 20983 | (call-interactively #'org-set-tags)) | 20983 | (call-interactively #'org-set-tags)) |
diff --git a/lisp/org/ox-ascii.el b/lisp/org/ox-ascii.el index 5b9db497150..c3ccb596aa3 100644 --- a/lisp/org/ox-ascii.el +++ b/lisp/org/ox-ascii.el | |||
| @@ -549,8 +549,8 @@ INFO is a plist used as a communication channel." | |||
| 549 | INFO is a plist used as a communication channel." | 549 | INFO is a plist used as a communication channel." |
| 550 | (pcase (org-element-type element) | 550 | (pcase (org-element-type element) |
| 551 | ;; Elements with an absolute width: `headline' and `inlinetask'. | 551 | ;; Elements with an absolute width: `headline' and `inlinetask'. |
| 552 | ('inlinetask (plist-get info :ascii-inlinetask-width)) | 552 | (`inlinetask (plist-get info :ascii-inlinetask-width)) |
| 553 | ('headline | 553 | (`headline |
| 554 | (- (plist-get info :ascii-text-width) | 554 | (- (plist-get info :ascii-text-width) |
| 555 | (let ((low-level-rank (org-export-low-level-p element info))) | 555 | (let ((low-level-rank (org-export-low-level-p element info))) |
| 556 | (if low-level-rank (* low-level-rank 2) | 556 | (if low-level-rank (* low-level-rank 2) |
| @@ -624,8 +624,8 @@ Return value is a symbol among `left', `center', `right' and | |||
| 624 | (while (and (not justification) | 624 | (while (and (not justification) |
| 625 | (setq element (org-element-property :parent element))) | 625 | (setq element (org-element-property :parent element))) |
| 626 | (pcase (org-element-type element) | 626 | (pcase (org-element-type element) |
| 627 | ('center-block (setq justification 'center)) | 627 | (`center-block (setq justification 'center)) |
| 628 | ('special-block | 628 | (`special-block |
| 629 | (let ((name (org-element-property :type element))) | 629 | (let ((name (org-element-property :type element))) |
| 630 | (cond ((string= name "JUSTIFYRIGHT") (setq justification 'right)) | 630 | (cond ((string= name "JUSTIFYRIGHT") (setq justification 'right)) |
| 631 | ((string= name "JUSTIFYLEFT") (setq justification 'left))))))) | 631 | ((string= name "JUSTIFYLEFT") (setq justification 'left))))))) |
| @@ -724,8 +724,8 @@ caption keyword." | |||
| 724 | element info nil 'org-ascii--has-caption-p)) | 724 | element info nil 'org-ascii--has-caption-p)) |
| 725 | (title-fmt (org-ascii--translate | 725 | (title-fmt (org-ascii--translate |
| 726 | (pcase (org-element-type element) | 726 | (pcase (org-element-type element) |
| 727 | ('table "Table %d:") | 727 | (`table "Table %d:") |
| 728 | ('src-block "Listing %d:")) | 728 | (`src-block "Listing %d:")) |
| 729 | info))) | 729 | info))) |
| 730 | (org-ascii--fill-string | 730 | (org-ascii--fill-string |
| 731 | (concat (format title-fmt reference) | 731 | (concat (format title-fmt reference) |
| @@ -890,8 +890,8 @@ If DATUM is a string, consider it to be a file name, per | |||
| 890 | `org-export-resolve-id-link'. INFO is the communication channel, | 890 | `org-export-resolve-id-link'. INFO is the communication channel, |
| 891 | as a plist." | 891 | as a plist." |
| 892 | (pcase (org-element-type datum) | 892 | (pcase (org-element-type datum) |
| 893 | ('plain-text (format "See file %s" datum)) ;External file | 893 | (`plain-text (format "See file %s" datum)) ;External file |
| 894 | ('headline | 894 | (`headline |
| 895 | (format (org-ascii--translate "See section %s" info) | 895 | (format (org-ascii--translate "See section %s" info) |
| 896 | (if (org-export-numbered-headline-p datum info) | 896 | (if (org-export-numbered-headline-p datum info) |
| 897 | (mapconcat #'number-to-string | 897 | (mapconcat #'number-to-string |
| @@ -907,7 +907,7 @@ as a plist." | |||
| 907 | (org-element-lineage datum | 907 | (org-element-lineage datum |
| 908 | '(headline paragraph src-block table) t))) | 908 | '(headline paragraph src-block table) t))) |
| 909 | (pcase (org-element-type enumerable) | 909 | (pcase (org-element-type enumerable) |
| 910 | ('headline | 910 | (`headline |
| 911 | (format (org-ascii--translate "See section %s" info) | 911 | (format (org-ascii--translate "See section %s" info) |
| 912 | (if (org-export-numbered-headline-p enumerable info) | 912 | (if (org-export-numbered-headline-p enumerable info) |
| 913 | (mapconcat #'number-to-string number ".") | 913 | (mapconcat #'number-to-string number ".") |
| @@ -915,11 +915,11 @@ as a plist." | |||
| 915 | (org-element-property :title enumerable) info)))) | 915 | (org-element-property :title enumerable) info)))) |
| 916 | ((guard (not number)) | 916 | ((guard (not number)) |
| 917 | (org-ascii--translate "Unknown reference" info)) | 917 | (org-ascii--translate "Unknown reference" info)) |
| 918 | ('paragraph | 918 | (`paragraph |
| 919 | (format (org-ascii--translate "See figure %s" info) number)) | 919 | (format (org-ascii--translate "See figure %s" info) number)) |
| 920 | ('src-block | 920 | (`src-block |
| 921 | (format (org-ascii--translate "See listing %s" info) number)) | 921 | (format (org-ascii--translate "See listing %s" info) number)) |
| 922 | ('table | 922 | (`table |
| 923 | (format (org-ascii--translate "See table %s" info) number)) | 923 | (format (org-ascii--translate "See table %s" info) number)) |
| 924 | (_ (org-ascii--translate "Unknown reference" info))))))) | 924 | (_ (org-ascii--translate "Unknown reference" info))))))) |
| 925 | 925 | ||
| @@ -970,9 +970,9 @@ channel." | |||
| 970 | INFO is a plist used as a communication channel." | 970 | INFO is a plist used as a communication channel." |
| 971 | (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))) | 971 | (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))) |
| 972 | (pcase (org-element-property :checkbox item) | 972 | (pcase (org-element-property :checkbox item) |
| 973 | ('on (if utf8p "☑ " "[X] ")) | 973 | (`on (if utf8p "☑ " "[X] ")) |
| 974 | ('off (if utf8p "☐ " "[ ] ")) | 974 | (`off (if utf8p "☐ " "[ ] ")) |
| 975 | ('trans (if utf8p "☒ " "[-] "))))) | 975 | (`trans (if utf8p "☒ " "[-] "))))) |
| 976 | 976 | ||
| 977 | 977 | ||
| 978 | 978 | ||
| @@ -1450,11 +1450,11 @@ contextual information." | |||
| 1450 | ;; First parent of ITEM is always the plain-list. Get | 1450 | ;; First parent of ITEM is always the plain-list. Get |
| 1451 | ;; `:type' property from it. | 1451 | ;; `:type' property from it. |
| 1452 | (pcase list-type | 1452 | (pcase list-type |
| 1453 | ('descriptive | 1453 | (`descriptive |
| 1454 | (concat checkbox | 1454 | (concat checkbox |
| 1455 | (org-export-data (org-element-property :tag item) | 1455 | (org-export-data (org-element-property :tag item) |
| 1456 | info))) | 1456 | info))) |
| 1457 | ('ordered | 1457 | (`ordered |
| 1458 | ;; Return correct number for ITEM, paying attention to | 1458 | ;; Return correct number for ITEM, paying attention to |
| 1459 | ;; counters. | 1459 | ;; counters. |
| 1460 | (let* ((struct (org-element-property :structure item)) | 1460 | (let* ((struct (org-element-property :structure item)) |
| @@ -1586,8 +1586,8 @@ INFO is a plist holding contextual information." | |||
| 1586 | (format " (%s)" | 1586 | (format " (%s)" |
| 1587 | (org-ascii--describe-datum destination info))))) | 1587 | (org-ascii--describe-datum destination info))))) |
| 1588 | ;; External file. | 1588 | ;; External file. |
| 1589 | ('plain-text destination) | 1589 | (`plain-text destination) |
| 1590 | ('headline | 1590 | (`headline |
| 1591 | (if (org-export-numbered-headline-p destination info) | 1591 | (if (org-export-numbered-headline-p destination info) |
| 1592 | (mapconcat #'number-to-string | 1592 | (mapconcat #'number-to-string |
| 1593 | (org-export-get-headline-number destination info) | 1593 | (org-export-get-headline-number destination info) |
diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index dd61ad926cb..6166a4ad019 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el | |||
| @@ -624,12 +624,12 @@ export back-end currently used." | |||
| 624 | (match-string 1 options) | 624 | (match-string 1 options) |
| 625 | default))) | 625 | default))) |
| 626 | (pcase opt | 626 | (pcase opt |
| 627 | ('path (setq template | 627 | (`path (setq template |
| 628 | (replace-regexp-in-string | 628 | (replace-regexp-in-string |
| 629 | "%SCRIPT_PATH" val template t t))) | 629 | "%SCRIPT_PATH" val template t t))) |
| 630 | ('sdepth (when (integerp (read val)) | 630 | (`sdepth (when (integerp (read val)) |
| 631 | (setq sdepth (min (read val) sdepth)))) | 631 | (setq sdepth (min (read val) sdepth)))) |
| 632 | ('tdepth (when (integerp (read val)) | 632 | (`tdepth (when (integerp (read val)) |
| 633 | (setq tdepth (min (read val) tdepth)))) | 633 | (setq tdepth (min (read val) tdepth)))) |
| 634 | (_ (setq val | 634 | (_ (setq val |
| 635 | (cond | 635 | (cond |
| @@ -2739,19 +2739,19 @@ INFO is a plist holding contextual information. See | |||
| 2739 | (extra-newline (if (and (org-string-nw-p contents) headline) "\n" ""))) | 2739 | (extra-newline (if (and (org-string-nw-p contents) headline) "\n" ""))) |
| 2740 | (concat | 2740 | (concat |
| 2741 | (pcase type | 2741 | (pcase type |
| 2742 | ('ordered | 2742 | (`ordered |
| 2743 | (let* ((counter term-counter-id) | 2743 | (let* ((counter term-counter-id) |
| 2744 | (extra (if counter (format " value=\"%s\"" counter) ""))) | 2744 | (extra (if counter (format " value=\"%s\"" counter) ""))) |
| 2745 | (concat | 2745 | (concat |
| 2746 | (format "<li%s%s>" class extra) | 2746 | (format "<li%s%s>" class extra) |
| 2747 | (when headline (concat headline br))))) | 2747 | (when headline (concat headline br))))) |
| 2748 | ('unordered | 2748 | (`unordered |
| 2749 | (let* ((id term-counter-id) | 2749 | (let* ((id term-counter-id) |
| 2750 | (extra (if id (format " id=\"%s\"" id) ""))) | 2750 | (extra (if id (format " id=\"%s\"" id) ""))) |
| 2751 | (concat | 2751 | (concat |
| 2752 | (format "<li%s%s>" class extra) | 2752 | (format "<li%s%s>" class extra) |
| 2753 | (when headline (concat headline br))))) | 2753 | (when headline (concat headline br))))) |
| 2754 | ('descriptive | 2754 | (`descriptive |
| 2755 | (let* ((term term-counter-id)) | 2755 | (let* ((term term-counter-id)) |
| 2756 | (setq term (or term "(no term)")) | 2756 | (setq term (or term "(no term)")) |
| 2757 | ;; Check-boxes in descriptive lists are associated to tag. | 2757 | ;; Check-boxes in descriptive lists are associated to tag. |
| @@ -2763,9 +2763,9 @@ INFO is a plist holding contextual information. See | |||
| 2763 | (and (org-string-nw-p contents) (org-trim contents)) | 2763 | (and (org-string-nw-p contents) (org-trim contents)) |
| 2764 | extra-newline | 2764 | extra-newline |
| 2765 | (pcase type | 2765 | (pcase type |
| 2766 | ('ordered "</li>") | 2766 | (`ordered "</li>") |
| 2767 | ('unordered "</li>") | 2767 | (`unordered "</li>") |
| 2768 | ('descriptive "</dd>"))))) | 2768 | (`descriptive "</dd>"))))) |
| 2769 | 2769 | ||
| 2770 | (defun org-html-item (item contents info) | 2770 | (defun org-html-item (item contents info) |
| 2771 | "Transcode an ITEM element from Org to HTML. | 2771 | "Transcode an ITEM element from Org to HTML. |
| @@ -2902,8 +2902,8 @@ if its description is a single link targeting an image file." | |||
| 2902 | (cons 'plain-text org-element-all-objects) | 2902 | (cons 'plain-text org-element-all-objects) |
| 2903 | (lambda (obj) | 2903 | (lambda (obj) |
| 2904 | (pcase (org-element-type obj) | 2904 | (pcase (org-element-type obj) |
| 2905 | ('plain-text (org-string-nw-p obj)) | 2905 | (`plain-text (org-string-nw-p obj)) |
| 2906 | ('link (if (= link-count 1) t | 2906 | (`link (if (= link-count 1) t |
| 2907 | (cl-incf link-count) | 2907 | (cl-incf link-count) |
| 2908 | (not (org-export-inline-image-p | 2908 | (not (org-export-inline-image-p |
| 2909 | obj (plist-get info :html-inline-image-rules))))) | 2909 | obj (plist-get info :html-inline-image-rules))))) |
| @@ -2930,8 +2930,8 @@ images, set it to: | |||
| 2930 | 2930 | ||
| 2931 | (lambda (paragraph) (org-element-property :caption paragraph))" | 2931 | (lambda (paragraph) (org-element-property :caption paragraph))" |
| 2932 | (let ((paragraph (pcase (org-element-type element) | 2932 | (let ((paragraph (pcase (org-element-type element) |
| 2933 | ('paragraph element) | 2933 | (`paragraph element) |
| 2934 | ('link (org-export-get-parent element))))) | 2934 | (`link (org-export-get-parent element))))) |
| 2935 | (and (eq (org-element-type paragraph) 'paragraph) | 2935 | (and (eq (org-element-type paragraph) 'paragraph) |
| 2936 | (or (not (fboundp 'org-html-standalone-image-predicate)) | 2936 | (or (not (fboundp 'org-html-standalone-image-predicate)) |
| 2937 | (funcall org-html-standalone-image-predicate paragraph)) | 2937 | (funcall org-html-standalone-image-predicate paragraph)) |
| @@ -2941,8 +2941,8 @@ images, set it to: | |||
| 2941 | (cons 'plain-text org-element-all-objects) | 2941 | (cons 'plain-text org-element-all-objects) |
| 2942 | (lambda (obj) | 2942 | (lambda (obj) |
| 2943 | (when (pcase (org-element-type obj) | 2943 | (when (pcase (org-element-type obj) |
| 2944 | ('plain-text (org-string-nw-p obj)) | 2944 | (`plain-text (org-string-nw-p obj)) |
| 2945 | ('link (or (> (cl-incf link-count) 1) | 2945 | (`link (or (> (cl-incf link-count) 1) |
| 2946 | (not (org-html-inline-image-p obj info)))) | 2946 | (not (org-html-inline-image-p obj info)))) |
| 2947 | (_ t)) | 2947 | (_ t)) |
| 2948 | (throw 'exit nil))) | 2948 | (throw 'exit nil))) |
| @@ -3046,7 +3046,7 @@ INFO is a plist holding contextual information. See | |||
| 3046 | (org-export-resolve-id-link link info)))) | 3046 | (org-export-resolve-id-link link info)))) |
| 3047 | (pcase (org-element-type destination) | 3047 | (pcase (org-element-type destination) |
| 3048 | ;; ID link points to an external file. | 3048 | ;; ID link points to an external file. |
| 3049 | ('plain-text | 3049 | (`plain-text |
| 3050 | (let ((fragment (concat "ID-" path)) | 3050 | (let ((fragment (concat "ID-" path)) |
| 3051 | ;; Treat links to ".org" files as ".html", if needed. | 3051 | ;; Treat links to ".org" files as ".html", if needed. |
| 3052 | (path (funcall link-org-files-as-html-maybe | 3052 | (path (funcall link-org-files-as-html-maybe |
| @@ -3054,13 +3054,13 @@ INFO is a plist holding contextual information. See | |||
| 3054 | (format "<a href=\"%s#%s\"%s>%s</a>" | 3054 | (format "<a href=\"%s#%s\"%s>%s</a>" |
| 3055 | path fragment attributes (or desc destination)))) | 3055 | path fragment attributes (or desc destination)))) |
| 3056 | ;; Fuzzy link points nowhere. | 3056 | ;; Fuzzy link points nowhere. |
| 3057 | ('nil | 3057 | (`nil |
| 3058 | (format "<i>%s</i>" | 3058 | (format "<i>%s</i>" |
| 3059 | (or desc | 3059 | (or desc |
| 3060 | (org-export-data | 3060 | (org-export-data |
| 3061 | (org-element-property :raw-link link) info)))) | 3061 | (org-element-property :raw-link link) info)))) |
| 3062 | ;; Link points to a headline. | 3062 | ;; Link points to a headline. |
| 3063 | ('headline | 3063 | (`headline |
| 3064 | (let ((href (or (org-element-property :CUSTOM_ID destination) | 3064 | (let ((href (or (org-element-property :CUSTOM_ID destination) |
| 3065 | (org-export-get-reference destination info))) | 3065 | (org-export-get-reference destination info))) |
| 3066 | ;; What description to use? | 3066 | ;; What description to use? |
| @@ -3189,9 +3189,9 @@ the plist used as a communication channel." | |||
| 3189 | CONTENTS is the contents of the list. INFO is a plist holding | 3189 | CONTENTS is the contents of the list. INFO is a plist holding |
| 3190 | contextual information." | 3190 | contextual information." |
| 3191 | (let* ((type (pcase (org-element-property :type plain-list) | 3191 | (let* ((type (pcase (org-element-property :type plain-list) |
| 3192 | ('ordered "ol") | 3192 | (`ordered "ol") |
| 3193 | ('unordered "ul") | 3193 | (`unordered "ul") |
| 3194 | ('descriptive "dl") | 3194 | (`descriptive "dl") |
| 3195 | (other (error "Unknown HTML list type: %s" other)))) | 3195 | (other (error "Unknown HTML list type: %s" other)))) |
| 3196 | (class (format "org-%s" type)) | 3196 | (class (format "org-%s" type)) |
| 3197 | (attributes (org-export-read-attribute :attr_html plain-list))) | 3197 | (attributes (org-export-read-attribute :attr_html plain-list))) |
diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index 332e42b7b99..5aaaf991fde 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el | |||
| @@ -2434,7 +2434,7 @@ used as a communication channel." | |||
| 2434 | nil t)))) | 2434 | nil t)))) |
| 2435 | ;; Return proper string, depending on FLOAT. | 2435 | ;; Return proper string, depending on FLOAT. |
| 2436 | (pcase float | 2436 | (pcase float |
| 2437 | ('wrap (format "\\begin{wrapfigure}%s | 2437 | (`wrap (format "\\begin{wrapfigure}%s |
| 2438 | %s%s | 2438 | %s%s |
| 2439 | %s%s | 2439 | %s%s |
| 2440 | %s\\end{wrapfigure}" | 2440 | %s\\end{wrapfigure}" |
| @@ -2443,7 +2443,7 @@ used as a communication channel." | |||
| 2443 | (if center "\\centering" "") | 2443 | (if center "\\centering" "") |
| 2444 | comment-include image-code | 2444 | comment-include image-code |
| 2445 | (if caption-above-p "" caption))) | 2445 | (if caption-above-p "" caption))) |
| 2446 | ('sideways (format "\\begin{sidewaysfigure} | 2446 | (`sideways (format "\\begin{sidewaysfigure} |
| 2447 | %s%s | 2447 | %s%s |
| 2448 | %s%s | 2448 | %s%s |
| 2449 | %s\\end{sidewaysfigure}" | 2449 | %s\\end{sidewaysfigure}" |
| @@ -2451,7 +2451,7 @@ used as a communication channel." | |||
| 2451 | (if center "\\centering" "") | 2451 | (if center "\\centering" "") |
| 2452 | comment-include image-code | 2452 | comment-include image-code |
| 2453 | (if caption-above-p "" caption))) | 2453 | (if caption-above-p "" caption))) |
| 2454 | ('multicolumn (format "\\begin{figure*}%s | 2454 | (`multicolumn (format "\\begin{figure*}%s |
| 2455 | %s%s | 2455 | %s%s |
| 2456 | %s%s | 2456 | %s%s |
| 2457 | %s\\end{figure*}" | 2457 | %s\\end{figure*}" |
| @@ -2460,7 +2460,7 @@ used as a communication channel." | |||
| 2460 | (if center "\\centering" "") | 2460 | (if center "\\centering" "") |
| 2461 | comment-include image-code | 2461 | comment-include image-code |
| 2462 | (if caption-above-p "" caption))) | 2462 | (if caption-above-p "" caption))) |
| 2463 | ('figure (format "\\begin{figure}%s | 2463 | (`figure (format "\\begin{figure}%s |
| 2464 | %s%s | 2464 | %s%s |
| 2465 | %s%s | 2465 | %s%s |
| 2466 | %s\\end{figure}" | 2466 | %s\\end{figure}" |
| @@ -2767,12 +2767,12 @@ containing export options. Modify DATA by side-effect and return it." | |||
| 2767 | ;; Non-nil when OBJ can be added to the latex math block B. | 2767 | ;; Non-nil when OBJ can be added to the latex math block B. |
| 2768 | (lambda (obj b) | 2768 | (lambda (obj b) |
| 2769 | (pcase (org-element-type obj) | 2769 | (pcase (org-element-type obj) |
| 2770 | ('entity (org-element-property :latex-math-p obj)) | 2770 | (`entity (org-element-property :latex-math-p obj)) |
| 2771 | ('latex-fragment | 2771 | (`latex-fragment |
| 2772 | (let ((value (org-element-property :value obj))) | 2772 | (let ((value (org-element-property :value obj))) |
| 2773 | (or (string-prefix-p "\\(" value) | 2773 | (or (string-prefix-p "\\(" value) |
| 2774 | (string-match-p "\\`\\$[^$]" value)))) | 2774 | (string-match-p "\\`\\$[^$]" value)))) |
| 2775 | ((and type (or 'subscript 'superscript)) | 2775 | ((and type (or `subscript `superscript)) |
| 2776 | (not (memq type (mapcar #'org-element-type | 2776 | (not (memq type (mapcar #'org-element-type |
| 2777 | (org-element-contents b))))))))) | 2777 | (org-element-contents b))))))))) |
| 2778 | (org-element-map data '(entity latex-fragment subscript superscript) | 2778 | (org-element-map data '(entity latex-fragment subscript superscript) |
diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el index aae9c5838ea..2bc6392dabb 100644 --- a/lisp/org/ox-man.el +++ b/lisp/org/ox-man.el | |||
| @@ -552,9 +552,9 @@ contextual information." | |||
| 552 | (let* ((bullet (org-element-property :bullet item)) | 552 | (let* ((bullet (org-element-property :bullet item)) |
| 553 | (type (org-element-property :type (org-element-property :parent item))) | 553 | (type (org-element-property :type (org-element-property :parent item))) |
| 554 | (checkbox (pcase (org-element-property :checkbox item) | 554 | (checkbox (pcase (org-element-property :checkbox item) |
| 555 | ('on "\\o'\\(sq\\(mu'") | 555 | (`on "\\o'\\(sq\\(mu'") |
| 556 | ('off "\\(sq ") | 556 | (`off "\\(sq ") |
| 557 | ('trans "\\o'\\(sq\\(mi'"))) | 557 | (`trans "\\o'\\(sq\\(mi'"))) |
| 558 | 558 | ||
| 559 | (tag (let ((tag (org-element-property :tag item))) | 559 | (tag (let ((tag (org-element-property :tag item))) |
| 560 | ;; Check-boxes must belong to the tag. | 560 | ;; Check-boxes must belong to the tag. |
| @@ -861,7 +861,7 @@ a communication channel." | |||
| 861 | (push "|" alignment)) | 861 | (push "|" alignment)) |
| 862 | (push | 862 | (push |
| 863 | (concat (pcase (org-export-table-cell-alignment cell info) | 863 | (concat (pcase (org-export-table-cell-alignment cell info) |
| 864 | ('left "l") ('right "r") ('center "c")) | 864 | (`left "l") (`right "r") (`center "c")) |
| 865 | width | 865 | width |
| 866 | divider) | 866 | divider) |
| 867 | alignment) | 867 | alignment) |
diff --git a/lisp/org/ox-md.el b/lisp/org/ox-md.el index a34b955dacf..c4da8fcb145 100644 --- a/lisp/org/ox-md.el +++ b/lisp/org/ox-md.el | |||
| @@ -339,9 +339,9 @@ a communication channel." | |||
| 339 | (concat bullet | 339 | (concat bullet |
| 340 | (make-string (- 4 (length bullet)) ? ) | 340 | (make-string (- 4 (length bullet)) ? ) |
| 341 | (pcase (org-element-property :checkbox item) | 341 | (pcase (org-element-property :checkbox item) |
| 342 | ('on "[X] ") | 342 | (`on "[X] ") |
| 343 | ('trans "[-] ") | 343 | (`trans "[-] ") |
| 344 | ('off "[ ] ")) | 344 | (`off "[ ] ")) |
| 345 | (let ((tag (org-element-property :tag item))) | 345 | (let ((tag (org-element-property :tag item))) |
| 346 | (and tag (format "**%s:** "(org-export-data tag info)))) | 346 | (and tag (format "**%s:** "(org-export-data tag info)))) |
| 347 | (and contents | 347 | (and contents |
| @@ -400,11 +400,11 @@ a communication channel." | |||
| 400 | (org-export-resolve-fuzzy-link link info) | 400 | (org-export-resolve-fuzzy-link link info) |
| 401 | (org-export-resolve-id-link link info)))) | 401 | (org-export-resolve-id-link link info)))) |
| 402 | (pcase (org-element-type destination) | 402 | (pcase (org-element-type destination) |
| 403 | ('plain-text ; External file. | 403 | (`plain-text ; External file. |
| 404 | (let ((path (funcall link-org-files-as-md destination))) | 404 | (let ((path (funcall link-org-files-as-md destination))) |
| 405 | (if (not contents) (format "<%s>" path) | 405 | (if (not contents) (format "<%s>" path) |
| 406 | (format "[%s](%s)" contents path)))) | 406 | (format "[%s](%s)" contents path)))) |
| 407 | ('headline | 407 | (`headline |
| 408 | (format | 408 | (format |
| 409 | "[%s](#%s)" | 409 | "[%s](#%s)" |
| 410 | ;; Description. | 410 | ;; Description. |
diff --git a/lisp/org/ox-org.el b/lisp/org/ox-org.el index b673d49899b..1b5a7cc0c23 100644 --- a/lisp/org/ox-org.el +++ b/lisp/org/ox-org.el | |||
| @@ -124,8 +124,8 @@ we make sure it is always called." | |||
| 124 | (let ((first-child (car (org-element-contents h))) | 124 | (let ((first-child (car (org-element-contents h))) |
| 125 | (new-section (org-element-create 'section))) | 125 | (new-section (org-element-create 'section))) |
| 126 | (pcase (org-element-type first-child) | 126 | (pcase (org-element-type first-child) |
| 127 | ('section nil) | 127 | (`section nil) |
| 128 | ('nil (org-element-adopt-elements h new-section)) | 128 | (`nil (org-element-adopt-elements h new-section)) |
| 129 | (_ (org-element-insert-before new-section first-child)))))) | 129 | (_ (org-element-insert-before new-section first-child)))))) |
| 130 | tree) | 130 | tree) |
| 131 | 131 | ||
diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index ff6723f407d..80ef239b679 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el | |||
| @@ -618,7 +618,7 @@ files, when entire projects are published (see | |||
| 618 | (project-plist (cdr project)) | 618 | (project-plist (cdr project)) |
| 619 | (publishing-function | 619 | (publishing-function |
| 620 | (pcase (org-publish-property :publishing-function project) | 620 | (pcase (org-publish-property :publishing-function project) |
| 621 | ('nil (user-error "No publishing function chosen")) | 621 | (`nil (user-error "No publishing function chosen")) |
| 622 | ((and f (pred listp)) f) | 622 | ((and f (pred listp)) f) |
| 623 | (f (list f)))) | 623 | (f (list f)))) |
| 624 | (base-dir | 624 | (base-dir |
| @@ -703,7 +703,7 @@ return a string. Return value is a list as returned by | |||
| 703 | (file-name-as-directory | 703 | (file-name-as-directory |
| 704 | (org-publish-property :base-directory project))))) | 704 | (org-publish-property :base-directory project))))) |
| 705 | (pcase style | 705 | (pcase style |
| 706 | ('list | 706 | (`list |
| 707 | (cons 'unordered | 707 | (cons 'unordered |
| 708 | (mapcar | 708 | (mapcar |
| 709 | (lambda (f) | 709 | (lambda (f) |
| @@ -712,7 +712,7 @@ return a string. Return value is a list as returned by | |||
| 712 | style | 712 | style |
| 713 | project))) | 713 | project))) |
| 714 | files))) | 714 | files))) |
| 715 | ('tree | 715 | (`tree |
| 716 | (letrec ((files-only (cl-remove-if #'directory-name-p files)) | 716 | (letrec ((files-only (cl-remove-if #'directory-name-p files)) |
| 717 | (directories (cl-remove-if-not #'directory-name-p files)) | 717 | (directories (cl-remove-if-not #'directory-name-p files)) |
| 718 | (subtree-to-list | 718 | (subtree-to-list |
| @@ -778,7 +778,7 @@ Default for SITEMAP-FILENAME is `sitemap.org'." | |||
| 778 | (let ((retval t)) | 778 | (let ((retval t)) |
| 779 | ;; First we sort files: | 779 | ;; First we sort files: |
| 780 | (pcase sort-files | 780 | (pcase sort-files |
| 781 | ('alphabetically | 781 | (`alphabetically |
| 782 | (let ((A (if (funcall org-file-p a) | 782 | (let ((A (if (funcall org-file-p a) |
| 783 | (concat (file-name-directory a) | 783 | (concat (file-name-directory a) |
| 784 | (org-publish-find-title a project)) | 784 | (org-publish-find-title a project)) |
| @@ -791,7 +791,7 @@ Default for SITEMAP-FILENAME is `sitemap.org'." | |||
| 791 | (if ignore-case | 791 | (if ignore-case |
| 792 | (not (string-lessp (upcase B) (upcase A))) | 792 | (not (string-lessp (upcase B) (upcase A))) |
| 793 | (not (string-lessp B A)))))) | 793 | (not (string-lessp B A)))))) |
| 794 | ((or 'anti-chronologically 'chronologically) | 794 | ((or `anti-chronologically `chronologically) |
| 795 | (let* ((adate (org-publish-find-date a project)) | 795 | (let* ((adate (org-publish-find-date a project)) |
| 796 | (bdate (org-publish-find-date b project)) | 796 | (bdate (org-publish-find-date b project)) |
| 797 | (A (+ (ash (car adate) 16) (cadr adate))) | 797 | (A (+ (ash (car adate) 16) (cadr adate))) |
| @@ -800,7 +800,7 @@ Default for SITEMAP-FILENAME is `sitemap.org'." | |||
| 800 | (if (eq sort-files 'chronologically) | 800 | (if (eq sort-files 'chronologically) |
| 801 | (<= A B) | 801 | (<= A B) |
| 802 | (>= A B))))) | 802 | (>= A B))))) |
| 803 | ('nil nil) | 803 | (`nil nil) |
| 804 | (_ (user-error "Invalid sort value %s" sort-files))) | 804 | (_ (user-error "Invalid sort value %s" sort-files))) |
| 805 | ;; Directory-wise wins: | 805 | ;; Directory-wise wins: |
| 806 | (when (memq sort-folders '(first last)) | 806 | (when (memq sort-folders '(first last)) |
| @@ -1104,9 +1104,9 @@ publishing directory." | |||
| 1104 | "[[%s][%s]]" | 1104 | "[[%s][%s]]" |
| 1105 | ;; Destination. | 1105 | ;; Destination. |
| 1106 | (pcase (car target) | 1106 | (pcase (car target) |
| 1107 | ('nil (format "file:%s" file)) | 1107 | (`nil (format "file:%s" file)) |
| 1108 | ('id (format "id:%s" (cdr target))) | 1108 | (`id (format "id:%s" (cdr target))) |
| 1109 | ('custom-id (format "file:%s::#%s" file (cdr target))) | 1109 | (`custom-id (format "file:%s::#%s" file (cdr target))) |
| 1110 | (_ (format "file:%s::*%s" file (cdr target)))) | 1110 | (_ (format "file:%s::*%s" file (cdr target)))) |
| 1111 | ;; Description. | 1111 | ;; Description. |
| 1112 | (car (last entry))))) | 1112 | (car (last entry))))) |
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index 624d13aa06b..d877c9c63a2 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el | |||
| @@ -452,10 +452,10 @@ This is used to choose a separator for constructs like \\verb." | |||
| 452 | INFO is a plist used as a communication channel. See | 452 | INFO is a plist used as a communication channel. See |
| 453 | `org-texinfo-text-markup-alist' for details." | 453 | `org-texinfo-text-markup-alist' for details." |
| 454 | (pcase (cdr (assq markup org-texinfo-text-markup-alist)) | 454 | (pcase (cdr (assq markup org-texinfo-text-markup-alist)) |
| 455 | ('nil text) ;no markup: return raw text | 455 | (`nil text) ;no markup: return raw text |
| 456 | ('code (format "@code{%s}" (org-texinfo--sanitize-content text))) | 456 | (`code (format "@code{%s}" (org-texinfo--sanitize-content text))) |
| 457 | ('samp (format "@samp{%s}" (org-texinfo--sanitize-content text))) | 457 | (`samp (format "@samp{%s}" (org-texinfo--sanitize-content text))) |
| 458 | ('verb | 458 | (`verb |
| 459 | (let ((separator (org-texinfo--find-verb-separator text))) | 459 | (let ((separator (org-texinfo--find-verb-separator text))) |
| 460 | (format "@verb{%s%s%s}" separator text separator))) | 460 | (format "@verb{%s%s%s}" separator text separator))) |
| 461 | ;; Else use format string. | 461 | ;; Else use format string. |
| @@ -872,7 +872,7 @@ contextual information." | |||
| 872 | unnumbered) | 872 | unnumbered) |
| 873 | ((org-export-numbered-headline-p headline info) numbered) | 873 | ((org-export-numbered-headline-p headline info) numbered) |
| 874 | (t unnumbered))) | 874 | (t unnumbered))) |
| 875 | ('nil 'plain-list) | 875 | (`nil 'plain-list) |
| 876 | (_ (user-error "Invalid Texinfo class specification: %S" class)))) | 876 | (_ (user-error "Invalid Texinfo class specification: %S" class)))) |
| 877 | (_ (user-error "Invalid Texinfo class specification: %S" class))))))) | 877 | (_ (user-error "Invalid Texinfo class specification: %S" class))))))) |
| 878 | 878 | ||
| @@ -993,7 +993,7 @@ contextual information." | |||
| 993 | (list tag)))))) | 993 | (list tag)))))) |
| 994 | (format "%s\n%s" | 994 | (format "%s\n%s" |
| 995 | (pcase items | 995 | (pcase items |
| 996 | ('nil "@item") | 996 | (`nil "@item") |
| 997 | (`(,item) (concat "@item " item)) | 997 | (`(,item) (concat "@item " item)) |
| 998 | (`(,item . ,items) | 998 | (`(,item . ,items) |
| 999 | (concat "@item " item "\n" | 999 | (concat "@item " item "\n" |
| @@ -1077,18 +1077,18 @@ INFO is a plist holding contextual information. See | |||
| 1077 | (org-export-resolve-fuzzy-link link info) | 1077 | (org-export-resolve-fuzzy-link link info) |
| 1078 | (org-export-resolve-id-link link info)))) | 1078 | (org-export-resolve-id-link link info)))) |
| 1079 | (pcase (org-element-type destination) | 1079 | (pcase (org-element-type destination) |
| 1080 | ('nil | 1080 | (`nil |
| 1081 | (format org-texinfo-link-with-unknown-path-format | 1081 | (format org-texinfo-link-with-unknown-path-format |
| 1082 | (org-texinfo--sanitize-content path))) | 1082 | (org-texinfo--sanitize-content path))) |
| 1083 | ;; Id link points to an external file. | 1083 | ;; Id link points to an external file. |
| 1084 | ('plain-text | 1084 | (`plain-text |
| 1085 | (if desc (format "@uref{file://%s,%s}" destination desc) | 1085 | (if desc (format "@uref{file://%s,%s}" destination desc) |
| 1086 | (format "@uref{file://%s}" destination))) | 1086 | (format "@uref{file://%s}" destination))) |
| 1087 | ((or 'headline | 1087 | ((or `headline |
| 1088 | ;; Targets within headlines cannot be turned into | 1088 | ;; Targets within headlines cannot be turned into |
| 1089 | ;; @anchor{}, so we refer to the headline parent | 1089 | ;; @anchor{}, so we refer to the headline parent |
| 1090 | ;; directly. | 1090 | ;; directly. |
| 1091 | (and 'target | 1091 | (and `target |
| 1092 | (guard (eq 'headline | 1092 | (guard (eq 'headline |
| 1093 | (org-element-type | 1093 | (org-element-type |
| 1094 | (org-element-property :parent destination)))))) | 1094 | (org-element-property :parent destination)))))) |
| @@ -1547,9 +1547,9 @@ information." | |||
| 1547 | (let ((value (org-texinfo-plain-text | 1547 | (let ((value (org-texinfo-plain-text |
| 1548 | (org-timestamp-translate timestamp) info))) | 1548 | (org-timestamp-translate timestamp) info))) |
| 1549 | (pcase (org-element-property :type timestamp) | 1549 | (pcase (org-element-property :type timestamp) |
| 1550 | ((or 'active 'active-range) | 1550 | ((or `active `active-range) |
| 1551 | (format (plist-get info :texinfo-active-timestamp-format) value)) | 1551 | (format (plist-get info :texinfo-active-timestamp-format) value)) |
| 1552 | ((or 'inactive 'inactive-range) | 1552 | ((or `inactive `inactive-range) |
| 1553 | (format (plist-get info :texinfo-inactive-timestamp-format) value)) | 1553 | (format (plist-get info :texinfo-inactive-timestamp-format) value)) |
| 1554 | (_ (format (plist-get info :texinfo-diary-timestamp-format) value))))) | 1554 | (_ (format (plist-get info :texinfo-diary-timestamp-format) value))))) |
| 1555 | 1555 | ||
diff --git a/lisp/org/ox.el b/lisp/org/ox.el index 91637dd6351..ea7d1dc81f0 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el | |||
| @@ -1954,8 +1954,8 @@ Return a string." | |||
| 1954 | (progn ,@body) | 1954 | (progn ,@body) |
| 1955 | (org-link-broken | 1955 | (org-link-broken |
| 1956 | (pcase (plist-get info :with-broken-links) | 1956 | (pcase (plist-get info :with-broken-links) |
| 1957 | ('nil (user-error "Unable to resolve link: %S" (nth 1 err))) | 1957 | (`nil (user-error "Unable to resolve link: %S" (nth 1 err))) |
| 1958 | ('mark (org-export-data | 1958 | (`mark (org-export-data |
| 1959 | (format "[BROKEN LINK: %s]" (nth 1 err)) info)) | 1959 | (format "[BROKEN LINK: %s]" (nth 1 err)) info)) |
| 1960 | (_ nil)))))) | 1960 | (_ nil)))))) |
| 1961 | (let* ((type (org-element-type data)) | 1961 | (let* ((type (org-element-type data)) |
| @@ -4278,7 +4278,7 @@ A search cell follows the pattern (TYPE . SEARCH) where | |||
| 4278 | A search cell is the internal representation of a fuzzy link. It | 4278 | A search cell is the internal representation of a fuzzy link. It |
| 4279 | ignores white spaces and statistics cookies, if applicable." | 4279 | ignores white spaces and statistics cookies, if applicable." |
| 4280 | (pcase (org-element-type datum) | 4280 | (pcase (org-element-type datum) |
| 4281 | ('headline | 4281 | (`headline |
| 4282 | (let ((title (split-string | 4282 | (let ((title (split-string |
| 4283 | (replace-regexp-in-string | 4283 | (replace-regexp-in-string |
| 4284 | "\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]" "" | 4284 | "\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]" "" |
| @@ -4289,7 +4289,7 @@ ignores white spaces and statistics cookies, if applicable." | |||
| 4289 | (cons 'other title) | 4289 | (cons 'other title) |
| 4290 | (let ((custom-id (org-element-property :custom-id datum))) | 4290 | (let ((custom-id (org-element-property :custom-id datum))) |
| 4291 | (and custom-id (cons 'custom-id custom-id))))))) | 4291 | (and custom-id (cons 'custom-id custom-id))))))) |
| 4292 | ('target | 4292 | (`target |
| 4293 | (list (cons 'target (split-string (org-element-property :value datum))))) | 4293 | (list (cons 'target (split-string (org-element-property :value datum))))) |
| 4294 | ((and (let name (org-element-property :name datum)) | 4294 | ((and (let name (org-element-property :name datum)) |
| 4295 | (guard name)) | 4295 | (guard name)) |