org-agenda: Treat fake planning info as regular time-stamp

* lisp/org-agenda.el (org-agenda-get-timestamps): Treat fake planning
  info as regular time-stamp.

Reported-by: Alan Tyree <alantyree@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/110197>
This commit is contained in:
Nicolas Goaziou 2016-11-11 01:08:53 +01:00
parent c6f9aeb06e
commit efcaff3688
1 changed files with 10 additions and 15 deletions

View File

@ -5596,8 +5596,8 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
mm mm
(deadline-position-alist (deadline-position-alist
(mapcar (lambda (a) (and (setq mm (get-text-property (mapcar (lambda (a) (and (setq mm (get-text-property
0 'org-hd-marker a)) 0 'org-hd-marker a))
(cons (marker-position mm) a))) (cons (marker-position mm) a)))
deadline-results)) deadline-results))
(remove-re org-ts-regexp) (remove-re org-ts-regexp)
(regexp (regexp
@ -5607,15 +5607,14 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(substring (substring
(format-time-string (format-time-string
(car org-time-stamp-formats) (car org-time-stamp-formats)
(apply 'encode-time ; DATE bound by calendar (apply 'encode-time ; DATE bound by calendar
(list 0 0 0 (nth 1 date) (car date) (nth 2 date)))) (list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
1 11)) 1 11))
"\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[hdwmy]>\\)" "\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[hdwmy]>\\)"
"\\|\\(<%%\\(([^>\n]+)\\)>\\)")) "\\|\\(<%%\\(([^>\n]+)\\)>\\)"))
marker hdmarker deadlinep scheduledp clockp closedp inactivep marker hdmarker clockp inactivep donep tmp priority category level ee
donep tmp priority category level ee txt timestr tags txt timestr tags b0 b3 e3 head todo-state end-of-match show-all
b0 b3 e3 head todo-state end-of-match show-all warntime habitp warntime habitp inherited-tags ts-date)
inherited-tags ts-date)
(goto-char (point-min)) (goto-char (point-min))
(while (setq end-of-match (re-search-forward regexp nil t)) (while (setq end-of-match (re-search-forward regexp nil t))
(setq b0 (match-beginning 0) (setq b0 (match-beginning 0)
@ -5626,7 +5625,8 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
(member todo-state (member todo-state
org-agenda-repeating-timestamp-show-all))) org-agenda-repeating-timestamp-show-all)))
(catch :skip (catch :skip
(and (org-at-date-range-p) (throw :skip nil)) (when (org-at-date-range-p) (throw :skip nil))
(when (org-at-planning-p) (throw :skip nil))
(org-agenda-skip) (org-agenda-skip)
(if (and (match-end 1) (if (and (match-end 1)
(not (= d1 (org-agenda--timestamp-to-absolute (not (= d1 (org-agenda--timestamp-to-absolute
@ -5641,18 +5641,13 @@ This function is invoked if `org-agenda-todo-ignore-deadlines',
b0) b0)
timestr (if b3 "" (buffer-substring b0 (point-at-eol))) timestr (if b3 "" (buffer-substring b0 (point-at-eol)))
inactivep (= (char-after b0) ?\[) inactivep (= (char-after b0) ?\[)
deadlinep (string-match org-deadline-regexp tmp)
scheduledp (string-match org-scheduled-regexp tmp)
closedp (and org-agenda-include-inactive-timestamps
(string-match org-closed-string tmp))
clockp (and org-agenda-include-inactive-timestamps clockp (and org-agenda-include-inactive-timestamps
(or (string-match org-clock-string tmp) (or (string-match org-clock-string tmp)
(string-match "]-+\\'" tmp))) (string-match "]-+\\'" tmp)))
warntime (get-text-property (point) 'org-appt-warntime) warntime (get-text-property (point) 'org-appt-warntime)
donep (member todo-state org-done-keywords)) donep (member todo-state org-done-keywords))
(if (or scheduledp deadlinep closedp clockp (when (or clockp (and donep org-agenda-skip-timestamp-if-done))
(and donep org-agenda-skip-timestamp-if-done)) (throw :skip t))
(throw :skip t))
(if (string-match ">" timestr) (if (string-match ">" timestr)
;; substring should only run to end of time stamp ;; substring should only run to end of time stamp
(setq timestr (substring timestr 0 (match-end 0)))) (setq timestr (substring timestr 0 (match-end 0))))