Skip to main content

11.5 Commands in the Agenda Buffer

Entries in the agenda buffer are linked back to the Org file or diary file where they originate. You are not allowed to edit the agenda buffer itself, but commands are provided to show and jump to the original entry location, and to edit the Org files β€œremotely" from the agenda buffer. In this way, all information is stored only once, removing the risk that your agenda and note files may diverge.

Some commands can be executed with mouse clicks on agenda lines. For the other commands, point needs to be in the desired line.

Motion​

n (org-agenda-next-line)​

Next line (same as DOWN and C-n).

p (org-agenda-previous-line)​

Previous line (same as UP and C-p).

View/Go to Org file​

SPC or mouse-3 (org-agenda-show-and-scroll-up)​

Display the original location of the item in another window. With a prefix argument, make sure that drawers stay folded.

L (org-agenda-recenter)​

Display original location and recenter that window.

TAB or mouse-2 (org-agenda-goto)​

Go to the original location of the item in another window.

RET (org-agenda-switch-to)​

Go to the original location of the item and delete other windows.

F (org-agenda-follow-mode)​

Toggle Follow mode. In Follow mode, as you move point through the agenda buffer, the other window always shows the corresponding location in the Org file. The initial setting for this mode in new agenda buffers can be set with the variable org-agenda-start-with-follow-mode.

C-c C-x b (org-agenda-tree-to-indirect-buffer)​

Display the entire subtree of the current item in an indirect buffer. With a numeric prefix argument N, go up to level N and then take that tree. If N is negative, go up that many levels. With a C-u prefix, do not remove the previously used indirect buffer.

Follow a link in the entry. This offers a selection of any links in the text belonging to the referenced Org node. If there is only one link, follow it without a selection prompt.

Change display​

A​

Interactively select another agenda view and append it to the current view.

o​

Delete other windows.

v d or short d (org-agenda-day-view)​

Switch to day view. When switching to day view, this setting becomes the default for subsequent agenda refreshes. A numeric prefix argument may be used to jump directly to a specific day of the year. For example, 32 d jumps to February 1st. When setting day view, a year may be encoded in the prefix argument as well. For example, 200712 d jumps to January 12, 2007. If such a year specification has only one or two digits, it is expanded into one of the 30 next years or the last 69 years.

v w or short w (org-agenda-week-view)​

Switch to week view. When switching week view, this setting becomes the default for subsequent agenda refreshes. A numeric prefix argument may be used to jump directly to a specific day of the ISO week. For example 9 w to ISO week number 9. When setting week view, a year may be encoded in the prefix argument as well. For example, 200712 w jumps to week 12 in 2007. If such a year specification has only one or two digits, it is expanded into one of the 30 next years or the last 69 years.

v m (org-agenda-month-view)​

Switch to month view. Because month views are slow to create, they do not become the default for subsequent agenda refreshes. A numeric prefix argument may be used to jump directly to a specific day of the month. When setting month view, a year may be encoded in the prefix argument as well. For example, 200712 m jumps to December, 2007. If such a year specification has only one or two digits, it is expanded into one of the 30 next years or the last 69 years.

v y (org-agenda-year-view)​

Switch to year view. Because year views are slow to create, they do not become the default for subsequent agenda refreshes. A numeric prefix argument may be used to jump directly to a specific day of the year.

v SPC (org-agenda-reset-view)​

Reset the current view to org-agenda-span.

f (org-agenda-later)​

Go forward in time to display the span following the current one. For example, if the display covers a week, switch to the following week. With a prefix argument, repeat that many times.

b (org-agenda-earlier)​

Go backward in time to display earlier dates.

. (org-agenda-goto-today)​

Go to today.

j (org-agenda-goto-date)​

Prompt for a date and go there.

J (org-agenda-clock-goto)​

Go to the currently clocked-in task in the agenda buffer.

D (org-agenda-toggle-diary)​

Toggle the inclusion of diary entries. See Weekly/daily agenda.

v l or v L or short l (org-agenda-log-mode)​

Toggle Logbook mode. In Logbook mode, entries that were marked as done while logging was on (see the variable org-log-done) are shown in the agenda, as are entries that have been clocked on that day. You can configure the entry types that should be included in log mode using the variable org-agenda-log-mode-items. When called with a C-u prefix argument, show all possible logbook entries, including state changes. When called with two prefix arguments C-u C-u, show only logging information, nothing else. v L is equivalent to C-u v l.

v [ or short [ (org-agenda-manipulate-query-add)​

Include inactive timestamps into the current view. Only for weekly/daily agenda.

v a (org-agenda-archives-mode)​

Toggle Archives mode. In Archives mode, trees that are archived (see Internal archiving) are also scanned when producing the agenda. To exit archives mode, press v a again.

v A​

Toggle Archives mode. Include all archive files as well.

v R or short R (org-agenda-clockreport-mode)​

Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda always shows a table with the clocked times for the time span and file scope covered by the current agenda view. The initial setting for this mode in new agenda buffers can be set with the variable org-agenda-start-with-clockreport-mode. By using a prefix argument when toggling this mode (i.e., C-u R), the clock table does not show contributions from entries that are hidden by agenda filtering1. See also the variable org-clock-report-include-clocking-task.

v c​

Show overlapping clock entries, clocking gaps, and other clocking problems in the current agenda range. You can then visit clocking lines and fix them manually. See the variable org-agenda-clock-consistency-checks for information on how to customize the definition of what constituted a clocking problem. To return to normal agenda display, press l to exit Logbook mode.

v E or short E (org-agenda-entry-text-mode)​

Toggle entry text mode. In entry text mode, a number of lines from the Org outline node referenced by an agenda line are displayed below the line. The maximum number of lines is given by the variable org-agenda-entry-text-maxlines. Calling this command with a numeric prefix argument temporarily modifies that number to the prefix value.

G (org-agenda-toggle-time-grid)​

Toggle the time grid on and off. See also the variables org-agenda-use-time-grid and org-agenda-time-grid.

r (org-agenda-redo)​

g​

Recreate the agenda buffer, for example to reflect the changes after modification of the timestamps of items with S-LEFT and S-RIGHT. When the buffer is the global TODO list, a prefix argument is interpreted to create a selective list for a specific TODO keyword.

C-x C-s or short s (org-save-all-org-buffers)​

Save all Org buffers in the current Emacs session, and also the locations of IDs.

C-c C-x C-c (org-agenda-columns)​

Invoke column view (see Column View) in the agenda buffer. The column view format is taken from the entry at point, or, if there is no entry at point, from the first entry in the agenda view. So whatever the format for that entry would be in the original buffer (taken from a property, from a β€˜COLUMNS’ keyword, or from the default variable org-columns-default-format) is used in the agenda.

C-c C-x > (org-agenda-remove-restriction-lock)​

Remove the restriction lock on the agenda, if it is currently restricted to a file or subtree (see Agenda Files).

M-UP (org-agenda-drag-line-backward)​

Drag the line at point backward one line. With a numeric prefix argument, drag backward by that many lines.

Moving agenda lines does not persist after an agenda refresh and does not modify the contributing Org files.

M-DOWN (org-agenda-drag-line-forward)​

Drag the line at point forward one line. With a numeric prefix argument, drag forward by that many lines.

Remote editing​

0--9​

Digit argument.

C-_ (org-agenda-undo)​

Undo a change due to a remote editing command. The change is undone both in the agenda buffer and in the remote buffer.

t (org-agenda-todo)​

Change the TODO state of the item, both in the agenda and in the original Org file. A prefix arg is passed through to the org-todo command, so for example a C-u prefix are will trigger taking a note to document the state change.

C-S-RIGHT (org-agenda-todo-nextset)​

Switch to the next set of TODO keywords.

C-S-LEFT, org-agenda-todo-previousset​

Switch to the previous set of TODO keywords.

C-k (org-agenda-kill)​

Delete the current agenda item along with the entire subtree belonging to it in the original Org file. If the text to be deleted remotely is longer than one line, the kill needs to be confirmed by the user. See variable org-agenda-confirm-kill.

C-c C-w (org-agenda-refile)​

Refile the entry at point.

C-c C-x C-a or short a (org-agenda-archive-default-with-confirmation)​

Archive the subtree corresponding to the entry at point using the default archiving command set in org-archive-default-command. When using the a key, confirmation is required.

C-c C-x a (org-agenda-toggle-archive-tag)​

Toggle the archive tag (see Internal archiving) for the current headline.

C-c C-x A (org-agenda-archive-to-archive-sibling)​

Move the subtree corresponding to the current entry to its archive sibling.

C-c C-x C-s or short $ (org-agenda-archive)​

Archive the subtree corresponding to the current headline. This means the entry is moved to the configured archive location, most likely a different file.

T (org-agenda-show-tags)​

Show all tags associated with the current item. This is useful if you have turned off org-agenda-show-inherited-tags, but still want to see all tags of a headline occasionally.

: (org-agenda-set-tags)​

Set tags for the current headline. If there is an active region in the agenda, change a tag for all headings in the region.

, (org-agenda-priority)​

Set the priority for the current item. Org mode prompts for the priority character. If you reply with SPC, the priority cookie is removed from the entry.

+ or S-UP (org-agenda-priority-up)​

Increase the priority of the current item. The priority is changed in the original buffer, but the agenda is not resorted. Use the r key for this.

- or S-DOWN (org-agenda-priority-down)​

Decrease the priority of the current item.

C-c C-x e or short e (org-agenda-set-effort)​

Set the effort property for the current item.

C-c C-z or short z (org-agenda-add-note)​

Add a note to the entry. This note is recorded, and then filed to the same location where state change notes are put. Depending on org-log-into-drawer, this may be inside a drawer.

C-c C-a (org-attach)​

Dispatcher for all command related to attachments.

C-c C-s (org-agenda-schedule)​

Schedule this item. With a prefix argument, remove the scheduling timestamp

C-c C-d (org-agenda-deadline)​

Set a deadline for this item. With a prefix argument, remove the deadline.

S-RIGHT (org-agenda-do-date-later)​

Change the timestamp associated with the current line by one day into the future. If the date is in the past, the first call to this command moves it to today. With a numeric prefix argument, change it by that many days. For example, 3 6 5 S-RIGHT changes it by a year. With a C-u prefix, change the time by one hour. If you immediately repeat the command, it will continue to change hours even without the prefix argument. With a double C-u C-u prefix, do the same for changing minutes. The stamp is changed in the original Org file, but the change is not directly reflected in the agenda buffer. Use r or g to update the buffer.

S-LEFT (org-agenda-do-date-earlier)​

Change the timestamp associated with the current line by one day into the past.

> (org-agenda-date-prompt)​

Change the timestamp associated with the current line. The key > has been chosen, because it is the same as S-. on my keyboard.

I (org-agenda-clock-in)​

Start the clock on the current item. If a clock is running already, it is stopped first.

O (org-agenda-clock-out)​

Stop the previously started clock.

X (org-agenda-clock-cancel)​

Cancel the currently running clock.

J (org-agenda-clock-goto)​

Jump to the running clock in another window.

k (org-agenda-capture)​

Like org-capture, but use the date at point as the default date for the capture template. See org-capture-use-agenda-date to make this the default behavior of org-capture.

Bulk remote editing selected entries​

m (org-agenda-bulk-mark)​

Mark the entry at point for bulk action. If there is an active region in the agenda, mark the entries in the region. With numeric prefix argument, mark that many successive entries.

* (org-agenda-bulk-mark-all)​

Mark all visible agenda entries for bulk action.

u (org-agenda-bulk-unmark)​

Unmark entry for bulk action.

U (org-agenda-bulk-remove-all-marks)​

Unmark all marked entries for bulk action.

M-m (org-agenda-bulk-toggle)​

Toggle mark of the entry at point for bulk action.

M-* (org-agenda-bulk-toggle-all)​

Toggle mark of every entry for bulk action.

% (org-agenda-bulk-mark-regexp)​

Mark entries matching a regular expression for bulk action.

B (org-agenda-bulk-action)​

Bulk action: act on all marked entries in the agenda. This prompts for another key to select the action to be applied. The prefix argument to B is passed through to the s and d commands, to bulk-remove these special timestamps. By default, marks are removed after the bulk. If you want them to persist, set org-agenda-bulk-persistent-marks to t or hit p at the prompt.

p​

Toggle persistent marks.

$

Archive all selected entries.

A​

Archive entries by moving them to their respective archive siblings.

t​

Change TODO state. This prompts for a single TODO keyword and changes the state of all selected entries, bypassing blocking and suppressing logging notesβ€”but not timestamps.

+​

Add a tag to all selected entries.

-​

Remove a tag from all selected entries.

s​

Schedule all items to a new date. To shift existing schedule dates by a fixed number of days, use something starting with double plus at the prompt, for example β€˜++8d’ or β€˜++2w’.

d​

Set deadline to a specific date.

r​

Prompt for a single refile target and move all entries. The entries are no longer in the agenda; refresh (g) to bring them back.

S​

Reschedule randomly into the coming N days. N is prompted for. With a prefix argument (C-u B S), scatter only across weekdays.

f​

Apply a function2 to marked entries. For example, the function below sets the β€˜CATEGORY’ property of the entries to β€˜web’.

(defun set-category ()
(interactive "P")
(let ((marker (or (org-get-at-bol 'org-hd-marker)
(org-agenda-error))))
(org-with-point-at marker
(org-back-to-heading t)
(org-set-property "CATEGORY" "web"))))

Calendar commands​

c (org-agenda-goto-calendar)​

Open the Emacs calendar and go to the date at point in the agenda.

c (org-calendar-goto-agenda)​

When in the calendar, compute and show the Org agenda for the date at point.

i (org-agenda-diary-entry)​

Insert a new entry into the diary, using the date at point and (for block entries) the date at the mark. This adds to the Emacs diary file3, in a way similar to the i command in the calendar. The diary file pops up in another window, where you can add the entry.

If you configure org-agenda-diary-file to point to an Org file, Org creates entries in that file instead. Most entries are stored in a date-based outline tree that will later make it easy to archive appointments from previous months/years. The tree is built under an entry with a β€˜DATE_TREE’ property, or else with years as top-level entries. Emacs prompts you for the entry textβ€”if you specify it, the entry is created in org-agenda-diary-file without further interaction. If you directly press RET at the prompt without typing text, the target file is shown in another window for you to finish the entry there. See also the k r command.

M (org-agenda-phases-of-moon)​

Show the phases of the moon for the three months around current date.

S (org-agenda-sunrise-sunset)​

Show sunrise and sunset times. The geographical location must be set with calendar variables, see the documentation for the Emacs calendar.

C (org-agenda-convert-date)​

Convert the date at point into many other cultural and historic calendars.

H (org-agenda-holidays)​

Show holidays for three months around point date.

Quit and exit​

q (org-agenda-quit)​

Quit agenda, remove the agenda buffer.

x (org-agenda-exit)​

Exit agenda, remove the agenda buffer and all buffers loaded by Emacs for the compilation of the agenda. Buffers created by the user to visit Org files are not removed.


  1. Only tags filtering is respected here, effort filtering is ignored.↩
  2. You can also create persistent custom functions through org-agenda-bulk-custom-functions.↩
  3. This file is parsed for the agenda when org-agenda-include-diary is set.↩