summaryrefslogtreecommitdiff
path: root/lisp/org-agenda.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org-agenda.el')
-rw-r--r--lisp/org-agenda.el60
1 files changed, 35 insertions, 25 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 8cfe858..4dfa3e9 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -863,7 +863,7 @@ When set to the symbol `not-today', skip scheduled previously,
but not scheduled today.
When set to the symbol `repeated-after-deadline', skip scheduled
-items if they are repeated beyond the current dealine."
+items if they are repeated beyond the current deadline."
:group 'org-agenda-skip
:group 'org-agenda-daily/weekly
:type '(choice
@@ -1419,13 +1419,14 @@ When nil, they may also match part of a word."
:version "24.1"
:type 'boolean)
-(defcustom org-agenda-search-view-max-outline-level nil
+(defcustom org-agenda-search-view-max-outline-level 0
"Maximum outline level to display in search view.
E.g. when this is set to 1, the search view will only
-show headlines of level 1."
+show headlines of level 1. When set to 0, the default
+value, don't limit agenda view by outline level."
:group 'org-agenda-search-view
:version "24.4"
- :package-version '(Org . "8.0")
+ :package-version '(Org . "8.3")
:type 'integer)
(defgroup org-agenda-time-grid nil
@@ -1746,10 +1747,9 @@ to capture the number of days."
:version "24.4"
:package-version '(Org . "8.0")
:type '(list
- (string :tag "Deadline today ")
- (choice :tag "Deadline relative"
- (string :tag "Format string")
- (function))))
+ (string :tag "Deadline today ")
+ (string :tag "Deadline in the future ")
+ (string :tag "Deadline in the past ")))
(defcustom org-agenda-remove-times-when-in-prefix t
"Non-nil means remove duplicate time specifications in agenda items.
@@ -2840,6 +2840,8 @@ Pressing `<' twice means to restrict to the current subtree or region
((equal org-keys "!") (customize-variable 'org-stuck-projects))
(t (user-error "Invalid agenda key"))))))
+(defvar org-agenda-multi)
+
(defun org-agenda-append-agenda ()
"Append another agenda view to the current one.
This function allows interactive building of block agendas.
@@ -3814,6 +3816,8 @@ generating a new one."
'org-priority))
(overlay-put ov 'org-type 'org-priority)))))
+(defvar org-depend-tag-blocked)
+
(defun org-agenda-dim-blocked-tasks (&optional invisible)
"Dim currently blocked TODO's in the agenda display.
When INVISIBLE is non-nil, hide currently blocked TODO instead of
@@ -3982,6 +3986,7 @@ This check for agenda markers in all agenda buffers currently active."
;;; Agenda timeline
(defvar org-agenda-only-exact-dates nil) ; dynamically scoped
+(defvar org-agenda-show-log-scoped) ;; dynamically scope in `org-timeline' or `org-agenda-list'
(defun org-timeline (&optional dotodo)
"Show a time-sorted view of the entries in the current org file.
@@ -4578,7 +4583,7 @@ in `org-agenda-text-search-extra-files'."
(goto-char (max (point-min) (1- (point))))
(while (re-search-forward regexp nil t)
(org-back-to-heading t)
- (while (and org-agenda-search-view-max-outline-level
+ (while (and (not (zerop org-agenda-search-view-max-outline-level))
(> (org-reduced-level (org-outline-level))
org-agenda-search-view-max-outline-level)
(forward-line -1)
@@ -4588,7 +4593,7 @@ in `org-agenda-text-search-extra-files'."
beg1 (point)
end (progn
(outline-next-heading)
- (while (and org-agenda-search-view-max-outline-level
+ (while (and (not (zerop org-agenda-search-view-max-outline-level))
(> (org-reduced-level (org-outline-level))
org-agenda-search-view-max-outline-level)
(forward-line 1)
@@ -5446,6 +5451,7 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(>= days n)
(<= days n))))
+;;;###autoload
(defun org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item
(&optional end)
"Do we have a reason to ignore this TODO entry because it has a time stamp?"
@@ -5762,7 +5768,6 @@ please use `org-class' instead."
dayname skip-weeks)))
(make-obsolete 'org-diary-class 'org-class "")
-(defvar org-agenda-show-log-scoped) ;; dynamically scope in `org-timeline' or `org-agenda-list'
(defalias 'org-get-closed 'org-agenda-get-progress)
(defun org-agenda-get-progress ()
"Return the logged TODO entries for agenda display."
@@ -7080,6 +7085,7 @@ their type."
'help-echo "Agendas are currently limited to this subtree.")
(org-detach-overlay org-agenda-restriction-lock-overlay)
+;;;###autoload
(defun org-agenda-set-restriction-lock (&optional type)
"Set restriction lock for agenda, to current subtree or file.
Restriction will be the file if TYPE is `file', or if type is the
@@ -7529,9 +7535,11 @@ to switch to narrowing."
(if notgroup
(push (cons 'and nf0) f)
(push (cons (or op 'or) nf0) f)))))
- (if (equal nfilter filter)
- (funcall ffunc f1 f filter t nil)
- (funcall ffunc nf1 nf nfilter nil nil)))))
+ (cond ((equal filter '("+"))
+ (setq f (list (list 'not 'tags))))
+ ((equal nfilter filter)
+ (funcall ffunc f1 f filter t nil))
+ (t (funcall ffunc nf1 nf nfilter nil nil))))))
;; Category filter
((eq type 'category)
(setq filter
@@ -9147,7 +9155,7 @@ Called with a universal prefix arg, show the priority instead of setting it."
(goto-char (point-max))
(while (not (bobp))
(when (equal marker (org-get-at-bol 'org-marker))
- (org-move-to-column (- (window-width) (length stamp)) t)
+ (org-move-to-column (- (window-width) (length stamp)) t nil t)
(org-agenda-fix-tags-filter-overlays-at (point))
(if (featurep 'xemacs)
;; Use `duplicable' property to trigger undo recording
@@ -9913,11 +9921,12 @@ current HH:MM time."
"Drag an agenda line forward by ARG lines."
(interactive "p")
(let ((inhibit-read-only t) lst)
- (if (save-excursion
- (dotimes (n arg)
- (beginning-of-line 2)
- (push (not (get-text-property (point) 'txt)) lst))
- (delq nil lst))
+ (if (or (not (get-text-property (point) 'txt))
+ (save-excursion
+ (dotimes (n arg)
+ (move-beginning-of-line 2)
+ (push (not (get-text-property (point) 'txt)) lst))
+ (delq nil lst)))
(message "Cannot move line forward")
(org-drag-line-forward arg))))
@@ -9925,11 +9934,12 @@ current HH:MM time."
"Drag an agenda line backward by ARG lines."
(interactive "p")
(let ((inhibit-read-only t) lst)
- (if (save-excursion
- (dotimes (n arg)
- (beginning-of-line 0)
- (push (not (get-text-property (point) 'txt)) lst))
- (delq nil lst))
+ (if (or (not (get-text-property (point) 'txt))
+ (save-excursion
+ (dotimes (n arg)
+ (move-beginning-of-line 0)
+ (push (not (get-text-property (point) 'txt)) lst))
+ (delq nil lst)))
(message "Cannot move line backward")
(org-drag-line-backward arg))))