emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org 8219776: org-agenda-get-scheduled: Make sure that '


From: ELPA Syncer
Subject: [elpa] externals/org 8219776: org-agenda-get-scheduled: Make sure that 'org-marker is at timestamp
Date: Mon, 18 Oct 2021 04:57:19 -0400 (EDT)

branch: externals/org
commit 821977611c1a51a0aa72959f649b8ef0bc87339c
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>

    org-agenda-get-scheduled: Make sure that 'org-marker is at timestamp
    
    * lisp/org-agenda.el (org-agenda-get-scheduled): Use beginning
    position of the timestamp as 'org-marker.
    
    Fixes 
https://list.orgmode.org/87sfwyrcyj.fsf@gnu.org/T/#meeca619b0abd3c3b30fe5057b51c891e8de705b8
---
 lisp/org-agenda.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 8334b08..2b7e298 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6406,6 +6406,10 @@ scheduled items with an hour specification like [h]h:mm."
                                      :raw-value
                                      (org-element-property :scheduled el))
                                     1 -1))
+                      (pos (save-excursion
+                             (goto-char (org-element-property :contents-begin 
el))
+                             (re-search-forward regexp)
+                             (1- (match-beginning 1))))
                       (todo-state (org-element-property :todo-keyword el))
                      (donep (eq 'done (org-element-property :todo-type el)))
                      (sexp? (eq 'diary
@@ -6420,7 +6424,7 @@ scheduled items with an hour specification like [h]h:mm."
                        ((or (eq org-agenda-prefer-last-repeat t)
                             (member todo-state org-agenda-prefer-last-repeat))
                         (org-agenda--timestamp-to-absolute
-                         s today 'past (current-buffer) (point)))
+                         s today 'past (current-buffer) pos))
                        (t (org-agenda--timestamp-to-absolute s))))
                      ;; REPEAT is the future repeat closest from CURRENT,
                      ;; according to `org-agenda-show-future-repeats'. If
@@ -6436,7 +6440,7 @@ scheduled items with an hour specification like [h]h:mm."
                                         (1+ today)
                                       current)))
                           (org-agenda--timestamp-to-absolute
-                           s base 'future (current-buffer) (point))))))
+                           s base 'future (current-buffer) pos)))))
                      (diff (- current schedule))
                      (warntime (get-text-property (point) 'org-appt-warntime))
                      (pastschedp (< schedule today))
@@ -6577,7 +6581,7 @@ scheduled items with an hour specification like [h]h:mm."
                     (org-add-props item props
                       'undone-face face
                       'face (if donep 'org-agenda-done face)
-                      'org-marker (org-agenda-new-marker (org-element-property 
:contents-begin el))
+                      'org-marker (org-agenda-new-marker pos)
                       'org-hd-marker (org-agenda-new-marker 
(line-beginning-position))
                       'type (if pastschedp "past-scheduled" "scheduled")
                       'date (if pastschedp schedule date)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]