diff options
Diffstat (limited to 'lisp/org')
-rw-r--r-- | lisp/org/ob-core.el | 2 | ||||
-rw-r--r-- | lisp/org/ob-julia.el | 8 | ||||
-rw-r--r-- | lisp/org/ob-lua.el | 2 | ||||
-rw-r--r-- | lisp/org/ob-table.el | 2 | ||||
-rw-r--r-- | lisp/org/ol-eshell.el | 2 | ||||
-rw-r--r-- | lisp/org/ol-eww.el | 2 | ||||
-rw-r--r-- | lisp/org/ol-man.el | 8 | ||||
-rw-r--r-- | lisp/org/ol-w3m.el | 2 | ||||
-rw-r--r-- | lisp/org/org-agenda.el | 6 | ||||
-rw-r--r-- | lisp/org/org-capture.el | 11 | ||||
-rw-r--r-- | lisp/org/org-clock.el | 8 | ||||
-rw-r--r-- | lisp/org/org-compat.el | 7 | ||||
-rw-r--r-- | lisp/org/org-id.el | 3 | ||||
-rw-r--r-- | lisp/org/org-macs.el | 8 | ||||
-rw-r--r-- | lisp/org/org-mouse.el | 2 | ||||
-rw-r--r-- | lisp/org/org-plot.el | 2 | ||||
-rw-r--r-- | lisp/org/org-refile.el | 14 | ||||
-rw-r--r-- | lisp/org/org-table.el | 2 | ||||
-rw-r--r-- | lisp/org/org.el | 4 | ||||
-rw-r--r-- | lisp/org/ox-html.el | 2 | ||||
-rw-r--r-- | lisp/org/ox-icalendar.el | 7 | ||||
-rw-r--r-- | lisp/org/ox-publish.el | 2 |
22 files changed, 54 insertions, 52 deletions
diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index 23ef162a7f3..04af84d2e44 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -480,7 +480,7 @@ value. The value can either be a string or a closure that evaluates to a string. The closure is evaluated when the source block is being evaluated (e.g. during execution or export), with point at the source block. It is not possible to use an -arbitrary function symbol (e.g. 'some-func), since org uses +arbitrary function symbol (e.g. `some-func'), since org uses lexical binding. To achieve the same functionality, call the function within a closure (e.g. (lambda () (some-func))). diff --git a/lisp/org/ob-julia.el b/lisp/org/ob-julia.el index abddca36134..50a44bcf448 100644 --- a/lisp/org/ob-julia.el +++ b/lisp/org/ob-julia.el @@ -250,8 +250,8 @@ end") (defun org-babel-julia-evaluate-external-process (body result-type result-params column-names-p) "Evaluate BODY in external julia process. -If RESULT-TYPE equals 'output then return standard output as a -string. If RESULT-TYPE equals 'value then return the value of the +If RESULT-TYPE equals `output' then return standard output as a +string. If RESULT-TYPE equals `value' then return the value of the last statement in BODY, as elisp." (cl-case result-type (value @@ -274,8 +274,8 @@ last statement in BODY, as elisp." (defun org-babel-julia-evaluate-session (session body result-type result-params column-names-p) "Evaluate BODY in SESSION. -If RESULT-TYPE equals 'output then return standard output as a -string. If RESULT-TYPE equals 'value then return the value of the +If RESULT-TYPE equals `output' then return standard output as a +string. If RESULT-TYPE equals `value' then return the value of the last statement in BODY, as elisp." (cl-case result-type (value diff --git a/lisp/org/ob-lua.el b/lisp/org/ob-lua.el index 48de0dbad06..b6e78fb7fd8 100644 --- a/lisp/org/ob-lua.el +++ b/lisp/org/ob-lua.el @@ -395,7 +395,7 @@ fd:close()" (org-babel-lua-table-or-string results))))) (defun org-babel-lua-read-string (string) - "Strip 's from around Lua string." + "Strip \\=' characters from around Lua string." (org-unbracket-string "'" "'" string)) (provide 'ob-lua) diff --git a/lisp/org/ob-table.el b/lisp/org/ob-table.el index 2f092998d8b..f6729e0ece7 100644 --- a/lisp/org/ob-table.el +++ b/lisp/org/ob-table.el @@ -84,7 +84,7 @@ is the equivalent of the following source code block: #+end_src NOTE: The quotation marks around the function name, -'source-block', are optional. +`source-block', are optional. NOTE: By default, string variable names are interpreted as references to source-code blocks, to force interpretation of a diff --git a/lisp/org/ol-eshell.el b/lisp/org/ol-eshell.el index 1dee61b98b8..1ca2aa2b28b 100644 --- a/lisp/org/ol-eshell.el +++ b/lisp/org/ol-eshell.el @@ -46,7 +46,7 @@ followed by a colon." (eshell-buffer-name (car buffer-and-command)) (command (cadr buffer-and-command))) (if (get-buffer eshell-buffer-name) - (pop-to-buffer-same-window eshell-buffer-name) + (pop-to-buffer eshell-buffer-name display-comint-buffer-action) (eshell)) (goto-char (point-max)) (eshell-kill-input) diff --git a/lisp/org/ol-eww.el b/lisp/org/ol-eww.el index 69bf1ba62dd..d1bb5195107 100644 --- a/lisp/org/ol-eww.el +++ b/lisp/org/ol-eww.el @@ -115,7 +115,7 @@ keep the structure of the Org file." (setq transform-start (region-beginning)) (setq transform-end (region-end)) ;; Deactivate mark if current mark is activate. - (when (fboundp 'deactivate-mark) (deactivate-mark))) + (deactivate-mark)) (message "Transforming links...") (save-excursion (goto-char transform-start) diff --git a/lisp/org/ol-man.el b/lisp/org/ol-man.el index 3806d95cdaf..beed216acf9 100644 --- a/lisp/org/ol-man.el +++ b/lisp/org/ol-man.el @@ -8,12 +8,12 @@ ;; ;; This file is part of GNU Emacs. ;; -;; This program is free software; you can redistribute it and/or modify +;; GNU Emacs is free software: you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 3, or (at your option) -;; any later version. +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. -;; This program is distributed in the hope that it will be useful, +;; GNU Emacs is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. diff --git a/lisp/org/ol-w3m.el b/lisp/org/ol-w3m.el index 517329889c6..80d6811a5c5 100644 --- a/lisp/org/ol-w3m.el +++ b/lisp/org/ol-w3m.el @@ -72,7 +72,7 @@ so that it can be yanked into an Org buffer with links working correctly." (setq transform-start (region-beginning)) (setq transform-end (region-end)) ;; Deactivate mark if current mark is activate. - (when (fboundp 'deactivate-mark) (deactivate-mark))) + (deactivate-mark)) (message "Transforming links...") (save-excursion (goto-char transform-start) diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 71aac271f7b..a43b083d536 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -1615,7 +1615,7 @@ alpha-down Sort headlines alphabetically, reversed. The different possibilities will be tried in sequence, and testing stops if one comparison returns a \"not-equal\". For example, the default - '(time-up category-keep priority-down) + `(time-up category-keep priority-down)' means: Pull out all entries having a specified time of day and sort them, in order to make a time schedule for the current day the first thing in the agenda listing for the day. Of the entries without a time indication, keep @@ -4124,7 +4124,7 @@ dimming them." ;FIXME: The arg isn't used, actually! If the header at `org-hd-marker' is blocked according to `org-entry-blocked-p', then if `org-agenda-dim-blocked-tasks' is -'invisible and the header is not blocked by checkboxes, set the +`invisible' and the header is not blocked by checkboxes, set the text property `org-todo-blocked' to `invisible', otherwise set it to t." (when (get-text-property 0 'todo-state entry) @@ -7399,7 +7399,7 @@ Argument ARG is the prefix argument." When in a restricted subtree, remove it. The restriction will span over the entire file if TYPE is `file', -or if type is '(4), or if the cursor is before the first headline +or if type is \\='(4), or if the cursor is before the first headline in the file. Otherwise, only apply the restriction to the current subtree." (interactive "P") diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el index bfead3aa5af..2fd9a9c74da 100644 --- a/lisp/org/org-capture.el +++ b/lisp/org/org-capture.el @@ -1816,10 +1816,13 @@ by their respective `org-store-link-plist' properties if present." ;; Load history list for current prompt. (setq org-capture--prompt-history (gethash prompt org-capture--prompt-history-table)) - (push (org-completing-read - (concat (or prompt "Enter string") - (and default (format " [%s]" default)) - ": ") + (push (org-completing-read + ;; `format-prompt' is new in Emacs 28.1. + (if (fboundp 'format-prompt) + (format-prompt (or prompt "Enter string") default) + (concat (or prompt "Enter string") + (and default (format " [%s]" default)) + ": ")) completions nil nil nil 'org-capture--prompt-history default) strings) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 081a6178345..fdc9818a5a8 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -219,8 +219,7 @@ Emacs initialization file." (const :tag "Clock and history" t) (const :tag "No persistence" nil))) -(defcustom org-clock-persist-file (convert-standard-filename - (concat user-emacs-directory "org-clock-save.el")) +(defcustom org-clock-persist-file (locate-user-emacs-file "org-clock-save.el") "File to save clock data to." :group 'org-clock :type 'string) @@ -659,7 +658,6 @@ there is no recent clock to choose from." (if (< i 10) (+ i ?0) (+ i (- ?A 10))) m)) - (if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s)))) (push s sel-list))) (run-hooks 'org-clock-before-select-task-hook) (goto-char (point-min)) @@ -2838,7 +2836,7 @@ a number of clock tables." (pcase (if range (car range) (plist-get params :tstart)) ((and (pred numberp) n) (pcase-let ((`(,m ,d ,y) (calendar-gregorian-from-absolute n))) - (apply #'encode-time (list 0 0 org-extend-today-until d m y)))) + (encode-time 0 0 org-extend-today-until d m y))) (timestamp (seconds-to-time (org-matcher-time (or timestamp @@ -2848,7 +2846,7 @@ a number of clock tables." (pcase (if range (nth 1 range) (plist-get params :tend)) ((and (pred numberp) n) (pcase-let ((`(,m ,d ,y) (calendar-gregorian-from-absolute n))) - (apply #'encode-time (list 0 0 org-extend-today-until d m y)))) + (encode-time 0 0 org-extend-today-until d m y))) (timestamp (seconds-to-time (org-matcher-time timestamp)))))) (while (time-less-p start end) (unless (bolp) (insert "\n")) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index c26eb6f10ab..3e394fbab1c 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -39,7 +39,7 @@ (declare-function org-calendar-goto-agenda "org-agenda" ()) (declare-function org-align-tags "org" (&optional all)) (declare-function org-at-heading-p "org" (&optional ignored)) -(declare-function org-at-table.el-p "org" ()) +(declare-function org-at-table.el-p "org-table" ()) (declare-function org-element-at-point "org-element" ()) (declare-function org-element-context "org-element" (&optional element)) (declare-function org-element-lineage "org-element" (blob &optional types with-self)) @@ -199,8 +199,7 @@ extension beyond end of line was not controllable." (defsubst file-attribute-modification-time (attributes) "The modification time in ATTRIBUTES returned by `file-attributes'. This is the time of the last change to the file's contents, and -is a list of integers (HIGH LOW USEC PSEC) in the same style -as (current-time)." +is a Lisp timestamp in the same style as `current-time'." (nth 5 attributes))) (unless (fboundp 'file-attribute-size) @@ -239,7 +238,7 @@ This is a floating point number if the size is too large for an integer." (if (fboundp 'string-collate-lessp) (defalias 'org-string-collate-lessp 'string-collate-lessp) - (defun org-string-collate-lessp (s1 s2 &rest _) + (defun org-string-collate-lessp (s1 s2 &optional _ _) "Return non-nil if STRING1 is less than STRING2 in lexicographic order. Case is significant." (string< s1 s2))) diff --git a/lisp/org/org-id.el b/lisp/org/org-id.el index b4acec7bdd7..7334050b8b4 100644 --- a/lisp/org/org-id.el +++ b/lisp/org/org-id.el @@ -196,8 +196,7 @@ the link." :group 'org-id :type 'boolean) -(defcustom org-id-locations-file (convert-standard-filename - (concat user-emacs-directory ".org-id-locations")) +(defcustom org-id-locations-file (locate-user-emacs-file ".org-id-locations") "The file for remembering in which file an ID was defined. This variable is only relevant when `org-id-track-globally' is set." :group 'org-id diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el index b10725bd526..bb0562dde06 100644 --- a/lisp/org/org-macs.el +++ b/lisp/org/org-macs.el @@ -37,6 +37,7 @@ (declare-function org-mode "org" ()) (declare-function org-show-context "org" (&optional key)) (declare-function org-string-collate-lessp "org-compat" (s1 s2 &optional locale ignore-case)) +(declare-function org-time-convert-to-integer "org-compat" (time)) (defvar org-ts-regexp0) (defvar ffap-url-regexp) @@ -257,15 +258,16 @@ ignored in this case." (defun org-file-newer-than-p (file time) "Non-nil if FILE is newer than TIME. -FILE is a filename, as a string, TIME is a list of integers, as +FILE is a filename, as a string, TIME is a Lisp time value, as returned by, e.g., `current-time'." (and (file-exists-p file) ;; Only compare times up to whole seconds as some file-systems ;; (e.g. HFS+) do not retain any finer granularity. As ;; a consequence, make sure we return non-nil when the two ;; times are equal. - (not (time-less-p (cl-subseq (nth 5 (file-attributes file)) 0 2) - (cl-subseq time 0 2))))) + (not (time-less-p (org-time-convert-to-integer + (nth 5 (file-attributes file))) + (org-time-convert-to-integer time))))) (defun org-compile-file (source process ext &optional err-msg log-buf spec) "Compile a SOURCE file using PROCESS. diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 20c20acc320..a590ff87f24 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -208,7 +208,7 @@ this function is called. Otherwise, the current major mode menu is used." (interactive "@e \nP") (if (and (= (event-click-count event) 1) (or (not mark-active) - (sit-for (/ double-click-time 1000.0)))) + (sit-for (/ (mouse-double-click-time) 1000.0)))) (progn (select-window (posn-window (event-start event))) (when (not (org-mouse-mark-active)) diff --git a/lisp/org/org-plot.el b/lisp/org/org-plot.el index bf84c99e042..4507fbe7ddc 100644 --- a/lisp/org/org-plot.el +++ b/lisp/org/org-plot.el @@ -280,7 +280,7 @@ When NORMALISE is non-nil, the count is divided by the number of values." collect (cons n (/ (length m) normaliser))))) (defun org--plot/prime-factors (value) - "Return the prime decomposition of VALUE, e.g. for 12, '(3 2 2)." + "Return the prime decomposition of VALUE, e.g. for 12, \\='(3 2 2)." (let ((factors '(1)) (i 1)) (while (/= 1 value) (setq i (1+ i)) diff --git a/lisp/org/org-refile.el b/lisp/org/org-refile.el index 5ad73422efa..71d00a7a22b 100644 --- a/lisp/org/org-refile.el +++ b/lisp/org/org-refile.el @@ -577,7 +577,7 @@ prefix argument (`C-u C-u C-u C-c C-w')." (with-demoted-errors "Bookmark set error: %S" (bookmark-set bookmark-name)))) (move-marker org-capture-last-stored-marker (point))) - (when (fboundp 'deactivate-mark) (deactivate-mark)) + (deactivate-mark) (run-hooks 'org-after-refile-insert-hook))) (unless org-refile-keep (if regionp @@ -640,11 +640,13 @@ this function appends the default value from org-refile-target-table)) (completion-ignore-case t) cdef - (prompt (concat prompt - (or (and (car org-refile-history) - (concat " (default " (car org-refile-history) ")")) - (and (assoc cbnex tbl) (setq cdef cbnex) - (concat " (default " cbnex ")"))) ": ")) + (prompt (let ((default (or (car org-refile-history) + (and (assoc cbnex tbl) (setq cdef cbnex) + cbnex)))) + ;; `format-prompt' is new in Emacs 28.1. + (if (fboundp 'format-prompt) + (format-prompt prompt default) + (concat prompt " (default " default ": ")))) pa answ parent-target child parent old-hist) (setq old-hist org-refile-history) (setq answ (funcall cfunc prompt tbl nil (not new-nodes) diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index 860fd6e5608..c301bc6af1a 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -5465,7 +5465,7 @@ The table is taken from the parameter TXT, or from the buffer at point." (nreverse table))))) (defun org-table-collapse-header (table &optional separator max-header-lines) - "Collapse the lines before 'hline into a single header. + "Collapse the lines before `hline' into a single header. The given TABLE is a list of lists as returned by `org-table-to-lisp'. The leading lines before the first `hline' symbol are considered diff --git a/lisp/org/org.el b/lisp/org/org.el index 06af12339ec..008230500d7 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -3301,7 +3301,7 @@ Replace format-specifiers in the command as noted below and use %i: The LaTeX fragment to be converted. For example, this could be used with LaTeXML as -\"latexmlc 'literal:%i' --profile=math --preload=siunitx.sty 2>/dev/null\"." +\"latexmlc \\='literal:%i\\=' --profile=math --preload=siunitx.sty 2>/dev/null\"." :group 'org-latex :package-version '(Org . "9.4") :type '(choice @@ -12160,7 +12160,7 @@ This works in the agenda, and also in an Org buffer." (progn (message "[s]et or [r]emove? ") (equal (read-char-exclusive) ?r)))) - (when (fboundp 'deactivate-mark) (deactivate-mark)) + (deactivate-mark) (let ((agendap (equal major-mode 'org-agenda-mode)) l1 l2 m buf pos newhead (cnt 0)) (goto-char end) diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 81ef002a052..9cf9125aebd 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -2909,7 +2909,7 @@ Starred and \"displaymath\" environments are not numbered." (defun org-html--unlabel-latex-environment (latex-frag) "Change environment in LATEX-FRAG string to an unnumbered one. -For instance, change an 'equation' environment to 'equation*'." +For instance, change an `equation' environment to `equation*'." (replace-regexp-in-string "\\`[ \t]*\\\\begin{\\([^*]+?\\)}" "\\1*" diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el index 7e40f5bcd0b..a3fe31d7b8f 100644 --- a/lisp/org/ox-icalendar.el +++ b/lisp/org/ox-icalendar.el @@ -824,8 +824,7 @@ as a communication channel." (if (not (plist-get info :with-author)) "" (org-export-data (plist-get info :author) info)) ;; Timezone. - (if (org-string-nw-p org-icalendar-timezone) org-icalendar-timezone - (cadr (current-time-zone))) + (or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z")) ;; Description. (org-export-data (plist-get info :title) info) contents)) @@ -972,7 +971,7 @@ This function assumes major mode for current buffer is (org-icalendar--vcalendar org-icalendar-combined-name user-full-name - (or (org-string-nw-p org-icalendar-timezone) (cadr (current-time-zone))) + (or (org-string-nw-p org-icalendar-timezone) (format-time-string "%Z")) org-icalendar-combined-description contents))) (run-hook-with-args 'org-icalendar-after-save-hook file))) @@ -995,7 +994,7 @@ FILES is a list of files to build the calendar from." user-full-name ;; Timezone. (or (org-string-nw-p org-icalendar-timezone) - (cadr (current-time-zone))) + (format-time-string "Z")) ;; Description. org-icalendar-combined-description ;; Contents. diff --git a/lisp/org/ox-publish.el b/lisp/org/ox-publish.el index 636bd0d2ae3..51e2352b4e8 100644 --- a/lisp/org/ox-publish.el +++ b/lisp/org/ox-publish.el @@ -839,7 +839,7 @@ in `org-export-options-alist' or in export back-ends. In the latter case, optional argument BACKEND has to be set to the back-end where the option is defined, e.g., - (org-publish-find-property file :subtitle 'latex) + (org-publish-find-property file :subtitle \\='latex) Return value may be a string or a list, depending on the type of PROPERTY, i.e. \"behavior\" parameter from `org-export-options-alist'." |