diff options
Diffstat (limited to 'lisp/org/org-agenda.el')
-rw-r--r-- | lisp/org/org-agenda.el | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index f1335a50668..23ee8d71e66 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -1401,6 +1401,9 @@ current display in the agenda." :group 'org-agenda-daily/weekly :type 'plist) +(defvaralias 'org-agenda-search-view-search-words-only + 'org-agenda-search-view-always-boolean) + (defcustom org-agenda-search-view-always-boolean nil "Non-nil means the search string is interpreted as individual parts. @@ -1429,9 +1432,6 @@ boolean search." :version "24.1" :type 'boolean) -(defvaralias 'org-agenda-search-view-search-words-only - 'org-agenda-search-view-always-boolean) - (defcustom org-agenda-search-view-force-full-words nil "Non-nil means, search words must be matches as complete words. When nil, they may also match part of a word." @@ -1873,6 +1873,9 @@ Nil means don't hide any tags." (const :tag "Hide none" nil) (string :tag "Regexp "))) +(defvaralias 'org-agenda-remove-tags-when-in-prefix + 'org-agenda-remove-tags) + (defcustom org-agenda-remove-tags nil "Non-nil means remove the tags from the headline copy in the agenda. When this is the symbol `prefix', only remove tags when @@ -1883,8 +1886,7 @@ When this is the symbol `prefix', only remove tags when (const :tag "Never" nil) (const :tag "When prefix format contains %T" prefix))) -(defvaralias 'org-agenda-remove-tags-when-in-prefix - 'org-agenda-remove-tags) +(defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column) (defcustom org-agenda-tags-column 'auto "Shift tags in agenda items to this column. @@ -1902,8 +1904,6 @@ character screen." :package-version '(Org . "9.1") :version "26.1") -(defvaralias 'org-agenda-align-tags-to-column 'org-agenda-tags-column) - (defcustom org-agenda-fontify-priorities 'cookies "Non-nil means highlight low and high priorities in agenda. When t, the highest priority entries are bold, lowest priority italic. @@ -2067,9 +2067,9 @@ works you probably want to add it to `org-agenda-custom-commands' for good." ;;; Define the org-agenda-mode +(defvaralias 'org-agenda-keymap 'org-agenda-mode-map) (defvar org-agenda-mode-map (make-sparse-keymap) "Keymap for `org-agenda-mode'.") -(defvaralias 'org-agenda-keymap 'org-agenda-mode-map) (defvar org-agenda-menu) ; defined later in this file. (defvar org-agenda-restrict nil) ; defined later in this file. @@ -2205,10 +2205,14 @@ The following commands are available: (add-hook 'post-command-hook 'org-agenda-update-agenda-type nil 'local) (add-hook 'pre-command-hook 'org-unhighlight nil 'local) ;; Make sure properties are removed when copying text - (add-hook 'filter-buffer-substring-functions - (lambda (fun start end delete) - (substring-no-properties (funcall fun start end delete))) - nil t) + (if (boundp 'filter-buffer-substring-functions) + (add-hook 'filter-buffer-substring-functions + (lambda (fun start end delete) + (substring-no-properties (funcall fun start end delete))) + nil t) + ;; Emacs >= 24.4. + (add-function :filter-return (local 'filter-buffer-substring-function) + #'substring-no-properties)) (unless org-agenda-keep-modes (setq org-agenda-follow-mode org-agenda-start-with-follow-mode org-agenda-entry-text-mode org-agenda-start-with-entry-text-mode @@ -2878,13 +2882,12 @@ Pressing `<' twice means to restrict to the current subtree or region (let* ((m (org-agenda-get-any-marker)) (note (and m (org-entry-get m "THEFLAGGINGNOTE")))) (when note - (message (concat - "FLAGGING-NOTE ([?] for more info): " - (org-add-props - (replace-regexp-in-string - "\\\\n" "//" - (copy-sequence note)) - nil 'face 'org-warning))))))) + (message "FLAGGING-NOTE ([?] for more info): %s" + (org-add-props + (replace-regexp-in-string + "\\\\n" "//" + (copy-sequence note)) + nil 'face 'org-warning)))))) t t)) ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects)) ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files)) @@ -5487,8 +5490,8 @@ displayed in agenda view." (substring (format-time-string (car org-time-stamp-formats) - (apply #'encode-time ; DATE bound by calendar - (list 0 0 0 (nth 1 date) (car date) (nth 2 date)))) + (encode-time ; DATE bound by calendar + 0 0 0 (nth 1 date) (car date) (nth 2 date))) 1 11)) "\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[hdwmy]>\\)" "\\|\\(<%%\\(([^>\n]+)\\)>\\)")) @@ -5738,8 +5741,8 @@ then those holidays will be skipped." (substring (format-time-string (car org-time-stamp-formats) - (apply 'encode-time ; DATE bound by calendar - (list 0 0 0 (nth 1 date) (car date) (nth 2 date)))) + (encode-time ; DATE bound by calendar + 0 0 0 (nth 1 date) (car date) (nth 2 date))) 1 11)))) (org-agenda-search-headline-for-time nil) marker hdmarker priority category level tags closedp @@ -5856,21 +5859,19 @@ See also the user option `org-agenda-clock-consistency-checks'." (throw 'next t)) (setq ts (match-string 1) te (match-string 3) - ts (float-time - (apply #'encode-time (org-parse-time-string ts))) - te (float-time - (apply #'encode-time (org-parse-time-string te))) + ts (float-time (org-time-string-to-time ts)) + te (float-time (org-time-string-to-time te)) dt (- te ts)))) (cond ((> dt (* 60 maxtime)) ;; a very long clocking chunk (setq issue (format "Clocking interval is very long: %s" - (org-duration-from-minutes (floor (/ dt 60.)))) + (org-duration-from-minutes (floor dt 60))) face (or (plist-get pl :long-face) face))) ((< dt (* 60 mintime)) ;; a very short clocking chunk (setq issue (format "Clocking interval is very short: %s" - (org-duration-from-minutes (floor (/ dt 60.)))) + (org-duration-from-minutes (floor dt 60))) face (or (plist-get pl :short-face) face))) ((and (> tlend 0) (< ts tlend)) ;; Two clock entries are overlapping @@ -5910,8 +5911,8 @@ See also the user option `org-agenda-clock-consistency-checks'." (throw 'exit t)) ;; We have a shorter gap. ;; Now we have to get the minute of the day when these times are - (let* ((t1dec (decode-time (seconds-to-time t1))) - (t2dec (decode-time (seconds-to-time t2))) + (let* ((t1dec (decode-time t1)) + (t2dec (decode-time t2)) ;; compute the minute on the day (min1 (+ (nth 1 t1dec) (* 60 (nth 2 t1dec)))) (min2 (+ (nth 1 t2dec) (* 60 (nth 2 t2dec))))) @@ -7005,15 +7006,15 @@ When TYPE is \"scheduled\", \"deadline\", \"timestamp\" or \"timestamp_ia\", compare within each of these type. When TYPE is the empty string, compare all timestamps without respect of their type." - (let* ((def (if org-sort-agenda-notime-is-late most-positive-fixnum -1)) + (let* ((def (and (not org-sort-agenda-notime-is-late) -1)) (ta (or (and (string-match type (or (get-text-property 1 'type a) "")) (get-text-property 1 'ts-date a)) def)) (tb (or (and (string-match type (or (get-text-property 1 'type b) "")) (get-text-property 1 'ts-date b)) def))) - (cond ((< ta tb) -1) - ((< tb ta) +1)))) + (cond ((if ta (and tb (< ta tb)) tb) -1) + ((if tb (and ta (< tb ta)) ta) +1)))) (defsubst org-cmp-habit-p (a b) "Compare the todo states of strings A and B." @@ -9444,7 +9445,7 @@ the resulting entry will not be shown. When TEXT is empty, switch to (goto-char (point-min)) (cond ((eq type 'anniversary) - (or (re-search-forward "^*[ \t]+Anniversaries" nil t) + (or (re-search-forward "^\\*[ \t]+Anniversaries" nil t) (progn (or (org-at-heading-p t) (progn @@ -10155,8 +10156,7 @@ to override `appt-message-warning-time'." ;; Do not use `org-today' here because appt only takes ;; time and without date as argument, so it may pass wrong ;; information otherwise - (today (org-date-to-gregorian - (time-to-days (current-time)))) + (today (org-date-to-gregorian (time-to-days nil))) (org-agenda-restrict nil) (files (org-agenda-files 'unrestricted)) entries file (org-agenda-buffer nil)) |