Skip to content

Commit

Permalink
org-agenda.el: Improve docstrings of agenda date navigation commands
Browse files Browse the repository at this point in the history
* lisp/org-agenda.el (org-agenda-goto-date)
(org-agenda-goto-today, org-agenda-later, org-agenda-earlier):
Improve documentation and add crossreferences.
  • Loading branch information
skangas authored and danielfleischer committed Jun 21, 2022
1 parent 4a0d951 commit e7e37c5
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions lisp/org-agenda.el
Original file line number Diff line number Diff line change
Expand Up @@ -8797,7 +8797,16 @@ Negative selection means regexp must not match for selection of an entry."
(set var (concat (symbol-value var) string)))

(defun org-agenda-goto-date (date)
"Jump to DATE in agenda."
"Jump to DATE in the agenda buffer.

When called interactively, prompt for the date.
When called from Lisp, DATE should be a date as returned by
`org-read-date'.

See also:
`org-agenda-earlier' (\\[org-agenda-earlier])
`org-agenda-later' (\\[org-agenda-later])
`org-agenda-goto-today' (\\[org-agenda-goto-today])"
(interactive
(list
(let ((org-read-date-prefer-future org-agenda-jump-prefer-future))
Expand Down Expand Up @@ -8829,7 +8838,12 @@ Negative selection means regexp must not match for selection of an entry."
org-agenda-this-buffer-is-sticky org-agenda-sticky))))

(defun org-agenda-goto-today ()
"Go to today."
"Go to today's date in the agenda buffer.

See also:
`org-agenda-later' (\\[org-agenda-later])
`org-agenda-earlier' (\\[org-agenda-earlier])
`org-agenda-goto-date' (\\[org-agenda-goto-date])"
(interactive)
(org-agenda-check-type t 'agenda)
(let* ((args (get-text-property (min (1- (point-max)) (point)) 'org-last-args))
Expand Down Expand Up @@ -8888,8 +8902,13 @@ When optional argument BACKWARD is set, go backward."
(message "No %s block" (if backward "previous" "further")))))))

(defun org-agenda-later (arg)
"Go forward in time by the current span.
With prefix ARG, go forward that many times the current span."
"Go forward in time by the current span in the agenda buffer.
With prefix ARG, go forward that many times the current span.

See also:
`org-agenda-earlier' (\\[org-agenda-earlier])
`org-agenda-goto-today' (\\[org-agenda-goto-today])
`org-agenda-goto-date' (\\[org-agenda-goto-date])"
(interactive "p")
(org-agenda-check-type t 'agenda)
(let* ((wstart (window-start))
Expand Down Expand Up @@ -8930,8 +8949,13 @@ With prefix ARG, go forward that many times the current span."
(set-window-start nil wstart)))

(defun org-agenda-earlier (arg)
"Go backward in time by the current span.
With prefix ARG, go backward that many times the current span."
"Go backward in time by the current span in the agenda buffer.
With prefix ARG, go backward that many times the current span.

See also:
`org-agenda-later' (\\[org-agenda-later])
`org-agenda-goto-today' (\\[org-agenda-goto-today])
`org-agenda-goto-date' (\\[org-agenda-goto-date])"
(interactive "p")
(org-agenda-later (- arg)))

Expand Down

0 comments on commit e7e37c5

Please sign in to comment.