forked from mirrors/org-mode
org-agenda.el (org-agenda-goto-date): Put the cursor on the agenda line with the selected date
* org-agenda.el (org-agenda-goto-date): Put the cursor on the agenda line with the selected date.
This commit is contained in:
parent
ee422561c8
commit
c25566fec3
|
@ -7723,6 +7723,7 @@ Negative selection means regexp must not match for selection of an entry."
|
|||
(let* ((org-read-date-prefer-future
|
||||
(eval org-agenda-jump-prefer-future))
|
||||
(date (org-read-date))
|
||||
(day (time-to-days (org-time-string-to-time date)))
|
||||
(org-agenda-sticky-orig org-agenda-sticky)
|
||||
(org-agenda-buffer-tmp-name (buffer-name))
|
||||
(args (get-text-property (min (1- (point-max)) (point)) 'org-last-args))
|
||||
|
@ -7734,12 +7735,16 @@ Negative selection means regexp must not match for selection of an entry."
|
|||
(inhibit-read-only t)
|
||||
org-agenda-sticky)
|
||||
(if (not (org-agenda-check-type t 'agenda))
|
||||
(error "Not available in non-agenda blocks")
|
||||
(error "Not available in non-agenda views")
|
||||
(add-text-properties (point-min) (point-max)
|
||||
`(org-redo-cmd ,newcmd org-last-args ,newargs))
|
||||
(org-agenda-redo)
|
||||
(setq org-agenda-sticky org-agenda-sticky-orig
|
||||
org-agenda-this-buffer-is-sticky org-agenda-sticky))))
|
||||
(goto-char (point-min))
|
||||
(while (not (or (= (or (get-text-property (point) 'day) 0) day)
|
||||
(save-excursion (move-beginning-of-line 2) (eobp))))
|
||||
(move-beginning-of-line 2))
|
||||
(setq org-agenda-sticky org-agenda-sticky-orig
|
||||
org-agenda-this-buffer-is-sticky org-agenda-sticky))))
|
||||
|
||||
(defun org-agenda-goto-today ()
|
||||
"Go to today."
|
||||
|
|
Loading…
Reference in New Issue