Debugger entered--Lisp error: (error #("Bad timestamp `%%(org-float t 4 2)' Error was: (Not a standard Org-mode time string: %%(org-float t 4 2))" 15 34 (face org-sexp-date org-category-position 37 org-category #("inbox" 0 5 (fontified t org-category "inbox" org-category-position 37 face org-meta-line font-lock-fontified t)) fontified t))) signal(error (#("Bad timestamp `%%(org-float t 4 2)'\nError was: (Not a standard Org-mode time string: %%(org-float t 4 2))" 15 34 (face org-sexp-date org-category-position 37 org-category #("inbox" 0 5 (fontified t org-category "inbox" org-category-position 37 face org-meta-line font-lock-fontified t)) fontified t)))) error("Bad timestamp `%s'%s\nError was: %s" #("%%(org-float t 4 2)" 0 19 (fontified t org-category #("inbox" 0 5 (fontified t org-category "inbox" org-category-position 37 face org-meta-line font-lock-fontified t)) org-category-position 37 face org-sexp-date)) "" (#("Not a standard Org-mode time string: %%(org-float t 4 2)" 37 56 (face org-sexp-date org-category-position 37 org-category #("inbox" 0 5 (fontified t org-category "inbox" org-category-position 37 face org-meta-line font-lock-fontified t)) fontified t)))) (condition-case errdata (apply (quote encode-time) (org-parse-time-string s)) (error (error "Bad timestamp `%s'%s\nError was: %s" s (if (not (and buffer pos)) "" (format " at %d in buffer `%s'" pos buffer)) (cdr errdata)))) org-time-string-to-time(#("%%(org-float t 4 2)" 0 19 (fontified t org-category #("inbox" 0 5 (fontified t org-category "inbox" org-category-position 37 face org-meta-line font-lock-fontified t)) org-category-position 37 face org-sexp-date))) (time-to-days (org-time-string-to-time timestamp-string)) (- (time-to-days (org-time-string-to-time timestamp-string)) (time-to-days (current-time))) org-days-to-time(#("%%(org-float t 4 2)" 0 19 (fontified t org-category #("inbox" 0 5 (fontified t org-category "inbox" org-category-position 37 face org-meta-line font-lock-fontified t)) org-category-position 37 face org-sexp-date))) (> (org-days-to-time (match-string 1)) 0) (cond ((eq org-agenda-todo-ignore-scheduled (quote future)) (> (org-days-to-time (match-string 1)) 0)) ((eq org-agenda-todo-ignore-scheduled (quote past)) (<= (org-days-to-time (match-string 1)) 0)) ((numberp org-agenda-todo-ignore-scheduled) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-scheduled)) (t)) (and org-agenda-todo-ignore-scheduled (re-search-forward org-scheduled-time-regexp end t) (cond ((eq org-agenda-todo-ignore-scheduled (quote future)) (> (org-days-to-time (match-string 1)) 0)) ((eq org-agenda-todo-ignore-scheduled (quote past)) (<= (org-days-to-time (match-string 1)) 0)) ((numberp org-agenda-todo-ignore-scheduled) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-scheduled)) (t))) (or (and org-agenda-todo-ignore-with-date (re-search-forward org-ts-regexp end t)) (and org-agenda-todo-ignore-scheduled (re-search-forward org-scheduled-time-regexp end t) (cond ((eq org-agenda-todo-ignore-scheduled (quote future)) (> (org-days-to-time (match-string 1)) 0)) ((eq org-agenda-todo-ignore-scheduled (quote past)) (<= (org-days-to-time (match-string 1)) 0)) ((numberp org-agenda-todo-ignore-scheduled) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-scheduled)) (t))) (and org-agenda-todo-ignore-deadlines (re-search-forward org-deadline-time-regexp end t) (cond ((memq org-agenda-todo-ignore-deadlines (quote (t all))) t) ((eq org-agenda-todo-ignore-deadlines (quote far)) (not (org-deadline-close (match-string 1)))) ((eq org-agenda-todo-ignore-deadlines (quote future)) (> (org-days-to-time (match-string 1)) 0)) ((eq org-agenda-todo-ignore-deadlines (quote past)) (<= (org-days-to-time (match-string 1)) 0)) ((numberp org-agenda-todo-ignore-deadlines) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-deadlines)) (t (org-deadline-close (match-string 1))))) (and org-agenda-todo-ignore-timestamp (let ((buffer (current-buffer)) (regexp (concat org-scheduled-time-regexp "\\|" org-deadline-time-regexp)) (start (point))) (with-temp-buffer (insert-buffer-substring buffer start end) (goto-char (point-min)) (while (re-search-forward regexp end t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (when (re-search-forward org-ts-regexp nil t) (cond ((eq org-agenda-todo-ignore-timestamp ...) (> ... 0)) ((eq org-agenda-todo-ignore-timestamp ...) (<= ... 0)) ((numberp org-agenda-todo-ignore-timestamp) (org-agenda-todo-custom-ignore-p ... org-agenda-todo-ignore-timestamp)) (t))))))) (save-excursion (or (and org-agenda-todo-ignore-with-date (re-search-forward org-ts-regexp end t)) (and org-agenda-todo-ignore-scheduled (re-search-forward org-scheduled-time-regexp end t) (cond ((eq org-agenda-todo-ignore-scheduled (quote future)) (> (org-days-to-time (match-string 1)) 0)) ((eq org-agenda-todo-ignore-scheduled (quote past)) (<= (org-days-to-time (match-string 1)) 0)) ((numberp org-agenda-todo-ignore-scheduled) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-scheduled)) (t))) (and org-agenda-todo-ignore-deadlines (re-search-forward org-deadline-time-regexp end t) (cond ((memq org-agenda-todo-ignore-deadlines (quote (t all))) t) ((eq org-agenda-todo-ignore-deadlines (quote far)) (not (org-deadline-close (match-string 1)))) ((eq org-agenda-todo-ignore-deadlines (quote future)) (> (org-days-to-time (match-string 1)) 0)) ((eq org-agenda-todo-ignore-deadlines (quote past)) (<= (org-days-to-time (match-string 1)) 0)) ((numberp org-agenda-todo-ignore-deadlines) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-deadlines)) (t (org-deadline-close (match-string 1))))) (and org-agenda-todo-ignore-timestamp (let ((buffer (current-buffer)) (regexp (concat org-scheduled-time-regexp "\\|" org-deadline-time-regexp)) (start (point))) (with-temp-buffer (insert-buffer-substring buffer start end) (goto-char (point-min)) (while (re-search-forward regexp end t) (delete-region (match-beginning 0) (match-end 0))) (goto-char (point-min)) (when (re-search-forward org-ts-regexp nil t) (cond (... ...) (... ...) (... ...) (t)))))))) (progn (setq end (or end (save-excursion (outline-next-heading) (point)))) (save-excursion (or (and org-agenda-todo-ignore-with-date (re-search-forward org-ts-regexp end t)) (and org-agenda-todo-ignore-scheduled (re-search-forward org-scheduled-time-regexp end t) (cond ((eq org-agenda-todo-ignore-scheduled (quote future)) (> (org-days-to-time ...) 0)) ((eq org-agenda-todo-ignore-scheduled (quote past)) (<= (org-days-to-time ...) 0)) ((numberp org-agenda-todo-ignore-scheduled) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-scheduled)) (t))) (and org-agenda-todo-ignore-deadlines (re-search-forward org-deadline-time-regexp end t) (cond ((memq org-agenda-todo-ignore-deadlines (quote ...)) t) ((eq org-agenda-todo-ignore-deadlines (quote far)) (not (org-deadline-close ...))) ((eq org-agenda-todo-ignore-deadlines (quote future)) (> (org-days-to-time ...) 0)) ((eq org-agenda-todo-ignore-deadlines (quote past)) (<= (org-days-to-time ...) 0)) ((numberp org-agenda-todo-ignore-deadlines) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-deadlines)) (t (org-deadline-close (match-string 1))))) (and org-agenda-todo-ignore-timestamp (let ((buffer (current-buffer)) (regexp (concat org-scheduled-time-regexp "\\|" org-deadline-time-regexp)) (start (point))) (with-temp-buffer (insert-buffer-substring buffer start end) (goto-char (point-min)) (while (re-search-forward regexp end t) (delete-region ... ...)) (goto-char (point-min)) (when (re-search-forward org-ts-regexp nil t) (cond ... ... ... ...)))))))) (if (or org-agenda-todo-ignore-with-date org-agenda-todo-ignore-scheduled org-agenda-todo-ignore-deadlines org-agenda-todo-ignore-timestamp) (progn (setq end (or end (save-excursion (outline-next-heading) (point)))) (save-excursion (or (and org-agenda-todo-ignore-with-date (re-search-forward org-ts-regexp end t)) (and org-agenda-todo-ignore-scheduled (re-search-forward org-scheduled-time-regexp end t) (cond ((eq org-agenda-todo-ignore-scheduled ...) (> ... 0)) ((eq org-agenda-todo-ignore-scheduled ...) (<= ... 0)) ((numberp org-agenda-todo-ignore-scheduled) (org-agenda-todo-custom-ignore-p ... org-agenda-todo-ignore-scheduled)) (t))) (and org-agenda-todo-ignore-deadlines (re-search-forward org-deadline-time-regexp end t) (cond ((memq org-agenda-todo-ignore-deadlines ...) t) ((eq org-agenda-todo-ignore-deadlines ...) (not ...)) ((eq org-agenda-todo-ignore-deadlines ...) (> ... 0)) ((eq org-agenda-todo-ignore-deadlines ...) (<= ... 0)) ((numberp org-agenda-todo-ignore-deadlines) (org-agenda-todo-custom-ignore-p ... org-agenda-todo-ignore-deadlines)) (t (org-deadline-close ...)))) (and org-agenda-todo-ignore-timestamp (let ((buffer ...) (regexp ...) (start ...)) (with-temp-buffer (insert-buffer-substring buffer start end) (goto-char ...) (while ... ...) (goto-char ...) (when ... ...)))))))) (when (or org-agenda-todo-ignore-with-date org-agenda-todo-ignore-scheduled org-agenda-todo-ignore-deadlines org-agenda-todo-ignore-timestamp) (setq end (or end (save-excursion (outline-next-heading) (point)))) (save-excursion (or (and org-agenda-todo-ignore-with-date (re-search-forward org-ts-regexp end t)) (and org-agenda-todo-ignore-scheduled (re-search-forward org-scheduled-time-regexp end t) (cond ((eq org-agenda-todo-ignore-scheduled (quote future)) (> (org-days-to-time ...) 0)) ((eq org-agenda-todo-ignore-scheduled (quote past)) (<= (org-days-to-time ...) 0)) ((numberp org-agenda-todo-ignore-scheduled) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-scheduled)) (t))) (and org-agenda-todo-ignore-deadlines (re-search-forward org-deadline-time-regexp end t) (cond ((memq org-agenda-todo-ignore-deadlines (quote ...)) t) ((eq org-agenda-todo-ignore-deadlines (quote far)) (not (org-deadline-close ...))) ((eq org-agenda-todo-ignore-deadlines (quote future)) (> (org-days-to-time ...) 0)) ((eq org-agenda-todo-ignore-deadlines (quote past)) (<= (org-days-to-time ...) 0)) ((numberp org-agenda-todo-ignore-deadlines) (org-agenda-todo-custom-ignore-p (match-string 1) org-agenda-todo-ignore-deadlines)) (t (org-deadline-close (match-string 1))))) (and org-agenda-todo-ignore-timestamp (let ((buffer (current-buffer)) (regexp (concat org-scheduled-time-regexp "\\|" org-deadline-time-regexp)) (start (point))) (with-temp-buffer (insert-buffer-substring buffer start end) (goto-char (point-min)) (while (re-search-forward regexp end t) (delete-region ... ...)) (goto-char (point-min)) (when (re-search-forward org-ts-regexp nil t) (cond ... ... ... ...)))))))) org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item() (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)) (or (not org-agenda-tags-todo-honor-ignore-options) (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))) (and (member todo org-not-done-keywords) (or (not org-agenda-tags-todo-honor-ignore-options) (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item)))) (or (not todo-only) (and (member todo org-not-done-keywords) (or (not org-agenda-tags-todo-honor-ignore-options) (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))))) (and (and (or (not todo-only) (member todo org-not-done-keywords)) (let ((case-fold-search t)) (eval matcher))) (progn (unless (eq action (quote sparse-tree)) (org-agenda-skip)) t) (or (not todo-only) (and (member todo org-not-done-keywords) (or (not org-agenda-tags-todo-honor-ignore-options) (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))))) (or (not (member org-archive-tag tags-list)) (or (not org-agenda-skip-archived-trees) (and (eq action (quote agenda)) org-agenda-archives-mode)))) (if (and (and (or (not todo-only) (member todo org-not-done-keywords)) (let ((case-fold-search t)) (eval matcher))) (progn (unless (eq action (quote sparse-tree)) (org-agenda-skip)) t) (or (not todo-only) (and (member todo org-not-done-keywords) (or (not org-agenda-tags-todo-honor-ignore-options) (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))))) (or (not (member org-archive-tag tags-list)) (or (not org-agenda-skip-archived-trees) (and (eq action (quote agenda)) org-agenda-archives-mode)))) (progn (cond ((eq action (quote sparse-tree)) (and org-highlight-sparse-tree-matches (org-get-heading) (match-end 0) (org-highlight-new-match (match-beginning 1) (match-end 1))) (org-show-context (quote tags-tree))) ((eq action (quote agenda)) (setq txt (org-agenda-format-item "" (concat (if ... ... "") (org-get-heading)) category tags-list) priority (org-get-priority txt)) (goto-char lspos) (setq marker (org-agenda-new-marker)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-category) category (quote todo-state) todo (quote priority) priority (quote type) "tagsmatch") (push txt rtn)) ((functionp action) (setq org-map-continue-from nil) (save-excursion (setq rtn1 (funcall action)) (push rtn1 rtn))) (t (error "Invalid action"))) (unless org-tags-match-list-sublevels (org-end-of-subtree t) (backward-char 1)))) (when (and (and (or (not todo-only) (member todo org-not-done-keywords)) (let ((case-fold-search t)) (eval matcher))) (progn (unless (eq action (quote sparse-tree)) (org-agenda-skip)) t) (or (not todo-only) (and (member todo org-not-done-keywords) (or (not org-agenda-tags-todo-honor-ignore-options) (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))))) (or (not (member org-archive-tag tags-list)) (or (not org-agenda-skip-archived-trees) (and (eq action (quote agenda)) org-agenda-archives-mode)))) (cond ((eq action (quote sparse-tree)) (and org-highlight-sparse-tree-matches (org-get-heading) (match-end 0) (org-highlight-new-match (match-beginning 1) (match-end 1))) (org-show-context (quote tags-tree))) ((eq action (quote agenda)) (setq txt (org-agenda-format-item "" (concat (if (eq org-tags-match-list-sublevels ...) (make-string ... 46) "") (org-get-heading)) category tags-list) priority (org-get-priority txt)) (goto-char lspos) (setq marker (org-agenda-new-marker)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-category) category (quote todo-state) todo (quote priority) priority (quote type) "tagsmatch") (push txt rtn)) ((functionp action) (setq org-map-continue-from nil) (save-excursion (setq rtn1 (funcall action)) (push rtn1 rtn))) (t (error "Invalid action"))) (unless org-tags-match-list-sublevels (org-end-of-subtree t) (backward-char 1))) (catch :skip (setq todo (if (match-end 1) (org-match-string-no-properties 2)) tags (if (match-end 4) (org-match-string-no-properties 4))) (goto-char (setq lspos (match-beginning 0))) (setq level (org-reduced-level (funcall outline-level)) category (org-get-category)) (setq i llast llast level) (while (>= i level) (when (setq entry (assoc i tags-alist)) (setq tags-alist (delete entry tags-alist))) (setq i (1- i))) (when tags (setq tags (org-split-string tags ":") tags-alist (cons (cons level tags) tags-alist))) (setq tags-list (if org-use-tag-inheritance (apply (quote append) (mapcar (quote cdr) (reverse tags-alist))) tags) org-scanner-tags tags-list) (when org-use-tag-inheritance (setcdr (car tags-alist) (mapcar (lambda (x) (setq x (copy-sequence x)) (org-add-prop-inherited x)) (cdar tags-alist)))) (when (and tags org-use-tag-inheritance (or (not (eq t org-use-tag-inheritance)) org-tags-exclude-from-inheritance)) (setcdr (car tags-alist) (org-remove-uninherited-tags (cdar tags-alist)))) (when (and (and (or (not todo-only) (member todo org-not-done-keywords)) (let ((case-fold-search t)) (eval matcher))) (progn (unless (eq action (quote sparse-tree)) (org-agenda-skip)) t) (or (not todo-only) (and (member todo org-not-done-keywords) (or (not org-agenda-tags-todo-honor-ignore-options) (not (org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item))))) (or (not (member org-archive-tag tags-list)) (or (not org-agenda-skip-archived-trees) (and (eq action (quote agenda)) org-agenda-archives-mode)))) (cond ((eq action (quote sparse-tree)) (and org-highlight-sparse-tree-matches (org-get-heading) (match-end 0) (org-highlight-new-match (match-beginning 1) (match-end 1))) (org-show-context (quote tags-tree))) ((eq action (quote agenda)) (setq txt (org-agenda-format-item "" (concat (if ... ... "") (org-get-heading)) category tags-list) priority (org-get-priority txt)) (goto-char lspos) (setq marker (org-agenda-new-marker)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-category) category (quote todo-state) todo (quote priority) priority (quote type) "tagsmatch") (push txt rtn)) ((functionp action) (setq org-map-continue-from nil) (save-excursion (setq rtn1 (funcall action)) (push rtn1 rtn))) (t (error "Invalid action"))) (unless org-tags-match-list-sublevels (org-end-of-subtree t) (backward-char 1)))) (while (re-search-forward re nil t) (setq org-map-continue-from nil) (catch :skip (setq todo (if (match-end 1) (org-match-string-no-properties 2)) tags (if (match-end 4) (org-match-string-no-properties 4))) (goto-char (setq lspos (match-beginning 0))) (setq level (org-reduced-level (funcall outline-level)) category (org-get-category)) (setq i llast llast level) (while (>= i level) (when (setq entry (assoc i tags-alist)) (setq tags-alist (delete entry tags-alist))) (setq i (1- i))) (when tags (setq tags (org-split-string tags ":") tags-alist (cons (cons level tags) tags-alist))) (setq tags-list (if org-use-tag-inheritance (apply (quote append) (mapcar (quote cdr) (reverse tags-alist))) tags) org-scanner-tags tags-list) (when org-use-tag-inheritance (setcdr (car tags-alist) (mapcar (lambda (x) (setq x (copy-sequence x)) (org-add-prop-inherited x)) (cdar tags-alist)))) (when (and tags org-use-tag-inheritance (or (not (eq t org-use-tag-inheritance)) org-tags-exclude-from-inheritance)) (setcdr (car tags-alist) (org-remove-uninherited-tags (cdar tags-alist)))) (when (and (and (or (not todo-only) (member todo org-not-done-keywords)) (let ((case-fold-search t)) (eval matcher))) (progn (unless (eq action (quote sparse-tree)) (org-agenda-skip)) t) (or (not todo-only) (and (member todo org-not-done-keywords) (or (not org-agenda-tags-todo-honor-ignore-options) (not ...)))) (or (not (member org-archive-tag tags-list)) (or (not org-agenda-skip-archived-trees) (and (eq action ...) org-agenda-archives-mode)))) (cond ((eq action (quote sparse-tree)) (and org-highlight-sparse-tree-matches (org-get-heading) (match-end 0) (org-highlight-new-match (match-beginning 1) (match-end 1))) (org-show-context (quote tags-tree))) ((eq action (quote agenda)) (setq txt (org-agenda-format-item "" (concat ... ...) category tags-list) priority (org-get-priority txt)) (goto-char lspos) (setq marker (org-agenda-new-marker)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-category) category (quote todo-state) todo (quote priority) priority (quote type) "tagsmatch") (push txt rtn)) ((functionp action) (setq org-map-continue-from nil) (save-excursion (setq rtn1 (funcall action)) (push rtn1 rtn))) (t (error "Invalid action"))) (unless org-tags-match-list-sublevels (org-end-of-subtree t) (backward-char 1)))) (if org-map-continue-from (goto-char org-map-continue-from) (and (= (point) lspos) (end-of-line 1)))) (save-excursion (goto-char (point-min)) (when (eq action (quote sparse-tree)) (org-overview) (org-remove-occur-highlights)) (while (re-search-forward re nil t) (setq org-map-continue-from nil) (catch :skip (setq todo (if (match-end 1) (org-match-string-no-properties 2)) tags (if (match-end 4) (org-match-string-no-properties 4))) (goto-char (setq lspos (match-beginning 0))) (setq level (org-reduced-level (funcall outline-level)) category (org-get-category)) (setq i llast llast level) (while (>= i level) (when (setq entry (assoc i tags-alist)) (setq tags-alist (delete entry tags-alist))) (setq i (1- i))) (when tags (setq tags (org-split-string tags ":") tags-alist (cons (cons level tags) tags-alist))) (setq tags-list (if org-use-tag-inheritance (apply (quote append) (mapcar (quote cdr) (reverse tags-alist))) tags) org-scanner-tags tags-list) (when org-use-tag-inheritance (setcdr (car tags-alist) (mapcar (lambda (x) (setq x ...) (org-add-prop-inherited x)) (cdar tags-alist)))) (when (and tags org-use-tag-inheritance (or (not (eq t org-use-tag-inheritance)) org-tags-exclude-from-inheritance)) (setcdr (car tags-alist) (org-remove-uninherited-tags (cdar tags-alist)))) (when (and (and (or (not todo-only) (member todo org-not-done-keywords)) (let (...) (eval matcher))) (progn (unless (eq action ...) (org-agenda-skip)) t) (or (not todo-only) (and (member todo org-not-done-keywords) (or ... ...))) (or (not (member org-archive-tag tags-list)) (or (not org-agenda-skip-archived-trees) (and ... org-agenda-archives-mode)))) (cond ((eq action (quote sparse-tree)) (and org-highlight-sparse-tree-matches (org-get-heading) (match-end 0) (org-highlight-new-match ... ...)) (org-show-context (quote tags-tree))) ((eq action (quote agenda)) (setq txt (org-agenda-format-item "" ... category tags-list) priority (org-get-priority txt)) (goto-char lspos) (setq marker (org-agenda-new-marker)) (org-add-props txt props (quote org-marker) marker (quote org-hd-marker) marker (quote org-category) category (quote todo-state) todo (quote priority) priority (quote type) "tagsmatch") (push txt rtn)) ((functionp action) (setq org-map-continue-from nil) (save-excursion (setq rtn1 ...) (push rtn1 rtn))) (t (error "Invalid action"))) (unless org-tags-match-list-sublevels (org-end-of-subtree t) (backward-char 1)))) (if org-map-continue-from (goto-char org-map-continue-from) (and (= (point) lspos) (end-of-line 1))))) (let* ((re (concat "^" (if start-level (concat "\\*\\{" (number-to-string start-level) "\\} ") org-outline-regexp) " *\\(\\<\\(" (mapconcat (quote regexp-quote) org-todo-keywords-1 "\\|") (org-re (if todo-only "\\>\\)\\)[ ]+\\(.*?\\)\\(:[[:alnum:address@hidden:]+:\\)?[ ]*$" "\\>\\)\\)? *\\([^ ].*?\\)\\(:[[:alnum:address@hidden:]+:\\)?[ ]*$")))) (props (list (quote face) (quote default) (quote done-face) (quote org-agenda-done) (quote undone-face) (quote default) (quote mouse-face) (quote highlight) (quote org-not-done-regexp) org-not-done-regexp (quote org-todo-regexp) org-todo-regexp (quote org-complex-heading-regexp) org-complex-heading-regexp (quote help-echo) (format "mouse-2 or RET jump to org file %s" (abbreviate-file-name (or (buffer-file-name ...) (buffer-name ...)))))) (case-fold-search nil) (org-map-continue-from nil) lspos tags tags-list (tags-alist (list (cons 0 org-file-tags))) (llast 0) rtn rtn1 level category i txt todo marker entry priority) (when (not (or (member action (quote (agenda sparse-tree))) (functionp action))) (setq action (list (quote lambda) nil action))) (save-excursion (goto-char (point-min)) (when (eq action (quote sparse-tree)) (org-overview) (org-remove-occur-highlights)) (while (re-search-forward re nil t) (setq org-map-continue-from nil) (catch :skip (setq todo (if (match-end 1) (org-match-string-no-properties 2)) tags (if (match-end 4) (org-match-string-no-properties 4))) (goto-char (setq lspos (match-beginning 0))) (setq level (org-reduced-level (funcall outline-level)) category (org-get-category)) (setq i llast llast level) (while (>= i level) (when (setq entry (assoc i tags-alist)) (setq tags-alist (delete entry tags-alist))) (setq i (1- i))) (when tags (setq tags (org-split-string tags ":") tags-alist (cons (cons level tags) tags-alist))) (setq tags-list (if org-use-tag-inheritance (apply (quote append) (mapcar ... ...)) tags) org-scanner-tags tags-list) (when org-use-tag-inheritance (setcdr (car tags-alist) (mapcar (lambda ... ... ...) (cdar tags-alist)))) (when (and tags org-use-tag-inheritance (or (not ...) org-tags-exclude-from-inheritance)) (setcdr (car tags-alist) (org-remove-uninherited-tags (cdar tags-alist)))) (when (and (and (or ... ...) (let ... ...)) (progn (unless ... ...) t) (or (not todo-only) (and ... ...)) (or (not ...) (or ... ...))) (cond ((eq action ...) (and org-highlight-sparse-tree-matches ... ... ...) (org-show-context ...)) ((eq action ...) (setq txt ... priority ...) (goto-char lspos) (setq marker ...) (org-add-props txt props ... marker ... marker ... category ... todo ... priority ... "tagsmatch") (push txt rtn)) ((functionp action) (setq org-map-continue-from nil) (save-excursion ... ...)) (t (error "Invalid action"))) (unless org-tags-match-list-sublevels (org-end-of-subtree t) (backward-char 1)))) (if org-map-continue-from (goto-char org-map-continue-from) (and (= (point) lspos) (end-of-line 1))))) (when (and (eq action (quote sparse-tree)) (not org-sparse-tree-open-archived-trees)) (org-hide-archived-subtrees (point-min) (point-max))) (nreverse rtn)) org-scan-tags(agenda (and (member todo org-not-done-keywords) (and (progn (setq org-cached-props nil) (not (member "CANCELLED" tags-list))) t)) (4)) (setq rtn (org-scan-tags (quote agenda) matcher todo-only)) (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq rtn (org-scan-tags (quote agenda) matcher todo-only)) (setq rtnall (append rtnall rtn))) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq rtn (org-scan-tags (quote agenda) matcher todo-only)) (setq rtnall (append rtnall rtn)))) (save-current-buffer (set-buffer buffer) (unless (eq major-mode (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq rtn (org-scan-tags (quote agenda) matcher todo-only)) (setq rtnall (append rtnall rtn))))) (with-current-buffer buffer (unless (eq major-mode (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq rtn (org-scan-tags (quote agenda) matcher todo-only)) (setq rtnall (append rtnall rtn))))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) rtnall (append rtnall rtn)) (with-current-buffer buffer (unless (eq major-mode (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq rtn (org-scan-tags (quote agenda) matcher todo-only)) (setq rtnall (append rtnall rtn)))))) (catch (quote nextfile) (org-check-agenda-file file) (setq buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) rtnall (append rtnall rtn)) (with-current-buffer buffer (unless (eq major-mode (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq rtn (org-scan-tags (quote agenda) matcher todo-only)) (setq rtnall (append rtnall rtn))))))) (while (setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file file) (setq buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) rtnall (append rtnall rtn)) (with-current-buffer buffer (unless (eq major-mode (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction (if org-agenda-restrict (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq rtn (org-scan-tags ... matcher todo-only)) (setq rtnall (append rtnall rtn)))))))) (let* ((org-tags-match-list-sublevels org-tags-match-list-sublevels) (completion-ignore-case t) rtn rtnall files file pos matcher buffer) (when (and (stringp match) (not (string-match "\\S-" match))) (setq match nil)) (setq matcher (org-make-tags-matcher match) match (car matcher) matcher (cdr matcher)) (org-prepare-agenda (concat "TAGS " match)) (setq org-agenda-query-string match) (setq org-agenda-redo-command (list (quote org-tags-view) (list (quote quote) todo-only) (list (quote if) (quote current-prefix-arg) nil (quote org-agenda-query-string)))) (setq files (org-agenda-files nil (quote ifmode)) rtnall nil) (while (setq file (pop files)) (catch (quote nextfile) (org-check-agenda-file file) (setq buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file))) (if (not buffer) (setq rtn (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) rtnall (append rtnall rtn)) (with-current-buffer buffer (unless (eq major-mode (quote org-mode)) (error "Agenda file %s is not in `org-mode'" file)) (save-excursion (save-restriction (if org-agenda-restrict ... ...) (setq rtn ...) (setq rtnall ...))))))) (if org-agenda-overriding-header (insert (org-add-props (copy-sequence org-agenda-overriding-header) nil (quote face) (quote org-agenda-structure)) "\n") (insert "Headlines with TAGS match: ") (add-text-properties (point-min) (1- (point)) (list (quote face) (quote org-agenda-structure) (quote short-heading) (concat "Match: " match))) (setq pos (point)) (insert match "\n") (add-text-properties pos (1- (point)) (list (quote face) (quote org-warning))) (setq pos (point)) (unless org-agenda-multi (insert "Press `C-u r' to search again with new search string\n")) (add-text-properties pos (1- (point)) (list (quote face) (quote org-agenda-structure)))) (org-agenda-mark-header-line (point-min)) (when rtnall (insert (org-finalize-agenda-entries rtnall) "\n")) (goto-char (point-min)) (or org-agenda-multi (org-fit-agenda-window)) (add-text-properties (point-min) (point-max) (quote (org-agenda-type tags))) (org-finalize-agenda) (setq buffer-read-only t)) org-tags-view((4) "-CANCELLED") (let ((org-agenda-todo-ignore-scheduled (quote future))) (org-tags-view (quote (4)) match)) eval((let ((org-agenda-todo-ignore-scheduled (quote future))) (org-tags-view (quote (4)) match))) org-let(((org-agenda-todo-ignore-scheduled (quote future))) (org-tags-view (quote (4)) match)) (cond ((eq type (quote agenda)) (org-let lprops (quote (org-agenda-list current-prefix-arg)))) ((eq type (quote alltodo)) (org-let lprops (quote (org-todo-list current-prefix-arg)))) ((eq type (quote search)) (org-let lprops (quote (org-search-view current-prefix-arg match nil)))) ((eq type (quote stuck)) (org-let lprops (quote (org-agenda-list-stuck-projects current-prefix-arg)))) ((eq type (quote tags)) (org-let lprops (quote (org-tags-view current-prefix-arg match)))) ((eq type (quote tags-todo)) (org-let lprops (quote (org-tags-view (quote (4)) match)))) ((eq type (quote todo)) (org-let lprops (quote (org-todo-list match)))) ((eq type (quote tags-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-match-sparse-tree current-prefix-arg match)))) ((eq type (quote todo-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-occur (concat "^" org-outline-regexp "[ ]*" (regexp-quote match) "\\>"))))) ((eq type (quote occur-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-occur match)))) ((functionp type) (org-let lprops (quote (funcall type match)))) ((fboundp type) (org-let lprops (quote (funcall type match)))) (t (error "Invalid custom agenda command type %s" type))) (progn (setq type (nth 2 entry) match (eval (nth 3 entry)) lprops (nth 4 entry)) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond ((eq type (quote agenda)) (org-let lprops (quote (org-agenda-list current-prefix-arg)))) ((eq type (quote alltodo)) (org-let lprops (quote (org-todo-list current-prefix-arg)))) ((eq type (quote search)) (org-let lprops (quote (org-search-view current-prefix-arg match nil)))) ((eq type (quote stuck)) (org-let lprops (quote (org-agenda-list-stuck-projects current-prefix-arg)))) ((eq type (quote tags)) (org-let lprops (quote (org-tags-view current-prefix-arg match)))) ((eq type (quote tags-todo)) (org-let lprops (quote (org-tags-view (quote (4)) match)))) ((eq type (quote todo)) (org-let lprops (quote (org-todo-list match)))) ((eq type (quote tags-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-match-sparse-tree current-prefix-arg match)))) ((eq type (quote todo-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-occur (concat "^" org-outline-regexp "[ ]*" (regexp-quote match) "\\>"))))) ((eq type (quote occur-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-occur match)))) ((functionp type) (org-let lprops (quote (funcall type match)))) ((fboundp type) (org-let lprops (quote (funcall type match)))) (t (error "Invalid custom agenda command type %s" type)))) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (setq type (nth 2 entry) match (eval (nth 3 entry)) lprops (nth 4 entry)) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond ((eq type (quote agenda)) (org-let lprops (quote (org-agenda-list current-prefix-arg)))) ((eq type (quote alltodo)) (org-let lprops (quote (org-todo-list current-prefix-arg)))) ((eq type (quote search)) (org-let lprops (quote (org-search-view current-prefix-arg match nil)))) ((eq type (quote stuck)) (org-let lprops (quote (org-agenda-list-stuck-projects current-prefix-arg)))) ((eq type (quote tags)) (org-let lprops (quote (org-tags-view current-prefix-arg match)))) ((eq type (quote tags-todo)) (org-let lprops (quote (org-tags-view (quote ...) match)))) ((eq type (quote todo)) (org-let lprops (quote (org-todo-list match)))) ((eq type (quote tags-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-match-sparse-tree current-prefix-arg match)))) ((eq type (quote todo-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-occur (concat "^" org-outline-regexp "[ ]*" ... "\\>"))))) ((eq type (quote occur-tree)) (org-check-for-org-mode) (org-let lprops (quote (org-occur match)))) ((functionp type) (org-let lprops (quote (funcall type match)))) ((fboundp type) (org-let lprops (quote (funcall type match)))) (t (error "Invalid custom agenda command type %s" type)))) (org-agenda-run-series (nth 1 entry) (cddr entry))) (cond ((setq entry (assoc keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (setq type (nth 2 entry) match (eval (nth 3 entry)) lprops (nth 4 entry)) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond ((eq type (quote agenda)) (org-let lprops (quote ...))) ((eq type (quote alltodo)) (org-let lprops (quote ...))) ((eq type (quote search)) (org-let lprops (quote ...))) ((eq type (quote stuck)) (org-let lprops (quote ...))) ((eq type (quote tags)) (org-let lprops (quote ...))) ((eq type (quote tags-todo)) (org-let lprops (quote ...))) ((eq type (quote todo)) (org-let lprops (quote ...))) ((eq type (quote tags-tree)) (org-check-for-org-mode) (org-let lprops (quote ...))) ((eq type (quote todo-tree)) (org-check-for-org-mode) (org-let lprops (quote ...))) ((eq type (quote occur-tree)) (org-check-for-org-mode) (org-let lprops (quote ...))) ((functionp type) (org-let lprops (quote ...))) ((fboundp type) (org-let lprops (quote ...))) (t (error "Invalid custom agenda command type %s" type)))) (org-agenda-run-series (nth 1 entry) (cddr entry)))) ((equal keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable (quote org-agenda-custom-commands))) ((equal keys "a") (call-interactively (quote org-agenda-list))) ((equal keys "s") (call-interactively (quote org-search-view))) ((equal keys "t") (call-interactively (quote org-todo-list))) ((equal keys "T") (org-call-with-arg (quote org-todo-list) (or arg (quote (4))))) ((equal keys "m") (call-interactively (quote org-tags-view))) ((equal keys "M") (org-call-with-arg (quote org-tags-view) (or arg (quote (4))))) ((equal keys "e") (call-interactively (quote org-store-agenda-views))) ((equal keys "?") (org-tags-view nil "+FLAGGED") (org-add-hook (quote post-command-hook) (lambda nil (unless (current-message) (let* ((m ...) (note ...)) (when note (message ...))))) t t)) ((equal keys "L") (unless (eq major-mode (quote org-mode)) (error "This is not an Org-mode file")) (unless restriction (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (org-call-with-arg (quote org-timeline) arg))) ((equal keys "#") (call-interactively (quote org-agenda-list-stuck-projects))) ((equal keys "/") (call-interactively (quote org-occur-in-agenda-files))) ((equal keys "!") (customize-variable (quote org-stuck-projects))) (t (error "Invalid agenda key"))) (let* ((prefix-descriptions nil) (org-agenda-window-setup (if (equal (buffer-name) org-agenda-buffer-name) (quote current-window) org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil (mapcar (lambda (x) (cond (... ... nil) (... x) (... ...) (t ...))) org-agenda-custom-commands))) (buf (current-buffer)) (bfn (buffer-file-name (buffer-base-buffer))) entry key type match lprops ans) (unless org-agenda-overriding-restriction (unless (org-bound-and-true-p org-agenda-keep-restricted-file-list) (put (quote org-agenda-files) (quote org-restrict) nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-command) (quote org-lprops) nil) (put (quote org-agenda-redo-command) (quote last-args) nil) (setq org-agenda-last-dispatch-buffer (current-buffer)) (unless keys (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans))) (when (and (not org-agenda-overriding-restriction) restriction) (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (cond ((eq restriction (quote region)) (setq org-agenda-restrict t) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction (quote subtree)) (save-excursion (setq org-agenda-restrict t) (org-back-to-heading t) (move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-end (progn (org-end-of-subtree t))))))) (cond ((setq entry (assoc keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (setq type (nth 2 entry) match (eval (nth 3 entry)) lprops (nth 4 entry)) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops ...)) ((eq type ...) (org-check-for-org-mode) (org-let lprops ...)) ((functionp type) (org-let lprops ...)) ((fboundp type) (org-let lprops ...)) (t (error "Invalid custom agenda command type %s" type)))) (org-agenda-run-series (nth 1 entry) (cddr entry)))) ((equal keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable (quote org-agenda-custom-commands))) ((equal keys "a") (call-interactively (quote org-agenda-list))) ((equal keys "s") (call-interactively (quote org-search-view))) ((equal keys "t") (call-interactively (quote org-todo-list))) ((equal keys "T") (org-call-with-arg (quote org-todo-list) (or arg (quote (4))))) ((equal keys "m") (call-interactively (quote org-tags-view))) ((equal keys "M") (org-call-with-arg (quote org-tags-view) (or arg (quote (4))))) ((equal keys "e") (call-interactively (quote org-store-agenda-views))) ((equal keys "?") (org-tags-view nil "+FLAGGED") (org-add-hook (quote post-command-hook) (lambda nil (unless (current-message) (let* (... ...) (when note ...)))) t t)) ((equal keys "L") (unless (eq major-mode (quote org-mode)) (error "This is not an Org-mode file")) (unless restriction (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (org-call-with-arg (quote org-timeline) arg))) ((equal keys "#") (call-interactively (quote org-agenda-list-stuck-projects))) ((equal keys "/") (call-interactively (quote org-occur-in-agenda-files))) ((equal keys "!") (customize-variable (quote org-stuck-projects))) (t (error "Invalid agenda key")))) (catch (quote exit) (let* ((prefix-descriptions nil) (org-agenda-window-setup (if (equal (buffer-name) org-agenda-buffer-name) (quote current-window) org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil (mapcar (lambda (x) (cond ... ... ... ...)) org-agenda-custom-commands))) (buf (current-buffer)) (bfn (buffer-file-name (buffer-base-buffer))) entry key type match lprops ans) (unless org-agenda-overriding-restriction (unless (org-bound-and-true-p org-agenda-keep-restricted-file-list) (put (quote org-agenda-files) (quote org-restrict) nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (put (quote org-agenda-redo-command) (quote org-lprops) nil) (put (quote org-agenda-redo-command) (quote last-args) nil) (setq org-agenda-last-dispatch-buffer (current-buffer)) (unless keys (setq ans (org-agenda-get-restriction-and-command prefix-descriptions) keys (car ans) restriction (cdr ans))) (when (and (not org-agenda-overriding-restriction) restriction) (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (cond ((eq restriction (quote region)) (setq org-agenda-restrict t) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction (quote subtree)) (save-excursion (setq org-agenda-restrict t) (org-back-to-heading t) (move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-end (progn ...)))))) (cond ((setq entry (assoc keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (setq type (nth 2 entry) match (eval ...) lprops (nth 4 entry)) (put (quote org-agenda-redo-command) (quote org-lprops) lprops) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ... ...) (... ... ...) (... ... ...) (... ...) (... ...) (t ...))) (org-agenda-run-series (nth 1 entry) (cddr entry)))) ((equal keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable (quote org-agenda-custom-commands))) ((equal keys "a") (call-interactively (quote org-agenda-list))) ((equal keys "s") (call-interactively (quote org-search-view))) ((equal keys "t") (call-interactively (quote org-todo-list))) ((equal keys "T") (org-call-with-arg (quote org-todo-list) (or arg (quote (4))))) ((equal keys "m") (call-interactively (quote org-tags-view))) ((equal keys "M") (org-call-with-arg (quote org-tags-view) (or arg (quote (4))))) ((equal keys "e") (call-interactively (quote org-store-agenda-views))) ((equal keys "?") (org-tags-view nil "+FLAGGED") (org-add-hook (quote post-command-hook) (lambda nil (unless (current-message) (let* ... ...))) t t)) ((equal keys "L") (unless (eq major-mode (quote org-mode)) (error "This is not an Org-mode file")) (unless restriction (put (quote org-agenda-files) (quote org-restrict) (list bfn)) (org-call-with-arg (quote org-timeline) arg))) ((equal keys "#") (call-interactively (quote org-agenda-list-stuck-projects))) ((equal keys "/") (call-interactively (quote org-occur-in-agenda-files))) ((equal keys "!") (customize-variable (quote org-stuck-projects))) (t (error "Invalid agenda key"))))) org-agenda(nil) call-interactively(org-agenda nil nil)