10.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, the cursor needs to be in the desired line.
- Motion
-
- n
- Next line (same as <up> and C-p).
- p
- Previous line (same as <down> and C-n).
- View/Go to org file
-
- mouse-3
- <SPC>
- Display the original location of the item in another window.
- L
- Display original location and recenter that window.
- mouse-2
- mouse-1
- <TAB>
- Go to the original location of the item in another window. Under Emacs
22, mouse-1 will also works for this.
- <RET>
- Go to the original location of the item and delete other windows.
- f
- Toggle Follow mode. In Follow mode, as you move the cursor 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.
- b
- 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.
- l
- Toggle Logbook mode. In Logbook mode, entries that where marked DONE while
logging was on (variable
org-log-done) are shown in the agenda,
as are entries that have been clocked on that day.
- v
- Toggle Archives mode. In archives mode, trees that are marked are also
scanned when producing the agenda. When you call this command with a
C-u prefix argument, even all archive files are included. To exit
archives mode, press v again.
- R
- Toggle Clockreport mode. In clockreport mode, the daily/weekly agenda will
always show a table with the clocked times for the timespan 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.
- Change display
-
- o
- Delete other windows.
- d w m y
- Switch to day/week/month/year view. When switching to day or week view,
this setting becomes the default for subsequent agenda commands. Since
month and year views are slow to create, they do not become the default.
A numeric prefix argument may be used to jump directly to a specific day
of the year, ISO week, month, or year, respectively. For example,
32 d jumps to February 1st, 9 w to ISO week number 9. When
setting day, week, or month view, a year may be encoded in the prefix
argument as well. For example, 200712 w will jump to week 12 in
2007. If such a year specification has only one or two digits, it will
be mapped to the interval 1938-2037.
- D
- Toggle the inclusion of diary entries. See Weekly/daily agenda.
- G
- Toggle the time grid on and off. See also the variables
org-agenda-use-time-grid and org-agenda-time-grid.
- r
- Recreate the agenda buffer, for example to reflect the changes
after modification of the time stamps 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.
- g
- Same as r.
- s
- C-x C-s
- Save all Org buffers in the current Emacs session.
- <right>
- Display the following
org-agenda-ndays days. For example, if
the display covers a week, switch to the following week. With prefix
arg, go forward that many times org-agenda-ndays days.
- <left>
- Display the previous dates.
- .
- Go to today.
- C-c C-x C-c
- 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 line, or from the default variable
org-columns-default-format), will be used in the agenda.
- Query editing
-
- [ ] { }
- In the search view (see Keyword search), these keys add new
search words ([ and ]) or new regular expressions ({
and }) to the query string. The opening bracket/brace will add a
positive search term prefixed by `+', indicating that this search
term must occur/match in the entry. Closing bracket/brace add a
negative search term which must not occur/match in the entry for it
to be selected.
- Remote editing
-
- 0-9
- Digit argument.
- C-_
- Undo a change due to a remote editing command. The change is undone
both in the agenda buffer and in the remote buffer.
- t
- Change the TODO state of the item, both in the agenda and in the
original org file.
- C-k
- 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.
- a
- Toggle the ARCHIVE tag for the current headline.
- A
- Move the subtree corresponding to the current entry to its Archive
Sibling.
- $
- Archive the subtree corresponding to the current headline. This means the
entry will be moved to the configured archive location, most likely a
different file.
- T
- Show all tags associated with the current item. Because of
inheritance, this may be more than the tags listed in the line itself.
- :
- Set tags for the current headline. If there is an active region in the
agenda, change a tag for all headings in the region.
- ,
- 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.
- P
- Display weighted priority of current item.
- +
- S-<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.
- -
- S-<down>
- Decrease the priority of the current item.
- C-c C-s
- Schedule this item
- C-c C-d
- Set a deadline for this item.
- k
- Agenda actions, to set dates for selected items to the cursor date.
This command also works in the calendar! The command prompts for an
additonal key:
m Mark the entry at point for action. You can also make entries
in Org files with C-c C-x C-k.
d Set the deadline of the marked entry to the date at point.
s Schedule the marked entry at the date at point.
r Call org-remember with the cursor date as default date.
Press r afterwards to refresh the agenda and see the effect of the
command.
- S-<right>
- Change the time stamp associated with the current line by one day into the
future. With a numeric prefix argument, change it by that many days. For
example, 3 6 5 S-<right> will change it by a year. The stamp is
changed in the original org file, but the change is not directly reflected in
the agenda buffer. Use the r key to update the buffer.
- S-<left>
- Change the time stamp associated with the current line by one day
into the past.
- >
- Change the time stamp associated with the current line to today.
The key > has been chosen, because it is the same as S-.
on my keyboard.
- I
- Start the clock on the current item. If a clock is running already, it
is stopped first.
- O
- Stop the previously started clock.
- X
- Cancel the currently running clock.
- J
- Jump to the running clock in another window.
- Calendar commands
-
- c
- Open the Emacs calendar and move to the date at the agenda cursor.
- c
- When in the calendar, compute and show the Org mode agenda for the
date at the cursor.
- i
- Insert a new entry into the diary. Prompts for the type of entry
(day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
entry in the diary, just as i d etc. would do in the calendar.
The date is taken from the cursor position.
- M
- Show the phases of the moon for the three months around current date.
- S
- Show sunrise and sunset times. The geographical location must be set
with calendar variables, see documentation of the Emacs calendar.
- C
- Convert the date at cursor into many other cultural and historic
calendars.
- H
- Show holidays for three month around the cursor date.
- M-x org-export-icalendar-combine-agenda-files
- Export a single iCalendar file containing entries from all agenda files.
This is a globally available command, and also available in the agenda menu.
- Exporting to a file
-
- C-x C-w
- Write the agenda view to a file. Depending on the extension of the
selected file name, the view will be exported as HTML (extension
.html or .htm), Postscript (extension .ps), or
plain text (any other extension). Use the variable
org-agenda-exporter-settings to set options for ps-print
and for htmlize to be used during export.
- Quit and Exit
-
- q
- Quit agenda, remove the agenda buffer.
- x
- 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 will not be removed.