Org API
Table of Contents
- Org-Agenda API Functions (org-agenda.el)
- org-agenda
&optional arg keys restriction - org-agenda-Quit
&optional arg - org-agenda-action
- org-agenda-add-entry-text
- org-agenda-add-entry-to-org-agenda-diary-file
type text &optional d1 d2 - org-agenda-add-note
&optional arg - org-agenda-align-tags
&optional line - org-agenda-append-agenda
- org-agenda-archive
- org-agenda-archive-default
- org-agenda-archive-default-with-confirmation
- org-agenda-archive-to-archive-sibling
- org-agenda-archive-with
cmd &optional confirm - org-agenda-archives-mode
&optional with-files - org-agenda-bulk-action
&optional arg - org-agenda-bulk-mark
&optional arg - org-agenda-bulk-mark-all
- org-agenda-bulk-mark-regexp
regexp - org-agenda-bulk-remove-overlays
&optional beg end - org-agenda-bulk-toggle
- org-agenda-bulk-unmark
&optional arg - org-agenda-bulk-unmark-all
- org-agenda-change-all-lines
newhead hdmarker &optional fixface just-this - org-agenda-change-time-span
span &optional n - org-agenda-check-clock-gap
t1 t2 ok-list - org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item
&optional end - org-agenda-check-no-diary
- org-agenda-check-type
error &rest types - org-agenda-cleanup-fancy-diary
- org-agenda-clock-cancel
&optional arg - org-agenda-clock-goto
- org-agenda-clock-in
&optional arg - org-agenda-clock-out
- org-agenda-clockreport-mode
&optional with-filter - org-agenda-collect-markers
- org-agenda-columns
- org-agenda-colview-compute
fmt - org-agenda-colview-summarize
cache - org-agenda-compare-effort
op value - org-agenda-compute-starting-span
sd span &optional n - org-agenda-copy-local-variable
var - org-agenda-cycle-show
&optional n - org-agenda-date-earlier
arg &optional what - org-agenda-date-earlier-hours
arg - org-agenda-date-earlier-minutes
arg - org-agenda-date-later
arg &optional what - org-agenda-date-later-hours
arg - org-agenda-date-later-minutes
arg - org-agenda-date-prompt
arg - org-agenda-day-view
&optional day-of-year - org-agenda-deadline
arg &optional time - org-agenda-deadline-face
fraction - org-agenda-diary-entry
- org-agenda-diary-entry-in-org-file
- org-agenda-dim-blocked-tasks
- org-agenda-do-action
form &optional current-buffer - org-agenda-do-context-action
- org-agenda-do-tree-to-indirect-buffer
- org-agenda-earlier
arg - org-agenda-entry-text-hide
- org-agenda-entry-text-mode
&optional arg - org-agenda-entry-text-show
- org-agenda-entry-text-show-here
- org-agenda-execute
arg - org-agenda-execute-calendar-command
cmd - org-agenda-exit
- org-agenda-file-p
&optional file - org-agenda-file-to-front
&optional to-end - org-agenda-files
&optional unrestricted archives - org-agenda-filter-apply
filter type - org-agenda-filter-by-category
strip - org-agenda-filter-by-tag
strip &optional char narrow - org-agenda-filter-by-tag-refine
strip &optional char - org-agenda-filter-by-top-category
strip - org-agenda-filter-effort-form
e - org-agenda-filter-make-matcher
- org-agenda-filter-top-category-apply
category &optional negative - org-agenda-fix-displayed-tags
txt tags add-inherited hide-re - org-agenda-follow-mode
- org-agenda-fontify-priorities
- org-agenda-format-date-aligned
date - org-agenda-format-item
extra txt &optional category tags dotime remove-re habitp - org-agenda-get-blocks
- org-agenda-get-category-icon
category - org-agenda-get-day-entries
file date &rest args - org-agenda-get-day-face
date - org-agenda-get-deadlines
- org-agenda-get-progress
- org-agenda-get-represented-tags
- org-agenda-get-restriction-and-command
prefix-descriptions - org-agenda-get-scheduled
&optional deadline-results - org-agenda-get-sexps
- org-agenda-get-some-entry-text
marker n-lines &optional indent &rest keep - org-agenda-get-timestamps
&optional deadline-results - org-agenda-get-todos
- org-agenda-goto
&optional highlight - org-agenda-goto-calendar
- org-agenda-goto-date
date - org-agenda-goto-mouse
ev - org-agenda-goto-today
- org-agenda-holidays
- org-agenda-insert-diary-as-top-level
text - org-agenda-insert-diary-make-new-entry
text - org-agenda-kill
- org-agenda-kill-all-agenda-buffers
- org-agenda-later
arg - org-agenda-list
&optional arg start-day span - org-agenda-list-stuck-projects
&rest ignore - org-agenda-log-mode
&optional special - org-agenda-manipulate-query-add
- org-agenda-manipulate-query-add-re
- org-agenda-manipulate-query-subtract
- org-agenda-manipulate-query-subtract-re
- org-agenda-mark-clocking-task
- org-agenda-mark-filtered-text
- org-agenda-mark-header-line
pos - org-agenda-maybe-redo
- org-agenda-menu
event - org-agenda-mode
- org-agenda
Org-Agenda API Functions (org-agenda.el)
org-agenda &optional arg keys restriction
Dispatch agenda commands to collect entries to the agenda buffer. Prompts for a command to execute. Any prefix arg will be passed on to the selected command. The default selections are:
a Call org-agenda-list to display the agenda for current day or week. t Call org-todo-list to display the global todo list. T Call org-todo-list to display the global todo list, select only entries with a specific TODO keyword (the user gets a prompt). m Call org-tags-view to display headlines with tags matching a condition (the user is prompted for the condition). M Like m, but select only TODO entries, no ordinary headlines. L Create a timeline for the current buffer. e Export views to associated files. s Search entries for keywords. / Multi occur across all agenda files and also files listed in org-agenda-text-search-extra-files. < Restrict agenda commands to buffer, subtree, or region. Press several times to get the desired effect. > Remove a previous restriction. ! Configure what "stuck" means. C Configure custom agenda commands.
More commands can be added by configuring the variable org-agenda-custom-commands. In particular, specific tags and TODO keyword searches can be pre-defined in this way.
If the current buffer is in Org-mode and visiting a file, you can also first press < once to indicate that the agenda should be temporarily (until the next use of C-c a) restricted to the current file. Pressing < twice means to restrict to the current subtree or region (if active).
org-agenda-Quit &optional arg
Exit agenda by removing the window or the buffer
org-agenda-action
Select entry for agenda action, or execute an agenda action. This command prompts for another letter. Valid inputs are:
m Mark the entry at point for an agenda action s Schedule the marked entry to the date at the cursor d Set the deadline of the marked entry to the date at the cursor r Call org-remember with cursor date as the default date c Call org-capture with cursor date as the default date SPC Show marked entry in other window TAB Visit marked entry in other window
The cursor may be at a date in the calendar, or in the Org agenda.
org-agenda-add-entry-text
Add entry text to agenda lines. This will add a maximum of org-agenda-add-entry-text-maxlines lines of the entry text following headings shown in the agenda. Drawers will be excluded, also the line with scheduling/deadline info.
org-agenda-add-entry-to-org-agenda-diary-file type text &optional d1 d2
Add a diary entry with type to org-agenda-diary-file.
If text is not empty, it will become the headline of the new entry, and
the resulting entry will not be shown. When text is empty, switch to
org-agenda-diary-file and let the user finish the entry there.
org-agenda-add-note &optional arg
Add a time-stamped note to the entry at point.
org-agenda-align-tags &optional line
Align all tags in agenda items to org-agenda-tags-column.
org-agenda-append-agenda
Append another agenda view to the current one. This function allows interactive building of block agendas. Agenda views are separated by org-agenda-block-separator.
org-agenda-archive
Archive the entry or subtree belonging to the current agenda entry.
org-agenda-archive-default
Archive the entry or subtree belonging to the current agenda entry.
org-agenda-archive-default-with-confirmation
Archive the entry or subtree belonging to the current agenda entry.
org-agenda-archive-to-archive-sibling
Move the entry to the archive sibling.
org-agenda-archive-with cmd &optional confirm
Move the entry to the archive sibling.
org-agenda-archives-mode &optional with-files
Toggle inclusion of items in trees marked with :ARCHIVE:. When called with a prefix argument, include all archive files as well.
org-agenda-bulk-action &optional arg
Execute an remote-editing action on all marked entries. The prefix arg is passed through to the command if possible.
org-agenda-bulk-mark &optional arg
Mark the entry at point for future bulk action.
org-agenda-bulk-mark-all
Mark all entries for future agenda bulk action.
org-agenda-bulk-mark-regexp regexp
Mark entries matching regexp for future agenda bulk action.
org-agenda-bulk-remove-overlays &optional beg end
Remove the mark overlays between beg and end in the agenda buffer.
beg and end default to the buffer limits.
This only removes the overlays, it does not remove the markers from the list in org-agenda-bulk-marked-entries.
org-agenda-bulk-toggle
Toggle marking the entry at point for bulk action.
org-agenda-bulk-unmark &optional arg
Unmark the entry at point for future bulk action.
org-agenda-bulk-unmark-all
Remove all marks in the agenda buffer. This will remove the markers and the overlays.
org-agenda-change-all-lines newhead hdmarker &optional fixface just-this
Change all lines in the agenda buffer which match hdmarker.
The new content of the line will be newhead (as modified by
org-agenda-format-item). hdmarker is checked with
equal against all org-hd-marker text properties in the file.
If fixface is non-nil, the face of each item is modified according to
the new TODO state.
If just-this is non-nil, change just the current line, not all.
If FORCE-TAGS is non nil, the car of it returns the new tags.
org-agenda-change-time-span span &optional n
Change the agenda view to span.
span may be day, week, month, year.
org-agenda-check-clock-gap t1 t2 ok-list
Check if gap t1 -> t2 contains one of the ok-list time-of-day values.
org-agenda-check-for-timestamp-as-reason-to-ignore-todo-item &optional end
Do we have a reason to ignore this TODO entry because it has a time stamp?
org-agenda-check-no-diary
Check if the entry is a diary link and abort if yes.
org-agenda-check-type error &rest types
Check if agenda buffer is of allowed type.
If error is non-nil, throw an error, otherwise just return nil.
org-agenda-cleanup-fancy-diary
Remove unwanted stuff in buffer created by fancy-diary-display. This gets rid of the date, the underline under the date, and the dummy entry installed by org-mode to ensure non-empty diary for each date. It also removes lines that contain only whitespace.
org-agenda-clock-cancel &optional arg
Cancel the currently running clock.
org-agenda-clock-goto
Jump to the currently clocked in task within the agenda. If the currently clocked in task is not listed in the agenda buffer, display it in another window.
org-agenda-clock-in &optional arg
Start the clock on the currently selected item.
org-agenda-clock-out
Stop the currently running clock.
org-agenda-clockreport-mode &optional with-filter
Toggle clocktable mode in an agenda buffer.
With prefix arg with-filter, make the clocktable respect the current
agenda filter.
org-agenda-collect-markers
Collect the markers pointing to entries in the agenda buffer.
org-agenda-columns
Turn on or update column view in the agenda.
org-agenda-colview-compute fmt
Compute the relevant columns in the contributing source buffers.
org-agenda-colview-summarize cache
Summarize the summarizable columns in column view in the agenda. This will add overlays to the date lines, to show the summary for each day.
org-agenda-compare-effort op value
Compare the effort of the current line with value, using op.
If the line does not have an effort defined, return nil.
org-agenda-compute-starting-span sd span &optional n
Compute starting date for agenda.
span may be day, week, month, year. The return value
is a cons cell with the starting date and the number of days,
so that the date sd will be in that range.
org-agenda-copy-local-variable var
Get a variable from a referenced buffer and install it here.
org-agenda-cycle-show &optional n
Show the current entry in another window, with default settings. Default settings are taken from org-show-hierarchy-above and siblings. When use repeatedly in immediate succession, the remote entry will cycle through visibility
children -> subtree -> folded
When called with a numeric prefix arg, that arg will be passed through to org-agenda-show-1. For the interpretation of that argument, see the docstring of org-agenda-show-1.
org-agenda-date-earlier arg &optional what
Change the date of this item to arg day(s) earlier.
org-agenda-date-earlier-hours arg
Change the time of this item, in hour steps.
org-agenda-date-earlier-minutes arg
Change the time of this item, in units of org-time-stamp-rounding-minutes.
org-agenda-date-later arg &optional what
Change the date of this item to arg day(s) later.
org-agenda-date-later-hours arg
Change the time of this item, in hour steps.
org-agenda-date-later-minutes arg
Change the time of this item, in units of org-time-stamp-rounding-minutes.
org-agenda-date-prompt arg
Change the date of this item. Date is prompted for, with default today.
The prefix arg is passed to the org-time-stamp command and can therefore
be used to request time specification in the time stamp.
org-agenda-day-view &optional day-of-year
Switch to daily view for agenda.
With argument day-of-year, switch to that day of the year.
org-agenda-deadline arg &optional time
Schedule the item at point.
arg is passed through to org-deadline.
org-agenda-deadline-face fraction
Return the face to displaying a deadline item.
fraction is what fraction of the head-warning time has passed.
org-agenda-diary-entry
Make a diary entry, like the i command from the calendar. All the standard commands work: block, weekly etc. When org-agenda-diary-file points to a file, org-agenda-diary-entry-in-org-file is called instead to create entries in that Org-mode file.
org-agenda-diary-entry-in-org-file
Make a diary entry in the file org-agenda-diary-file.
org-agenda-dim-blocked-tasks
Dim currently blocked TODO's in the agenda display.
org-agenda-do-action form &optional current-buffer
Evaluate form at the entry pointed to by org-agenda-action-marker.
org-agenda-do-context-action
Show outline path and, maybe, follow mode window.
org-agenda-do-tree-to-indirect-buffer
Same as org-agenda-tree-to-indirect-buffer without saving window.
org-agenda-earlier arg
Go backward in time by the current span.
With prefix arg, go backward that many times the current span.
org-agenda-entry-text-hide
Remove any shown entry context.
org-agenda-entry-text-mode &optional arg
Toggle entry text mode in an agenda buffer.
org-agenda-entry-text-show
Add entry context for all agenda lines.
org-agenda-entry-text-show-here
Add some text from the entry as context to the current line.
org-agenda-execute arg
Execute another agenda command, keeping same window. So this is just a shortcut for C-c C-a, available in the agenda.
org-agenda-execute-calendar-command cmd
Execute a calendar command from the agenda, with the date associated to the cursor position.
org-agenda-exit
Exit agenda by removing the window or the buffer. Also kill all Org-mode buffers which have been loaded by org-agenda. Org-mode buffers visited directly by the user will not be touched.
org-agenda-file-p &optional file
Return non-nil, if file is an agenda file.
If file is omitted, use the file associated with the current
buffer.
org-agenda-file-to-front &optional to-end
Move/add the current file to the top of the agenda file list.
If the file is not present in the list, it is added to the front. If it is
present, it is moved there. With optional argument to-end, add/move to the
end of the list.
org-agenda-files &optional unrestricted archives
Get the list of agenda files.
Optional unrestricted means return the full list even if a restriction
is currently in place.
When archives is t, include all archive files that are really being
used by the agenda files. If ARCHIVE is ifmode, do this only if
org-agenda-archives-mode is t.
org-agenda-filter-apply filter type
Set filter as the new agenda filter and apply it.
org-agenda-filter-by-category strip
Keep only those lines in the agenda buffer that have a specific category. The category is that of the current line.
org-agenda-filter-by-tag strip &optional char narrow
Keep only those lines in the agenda buffer that have a specific tag.
The tag is selected with its fast selection letter, as configured.
With prefix argument strip, remove all lines that do have the tag.
A lisp caller can specify char. narrow means that the new tag should be
used to narrow the search - the interactive user can also press - or +
to switch to narrowing.
org-agenda-filter-by-tag-refine strip &optional char
Refine the current filter. See org-agenda-filter-by-tag.
org-agenda-filter-by-top-category strip
Keep only those lines in the agenda buffer that have a specific category. The category is that of the current line.
org-agenda-filter-effort-form e
Return the form to compare the effort of the current line with what e says.
e looks like "+<2:25".
org-agenda-filter-make-matcher
Create the form that tests a line for agenda filter.
org-agenda-filter-top-category-apply category &optional negative
Set FILTER as the new agenda filter and apply it.
org-agenda-fix-displayed-tags txt tags add-inherited hide-re
Remove tags string from txt, and add a modified list of tags.
The modified list may contain inherited tags, and tags matched by
org-agenda-hide-tags-regexp will be removed.
org-agenda-follow-mode
Toggle follow mode in an agenda buffer.
org-agenda-fontify-priorities
Make highest priority lines bold, and lowest italic.
org-agenda-format-date-aligned date
Format a date string for display in the daily/weekly agenda, or timeline. This function makes sure that dates are aligned for easy reading.
org-agenda-format-item extra txt &optional category tags dotime remove-re habitp
Format txt to be inserted into the agenda buffer.
In particular, it adds the prefix and corresponding text properties. extra
must be a string and replaces the %s specifier in the prefix format.
category (string, symbol or nil) may be used to overrule the default
category taken from local variable or file name. It will replace the %c
specifier in the format. dotime, when non-nil, indicates that a
time-of-day should be extracted from txt for sorting of this entry, and for
the %t specifier in the format. When dotime is a string, this string is
searched for a time before txt is. tags can be the tags of the headline.
Any match of remove-re will be removed from txt.
org-agenda-get-blocks
Return the date-range information for agenda display.
org-agenda-get-category-icon category
Return an image for category according to org-agenda-category-icon-alist.
org-agenda-get-day-entries file date &rest args
Does the work for org-diary and org-agenda.
file is the path to a file to be checked for entries. date is date like
the one returned by calendar-current-date. args are symbols indicating
which kind of entries should be extracted. For details about these, see
the documentation of org-diary.
org-agenda-get-day-face date
Return the face date should be displayed with.
org-agenda-get-deadlines
Return the deadline information for agenda display.
org-agenda-get-progress
Return the logged TODO entries for agenda display.
org-agenda-get-represented-tags
Get a list of all tags currently represented in the agenda.
org-agenda-get-restriction-and-command prefix-descriptions
The user interface for selecting an agenda command.
org-agenda-get-scheduled &optional deadline-results
Return the scheduled information for agenda display.
org-agenda-get-sexps
Return the sexp information for agenda display.
org-agenda-get-some-entry-text marker n-lines &optional indent &rest keep
Extract entry text from marker, at most n-lines lines.
This will ignore drawers etc, just get the text.
If indent is given, prefix every line with this string. If keep is
given, it is a list of symbols, defining stuff that should not be
removed from the entry content. Currently only planning is allowed here.
org-agenda-get-timestamps &optional deadline-results
Return the date stamp information for agenda display.
org-agenda-get-todos
Return the TODO information for agenda display.
org-agenda-goto &optional highlight
Go to the Org-mode file which contains the item at point.
org-agenda-goto-calendar
Open the Emacs calendar with the date at the cursor.
org-agenda-goto-date date
Jump to date in agenda.
org-agenda-goto-mouse ev
Go to the Org-mode file which contains the item at the mouse click.
org-agenda-goto-today
Go to today.
org-agenda-holidays
Display the holidays for the 3 months around the cursor date.
org-agenda-insert-diary-as-top-level text
Make new entry as a top-level entry at the end of the file.
Add text as headline, and position the cursor in the second line so that
a timestamp can be added there.
org-agenda-insert-diary-make-new-entry text
Make new entry as last child of current entry.
Add text as headline, and position the cursor in the second line so that
a timestamp can be added there.
org-agenda-kill
Kill the entry or subtree belonging to the current agenda entry.
org-agenda-kill-all-agenda-buffers
Kill all buffers in org-agena-mode. This is used when toggling sticky agendas. You can also explicitly invoke it with C-c a C-k.
org-agenda-later arg
Go forward in time by thee current span.
With prefix arg, go forward that many times the current span.
org-agenda-list &optional arg start-day span
Produce a daily/weekly view from all files in variable org-agenda-files. The view will be for the current day or week, but from the overview buffer you will be able to go to other days/weeks.
With a numeric prefix argument in an interactive call, the agenda will
span arg days. Lisp programs should instead specify span to change
the number of days. span defaults to org-agenda-span.
start-day defaults to TODAY, or to the most recent match for the weekday
given in org-agenda-start-on-weekday.
org-agenda-list-stuck-projects &rest ignore
Create agenda view for projects that are stuck. Stuck projects are project that have no next actions. For the definitions of what a project is and how to check if it stuck, customize the variable org-stuck-projects.
org-agenda-log-mode &optional special
Toggle log mode in an agenda buffer.
With argument special, show all possible log items, not only the ones
configured in org-agenda-log-mode-items.
With a double C-u prefix arg, show only log items, nothing else.
org-agenda-manipulate-query-add
Manipulate the query by adding a search term with positive selection. Positive selection means the term must be matched for selection of an entry.
org-agenda-manipulate-query-add-re
Manipulate the query by adding a search regexp with positive selection. Positive selection means the regexp must match for selection of an entry.
org-agenda-manipulate-query-subtract
Manipulate the query by adding a search term with negative selection. Negative selection means term must not be matched for selection of an entry.
org-agenda-manipulate-query-subtract-re
Manipulate the query by adding a search regexp with negative selection. Negative selection means regexp must not match for selection of an entry.
org-agenda-mark-clocking-task
Mark the current clock entry in the agenda if it is present.
org-agenda-mark-filtered-text
Mark all text hidden by filtering with a text property.
org-agenda-mark-header-line pos
Mark the line at pos as an agenda structure header.
org-agenda-maybe-redo
If there is any window showing the agenda view, update it.
org-agenda-menu event
Agenda menu
org-agenda-mode
Mode for time-sorted view on action items in Org-mode files.
The following commands are available:
key binding — -------
C-c Prefix Command TAB org-agenda-goto C-k org-agenda-kill RET org-agenda-switch-to C-n org-agenda-next-line C-p org-agenda-previous-line C-x Prefix Command C-_ org-agenda-undo SPC org-agenda-show-and-scroll-up ! org-agenda-toggle-deadlines $ org-agenda-archive % org-agenda-bulk-mark-regexp