Skip to content

Instantly share code, notes, and snippets.

@jwiegley
Created October 11, 2024 22:13
Show Gist options
  • Save jwiegley/43271c7e9b7a114b617369cb0842ad93 to your computer and use it in GitHub Desktop.
Save jwiegley/43271c7e9b7a114b617369cb0842ad93 to your computer and use it in GitHub Desktop.
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
set-buffer(nil)
(save-current-buffer (set-buffer (let ((idx (or 14 14))) (let* ((parray (and t (and idx ...)))) (if parray (let* ((val ...)) (if (eq val ...) 'nil (let ... val))) (let* ((val ...)) (cond (... ...) (... ...) (t ...))))))) (save-excursion (save-restriction (widen) (let* ((value (let (... ...) (if contents-begin ...)))) (if (eq (org-element-type element t) 'plain-text) (org-add-props element nil :robust-begin value) (let ((parray ...)) (if parray (progn ...)) element))) (let* ((value (let (... ...) (if contents-end ...)))) (if (eq (org-element-type element t) 'plain-text) (org-add-props element nil :robust-end value) (let ((parray ...)) (if parray (progn ...)) element))) (if (let ((idx (or 12 12))) (let* ((parray ...)) (if parray (let* ... ...) (let* ... ...)))) nil (if (eq (org-element-type element t) 'plain-text) (org-add-props element nil :robust-begin nil) (let ((parray ...)) (if parray (progn ...)) element))) (goto-char (org-element-begin element)) (setcar (cdr element) (nconc (nth 1 element) (org-element--get-time-properties))) (goto-char (org-element-begin element)) (setcar (cdr element) (nconc (nth 1 element) (org-element--get-node-properties nil element))))))
org-element--headline-deferred((headline (:standard-properties [2074 2074 2114 2653 2653 0 (:title) nil nil t (0 . 2074) 2116 2653 3 nil [org-element-deferred org-element--headline-deferred nil t] nil (headline (:standard-properties [392 392 407 6089 6089 0 (:title) nil element t (0 . 392) 526 6087 2 nil nil nil (headline ...)] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-raw-value (3 14) t] :title [org-element-deferred org-element-property-2 (:raw-value) nil] :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :footnote-section-p [org-element-deferred org-element--headline-footnote-section-p nil nil] :archivedp [org-element-deferred org-element--headline-archivedp nil nil] :commentedp nil :ID [org-element-deferred org-element--substring (39 75) t] :CREATED [org-element-deferred org-element--substring (87 109) t] :CATEGORY "CDS4LTL" :fragile-cache nil))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title (t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level [org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred org-element--headline-parse-title (t) t] :tags [org-element-deferred org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred org-element--headline-parse-title (t) t] :todo-type [org-element-deferred org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred org-element--headline-parse-title (t) t] :archivedp [org-element-deferred org-element--headline-parse-title (t) t] :commentedp [org-element-deferred org-element--headline-parse-title (t) t])))
apply(org-element--headline-deferred (headline (:standard-properties [2074 2074 2114 2653 2653 0 (:title) nil nil t (0 . 2074) 2116 2653 3 nil [org-element-deferred org-element--headline-deferred nil t] nil (headline (:standard-properties [392 392 407 6089 6089 0 (:title) nil element t (0 . 392) 526 6087 2 nil nil nil (headline ...)] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-raw-value (3 14) t] :title [org-element-deferred org-element-property-2 (:raw-value) nil] :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :footnote-section-p [org-element-deferred org-element--headline-footnote-section-p nil nil] :archivedp [org-element-deferred org-element--headline-archivedp nil nil] :commentedp nil :ID [org-element-deferred org-element--substring (39 75) t] :CREATED [org-element-deferred org-element--substring (87 109) t] :CATEGORY "CDS4LTL" :fragile-cache nil))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title (t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level [org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred org-element--headline-parse-title (t) t] :tags [org-element-deferred org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred org-element--headline-parse-title (t) t] :todo-type [org-element-deferred org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred org-element--headline-parse-title (t) t] :archivedp [org-element-deferred org-element--headline-parse-title (t) t] :commentedp [org-element-deferred org-element--headline-parse-title (t) t])) nil)
org-element--property(:deferred (headline (:standard-properties [2074 2074 2114 2653 2653 0 (:title) nil nil t (0 . 2074) 2116 2653 3 nil [org-element-deferred org-element--headline-deferred nil t] nil (headline (:standard-properties [392 392 407 6089 6089 0 (:title) nil element t (0 . 392) 526 6087 2 nil nil nil (headline ...)] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-raw-value (3 14) t] :title [org-element-deferred org-element-property-2 (:raw-value) nil] :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :footnote-section-p [org-element-deferred org-element--headline-footnote-section-p nil nil] :archivedp [org-element-deferred org-element--headline-archivedp nil nil] :commentedp nil :ID [org-element-deferred org-element--substring (39 75) t] :CREATED [org-element-deferred org-element--substring (87 109) t] :CATEGORY "CDS4LTL" :fragile-cache nil))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title (t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level [org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred org-element--headline-parse-title (t) t] :tags [org-element-deferred org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred org-element--headline-parse-title (t) t] :todo-type [org-element-deferred org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred org-element--headline-parse-title (t) t] :archivedp [org-element-deferred org-element--headline-parse-title (t) t] :commentedp [org-element-deferred org-element--headline-parse-title (t) t])) nil force-undefer)
org-element--property(:scheduled (headline (:standard-properties [2074 2074 2114 2653 2653 0 (:title) nil nil t (0 . 2074) 2116 2653 3 nil [org-element-deferred org-element--headline-deferred nil t] nil (headline (:standard-properties [392 392 407 6089 6089 0 (:title) nil element t (0 . 392) 526 6087 2 nil nil nil (headline ...)] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-raw-value (3 14) t] :title [org-element-deferred org-element-property-2 (:raw-value) nil] :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :footnote-section-p [org-element-deferred org-element--headline-footnote-section-p nil nil] :archivedp [org-element-deferred org-element--headline-archivedp nil nil] :commentedp nil :ID [org-element-deferred org-element--substring (39 75) t] :CREATED [org-element-deferred org-element--substring (87 109) t] :CATEGORY "CDS4LTL" :fragile-cache nil))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title (t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level [org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred org-element--headline-parse-title (t) t] :tags [org-element-deferred org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred org-element--headline-parse-title (t) t] :todo-type [org-element-deferred org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred org-element--headline-parse-title (t) t] :archivedp [org-element-deferred org-element--headline-parse-title (t) t] :commentedp [org-element-deferred org-element--headline-parse-title (t) t])) nil nil)
(and (org-element--property :scheduled el nil nil) (memq (org-element--property :type (org-element--property :scheduled el nil nil) nil nil) '(diary active active-range)) (or (not with-hour) (org-element--property :hour-start (org-element--property :scheduled el nil nil) nil nil) (org-element--property :hour-end (org-element--property :scheduled el nil nil) nil nil)))
(if (and (org-element--property :scheduled el nil nil) (memq (org-element--property :type (org-element--property :scheduled el nil nil) nil nil) '(diary active active-range)) (or (not with-hour) (org-element--property :hour-start (org-element--property :scheduled el nil nil) nil nil) (org-element--property :hour-end (org-element--property :scheduled el nil nil) nil nil))) (progn (goto-char (org-element-contents-begin el)) (catch :skip (org-agenda-skip el) (let* ((s (substring (org-element--property :raw-value ... nil nil) 1 -1)) (pos (save-excursion (goto-char ...) (re-search-forward regexp ...) (1- ...))) (todo-state (org-element--property :todo-keyword el nil nil)) (donep (eq 'done (org-element--property :todo-type el nil nil))) (sexp? (eq 'diary (org-element--property :type ... nil nil))) (schedule (cond (sexp? ...) (... ...) (t ...))) (repeat (cond (sexp? schedule) (... schedule) (... schedule) (t ...))) (diff (- current schedule)) (warntime (org-entry-get (point) "APPT_WARNTIME" 'selective)) (pastschedp (< schedule today)) (futureschedp (> schedule today)) (habitp (and (fboundp ...) (string= "habit" ...))) (max-delay-days (let (...) (cond ... ... ... ...))) (delay-days (cond (... 0) (t ...)))) (if (and todayp habitp (and (boundp ...) org-habit-show-all-today)) nil (if (or (and ... ...) (> diff ...) (> schedule current) (and ... ... ...)) (progn (throw :skip nil)))) (if (and donep (or org-agenda-skip-scheduled-if-done (/= schedule current))) (progn (throw :skip nil))) (if (or org-agenda-skip-scheduled-repeats-after-deadline (eq org-agenda-skip-scheduled-if-deadline-is-shown 'repeated-after-deadline)) (progn (let (...) (if ... ...)))) (if (cond ((or ... habitp) 'nil) ((eq org-agenda-skip-scheduled-if-deadline-is-shown ...) (let nil pastschedp)) ((eq org-agenda-skip-scheduled-if-deadline-is-shown ...) (let nil t)) (t 'nil)) (progn (throw :skip nil))) (if (and habitp (or donep (not ...) (and ... ...))) (progn (throw :skip nil))) (save-excursion (goto-char (org-element-begin el)) (let* ((category ...) (effort ...) (effort-minutes ...) (inherited-tags ...) (tags ...) (level ...) (head ...) (time ...) (item ...) (face ...) (habitp ...)) (org-add-props item props 'undone-face face 'face (if donep ... face) 'org-marker (org-agenda-new-marker pos) 'org-hd-marker (org-agenda-new-marker ...) 'type (if pastschedp "past-scheduled" "scheduled") 'date (if pastschedp schedule date) 'ts-date schedule 'warntime warntime 'level level 'effort effort 'effort-minutes effort-minutes 'urgency (if habitp ... ...) 'priority (org-get-priority item) 'org-habit-p habitp 'todo-state todo-state) (setq scheduled-items (cons item scheduled-items))))))))
(closure ((scheduled-items) (deadline-pos) (current . 739170) (todayp . t) (today . 739170) (regexp . "\\<SCHEDULED: *<\\([^>]+\\)>") (props org-not-done-regexp "\\(D\\(?:EFER\\|OING\\)\\|HABIT\\|PROJECT\\|T\\(?:ASK\\|ODO..." org-todo-regexp "\\(ABORTED\\|C\\(?:ANCELED\\|OMPLETE\\)\\|D\\(?:EFER\\|O\\(..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(ABORTED\\|C\\(?:ANCELED\\|OMPLETE\\)\\|..." done-face org-agenda-done mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/OSS.org") (with-hour)) (el) (if (and (org-element--property :scheduled el nil nil) (memq (org-element--property :type (org-element--property :scheduled el nil nil) nil nil) '(diary active active-range)) (or (not with-hour) (org-element--property :hour-start (org-element--property :scheduled el nil nil) nil nil) (org-element--property :hour-end (org-element--property :scheduled el nil nil) nil nil))) (progn (goto-char (org-element-contents-begin el)) (catch :skip (org-agenda-skip el) (let* ((s ...) (pos ...) (todo-state ...) (donep ...) (sexp? ...) (schedule ...) (repeat ...) (diff ...) (warntime ...) (pastschedp ...) (futureschedp ...) (habitp ...) (max-delay-days ...) (delay-days ...)) (if (and todayp habitp ...) nil (if ... ...)) (if (and donep ...) (progn ...)) (if (or org-agenda-skip-scheduled-repeats-after-deadline ...) (progn ...)) (if (cond ... ... ... ...) (progn ...)) (if (and habitp ...) (progn ...)) (save-excursion (goto-char ...) (let* ... ... ...)))))))((headline (:standard-properties [2074 2074 2114 2653 2653 0 (:title) nil nil t (0 . 2074) 2116 2653 3 nil [org-element-deferred org-element--headline-deferred nil t] nil (headline (:standard-properties [392 392 407 6089 6089 0 (:title) nil element t (0 . 392) 526 6087 2 nil nil nil (headline ...)] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-raw-value (3 14) t] :title [org-element-deferred org-element-property-2 (:raw-value) nil] :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :footnote-section-p [org-element-deferred org-element--headline-footnote-section-p nil nil] :archivedp [org-element-deferred org-element--headline-archivedp nil nil] :commentedp nil :ID [org-element-deferred org-element--substring (39 75) t] :CREATED [org-element-deferred org-element--substring (87 109) t] :CATEGORY "CDS4LTL" :fragile-cache nil))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title (t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level [org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred org-element--headline-parse-title (t) t] :tags [org-element-deferred org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred org-element--headline-parse-title (t) t] :todo-type [org-element-deferred org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred org-element--headline-parse-title (t) t] :archivedp [org-element-deferred org-element--headline-parse-title (t) t] :commentedp [org-element-deferred org-element--headline-parse-title (t) t])))
funcall((closure ((scheduled-items) (deadline-pos) (current . 739170) (todayp . t) (today . 739170) (regexp . "\\<SCHEDULED: *<\\([^>]+\\)>") (props org-not-done-regexp "\\(D\\(?:EFER\\|OING\\)\\|HABIT\\|PROJECT\\|T\\(?:ASK\\|ODO..." org-todo-regexp "\\(ABORTED\\|C\\(?:ANCELED\\|OMPLETE\\)\\|D\\(?:EFER\\|O\\(..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(ABORTED\\|C\\(?:ANCELED\\|OMPLETE\\)\\|..." done-face org-agenda-done mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/OSS.org") (with-hour)) (el) (if (and (org-element--property :scheduled el nil nil) (memq (org-element--property :type (org-element--property :scheduled el nil nil) nil nil) '(diary active active-range)) (or (not with-hour) (org-element--property :hour-start (org-element--property :scheduled el nil nil) nil nil) (org-element--property :hour-end (org-element--property :scheduled el nil nil) nil nil))) (progn (goto-char (org-element-contents-begin el)) (catch :skip (org-agenda-skip el) (let* ((s ...) (pos ...) (todo-state ...) (donep ...) (sexp? ...) (schedule ...) (repeat ...) (diff ...) (warntime ...) (pastschedp ...) (futureschedp ...) (habitp ...) (max-delay-days ...) (delay-days ...)) (if (and todayp habitp ...) nil (if ... ...)) (if (and donep ...) (progn ...)) (if (or org-agenda-skip-scheduled-repeats-after-deadline ...) (progn ...)) (if (cond ... ... ... ...) (progn ...)) (if (and habitp ...) (progn ...)) (save-excursion (goto-char ...) (let* ... ... ...))))))) (headline (:standard-properties [2074 2074 2114 2653 2653 0 (:title) nil nil t (0 . 2074) 2116 2653 3 nil [org-element-deferred org-element--headline-deferred nil t] nil (headline (:standard-properties [392 392 407 6089 6089 0 (:title) nil element t (0 . 392) 526 6087 2 nil nil nil (headline ...)] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-raw-value (3 14) t] :title [org-element-deferred org-element-property-2 (:raw-value) nil] :level 2 :priority nil :tags nil :todo-keyword nil :todo-type nil :footnote-section-p [org-element-deferred org-element--headline-footnote-section-p nil nil] :archivedp [org-element-deferred org-element--headline-archivedp nil nil] :commentedp nil :ID [org-element-deferred org-element--substring (39 75) t] :CREATED [org-element-deferred org-element--substring (87 109) t] :CATEGORY "CDS4LTL" :fragile-cache nil))] :pre-blank 0 :raw-value [org-element-deferred org-element--headline-parse-title (t) t] :title [org-element-deferred org-element--headline-parse-title (t) t] :level [org-element-deferred org-element--headline-parse-title (t) t] :priority [org-element-deferred org-element--headline-parse-title (t) t] :tags [org-element-deferred org-element--headline-parse-title (t) t] :todo-keyword [org-element-deferred org-element--headline-parse-title (t) t] :todo-type [org-element-deferred org-element--headline-parse-title (t) t] :footnote-section-p [org-element-deferred org-element--headline-parse-title (t) t] :archivedp [org-element-deferred org-element--headline-parse-title (t) t] :commentedp [org-element-deferred org-element--headline-parse-title (t) t])))
(cons (funcall func data) result)
(setq result (cons (funcall func data) result))
(if (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) org-element--cache-map-statistics) (progn (setq before-time (float-time)) (setq result (cons (funcall func data) result)) (setq predicate-time (+ predicate-time (- (float-time) before-time))) (if (car result) (setq count-predicate-calls-match (1+ count-predicate-calls-match)) (setq count-predicate-calls-fail (1+ count-predicate-calls-fail)))) (setq result (cons (funcall func data) result)) (if (car result) (progn (setq count-predicate-calls-match (1+ count-predicate-calls-match)))))
(progn (setq org-element-cache-map-continue-from nil) (if (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) org-element--cache-map-statistics) (progn (setq before-time (float-time)) (setq result (cons (funcall func data) result)) (setq predicate-time (+ predicate-time (- (float-time) before-time))) (if (car result) (setq count-predicate-calls-match (1+ count-predicate-calls-match)) (setq count-predicate-calls-fail (1+ count-predicate-calls-fail)))) (setq result (cons (funcall func data) result)) (if (car result) (progn (setq count-predicate-calls-match (1+ count-predicate-calls-match))))) (setq last-match (car result)) (if org-element-cache-map-continue-from (progn (goto-char org-element-cache-map-continue-from))) (if (> (point) start) (progn (let ((saved-match-data (match-data))) (unwind-protect (progn (if (or ... ...) (if ... nil ... ... ...) (progn ... ...))) (set-match-data saved-match-data t))) (if (> (point) start) (progn (setq data (progn (save-current-buffer ... ...) (if restrict-elements ... ...))) (if (not data) (progn (setq continue-flag t) (setq node nil)) (goto-char (progn ... ... ... ... tmpnext-start)) (let (...) (unwind-protect ... ...))))))) (if (car result) nil (car-safe (prog1 result (setq result (cdr result))))))
(if (or (not restrict-elements) (org-element-type-p data restrict-elements)) (progn (setq org-element-cache-map-continue-from nil) (if (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) org-element--cache-map-statistics) (progn (setq before-time (float-time)) (setq result (cons (funcall func data) result)) (setq predicate-time (+ predicate-time (- (float-time) before-time))) (if (car result) (setq count-predicate-calls-match (1+ count-predicate-calls-match)) (setq count-predicate-calls-fail (1+ count-predicate-calls-fail)))) (setq result (cons (funcall func data) result)) (if (car result) (progn (setq count-predicate-calls-match (1+ count-predicate-calls-match))))) (setq last-match (car result)) (if org-element-cache-map-continue-from (progn (goto-char org-element-cache-map-continue-from))) (if (> (point) start) (progn (let ((saved-match-data (match-data))) (unwind-protect (progn (if ... ... ...)) (set-match-data saved-match-data t))) (if (> (point) start) (progn (setq data (progn ... ...)) (if (not data) (progn ... ...) (goto-char ...) (let ... ...)))))) (if (car result) nil (car-safe (prog1 result (setq result (cdr result)))))))
(progn (setq start (progn (setq tmpnext-start nil) (if (memq granularity '(headline headline+inlinetask)) (setq tmpnext-start (or (if (memq ... ...) (progn ...)) (org-element-end data))) (setq tmpnext-start (or (if (org-element-type-p data org-element-greater-elements) (progn ...)) (org-element-end data)))) (setq tmpparent data) (catch :exit (if (eq tmpnext-start (org-element-contents-end tmpparent)) (progn (setq tmpnext-start (org-element-end tmpparent)))) (while (setq tmpparent (org-element-parent tmpparent)) (if (eq tmpnext-start (org-element-contents-end tmpparent)) (setq tmpnext-start (org-element-end tmpparent)) (throw :exit t)))) tmpnext-start)) (goto-char start) (save-excursion (if (and next-element-re (not (save-current-buffer (set-buffer (or ... ...)) (eq org-element--cache-change-tic (alist-get granularity org-element--cache-gapless))))) (progn (let ((saved-match-data (match-data))) (unwind-protect (progn (if ... ... ...)) (set-match-data saved-match-data t)))))) (if (or (not restrict-elements) (org-element-type-p data restrict-elements)) (progn (setq org-element-cache-map-continue-from nil) (if (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) org-element--cache-map-statistics) (progn (setq before-time (float-time)) (setq result (cons (funcall func data) result)) (setq predicate-time (+ predicate-time (- ... before-time))) (if (car result) (setq count-predicate-calls-match (1+ count-predicate-calls-match)) (setq count-predicate-calls-fail (1+ count-predicate-calls-fail)))) (setq result (cons (funcall func data) result)) (if (car result) (progn (setq count-predicate-calls-match (1+ count-predicate-calls-match))))) (setq last-match (car result)) (if org-element-cache-map-continue-from (progn (goto-char org-element-cache-map-continue-from))) (if (> (point) start) (progn (let ((saved-match-data ...)) (unwind-protect (progn ...) (set-match-data saved-match-data t))) (if (> (point) start) (progn (setq data ...) (if ... ... ... ...))))) (if (car result) nil (car-safe (prog1 result (setq result (cdr result))))))) (if (and (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) (eq org-element--cache-change-tic (alist-get granularity org-element--cache-gapless))) (eq (progn (setq tmpnext-start nil) (if (memq granularity '...) (setq tmpnext-start (or ... ...)) (setq tmpnext-start (or ... ...))) (setq tmpparent data) (catch :exit (if (eq tmpnext-start ...) (progn ...)) (while (setq tmpparent ...) (if ... ... ...))) tmpnext-start) start)) (progn (setq start nil))) (if (and limit-count (>= count-predicate-calls-match limit-count)) (progn (progn (setq continue-flag t) (setq node nil)))) (if start (progn (progn (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) (if org-element--cache-sync-requests (progn (org-element--cache-sync ...)))) (if restrict-elements (progn (setq tmpelement (org-element--parse-to ...)) (while (and tmpelement ...) (setq tmpelement ...)) tmpelement) (org-element--parse-to (point)))))))
(if (and (or (not start) (eq (org-element-begin data) start)) (< (org-element-begin data) to-pos) (not continue-flag)) (progn (setq start (progn (setq tmpnext-start nil) (if (memq granularity '(headline headline+inlinetask)) (setq tmpnext-start (or (if ... ...) (org-element-end data))) (setq tmpnext-start (or (if ... ...) (org-element-end data)))) (setq tmpparent data) (catch :exit (if (eq tmpnext-start (org-element-contents-end tmpparent)) (progn (setq tmpnext-start ...))) (while (setq tmpparent (org-element-parent tmpparent)) (if (eq tmpnext-start ...) (setq tmpnext-start ...) (throw :exit t)))) tmpnext-start)) (goto-char start) (save-excursion (if (and next-element-re (not (save-current-buffer (set-buffer ...) (eq org-element--cache-change-tic ...)))) (progn (let ((saved-match-data ...)) (unwind-protect (progn ...) (set-match-data saved-match-data t)))))) (if (or (not restrict-elements) (org-element-type-p data restrict-elements)) (progn (setq org-element-cache-map-continue-from nil) (if (save-current-buffer (set-buffer (or ... ...)) org-element--cache-map-statistics) (progn (setq before-time (float-time)) (setq result (cons ... result)) (setq predicate-time (+ predicate-time ...)) (if (car result) (setq count-predicate-calls-match ...) (setq count-predicate-calls-fail ...))) (setq result (cons (funcall func data) result)) (if (car result) (progn (setq count-predicate-calls-match ...)))) (setq last-match (car result)) (if org-element-cache-map-continue-from (progn (goto-char org-element-cache-map-continue-from))) (if (> (point) start) (progn (let (...) (unwind-protect ... ...)) (if (> ... start) (progn ... ...)))) (if (car result) nil (car-safe (prog1 result (setq result ...)))))) (if (and (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) (eq org-element--cache-change-tic (alist-get granularity org-element--cache-gapless))) (eq (progn (setq tmpnext-start nil) (if (memq granularity ...) (setq tmpnext-start ...) (setq tmpnext-start ...)) (setq tmpparent data) (catch :exit (if ... ...) (while ... ...)) tmpnext-start) start)) (progn (setq start nil))) (if (and limit-count (>= count-predicate-calls-match limit-count)) (progn (progn (setq continue-flag t) (setq node nil)))) (if start (progn (progn (save-current-buffer (set-buffer (or ... ...)) (if org-element--cache-sync-requests (progn ...))) (if restrict-elements (progn (setq tmpelement ...) (while ... ...) tmpelement) (org-element--parse-to (point))))))))
(progn (setq modified-tic (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) org-element--cache-change-tic)) (setq cache-size (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) (if (memq granularity '(headline headline+inlinetask)) org-element--headline-cache-size org-element--cache-size))) (if (if last-match next-re fail-re) (progn (goto-char (org-element-begin data)) (let ((saved-match-data (match-data))) (unwind-protect (progn (if (or ... ...) (if ... nil ... ... ...) (progn ... ...))) (set-match-data saved-match-data t))))) (if (and (or (not start) (eq (org-element-begin data) start)) (< (org-element-begin data) to-pos) (not continue-flag)) (progn (setq start (progn (setq tmpnext-start nil) (if (memq granularity '...) (setq tmpnext-start (or ... ...)) (setq tmpnext-start (or ... ...))) (setq tmpparent data) (catch :exit (if (eq tmpnext-start ...) (progn ...)) (while (setq tmpparent ...) (if ... ... ...))) tmpnext-start)) (goto-char start) (save-excursion (if (and next-element-re (not (save-current-buffer ... ...))) (progn (let (...) (unwind-protect ... ...))))) (if (or (not restrict-elements) (org-element-type-p data restrict-elements)) (progn (setq org-element-cache-map-continue-from nil) (if (save-current-buffer (set-buffer ...) org-element--cache-map-statistics) (progn (setq before-time ...) (setq result ...) (setq predicate-time ...) (if ... ... ...)) (setq result (cons ... result)) (if (car result) (progn ...))) (setq last-match (car result)) (if org-element-cache-map-continue-from (progn (goto-char org-element-cache-map-continue-from))) (if (> (point) start) (progn (let ... ...) (if ... ...))) (if (car result) nil (car-safe (prog1 result ...))))) (if (and (save-current-buffer (set-buffer (or ... ...)) (eq org-element--cache-change-tic (alist-get granularity org-element--cache-gapless))) (eq (progn (setq tmpnext-start nil) (if ... ... ...) (setq tmpparent data) (catch :exit ... ...) tmpnext-start) start)) (progn (setq start nil))) (if (and limit-count (>= count-predicate-calls-match limit-count)) (progn (progn (setq continue-flag t) (setq node nil)))) (if start (progn (progn (save-current-buffer (set-buffer ...) (if org-element--cache-sync-requests ...)) (if restrict-elements (progn ... ... tmpelement) (org-element--parse-to ...))))))) (if (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) (and (eq modified-tic org-element--cache-change-tic) (eq cache-size (save-current-buffer (set-buffer (or ... ...)) (if (memq granularity ...) org-element--headline-cache-size org-element--cache-size))))) nil (setq start nil) (let ((data nil)) (let ((saved-match-data (match-data))) (unwind-protect (progn (if (or ... ...) (if ... nil ... ... ...) (progn ... ...))) (set-match-data saved-match-data t)))) (if (and start (<= start (org-element-begin data)) (not org-element-cache-map-continue-from)) (progn (goto-char start) (setq data (progn (save-current-buffer (set-buffer ...) (if org-element--cache-sync-requests ...)) (if restrict-elements (progn ... ... tmpelement) (org-element--parse-to ...)))) (if data (progn (goto-char (progn ... ... ... ... tmpnext-start)) (let (...) (unwind-protect ... ...)))))) (org-element-at-point to-pos) (if node (progn (org-element-at-point (point-max)) (progn (setq node (save-current-buffer (set-buffer ...) (if ... ... ...))) (setq stack (list nil)) (setq leftp t) (setq continue-flag t))))) (if (let ((idx (or 9 9))) (let* ((parray (and t (and idx ...)))) (if parray (let* ((val ...)) (if (eq val ...) 'nil (let ... val))) (let* ((val ...)) (cond (... ...) (... ...) (t ...)))))) (setq prev data) (setq prev nil)))
(if (or (not start) (= (org-element-begin data) start)) (progn (setq modified-tic (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) org-element--cache-change-tic)) (setq cache-size (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) (if (memq granularity '(headline headline+inlinetask)) org-element--headline-cache-size org-element--cache-size))) (if (if last-match next-re fail-re) (progn (goto-char (org-element-begin data)) (let ((saved-match-data (match-data))) (unwind-protect (progn (if ... ... ...)) (set-match-data saved-match-data t))))) (if (and (or (not start) (eq (org-element-begin data) start)) (< (org-element-begin data) to-pos) (not continue-flag)) (progn (setq start (progn (setq tmpnext-start nil) (if (memq granularity ...) (setq tmpnext-start ...) (setq tmpnext-start ...)) (setq tmpparent data) (catch :exit (if ... ...) (while ... ...)) tmpnext-start)) (goto-char start) (save-excursion (if (and next-element-re (not ...)) (progn (let ... ...)))) (if (or (not restrict-elements) (org-element-type-p data restrict-elements)) (progn (setq org-element-cache-map-continue-from nil) (if (save-current-buffer ... org-element--cache-map-statistics) (progn ... ... ... ...) (setq result ...) (if ... ...)) (setq last-match (car result)) (if org-element-cache-map-continue-from (progn ...)) (if (> ... start) (progn ... ...)) (if (car result) nil (car-safe ...)))) (if (and (save-current-buffer (set-buffer ...) (eq org-element--cache-change-tic ...)) (eq (progn ... ... ... ... tmpnext-start) start)) (progn (setq start nil))) (if (and limit-count (>= count-predicate-calls-match limit-count)) (progn (progn (setq continue-flag t) (setq node nil)))) (if start (progn (progn (save-current-buffer ... ...) (if restrict-elements ... ...)))))) (if (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) (and (eq modified-tic org-element--cache-change-tic) (eq cache-size (save-current-buffer (set-buffer ...) (if ... org-element--headline-cache-size org-element--cache-size))))) nil (setq start nil) (let ((data nil)) (let ((saved-match-data (match-data))) (unwind-protect (progn (if ... ... ...)) (set-match-data saved-match-data t)))) (if (and start (<= start (org-element-begin data)) (not org-element-cache-map-continue-from)) (progn (goto-char start) (setq data (progn (save-current-buffer ... ...) (if restrict-elements ... ...))) (if data (progn (goto-char ...) (let ... ...))))) (org-element-at-point to-pos) (if node (progn (org-element-at-point (point-max)) (progn (setq node (save-current-buffer ... ...)) (setq stack (list nil)) (setq leftp t) (setq continue-flag t))))) (if (let ((idx (or 9 9))) (let* ((parray (and t ...))) (if parray (let* (...) (if ... ... ...)) (let* (...) (cond ... ... ...))))) (setq prev data) (setq prev nil))) (if (let* ((node (org-element--parse-to start))) (memq (org-element-type node t) '(plain-list table))) (org-element--parse-to (1+ start))) (if node (progn (org-element-at-point (point-max)) (progn (setq node (save-current-buffer (set-buffer (or ... ...)) (if (memq granularity ...) (org-element--headline-cache-root) (org-element--cache-root)))) (setq stack (list nil)) (setq leftp t) (setq continue-flag t)))))
(if (or (and start (< (org-element-begin data) start)) (and prev (not (org-element--cache-key-less-p (org-element--cache-key prev) (org-element--cache-key data))))) nil (if (or (not start) (= (org-element-begin data) start)) (progn (setq modified-tic (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) org-element--cache-change-tic)) (setq cache-size (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) (if (memq granularity '...) org-element--headline-cache-size org-element--cache-size))) (if (if last-match next-re fail-re) (progn (goto-char (org-element-begin data)) (let ((saved-match-data ...)) (unwind-protect (progn ...) (set-match-data saved-match-data t))))) (if (and (or (not start) (eq (org-element-begin data) start)) (< (org-element-begin data) to-pos) (not continue-flag)) (progn (setq start (progn (setq tmpnext-start nil) (if ... ... ...) (setq tmpparent data) (catch :exit ... ...) tmpnext-start)) (goto-char start) (save-excursion (if (and next-element-re ...) (progn ...))) (if (or (not restrict-elements) (org-element-type-p data restrict-elements)) (progn (setq org-element-cache-map-continue-from nil) (if ... ... ... ...) (setq last-match ...) (if org-element-cache-map-continue-from ...) (if ... ...) (if ... nil ...))) (if (and (save-current-buffer ... ...) (eq ... start)) (progn (setq start nil))) (if (and limit-count (>= count-predicate-calls-match limit-count)) (progn (progn ... ...))) (if start (progn (progn ... ...))))) (if (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) (and (eq modified-tic org-element--cache-change-tic) (eq cache-size (save-current-buffer ... ...)))) nil (setq start nil) (let ((data nil)) (let ((saved-match-data ...)) (unwind-protect (progn ...) (set-match-data saved-match-data t)))) (if (and start (<= start (org-element-begin data)) (not org-element-cache-map-continue-from)) (progn (goto-char start) (setq data (progn ... ...)) (if data (progn ... ...)))) (org-element-at-point to-pos) (if node (progn (org-element-at-point (point-max)) (progn (setq node ...) (setq stack ...) (setq leftp t) (setq continue-flag t))))) (if (let ((idx (or 9 9))) (let* ((parray ...)) (if parray (let* ... ...) (let* ... ...)))) (setq prev data) (setq prev nil))) (if (let* ((node (org-element--parse-to start))) (memq (org-element-type node t) '(plain-list table))) (org-element--parse-to (1+ start))) (if node (progn (org-element-at-point (point-max)) (progn (setq node (save-current-buffer (set-buffer ...) (if ... ... ...))) (setq stack (list nil)) (setq leftp t) (setq continue-flag t))))))
(if (and leftp (progn (progn (aref node 0))) (or (not prev) (not (org-element--cache-key-less-p (org-element--cache-key data) (org-element--cache-key prev)))) (or (not start) (not (> start (org-element-begin data))))) (progn (setq stack (cons node stack)) (setq node (progn (progn (aref node 0))))) (if (or (and start (< (org-element-begin data) start)) (and prev (not (org-element--cache-key-less-p (org-element--cache-key prev) (org-element--cache-key data))))) nil (if (or (not start) (= (org-element-begin data) start)) (progn (setq modified-tic (save-current-buffer (set-buffer (or ... ...)) org-element--cache-change-tic)) (setq cache-size (save-current-buffer (set-buffer (or ... ...)) (if (memq granularity ...) org-element--headline-cache-size org-element--cache-size))) (if (if last-match next-re fail-re) (progn (goto-char (org-element-begin data)) (let (...) (unwind-protect ... ...)))) (if (and (or (not start) (eq ... start)) (< (org-element-begin data) to-pos) (not continue-flag)) (progn (setq start (progn ... ... ... ... tmpnext-start)) (goto-char start) (save-excursion (if ... ...)) (if (or ... ...) (progn ... ... ... ... ... ...)) (if (and ... ...) (progn ...)) (if (and limit-count ...) (progn ...)) (if start (progn ...)))) (if (save-current-buffer (set-buffer (or ... ...)) (and (eq modified-tic org-element--cache-change-tic) (eq cache-size ...))) nil (setq start nil) (let ((data nil)) (let (...) (unwind-protect ... ...))) (if (and start (<= start ...) (not org-element-cache-map-continue-from)) (progn (goto-char start) (setq data ...) (if data ...))) (org-element-at-point to-pos) (if node (progn (org-element-at-point ...) (progn ... ... ... ...)))) (if (let ((idx ...)) (let* (...) (if parray ... ...))) (setq prev data) (setq prev nil))) (if (let* ((node (org-element--parse-to start))) (memq (org-element-type node t) '(plain-list table))) (org-element--parse-to (1+ start))) (if node (progn (org-element-at-point (point-max)) (progn (setq node (save-current-buffer ... ...)) (setq stack (list nil)) (setq leftp t) (setq continue-flag t)))))) (if continue-flag (setq continue-flag nil) (setq node (if (and (car stack) (or (and start (< ... start)) (and prev (org-element--cache-key-less-p ... ...)))) (progn (setq leftp nil) (car-safe (prog1 stack (setq stack ...)))) (if (setq leftp (progn (progn ...))) (progn (progn (aref node 1))) (car-safe (prog1 stack (setq stack ...))))))))
(while node (setq data (progn (progn (aref node 2)))) (if (and leftp (progn (progn (aref node 0))) (or (not prev) (not (org-element--cache-key-less-p (org-element--cache-key data) (org-element--cache-key prev)))) (or (not start) (not (> start (org-element-begin data))))) (progn (setq stack (cons node stack)) (setq node (progn (progn (aref node 0))))) (if (or (and start (< (org-element-begin data) start)) (and prev (not (org-element--cache-key-less-p (org-element--cache-key prev) (org-element--cache-key data))))) nil (if (or (not start) (= (org-element-begin data) start)) (progn (setq modified-tic (save-current-buffer (set-buffer ...) org-element--cache-change-tic)) (setq cache-size (save-current-buffer (set-buffer ...) (if ... org-element--headline-cache-size org-element--cache-size))) (if (if last-match next-re fail-re) (progn (goto-char ...) (let ... ...))) (if (and (or ... ...) (< ... to-pos) (not continue-flag)) (progn (setq start ...) (goto-char start) (save-excursion ...) (if ... ...) (if ... ...) (if ... ...) (if start ...))) (if (save-current-buffer (set-buffer ...) (and ... ...)) nil (setq start nil) (let (...) (let ... ...)) (if (and start ... ...) (progn ... ... ...)) (org-element-at-point to-pos) (if node (progn ... ...))) (if (let (...) (let* ... ...)) (setq prev data) (setq prev nil))) (if (let* ((node ...)) (memq (org-element-type node t) '...)) (org-element--parse-to (1+ start))) (if node (progn (org-element-at-point (point-max)) (progn (setq node ...) (setq stack ...) (setq leftp t) (setq continue-flag t)))))) (if continue-flag (setq continue-flag nil) (setq node (if (and (car stack) (or (and start ...) (and prev ...))) (progn (setq leftp nil) (car-safe (prog1 stack ...))) (if (setq leftp (progn ...)) (progn (progn ...)) (car-safe (prog1 stack ...))))))))
(if (and start (>= start to-pos)) nil (while node (setq data (progn (progn (aref node 2)))) (if (and leftp (progn (progn (aref node 0))) (or (not prev) (not (org-element--cache-key-less-p (org-element--cache-key data) (org-element--cache-key prev)))) (or (not start) (not (> start (org-element-begin data))))) (progn (setq stack (cons node stack)) (setq node (progn (progn (aref node 0))))) (if (or (and start (< (org-element-begin data) start)) (and prev (not (org-element--cache-key-less-p ... ...)))) nil (if (or (not start) (= (org-element-begin data) start)) (progn (setq modified-tic (save-current-buffer ... org-element--cache-change-tic)) (setq cache-size (save-current-buffer ... ...)) (if (if last-match next-re fail-re) (progn ... ...)) (if (and ... ... ...) (progn ... ... ... ... ... ... ...)) (if (save-current-buffer ... ...) nil (setq start nil) (let ... ...) (if ... ...) (org-element-at-point to-pos) (if node ...)) (if (let ... ...) (setq prev data) (setq prev nil))) (if (let* (...) (memq ... ...)) (org-element--parse-to (1+ start))) (if node (progn (org-element-at-point ...) (progn ... ... ... ...))))) (if continue-flag (setq continue-flag nil) (setq node (if (and (car stack) (or ... ...)) (progn (setq leftp nil) (car-safe ...)) (if (setq leftp ...) (progn ...) (car-safe ...))))))))
(let* ((start (and from-pos (progn (goto-char from-pos) (org-element-begin (progn (save-current-buffer ... ...) (if restrict-elements ... ...)))))) (prev after-element) (node (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil (current-buffer)))) (if (memq granularity '(headline headline+inlinetask)) (org-element--headline-cache-root) (org-element--cache-root)))) data (stack (list nil)) (leftp t) result (last-match t) continue-flag (next-element-re (let* ((pcase-0 #'(lambda nil ...))) (cond ((eq granularity 'headline) (funcall pcase-0)) ((equal '... restrict-elements) (funcall pcase-0)) ((eq granularity 'headline+inlinetask) (let nil (cons ... ...))) (t 'nil)))) (next-re (if (and next-re (string= next-re (or (car-safe next-element-re) next-element-re))) nil next-re)) (fail-re (if (and fail-re (string= fail-re (or (car-safe next-element-re) next-element-re))) nil fail-re)) (restrict-elements (or restrict-elements (cond ((eq granularity 'headline) (let nil '...)) ((eq granularity 'headline+inlinetask) (let nil '...)) ((eq granularity 'greater-element) (let nil org-element-greater-elements)) (t 'nil)))) (time (float-time)) (predicate-time 0) (pre-process-time 0) (re-search-time 0) (count-predicate-calls-match 0) (count-predicate-calls-fail 0) cache-size before-time modified-tic) (goto-char (or start (point-min))) (let ((saved-match-data (match-data))) (unwind-protect (progn (if (or (not next-element-re) (if org-element--cache-map-statistics (progn ... ...) (re-search-forward ... nil ...))) (if (or (< ... ...) (and data ...)) nil (if (cdr-safe next-element-re) (setq start ...) (setq start ...)) (if (>= start to-pos) (progn ...)) (if (eq start -1) (progn ...))) (progn (setq continue-flag t) (setq node nil)))) (set-match-data saved-match-data t))) (if (and start (>= start to-pos)) nil (while node (setq data (progn (progn (aref node 2)))) (if (and leftp (progn (progn (aref node 0))) (or (not prev) (not (org-element--cache-key-less-p ... ...))) (or (not start) (not (> start ...)))) (progn (setq stack (cons node stack)) (setq node (progn (progn ...)))) (if (or (and start (< ... start)) (and prev (not ...))) nil (if (or (not start) (= ... start)) (progn (setq modified-tic ...) (setq cache-size ...) (if ... ...) (if ... ...) (if ... nil ... ... ... ... ...) (if ... ... ...)) (if (let* ... ...) (org-element--parse-to ...)) (if node (progn ... ...)))) (if continue-flag (setq continue-flag nil) (setq node (if (and ... ...) (progn ... ...) (if ... ... ...))))))) (if (and org-element--cache-map-statistics (or (not org-element--cache-map-statistics-threshold) (> (- (float-time) time) org-element--cache-map-statistics-threshold))) (progn (message "Mapped over elements in %S. %d/%d predicate matche..." (current-buffer) count-predicate-calls-match (+ count-predicate-calls-match count-predicate-calls-fail) (- (float-time) time) pre-process-time predicate-time re-search-time granularity restrict-elements next-re fail-re from-pos to-pos limit-count after-element))) (nreverse result))
(save-restriction (if narrow nil (widen)) (org-element-at-point to-pos) (let* ((start (and from-pos (progn (goto-char from-pos) (org-element-begin (progn ... ...))))) (prev after-element) (node (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) (if (memq granularity '...) (org-element--headline-cache-root) (org-element--cache-root)))) data (stack (list nil)) (leftp t) result (last-match t) continue-flag (next-element-re (let* ((pcase-0 #'...)) (cond ((eq granularity ...) (funcall pcase-0)) ((equal ... restrict-elements) (funcall pcase-0)) ((eq granularity ...) (let nil ...)) (t 'nil)))) (next-re (if (and next-re (string= next-re (or ... next-element-re))) nil next-re)) (fail-re (if (and fail-re (string= fail-re (or ... next-element-re))) nil fail-re)) (restrict-elements (or restrict-elements (cond ((eq granularity ...) (let nil ...)) ((eq granularity ...) (let nil ...)) ((eq granularity ...) (let nil org-element-greater-elements)) (t 'nil)))) (time (float-time)) (predicate-time 0) (pre-process-time 0) (re-search-time 0) (count-predicate-calls-match 0) (count-predicate-calls-fail 0) cache-size before-time modified-tic) (goto-char (or start (point-min))) (let ((saved-match-data (match-data))) (unwind-protect (progn (if (or (not next-element-re) (if org-element--cache-map-statistics ... ...)) (if (or ... ...) nil (if ... ... ...) (if ... ...) (if ... ...)) (progn (setq continue-flag t) (setq node nil)))) (set-match-data saved-match-data t))) (if (and start (>= start to-pos)) nil (while node (setq data (progn (progn (aref node 2)))) (if (and leftp (progn (progn ...)) (or (not prev) (not ...)) (or (not start) (not ...))) (progn (setq stack (cons node stack)) (setq node (progn ...))) (if (or (and start ...) (and prev ...)) nil (if (or ... ...) (progn ... ... ... ... ... ...) (if ... ...) (if node ...))) (if continue-flag (setq continue-flag nil) (setq node (if ... ... ...)))))) (if (and org-element--cache-map-statistics (or (not org-element--cache-map-statistics-threshold) (> (- (float-time) time) org-element--cache-map-statistics-threshold))) (progn (message "Mapped over elements in %S. %d/%d predicate matche..." (current-buffer) count-predicate-calls-match (+ count-predicate-calls-match count-predicate-calls-fail) (- (float-time) time) pre-process-time predicate-time re-search-time granularity restrict-elements next-re fail-re from-pos to-pos limit-count after-element))) (nreverse result)))
(save-excursion (save-restriction (if narrow nil (widen)) (org-element-at-point to-pos) (let* ((start (and from-pos (progn (goto-char from-pos) (org-element-begin ...)))) (prev after-element) (node (save-current-buffer (set-buffer (or ... ...)) (if (memq granularity ...) (org-element--headline-cache-root) (org-element--cache-root)))) data (stack (list nil)) (leftp t) result (last-match t) continue-flag (next-element-re (let* ((pcase-0 ...)) (cond (... ...) (... ...) (... ...) (t ...)))) (next-re (if (and next-re (string= next-re ...)) nil next-re)) (fail-re (if (and fail-re (string= fail-re ...)) nil fail-re)) (restrict-elements (or restrict-elements (cond (... ...) (... ...) (... ...) (t ...)))) (time (float-time)) (predicate-time 0) (pre-process-time 0) (re-search-time 0) (count-predicate-calls-match 0) (count-predicate-calls-fail 0) cache-size before-time modified-tic) (goto-char (or start (point-min))) (let ((saved-match-data (match-data))) (unwind-protect (progn (if (or ... ...) (if ... nil ... ... ...) (progn ... ...))) (set-match-data saved-match-data t))) (if (and start (>= start to-pos)) nil (while node (setq data (progn (progn ...))) (if (and leftp (progn ...) (or ... ...) (or ... ...)) (progn (setq stack ...) (setq node ...)) (if (or ... ...) nil (if ... ... ... ...)) (if continue-flag (setq continue-flag nil) (setq node ...))))) (if (and org-element--cache-map-statistics (or (not org-element--cache-map-statistics-threshold) (> (- ... time) org-element--cache-map-statistics-threshold))) (progn (message "Mapped over elements in %S. %d/%d predicate matche..." (current-buffer) count-predicate-calls-match (+ count-predicate-calls-match count-predicate-calls-fail) (- (float-time) time) pre-process-time predicate-time re-search-time granularity restrict-elements next-re fail-re from-pos to-pos limit-count after-element))) (nreverse result))))
(let ((gc-cons-threshold 1073741824) tmpnext-start tmpparent tmpelement) (save-excursion (save-restriction (if narrow nil (widen)) (org-element-at-point to-pos) (let* ((start (and from-pos (progn ... ...))) (prev after-element) (node (save-current-buffer (set-buffer ...) (if ... ... ...))) data (stack (list nil)) (leftp t) result (last-match t) continue-flag (next-element-re (let* (...) (cond ... ... ... ...))) (next-re (if (and next-re ...) nil next-re)) (fail-re (if (and fail-re ...) nil fail-re)) (restrict-elements (or restrict-elements (cond ... ... ... ...))) (time (float-time)) (predicate-time 0) (pre-process-time 0) (re-search-time 0) (count-predicate-calls-match 0) (count-predicate-calls-fail 0) cache-size before-time modified-tic) (goto-char (or start (point-min))) (let ((saved-match-data (match-data))) (unwind-protect (progn (if ... ... ...)) (set-match-data saved-match-data t))) (if (and start (>= start to-pos)) nil (while node (setq data (progn ...)) (if (and leftp ... ... ...) (progn ... ...) (if ... nil ...) (if continue-flag ... ...)))) (if (and org-element--cache-map-statistics (or (not org-element--cache-map-statistics-threshold) (> ... org-element--cache-map-statistics-threshold))) (progn (message "Mapped over elements in %S. %d/%d predicate matche..." (current-buffer) count-predicate-calls-match (+ count-predicate-calls-match count-predicate-calls-fail) (- ... time) pre-process-time predicate-time re-search-time granularity restrict-elements next-re fail-re from-pos to-pos limit-count after-element))) (nreverse result)))))
(progn (if (org-element--cache-active-p) nil (error "Cache must be active")) (if (memq granularity '(headline headline+inlinetask greater-element element)) nil (error "Unsupported granularity: %S" granularity)) (if (markerp to-pos) nil (let ((mk (make-marker))) (set-marker mk to-pos) (setq to-pos mk))) (let ((gc-cons-threshold 1073741824) tmpnext-start tmpparent tmpelement) (save-excursion (save-restriction (if narrow nil (widen)) (org-element-at-point to-pos) (let* ((start (and from-pos ...)) (prev after-element) (node (save-current-buffer ... ...)) data (stack (list nil)) (leftp t) result (last-match t) continue-flag (next-element-re (let* ... ...)) (next-re (if ... nil next-re)) (fail-re (if ... nil fail-re)) (restrict-elements (or restrict-elements ...)) (time (float-time)) (predicate-time 0) (pre-process-time 0) (re-search-time 0) (count-predicate-calls-match 0) (count-predicate-calls-fail 0) cache-size before-time modified-tic) (goto-char (or start (point-min))) (let ((saved-match-data ...)) (unwind-protect (progn ...) (set-match-data saved-match-data t))) (if (and start (>= start to-pos)) nil (while node (setq data ...) (if ... ... ... ...))) (if (and org-element--cache-map-statistics (or ... ...)) (progn (message "Mapped over elements in %S. %d/%d predicate matche..." ... count-predicate-calls-match ... ... pre-process-time predicate-time re-search-time granularity restrict-elements next-re fail-re from-pos to-pos limit-count after-element))) (nreverse result))))))
(if (org-element--cache-active-p) (progn (if (org-element--cache-active-p) nil (error "Cache must be active")) (if (memq granularity '(headline headline+inlinetask greater-element element)) nil (error "Unsupported granularity: %S" granularity)) (if (markerp to-pos) nil (let ((mk (make-marker))) (set-marker mk to-pos) (setq to-pos mk))) (let ((gc-cons-threshold 1073741824) tmpnext-start tmpparent tmpelement) (save-excursion (save-restriction (if narrow nil (widen)) (org-element-at-point to-pos) (let* ((start ...) (prev after-element) (node ...) data (stack ...) (leftp t) result (last-match t) continue-flag (next-element-re ...) (next-re ...) (fail-re ...) (restrict-elements ...) (time ...) (predicate-time 0) (pre-process-time 0) (re-search-time 0) (count-predicate-calls-match 0) (count-predicate-calls-fail 0) cache-size before-time modified-tic) (goto-char (or start ...)) (let (...) (unwind-protect ... ...)) (if (and start ...) nil (while node ... ...)) (if (and org-element--cache-map-statistics ...) (progn ...)) (nreverse result)))))) (let ((--buffer (current-buffer)) (--old-state (save-current-buffer (set-buffer (or (buffer-base-buffer nil) (or nil ...))) (mapcar #'symbol-value org-element--cache-variables))) (org-element-use-cache t)) (unwind-protect (progn (org-element-cache-reset) (if (org-element--cache-active-p) nil (error "Cache must be active")) (if (memq granularity '(headline headline+inlinetask greater-element element)) nil (error "Unsupported granularity: %S" granularity)) (if (markerp to-pos) nil (let ((mk ...)) (set-marker mk to-pos) (setq to-pos mk))) (let ((gc-cons-threshold 1073741824) tmpnext-start tmpparent tmpelement) (save-excursion (save-restriction (if narrow nil ...) (org-element-at-point to-pos) (let* ... ... ... ... ... ...))))) (cl-mapc #'(lambda (var values) (save-current-buffer (set-buffer ...) (set var values))) org-element--cache-variables --old-state))))
(progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '(:granularity :restrict-elements :next-re :fail-re :from-pos :to-pos :after-element :limit-count :narrow :allow-other-keys)) (if (cdr --cl-keys--) nil (error "Missing argument for %s" (car --cl-keys--))) (setq --cl-keys-- (cdr (cdr --cl-keys--)))) ((car (cdr (memq ... --cl-rest--))) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:granularity :rest..." (car --cl-keys--)))))) (if (org-element--cache-active-p) (progn (if (org-element--cache-active-p) nil (error "Cache must be active")) (if (memq granularity '(headline headline+inlinetask greater-element element)) nil (error "Unsupported granularity: %S" granularity)) (if (markerp to-pos) nil (let ((mk (make-marker))) (set-marker mk to-pos) (setq to-pos mk))) (let ((gc-cons-threshold 1073741824) tmpnext-start tmpparent tmpelement) (save-excursion (save-restriction (if narrow nil (widen)) (org-element-at-point to-pos) (let* (... ... ... data ... ... result ... continue-flag ... ... ... ... ... ... ... ... ... ... cache-size before-time modified-tic) (goto-char ...) (let ... ...) (if ... nil ...) (if ... ...) (nreverse result)))))) (let ((--buffer (current-buffer)) (--old-state (save-current-buffer (set-buffer (or ... ...)) (mapcar #'symbol-value org-element--cache-variables))) (org-element-use-cache t)) (unwind-protect (progn (org-element-cache-reset) (if (org-element--cache-active-p) nil (error "Cache must be active")) (if (memq granularity '...) nil (error "Unsupported granularity: %S" granularity)) (if (markerp to-pos) nil (let (...) (set-marker mk to-pos) (setq to-pos mk))) (let ((gc-cons-threshold 1073741824) tmpnext-start tmpparent tmpelement) (save-excursion (save-restriction ... ... ...)))) (cl-mapc #'(lambda (var values) (save-current-buffer ... ...)) org-element--cache-variables --old-state)))))
(let* ((granularity (car (cdr (or (plist-member --cl-rest-- ':granularity) '(nil headline+inlinetask))))) (restrict-elements (car (cdr (plist-member --cl-rest-- ':restrict-elements)))) (next-re (car (cdr (plist-member --cl-rest-- ':next-re)))) (fail-re (car (cdr (plist-member --cl-rest-- ':fail-re)))) (from-pos (car (cdr (plist-member --cl-rest-- ':from-pos)))) (to-pos (car (cdr (or (plist-member --cl-rest-- ':to-pos) (list nil (point-max-marker)))))) (after-element (car (cdr (plist-member --cl-rest-- ':after-element)))) (limit-count (car (cdr (plist-member --cl-rest-- ':limit-count)))) (narrow (car (cdr (plist-member --cl-rest-- ':narrow))))) (progn (let ((--cl-keys-- --cl-rest--)) (while --cl-keys-- (cond ((memq (car --cl-keys--) '...) (if (cdr --cl-keys--) nil (error "Missing argument for %s" ...)) (setq --cl-keys-- (cdr ...))) ((car (cdr ...)) (setq --cl-keys-- nil)) (t (error "Keyword argument %s not one of (:granularity :rest..." (car --cl-keys--)))))) (if (org-element--cache-active-p) (progn (if (org-element--cache-active-p) nil (error "Cache must be active")) (if (memq granularity '(headline headline+inlinetask greater-element element)) nil (error "Unsupported granularity: %S" granularity)) (if (markerp to-pos) nil (let ((mk ...)) (set-marker mk to-pos) (setq to-pos mk))) (let ((gc-cons-threshold 1073741824) tmpnext-start tmpparent tmpelement) (save-excursion (save-restriction (if narrow nil ...) (org-element-at-point to-pos) (let* ... ... ... ... ... ...))))) (let ((--buffer (current-buffer)) (--old-state (save-current-buffer (set-buffer ...) (mapcar ... org-element--cache-variables))) (org-element-use-cache t)) (unwind-protect (progn (org-element-cache-reset) (if (org-element--cache-active-p) nil (error "Cache must be active")) (if (memq granularity ...) nil (error "Unsupported granularity: %S" granularity)) (if (markerp to-pos) nil (let ... ... ...)) (let (... tmpnext-start tmpparent tmpelement) (save-excursion ...))) (cl-mapc #'(lambda ... ...) org-element--cache-variables --old-state))))))
org-element-cache-map((closure ((scheduled-items) (deadline-pos) (current . 739170) (todayp . t) (today . 739170) (regexp . "\\<SCHEDULED: *<\\([^>]+\\)>") (props org-not-done-regexp "\\(D\\(?:EFER\\|OING\\)\\|HABIT\\|PROJECT\\|T\\(?:ASK\\|ODO..." org-todo-regexp "\\(ABORTED\\|C\\(?:ANCELED\\|OMPLETE\\)\\|D\\(?:EFER\\|O\\(..." org-complex-heading-regexp "^\\(\\*+\\)\\(?: +\\(ABORTED\\|C\\(?:ANCELED\\|OMPLETE\\)\\|..." done-face org-agenda-done mouse-face highlight help-echo "mouse-2 or RET jump to Org file ~/org/OSS.org") (with-hour)) (el) (if (and (org-element--property :scheduled el nil nil) (memq (org-element--property :type (org-element--property :scheduled el nil nil) nil nil) '(diary active active-range)) (or (not with-hour) (org-element--property :hour-start (org-element--property :scheduled el nil nil) nil nil) (org-element--property :hour-end (org-element--property :scheduled el nil nil) nil nil))) (progn (goto-char (org-element-contents-begin el)) (catch :skip (org-agenda-skip el) (let* ((s ...) (pos ...) (todo-state ...) (donep ...) (sexp? ...) (schedule ...) (repeat ...) (diff ...) (warntime ...) (pastschedp ...) (futureschedp ...) (habitp ...) (max-delay-days ...) (delay-days ...)) (if (and todayp habitp ...) nil (if ... ...)) (if (and donep ...) (progn ...)) (if (or org-agenda-skip-scheduled-repeats-after-deadline ...) (progn ...)) (if (cond ... ... ... ...) (progn ...)) (if (and habitp ...) (progn ...)) (save-excursion (goto-char ...) (let* ... ... ...))))))) :next-re "\\<SCHEDULED: *<\\([^>]+\\)>" :fail-re "\\<SCHEDULED: *<\\([^>]+\\)>" :narrow t)
(let* ((props (list 'org-not-done-regexp org-not-done-regexp 'org-todo-regexp org-todo-regexp 'org-complex-heading-regexp org-complex-heading-regexp 'done-face 'org-agenda-done 'mouse-face 'highlight 'help-echo (format "mouse-2 or RET jump to Org file %s" (abbreviate-file-name buffer-file-name)))) (regexp (if with-hour org-scheduled-time-hour-regexp org-scheduled-time-regexp)) (today (org-today)) (todayp (org-agenda-today-p date)) (current (calendar-absolute-from-gregorian date)) (deadline-pos (mapcar #'(lambda (d) (let (...) (and m ...))) deadlines)) scheduled-items) (org-element-cache-map #'(lambda (el) (if (and (org-element--property :scheduled el nil nil) (memq (org-element--property :type ... nil nil) '...) (or (not with-hour) (org-element--property :hour-start ... nil nil) (org-element--property :hour-end ... nil nil))) (progn (goto-char (org-element-contents-begin el)) (catch :skip (org-agenda-skip el) (let* ... ... ... ... ... ... ...))))) :next-re regexp :fail-re regexp :narrow t) (nreverse scheduled-items))
org-agenda-get-scheduled(nil)
(cons (org-agenda-get-scheduled deadlines) results)
(setq results (cons (org-agenda-get-scheduled deadlines) results))
(let nil (setq results (cons (org-agenda-get-scheduled deadlines) results)))
(cond ((eq arg :todo) (if (org-agenda-today-p date) (let nil (setq results (cons (org-agenda-get-todos) results))))) ((eq arg :timestamp) (let nil (setq results (cons (org-agenda-get-blocks) results)) (setq results (cons (org-agenda-get-timestamps deadlines) results)))) ((eq arg :sexp) (let nil (setq results (cons (org-agenda-get-sexps) results)))) ((eq arg :scheduled) (let nil (setq results (cons (org-agenda-get-scheduled deadlines) results)))) ((eq arg :scheduled*) (let nil (setq results (cons (org-agenda-get-scheduled deadlines t) results)))) ((eq arg :closed) (let nil (setq results (cons (org-agenda-get-progress) results)))) ((eq arg :deadline) (let nil (setq deadlines (org-agenda-get-deadlines)) (setq results (cons deadlines results)))) ((eq arg :deadline*) (let nil (setq deadlines (org-agenda-get-deadlines t)) (setq results (cons deadlines results)))))
(let ((arg (car tail))) (cond ((eq arg :todo) (if (org-agenda-today-p date) (let nil (setq results (cons (org-agenda-get-todos) results))))) ((eq arg :timestamp) (let nil (setq results (cons (org-agenda-get-blocks) results)) (setq results (cons (org-agenda-get-timestamps deadlines) results)))) ((eq arg :sexp) (let nil (setq results (cons (org-agenda-get-sexps) results)))) ((eq arg :scheduled) (let nil (setq results (cons (org-agenda-get-scheduled deadlines) results)))) ((eq arg :scheduled*) (let nil (setq results (cons (org-agenda-get-scheduled deadlines t) results)))) ((eq arg :closed) (let nil (setq results (cons (org-agenda-get-progress) results)))) ((eq arg :deadline) (let nil (setq deadlines (org-agenda-get-deadlines)) (setq results (cons deadlines results)))) ((eq arg :deadline*) (let nil (setq deadlines (org-agenda-get-deadlines t)) (setq results (cons deadlines results))))) (setq tail (cdr tail)))
(while tail (let ((arg (car tail))) (cond ((eq arg :todo) (if (org-agenda-today-p date) (let nil (setq results (cons ... results))))) ((eq arg :timestamp) (let nil (setq results (cons (org-agenda-get-blocks) results)) (setq results (cons (org-agenda-get-timestamps deadlines) results)))) ((eq arg :sexp) (let nil (setq results (cons (org-agenda-get-sexps) results)))) ((eq arg :scheduled) (let nil (setq results (cons (org-agenda-get-scheduled deadlines) results)))) ((eq arg :scheduled*) (let nil (setq results (cons (org-agenda-get-scheduled deadlines t) results)))) ((eq arg :closed) (let nil (setq results (cons (org-agenda-get-progress) results)))) ((eq arg :deadline) (let nil (setq deadlines (org-agenda-get-deadlines)) (setq results (cons deadlines results)))) ((eq arg :deadline*) (let nil (setq deadlines (org-agenda-get-deadlines t)) (setq results (cons deadlines results))))) (setq tail (cdr tail))))
(let ((tail args)) (while tail (let ((arg (car tail))) (cond ((eq arg :todo) (if (org-agenda-today-p date) (let nil (setq results ...)))) ((eq arg :timestamp) (let nil (setq results (cons ... results)) (setq results (cons ... results)))) ((eq arg :sexp) (let nil (setq results (cons ... results)))) ((eq arg :scheduled) (let nil (setq results (cons ... results)))) ((eq arg :scheduled*) (let nil (setq results (cons ... results)))) ((eq arg :closed) (let nil (setq results (cons ... results)))) ((eq arg :deadline) (let nil (setq deadlines (org-agenda-get-deadlines)) (setq results (cons deadlines results)))) ((eq arg :deadline*) (let nil (setq deadlines (org-agenda-get-deadlines t)) (setq results (cons deadlines results))))) (setq tail (cdr tail)))) (apply #'nconc (nreverse results)))
(let* ((date date)) (let ((tail args)) (while tail (let ((arg (car tail))) (cond ((eq arg :todo) (if (org-agenda-today-p date) (let nil ...))) ((eq arg :timestamp) (let nil (setq results ...) (setq results ...))) ((eq arg :sexp) (let nil (setq results ...))) ((eq arg :scheduled) (let nil (setq results ...))) ((eq arg :scheduled*) (let nil (setq results ...))) ((eq arg :closed) (let nil (setq results ...))) ((eq arg :deadline) (let nil (setq deadlines ...) (setq results ...))) ((eq arg :deadline*) (let nil (setq deadlines ...) (setq results ...)))) (setq tail (cdr tail)))) (apply #'nconc (nreverse results))))
(progn (with-no-warnings (defvar date)) (let* ((date date)) (let ((tail args)) (while tail (let ((arg (car tail))) (cond ((eq arg :todo) (if ... ...)) ((eq arg :timestamp) (let nil ... ...)) ((eq arg :sexp) (let nil ...)) ((eq arg :scheduled) (let nil ...)) ((eq arg :scheduled*) (let nil ...)) ((eq arg :closed) (let nil ...)) ((eq arg :deadline) (let nil ... ...)) ((eq arg :deadline*) (let nil ... ...))) (setq tail (cdr tail)))) (apply #'nconc (nreverse results)))))
(let ((case-fold-search nil) results deadlines) (progn (with-no-warnings (defvar date)) (let* ((date date)) (let ((tail args)) (while tail (let ((arg ...)) (cond (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...) (... ...)) (setq tail (cdr tail)))) (apply #'nconc (nreverse results))))))
(save-restriction (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq args (org-uniquify (or args org-agenda-entry-types))) (if (and (memq :scheduled args) (memq :scheduled* args)) (progn (setq args (delq :scheduled* args)))) (cond ((memq :deadline args) (setq args (cons :deadline (delq :deadline (delq :deadline* args))))) ((memq :deadline* args) (setq args (cons :deadline* (delq :deadline* args))))) (let ((case-fold-search nil) results deadlines) (progn (with-no-warnings (defvar date)) (let* ((date date)) (let ((tail args)) (while tail (let (...) (cond ... ... ... ... ... ... ... ...) (setq tail ...))) (apply #'nconc (nreverse results)))))))
(save-excursion (save-restriction (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq args (org-uniquify (or args org-agenda-entry-types))) (if (and (memq :scheduled args) (memq :scheduled* args)) (progn (setq args (delq :scheduled* args)))) (cond ((memq :deadline args) (setq args (cons :deadline (delq :deadline (delq :deadline* args))))) ((memq :deadline* args) (setq args (cons :deadline* (delq :deadline* args))))) (let ((case-fold-search nil) results deadlines) (progn (with-no-warnings (defvar date)) (let* ((date date)) (let ((tail args)) (while tail (let ... ... ...)) (apply #'nconc (nreverse results))))))))
(save-current-buffer (set-buffer buffer) (if (derived-mode-p 'org-mode) nil (error "Agenda file %s is not in Org mode" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (setq org-agenda-current-date date) (save-excursion (save-restriction (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq args (org-uniquify (or args org-agenda-entry-types))) (if (and (memq :scheduled args) (memq :scheduled* args)) (progn (setq args (delq :scheduled* args)))) (cond ((memq :deadline args) (setq args (cons :deadline (delq :deadline ...)))) ((memq :deadline* args) (setq args (cons :deadline* (delq :deadline* args))))) (let ((case-fold-search nil) results deadlines) (progn (with-no-warnings (defvar date)) (let* ((date date)) (let (...) (while tail ...) (apply ... ...))))))))
(if (not buffer) (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) (save-current-buffer (set-buffer buffer) (if (derived-mode-p 'org-mode) nil (error "Agenda file %s is not in Org mode" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (setq org-agenda-current-date date) (save-excursion (save-restriction (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq args (org-uniquify (or args org-agenda-entry-types))) (if (and (memq :scheduled args) (memq :scheduled* args)) (progn (setq args (delq :scheduled* args)))) (cond ((memq :deadline args) (setq args (cons :deadline ...))) ((memq :deadline* args) (setq args (cons :deadline* ...)))) (let ((case-fold-search nil) results deadlines) (progn (with-no-warnings (defvar date)) (let* (...) (let ... ... ...))))))))
(let* ((org-startup-folded nil) (org-startup-align-all-tables nil) (buffer (if (file-exists-p file) (org-get-agenda-file-buffer file) (error "No such file %s" file)))) (if (not buffer) (list (format "ORG-AGENDA-ERROR: No such org-file %s" file)) (save-current-buffer (set-buffer buffer) (if (derived-mode-p 'org-mode) nil (error "Agenda file %s is not in Org mode" file)) (setq org-agenda-buffer (or org-agenda-buffer buffer)) (setq org-agenda-current-date date) (save-excursion (save-restriction (if (eq buffer org-agenda-restrict) (narrow-to-region org-agenda-restrict-begin org-agenda-restrict-end) (widen)) (setq args (org-uniquify (or args org-agenda-entry-types))) (if (and (memq :scheduled args) (memq :scheduled* args)) (progn (setq args ...))) (cond ((memq :deadline args) (setq args ...)) ((memq :deadline* args) (setq args ...))) (let ((case-fold-search nil) results deadlines) (progn (with-no-warnings ...) (let* ... ...))))))))
org-agenda-get-day-entries("/Users/johnw/org/OSS.org" (10 11 2024) :deadline :scheduled :timestamp :sexp)
apply(org-agenda-get-day-entries "/Users/johnw/org/OSS.org" (10 11 2024) (:deadline :scheduled :timestamp :sexp))
(setq rtn (apply #'org-agenda-get-day-entries file date org-agenda-entry-types))
(cond ((memq org-agenda-show-log-scoped '(only clockcheck)) (setq rtn (org-agenda-get-day-entries file date :closed))) (org-agenda-show-log-scoped (setq rtn (apply #'org-agenda-get-day-entries file date (append '(:closed) org-agenda-entry-types)))) (t (setq rtn (apply #'org-agenda-get-day-entries file date org-agenda-entry-types))))
(let ((org-agenda-entry-types org-agenda-entry-types)) (if (member :deadline* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :deadline org-agenda-entry-types)))) (if (member :scheduled* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :scheduled org-agenda-entry-types)))) (if with-hour (progn (if (member :deadline org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :deadline org-agenda-entry-types)) (setq org-agenda-entry-types (cons :deadline* org-agenda-entry-types)))) (if (member :scheduled org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :scheduled org-agenda-entry-types)) (setq org-agenda-entry-types (cons :scheduled* org-agenda-entry-types)))))) (if org-agenda-include-deadlines nil (setq org-agenda-entry-types (delq :deadline* (delq :deadline org-agenda-entry-types)))) (cond ((memq org-agenda-show-log-scoped '(only clockcheck)) (setq rtn (org-agenda-get-day-entries file date :closed))) (org-agenda-show-log-scoped (setq rtn (apply #'org-agenda-get-day-entries file date (append '(:closed) org-agenda-entry-types)))) (t (setq rtn (apply #'org-agenda-get-day-entries file date org-agenda-entry-types)))))
(catch 'nextfile (org-check-agenda-file file) (let ((org-agenda-entry-types org-agenda-entry-types)) (if (member :deadline* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :deadline org-agenda-entry-types)))) (if (member :scheduled* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :scheduled org-agenda-entry-types)))) (if with-hour (progn (if (member :deadline org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :deadline org-agenda-entry-types)) (setq org-agenda-entry-types (cons :deadline* org-agenda-entry-types)))) (if (member :scheduled org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :scheduled org-agenda-entry-types)) (setq org-agenda-entry-types (cons :scheduled* org-agenda-entry-types)))))) (if org-agenda-include-deadlines nil (setq org-agenda-entry-types (delq :deadline* (delq :deadline org-agenda-entry-types)))) (cond ((memq org-agenda-show-log-scoped '(only clockcheck)) (setq rtn (org-agenda-get-day-entries file date :closed))) (org-agenda-show-log-scoped (setq rtn (apply #'org-agenda-get-day-entries file date (append '... org-agenda-entry-types)))) (t (setq rtn (apply #'org-agenda-get-day-entries file date org-agenda-entry-types))))) (setq rtnall (append rtnall rtn)))
(while (setq file (car-safe (prog1 files (setq files (cdr files))))) (catch 'nextfile (org-check-agenda-file file) (let ((org-agenda-entry-types org-agenda-entry-types)) (if (member :deadline* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :deadline org-agenda-entry-types)))) (if (member :scheduled* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :scheduled org-agenda-entry-types)))) (if with-hour (progn (if (member :deadline org-agenda-entry-types) (progn (setq org-agenda-entry-types ...) (setq org-agenda-entry-types ...))) (if (member :scheduled org-agenda-entry-types) (progn (setq org-agenda-entry-types ...) (setq org-agenda-entry-types ...))))) (if org-agenda-include-deadlines nil (setq org-agenda-entry-types (delq :deadline* (delq :deadline org-agenda-entry-types)))) (cond ((memq org-agenda-show-log-scoped '(only clockcheck)) (setq rtn (org-agenda-get-day-entries file date :closed))) (org-agenda-show-log-scoped (setq rtn (apply #'org-agenda-get-day-entries file date (append ... org-agenda-entry-types)))) (t (setq rtn (apply #'org-agenda-get-day-entries file date org-agenda-entry-types))))) (setq rtnall (append rtnall rtn))))
(while (setq d (car-safe (prog1 day-numbers (setq day-numbers (cdr day-numbers))))) (progn (setq date (calendar-gregorian-from-absolute d)) (setq s (point))) (if (or (setq todayp (= d today)) (and (not start-pos) (= d sd))) (setq start-pos (point)) (if (and start-pos (not end-pos)) (progn (setq end-pos (point))))) (progn (setq files thefiles) (setq rtnall nil)) (while (setq file (car-safe (prog1 files (setq files (cdr files))))) (catch 'nextfile (org-check-agenda-file file) (let ((org-agenda-entry-types org-agenda-entry-types)) (if (member :deadline* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :deadline org-agenda-entry-types)))) (if (member :scheduled* org-agenda-entry-types) (progn (setq org-agenda-entry-types (delq :scheduled org-agenda-entry-types)))) (if with-hour (progn (if (member :deadline org-agenda-entry-types) (progn ... ...)) (if (member :scheduled org-agenda-entry-types) (progn ... ...)))) (if org-agenda-include-deadlines nil (setq org-agenda-entry-types (delq :deadline* (delq :deadline org-agenda-entry-types)))) (cond ((memq org-agenda-show-log-scoped '...) (setq rtn (org-agenda-get-day-entries file date :closed))) (org-agenda-show-log-scoped (setq rtn (apply ... file date ...))) (t (setq rtn (apply ... file date org-agenda-entry-types))))) (setq rtnall (append rtnall rtn)))) (if org-agenda-include-diary (progn (let ((org-agenda-search-headline-for-time t)) (require 'diary-lib) (setq rtn (org-get-entries-from-diary date)) (setq rtnall (append rtnall rtn))))) (if (or rtnall org-agenda-show-all-dates) (progn (setq day-cnt (1+ day-cnt)) (insert (if (stringp org-agenda-format-date) (format-time-string org-agenda-format-date (org-time-from-absolute date)) (funcall org-agenda-format-date date)) "\n") (put-text-property s (1- (point)) 'face (org-agenda-get-day-face date)) (put-text-property s (1- (point)) 'org-date-line t) (put-text-property s (1- (point)) 'org-agenda-date-header t) (put-text-property s (1- (point)) 'org-day-cnt day-cnt) (if todayp (progn (put-text-property s (1- (point)) 'org-today t))) (setq rtnall (org-agenda-add-time-grid-maybe rtnall ndays todayp)) (if rtnall (progn (insert (org-agenda-finalize-entries rtnall 'agenda) "\n"))) (put-text-property s (1- (point)) 'day d) (put-text-property s (1- (point)) 'org-day-cnt day-cnt))))
(let* ((span (org-agenda-ndays-to-span (or span org-agenda-span))) (today (org-today)) (sd (or start-day today)) (ndays (org-agenda-span-to-ndays span sd)) (org-agenda-start-on-weekday (and (or (eq ndays 7) (eq ndays 14)) org-agenda-start-on-weekday)) (thefiles (org-agenda-files nil 'ifmode)) (files thefiles) (start (if (or (null org-agenda-start-on-weekday) (< ndays 7)) sd (let* (... ... ...) (- sd ...)))) (day-numbers (list start)) (day-cnt 0) (inhibit-redisplay (not debug-on-error)) (org-agenda-show-log-scoped org-agenda-show-log) s rtn rtnall file date d start-pos end-pos todayp clocktable-start clocktable-end) (setq org-agenda-redo-command (list 'org-agenda-list (list 'quote arg) start-day (list 'quote span) with-hour)) (let ((upper-bound (1- ndays)) (counter 0)) (while (< counter upper-bound) (let ((_ counter)) (setq day-numbers (cons ... day-numbers))) (setq counter (1+ counter)))) (setq day-numbers (nreverse day-numbers)) (progn (setq clocktable-start (car day-numbers)) (setq clocktable-end (1+ (or (org-last day-numbers) 0)))) (set (make-local-variable 'org-starting-day) (car day-numbers)) (set (make-local-variable 'org-arg-loc) arg) (set (make-local-variable 'org-agenda-current-span) (org-agenda-ndays-to-span span)) (if org-agenda-compact-blocks nil (let* ((d1 (car day-numbers)) (d2 (org-last day-numbers)) (w1 (org-days-to-iso-week d1)) (w2 (org-days-to-iso-week d2))) (setq s (point)) (cond ((not org-agenda-overriding-header) (insert ...)) ((equal org-agenda-overriding-header "") nil) ((stringp org-agenda-overriding-header) (insert ... "\n")) ((functionp org-agenda-overriding-header) (insert ...)) (t (user-error "Invalid value for `org-agenda-overridi..." org-agenda-overriding-header)))) (if (> (point) s) (progn (add-text-properties s (1- ...) (list ... ... ... t)) (org-agenda-mark-header-line s)))) (while (setq d (car-safe (prog1 day-numbers (setq day-numbers ...)))) (progn (setq date (calendar-gregorian-from-absolute d)) (setq s (point))) (if (or (setq todayp (= d today)) (and (not start-pos) (= d sd))) (setq start-pos (point)) (if (and start-pos (not end-pos)) (progn (setq end-pos ...)))) (progn (setq files thefiles) (setq rtnall nil)) (while (setq file (car-safe (prog1 files ...))) (catch 'nextfile (org-check-agenda-file file) (let (...) (if ... ...) (if ... ...) (if with-hour ...) (if org-agenda-include-deadlines nil ...) (cond ... ... ...)) (setq rtnall (append rtnall rtn)))) (if org-agenda-include-diary (progn (let (...) (require ...) (setq rtn ...) (setq rtnall ...)))) (if (or rtnall org-agenda-show-all-dates) (progn (setq day-cnt (1+ day-cnt)) (insert (if ... ... ...) "\n") (put-text-property s (1- ...) 'face (org-agenda-get-day-face date)) (put-text-property s (1- ...) 'org-date-line t) (put-text-property s (1- ...) 'org-agenda-date-header t) (put-text-property s (1- ...) 'org-day-cnt day-cnt) (if todayp (progn ...)) (setq rtnall (org-agenda-add-time-grid-maybe rtnall ndays todayp)) (if rtnall (progn ...)) (put-text-property s (1- ...) 'day d) (put-text-property s (1- ...) 'org-day-cnt day-cnt)))) (if (and org-agenda-clockreport-mode clocktable-start) (progn (let ((org-agenda-files ...) (p ...) tbl) (setq p (org-plist-delete p :block)) (setq p (plist-put p :tstart clocktable-start)) (setq p (plist-put p :tend clocktable-end)) (setq p (plist-put p :scope ...)) (setq tbl (apply ... p)) (if org-agenda-clock-report-header (progn ... ...)) (insert tbl)))) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (if (or (not (get-buffer-window org-agenda-buffer-name)) (and (pos-visible-in-window-p (point-min)) (pos-visible-in-window-p (point-max)))) nil (goto-char (1- (point-max))) (recenter -1) (if (not (pos-visible-in-window-p (or start-pos 1))) (progn (goto-char (or start-pos 1)) (recenter 1)))) (goto-char (or start-pos 1)) (add-text-properties (point-min) (point-max) (list 'org-agenda-type 'agenda 'org-last-args (list arg start-day span) 'org-redo-cmd org-agenda-redo-command 'org-series-cmd org-cmd)) (if (eq org-agenda-show-log-scoped 'clockcheck) (progn (org-agenda-show-clocking-issues))) (org-agenda-finalize) (setq buffer-read-only t) (message ""))
(catch 'exit (setq org-agenda-buffer-name (org-agenda--get-buffer-name (and org-agenda-sticky (cond ((and org-keys ...) (format "*Org Agenda(%s:%s)*" org-keys org-match)) (org-keys (format "*Org Agenda(%s)*" org-keys)) (t "*Org Agenda(a)*"))))) (org-agenda-prepare "Day/Week") (setq start-day (or start-day org-agenda-start-day)) (if (stringp start-day) (progn (setq start-day (time-to-days (org-read-date nil t start-day))))) (org-compile-prefix-format 'agenda) (org-set-sorting-strategy 'agenda) (let* ((span (org-agenda-ndays-to-span (or span org-agenda-span))) (today (org-today)) (sd (or start-day today)) (ndays (org-agenda-span-to-ndays span sd)) (org-agenda-start-on-weekday (and (or (eq ndays 7) (eq ndays 14)) org-agenda-start-on-weekday)) (thefiles (org-agenda-files nil 'ifmode)) (files thefiles) (start (if (or (null org-agenda-start-on-weekday) (< ndays 7)) sd (let* (... ... ...) (- sd ...)))) (day-numbers (list start)) (day-cnt 0) (inhibit-redisplay (not debug-on-error)) (org-agenda-show-log-scoped org-agenda-show-log) s rtn rtnall file date d start-pos end-pos todayp clocktable-start clocktable-end) (setq org-agenda-redo-command (list 'org-agenda-list (list 'quote arg) start-day (list 'quote span) with-hour)) (let ((upper-bound (1- ndays)) (counter 0)) (while (< counter upper-bound) (let ((_ counter)) (setq day-numbers (cons ... day-numbers))) (setq counter (1+ counter)))) (setq day-numbers (nreverse day-numbers)) (progn (setq clocktable-start (car day-numbers)) (setq clocktable-end (1+ (or (org-last day-numbers) 0)))) (set (make-local-variable 'org-starting-day) (car day-numbers)) (set (make-local-variable 'org-arg-loc) arg) (set (make-local-variable 'org-agenda-current-span) (org-agenda-ndays-to-span span)) (if org-agenda-compact-blocks nil (let* ((d1 (car day-numbers)) (d2 (org-last day-numbers)) (w1 (org-days-to-iso-week d1)) (w2 (org-days-to-iso-week d2))) (setq s (point)) (cond ((not org-agenda-overriding-header) (insert ...)) ((equal org-agenda-overriding-header "") nil) ((stringp org-agenda-overriding-header) (insert ... "\n")) ((functionp org-agenda-overriding-header) (insert ...)) (t (user-error "Invalid value for `org-agenda-overriding-hea..." org-agenda-overriding-header)))) (if (> (point) s) (progn (add-text-properties s (1- ...) (list ... ... ... t)) (org-agenda-mark-header-line s)))) (while (setq d (car-safe (prog1 day-numbers (setq day-numbers ...)))) (progn (setq date (calendar-gregorian-from-absolute d)) (setq s (point))) (if (or (setq todayp (= d today)) (and (not start-pos) (= d sd))) (setq start-pos (point)) (if (and start-pos (not end-pos)) (progn (setq end-pos ...)))) (progn (setq files thefiles) (setq rtnall nil)) (while (setq file (car-safe (prog1 files ...))) (catch 'nextfile (org-check-agenda-file file) (let (...) (if ... ...) (if ... ...) (if with-hour ...) (if org-agenda-include-deadlines nil ...) (cond ... ... ...)) (setq rtnall (append rtnall rtn)))) (if org-agenda-include-diary (progn (let (...) (require ...) (setq rtn ...) (setq rtnall ...)))) (if (or rtnall org-agenda-show-all-dates) (progn (setq day-cnt (1+ day-cnt)) (insert (if ... ... ...) "\n") (put-text-property s (1- ...) 'face (org-agenda-get-day-face date)) (put-text-property s (1- ...) 'org-date-line t) (put-text-property s (1- ...) 'org-agenda-date-header t) (put-text-property s (1- ...) 'org-day-cnt day-cnt) (if todayp (progn ...)) (setq rtnall (org-agenda-add-time-grid-maybe rtnall ndays todayp)) (if rtnall (progn ...)) (put-text-property s (1- ...) 'day d) (put-text-property s (1- ...) 'org-day-cnt day-cnt)))) (if (and org-agenda-clockreport-mode clocktable-start) (progn (let ((org-agenda-files ...) (p ...) tbl) (setq p (org-plist-delete p :block)) (setq p (plist-put p :tstart clocktable-start)) (setq p (plist-put p :tend clocktable-end)) (setq p (plist-put p :scope ...)) (setq tbl (apply ... p)) (if org-agenda-clock-report-header (progn ... ...)) (insert tbl)))) (goto-char (point-min)) (or org-agenda-multi (org-agenda-fit-window-to-buffer)) (if (or (not (get-buffer-window org-agenda-buffer-name)) (and (pos-visible-in-window-p (point-min)) (pos-visible-in-window-p (point-max)))) nil (goto-char (1- (point-max))) (recenter -1) (if (not (pos-visible-in-window-p (or start-pos 1))) (progn (goto-char (or start-pos 1)) (recenter 1)))) (goto-char (or start-pos 1)) (add-text-properties (point-min) (point-max) (list 'org-agenda-type 'agenda 'org-last-args (list arg start-day span) 'org-redo-cmd org-agenda-redo-command 'org-series-cmd org-cmd)) (if (eq org-agenda-show-log-scoped 'clockcheck) (progn (org-agenda-show-clocking-issues))) (org-agenda-finalize) (setq buffer-read-only t) (message "")))
org-agenda-list(nil)
funcall-interactively(org-agenda-list nil)
call-interactively(org-agenda-list)
(cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (progn (setq type (nth 2 entry)) (setq org-match (eval (nth 3 entry) t)) (setq lprops (nth 4 entry))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name (or ... ...)))) (progn (let* ((syms ...) (vals ...) (body ...) (binds nil)) (while syms (setq binds ...)) (eval (list ... ... ...)))) (let ((inhibit-read-only t)) (add-text-properties (point-min) (point-max) (list 'org-lprops lprops)))) (org-agenda-run-series (nth 1 entry) (cdr (cdr entry))))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable 'org-agenda-custom-commands)) ((equal org-keys "a") (call-interactively 'org-agenda-list)) ((equal org-keys "s") (call-interactively 'org-search-view)) ((equal org-keys "S") (org-call-with-arg 'org-search-view (or arg '(4)))) ((equal org-keys "t") (call-interactively 'org-todo-list)) ((equal org-keys "T") (org-call-with-arg 'org-todo-list (or arg '(4)))) ((equal org-keys "m") (call-interactively 'org-tags-view)) ((equal org-keys "M") (org-call-with-arg 'org-tags-view (or arg '(4)))) ((equal org-keys "e") (call-interactively 'org-store-agenda-views)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook 'post-command-hook #'(lambda nil (if (current-message) nil (let* (... ...) (if note ...)))) t t)) ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects)) ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files)) ((equal org-keys "!") (customize-variable 'org-stuck-projects)) (t (user-error "Invalid agenda key")))
(let* ((org-keys keys) (prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if (equal (buffer-name) org-agenda-buffer-name) '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))) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (bfn (buffer-file-name (buffer-base-buffer))) entry type org-match lprops ans) (if org-agenda-overriding-restriction nil (if org-agenda-keep-restricted-file-list nil (put 'org-agenda-files 'org-restrict nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (if org-keys nil (progn (setq ans (org-agenda-get-restriction-and-command prefix-descriptions)) (setq org-keys (car ans)) (setq restriction (cdr ans)))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name (format "*Org Agenda(%s)*" org-keys)))) (if (and (not org-agenda-overriding-restriction) restriction) (progn (put 'org-agenda-files 'org-restrict (list bfn)) (cond ((eq restriction 'region) (setq org-agenda-restrict (current-buffer)) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction 'subtree) (save-excursion (setq org-agenda-restrict (current-buffer)) (org-back-to-heading t) (move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-end (progn ...)))) ((eq restriction 'buffer) (if (not (buffer-narrowed-p)) (setq org-agenda-restrict t) (setq org-agenda-restrict (current-buffer)) (move-marker org-agenda-restrict-begin (point-min)) (move-marker org-agenda-restrict-end (point-max))))))) (cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (progn (setq type (nth 2 entry)) (setq org-match (eval ... t)) (setq lprops (nth 4 entry))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name ...))) (progn (let* (... ... ... ...) (while syms ...) (eval ...))) (let ((inhibit-read-only t)) (add-text-properties (point-min) (point-max) (list ... lprops)))) (org-agenda-run-series (nth 1 entry) (cdr (cdr entry))))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable 'org-agenda-custom-commands)) ((equal org-keys "a") (call-interactively 'org-agenda-list)) ((equal org-keys "s") (call-interactively 'org-search-view)) ((equal org-keys "S") (org-call-with-arg 'org-search-view (or arg '(4)))) ((equal org-keys "t") (call-interactively 'org-todo-list)) ((equal org-keys "T") (org-call-with-arg 'org-todo-list (or arg '(4)))) ((equal org-keys "m") (call-interactively 'org-tags-view)) ((equal org-keys "M") (org-call-with-arg 'org-tags-view (or arg '(4)))) ((equal org-keys "e") (call-interactively 'org-store-agenda-views)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook 'post-command-hook #'(lambda nil (if (current-message) nil (let* ... ...))) t t)) ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects)) ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files)) ((equal org-keys "!") (customize-variable 'org-stuck-projects)) (t (user-error "Invalid agenda key"))))
(catch 'exit (let* ((org-keys keys) (prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if (equal (buffer-name) org-agenda-buffer-name) 'current-window org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil (mapcar #'(lambda ... ...) org-agenda-custom-commands))) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (bfn (buffer-file-name (buffer-base-buffer))) entry type org-match lprops ans) (if org-agenda-overriding-restriction nil (if org-agenda-keep-restricted-file-list nil (put 'org-agenda-files 'org-restrict nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (if org-keys nil (progn (setq ans (org-agenda-get-restriction-and-command prefix-descriptions)) (setq org-keys (car ans)) (setq restriction (cdr ans)))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name (format "*Org Agenda(%s)*" org-keys)))) (if (and (not org-agenda-overriding-restriction) restriction) (progn (put 'org-agenda-files 'org-restrict (list bfn)) (cond ((eq restriction 'region) (setq org-agenda-restrict (current-buffer)) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction 'subtree) (save-excursion (setq org-agenda-restrict ...) (org-back-to-heading t) (move-marker org-agenda-restrict-begin ...) (move-marker org-agenda-restrict-end ...))) ((eq restriction 'buffer) (if (not ...) (setq org-agenda-restrict t) (setq org-agenda-restrict ...) (move-marker org-agenda-restrict-begin ...) (move-marker org-agenda-restrict-end ...)))))) (cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (progn (setq type ...) (setq org-match ...) (setq lprops ...)) (if org-agenda-sticky (progn ...)) (progn (let* ... ... ...)) (let (...) (add-text-properties ... ... ...))) (org-agenda-run-series (nth 1 entry) (cdr (cdr entry))))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable 'org-agenda-custom-commands)) ((equal org-keys "a") (call-interactively 'org-agenda-list)) ((equal org-keys "s") (call-interactively 'org-search-view)) ((equal org-keys "S") (org-call-with-arg 'org-search-view (or arg '(4)))) ((equal org-keys "t") (call-interactively 'org-todo-list)) ((equal org-keys "T") (org-call-with-arg 'org-todo-list (or arg '(4)))) ((equal org-keys "m") (call-interactively 'org-tags-view)) ((equal org-keys "M") (org-call-with-arg 'org-tags-view (or arg '(4)))) ((equal org-keys "e") (call-interactively 'org-store-agenda-views)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook 'post-command-hook #'(lambda nil (if ... nil ...)) t t)) ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects)) ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files)) ((equal org-keys "!") (customize-variable 'org-stuck-projects)) (t (user-error "Invalid agenda key")))))
(closure (original-date org-mobile-force-id-on-agenda-items t) (&optional arg keys restriction) "Dispatch agenda commands to collect entries..." (interactive "P") (catch 'exit (let* ((org-keys keys) (prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if ... ... org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil ...)) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (bfn (buffer-file-name ...)) entry type org-match lprops ans) (if org-agenda-overriding-restriction nil (if org-agenda-keep-restricted-file-list nil (put ... ... nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (if org-keys nil (progn (setq ans ...) (setq org-keys ...) (setq restriction ...))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name ...))) (if (and (not org-agenda-overriding-restriction) restriction) (progn (put ... ... ...) (cond ... ... ...))) (cond ((setq entry ...) (if ... ... ...)) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable ...)) ((equal org-keys "a") (call-interactively ...)) ((equal org-keys "s") (call-interactively ...)) ((equal org-keys "S") (org-call-with-arg ... ...)) ((equal org-keys "t") (call-interactively ...)) ((equal org-keys "T") (org-call-with-arg ... ...)) ((equal org-keys "m") (call-interactively ...)) ((equal org-keys "M") (org-call-with-arg ... ...)) ((equal org-keys "e") (call-interactively ...)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook ... ... t t)) ((equal org-keys "#") (call-interactively ...)) ((equal org-keys "/") (call-interactively ...)) ((equal org-keys "!") (customize-variable ...)) (t (user-error "Invalid agenda key"))))))(nil nil nil)
apply((closure (original-date org-mobile-force-id-on-agenda-items t) (&optional arg keys restriction) "Dispatch agenda commands to collect entries to the..." (interactive "P") (catch 'exit (let* ((org-keys keys) (prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if (equal ... org-agenda-buffer-name) 'current-window org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil (mapcar ... org-agenda-custom-commands))) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (bfn (buffer-file-name (buffer-base-buffer))) entry type org-match lprops ans) (if org-agenda-overriding-restriction nil (if org-agenda-keep-restricted-file-list nil (put 'org-agenda-files 'org-restrict nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (if org-keys nil (progn (setq ans (org-agenda-get-restriction-and-command prefix-descriptions)) (setq org-keys (car ans)) (setq restriction (cdr ans)))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name (format "*Org Agenda(%s)*" org-keys)))) (if (and (not org-agenda-overriding-restriction) restriction) (progn (put 'org-agenda-files 'org-restrict (list bfn)) (cond (... ... ... ...) (... ...) (... ...)))) (cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or ... ...) (progn ... ... ... ...) (org-agenda-run-series ... ...))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable 'org-agenda-custom-commands)) ((equal org-keys "a") (call-interactively 'org-agenda-list)) ((equal org-keys "s") (call-interactively 'org-search-view)) ((equal org-keys "S") (org-call-with-arg 'org-search-view (or arg ...))) ((equal org-keys "t") (call-interactively 'org-todo-list)) ((equal org-keys "T") (org-call-with-arg 'org-todo-list (or arg ...))) ((equal org-keys "m") (call-interactively 'org-tags-view)) ((equal org-keys "M") (org-call-with-arg 'org-tags-view (or arg ...))) ((equal org-keys "e") (call-interactively 'org-store-agenda-views)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook 'post-command-hook #'... t t)) ((equal org-keys "#") (call-interactively 'org-agenda-list-stuck-projects)) ((equal org-keys "/") (call-interactively 'org-occur-in-agenda-files)) ((equal org-keys "!") (customize-variable 'org-stuck-projects)) (t (user-error "Invalid agenda key")))))) (nil nil nil))
#f(advice org-roam-extra-update-todo-files :before (closure (original-date org-mobile-force-id-on-agenda-items t) (&optional arg keys restriction) "Dispatch agenda commands to collect entries to the agenda buffer.\nPrompts for a command to execute. Any prefix arg will be passed\non to the selected command. The default selections are:\n\na Call `org-agenda-list' to display the agenda for current day or week.\nt Call `org-todo-list' to display the global todo list.\nT Call `org-todo-list' to display the global todo list, select only\n entries with a specific TODO keyword (the user gets a prompt).\nm Call `org-tags-view' to display headlines with tags matching\n a condition (the user is prompted for the condition).\nM Like `m', but select only TODO entries, no ordinary headlines.\ne Export views to associated files.\ns Search entries for keywords.\nS Search entries for keywords, only with TODO keywords.\n/ Multi occur across all agenda files and also files listed\n in `org-agenda-text-search-extra-files'.\n< Restrict agenda commands to buffer, subtree, or region.\n Press several times to get the desired effect.\n> Remove a previous restriction.\n# List \"stuck\" projects.\n! Configure what \"stuck\" means.\nC Configure custom agenda commands.\n\nMore commands can be added by configuring the variable\n`org-agenda-custom-commands'. In particular, specific tags and TODO keyword\nsearches can be pre-defined in this way.\n\nIf the current buffer is in Org mode and visiting a file, you can also\nfirst press `<' once to indicate that the agenda should be temporarily\n(until the next use of `\\[org-agenda]') restricted to the current file.\nPressing `<' twice means to restrict to the current subtree or region\n(if active)." (interactive "P") (catch 'exit (let* ((org-keys keys) (prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if (equal (buffer-name) org-agenda-buffer-name) '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 ((stringp (cdr x)) (setq prefix-descriptions (cons x prefix-descriptions)) nil) ((stringp (nth 1 x)) x) ((not (nth 1 x)) (cons (car x) (cons "" (cdr (cdr x))))) (t (cons (car x) (cons "" (cdr x)))))) org-agenda-custom-commands))) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (bfn (buffer-file-name (buffer-base-buffer))) entry type org-match lprops ans) (if org-agenda-overriding-restriction nil (if org-agenda-keep-restricted-file-list nil (put 'org-agenda-files 'org-restrict nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (if org-keys nil (progn (setq ans (org-agenda-get-restriction-and-command prefix-descriptions)) (setq org-keys (car ans)) (setq restriction (cdr ans)))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name (format "*Org Agenda(%s)*" org-keys)))) (if (and (not org-agenda-overriding-restriction) restriction) (progn (put 'org-agenda-files 'org-restrict (list bfn)) (cond ((eq restriction 'region) (setq org-agenda-restrict (current-buffer)) (move-marker org-agenda-restrict-begin (region-beginning)) (move-marker org-agenda-restrict-end (region-end))) ((eq restriction 'subtree) (save-excursion (setq org-agenda-restrict (current-buffer)) (org-back-to-heading t) (move-marker org-agenda-restrict-begin (point)) (move-marker org-agenda-restrict-end (progn (org-end-of-subtree t))))) ((eq restriction 'buffer) (if (not (buffer-narrowed-p)) (setq org-agenda-restrict t) (setq org-agenda-restrict (current-buffer)) (move-marker org-agenda-restrict-begin (point-min)) (move-marker org-agenda-restrict-end (point-max))))))) (cond ((setq entry (assoc org-keys org-agenda-custom-commands)) (if (or (symbolp (nth 2 entry)) (functionp (nth 2 entry))) (progn (progn (setq type (nth 2 entry)) (setq org-match (eval (nth 3 entry) t)) (setq lprops (nth 4 entry))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name (or (and (stringp org-match) (format "*Org Agenda(%s:%s)*" org-keys org-match)) (format "*Org Agenda(%s)*" org-keys))))) (progn (let* ((syms (mapcar #'car lprops)) (vals (mapcar #'(lambda (binding) (eval (car (cdr binding)) t)) lprops)) (body #'(lambda nil (cond ((eq type 'agenda) (let nil (org-agenda-list arg))) ((eq type 'agenda*) (let nil (org-agenda-list arg nil nil t))) ((eq type 'alltodo) (let nil (org-todo-list arg))) ((eq type 'search) (let nil (org-search-view arg org-match nil))) ((eq type 'stuck) (let nil (org-agenda-list-stuck-projects arg))) ((eq type 'tags) (let nil (org-tags-view arg org-match))) ((eq type 'tags-todo) (let nil (org-tags-view '(4) org-match))) ((eq type 'todo) (let nil (org-todo-list org-match))) ((eq type 'tags-tree) (let nil (org-check-for-org-mode) (org-match-sparse-tree arg org-match))) ((eq type 'todo-tree) (let nil (org-check-for-org-mode) (org-occur (concat "^" org-outline-regexp "[ \11]*" (regexp-quote org-match) "\\(?:[\11 ]\\|$\\)")))) ((eq type 'occur-tree) (let nil (org-check-for-org-mode) (org-occur org-match))) ((functionp type) (let nil (funcall type org-match))) ((fboundp type) (let nil (funcall type org-match))) (t (let nil (user-error "Invalid custom agenda command type %s" type)))))) (binds nil)) (while syms (setq binds (cons (list (car-safe (prog1 syms (setq syms (cdr syms)))) (list 'quote (car-safe (prog1 vals (setq vals (cdr vals)))))) binds))) (eval (list 'let (nreverse binds) (list 'funcall (list 'quote body)))))) (let ((inhibit-read-only t)) (add-text-properties (point-min) (point-max) (list 'org-lprops lprops)))) (org-agenda-run-series (nth 1 entry) (cdr (cdr entry))))) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable 'org-agenda-custom-commands)) ((equal org-keys "a") (call-interactively 'org-agenda-list)) ((equal org-keys "s") (call-interactively 'org-search-view)) ((equal org-keys "S") (org-call-with-arg 'org-search-view (or arg '(4)))) ((equal org-keys "t") (call-interactively 'org-todo-list)) ((equal org-keys "T") (org-call-with-arg 'org-todo-list (or arg '(4)))) ((equal org-keys "m") (call-interactively 'org-tags-view)) ((equal org-keys "M") (org-call-with-arg 'org-tags-view (or arg '(4)))) ((equal org-keys "e") (call-interactively 'org-store-agenda-views)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook 'post-command-hook #'(lambda nil (if (current-message) nil (let* ((m (org-agenda-get-any-marker)) (note (and m (org-entry-get m "THEFLAGGINGNOTE")))) (if note (progn (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)) ((equal org-keys "!") (customize-variable 'org-stuck-projects)) (t (user-error "Invalid agenda key")))))))(nil nil nil)
ad-Advice-org-agenda(#f(advice org-roam-extra-update-todo-files :before (closure (original-date org-mobile-force-id-on-agenda-items t) (&optional arg keys restriction) "Dispatch agenda commands to collect entries to the..." (interactive "P") (catch 'exit (let* ((org-keys keys) (prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if ... ... org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil ...)) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (bfn (buffer-file-name ...)) entry type org-match lprops ans) (if org-agenda-overriding-restriction nil (if org-agenda-keep-restricted-file-list nil (put ... ... nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (if org-keys nil (progn (setq ans ...) (setq org-keys ...) (setq restriction ...))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name ...))) (if (and (not org-agenda-overriding-restriction) restriction) (progn (put ... ... ...) (cond ... ... ...))) (cond ((setq entry ...) (if ... ... ...)) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable ...)) ((equal org-keys "a") (call-interactively ...)) ((equal org-keys "s") (call-interactively ...)) ((equal org-keys "S") (org-call-with-arg ... ...)) ((equal org-keys "t") (call-interactively ...)) ((equal org-keys "T") (org-call-with-arg ... ...)) ((equal org-keys "m") (call-interactively ...)) ((equal org-keys "M") (org-call-with-arg ... ...)) ((equal org-keys "e") (call-interactively ...)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook ... ... t t)) ((equal org-keys "#") (call-interactively ...)) ((equal org-keys "/") (call-interactively ...)) ((equal org-keys "!") (customize-variable ...)) (t (user-error "Invalid agenda key"))))))))
apply(ad-Advice-org-agenda #f(advice org-roam-extra-update-todo-files :before (closure (original-date org-mobile-force-id-on-agenda-items t) (&optional arg keys restriction) "Dispatch agenda commands to collect entries to the..." (interactive "P") (catch 'exit (let* ((org-keys keys) (prefix-descriptions nil) (org-agenda-buffer-name org-agenda-buffer-name) (org-agenda-window-setup (if ... ... org-agenda-window-setup)) (org-agenda-custom-commands-orig org-agenda-custom-commands) (org-agenda-custom-commands (delq nil ...)) (org-agenda-custom-commands (org-contextualize-keys org-agenda-custom-commands org-agenda-custom-commands-contexts)) (bfn (buffer-file-name ...)) entry type org-match lprops ans) (if org-agenda-overriding-restriction nil (if org-agenda-keep-restricted-file-list nil (put ... ... nil)) (setq org-agenda-restrict nil) (move-marker org-agenda-restrict-begin nil) (move-marker org-agenda-restrict-end nil)) (if org-keys nil (progn (setq ans ...) (setq org-keys ...) (setq restriction ...))) (if org-agenda-sticky (progn (setq org-agenda-buffer-name ...))) (if (and (not org-agenda-overriding-restriction) restriction) (progn (put ... ... ...) (cond ... ... ...))) (cond ((setq entry ...) (if ... ... ...)) ((equal org-keys "C") (setq org-agenda-custom-commands org-agenda-custom-commands-orig) (customize-variable ...)) ((equal org-keys "a") (call-interactively ...)) ((equal org-keys "s") (call-interactively ...)) ((equal org-keys "S") (org-call-with-arg ... ...)) ((equal org-keys "t") (call-interactively ...)) ((equal org-keys "T") (org-call-with-arg ... ...)) ((equal org-keys "m") (call-interactively ...)) ((equal org-keys "M") (org-call-with-arg ... ...)) ((equal org-keys "e") (call-interactively ...)) ((equal org-keys "?") (org-tags-view nil "+FLAGGED") (add-hook ... ... t t)) ((equal org-keys "#") (call-interactively ...)) ((equal org-keys "/") (call-interactively ...)) ((equal org-keys "!") (customize-variable ...)) (t (user-error "Invalid agenda key"))))))) nil)
org-agenda()
funcall-interactively(org-agenda)
command-execute(org-agenda)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment