Skip to content

Latest commit

 

History

History
493 lines (429 loc) · 25.1 KB

README.org

File metadata and controls

493 lines (429 loc) · 25.1 KB

Org layer

img/org.png

Table of Contents

Description

This layer enables org mode for Spacemacs.

Features:

BibTeX

For more extensive support of references through BibTeX files, have a look at the BibTeX layer.

Important Note

Since version 0.104, spacemacs uses the org version from the org ELPA repository instead of the one shipped with emacs. Then, any org related code should not be loaded before dotspacemacs/user-config, otherwise both versions will be loaded and will conflict.

Because of autoloading, calling to org functions will trigger the loading up of the org shipped with emacs which will induce conflicts. One way to avoid conflict is to wrap your org config code in a with-eval-after-load block like this:

(with-eval-after-load 'org
  ;; here goes your Org config :)
  ;; ....
  )

Install

Layer

To use this configuration layer, add it to your ~/.spacemacs. You will need to add org to the existing dotspacemacs-configuration-layers list in this file.

Github support

To install Github related extensions like ox-gfm to export to Github flavored markdown set the variable org-enable-github-support to t.

(setq-default dotspacemacs-configuration-layers '(
  (org :variables org-enable-github-support t)))

Twitter Bootstrap support

To install the Twitter Boostrap extension (from ox-twbs), which enables twitter bootstrap formatted html, then set the variable org-enable-bootstrap-support to t.

(setq-default dotspacemacs-configuration-layers '(
  (org :variables
       org-enable-bootstrap-support t)))

Gnuplot support

Org-mode support the plotting of data within tables through Gnuplot as demonstrated here; unfortunately, this is not terribly well supported on Windows at this stage. It is possible to disable the configuration of gnuplot support as usual by adding the package gnuplot to your dotspacemacs-excluded-packages variable.

Reveal.js support

To enable the export of your org file as a reveal.js presentation, set the variable org-enable-reveal-js-support to t. This will install the org-reveal extension.

(setq-default dotspacemacs-configuration-layers
 '((org :variables org-enable-reveal-js-support t)))

In order to be able to use org-reveal, download reveal.js from its homepage and set org-reveal-js to the download path, as described in the manual. Alternatively, add the following line to each .org file you want to process:

#+REVEAL_ROOT: http://cdn.jsdelivr.net/reveal.js/3.0.0/

Different bullets

You can tweak the bullets displayed in the org buffer in the function dotspacemacs/user-config of your dotfile by setting the variable org-bullets-bullet-list. By default the list is set to ("◉" "○" "✸" "✿").

(setq org-bullets-bullet-list '("" "" "" ""))

Project support

Set the layer variable org-projectile-file to the filename where you want to store project-specific TODOs. If this is an absolute path, all todos will be stored in the same file (organized by project), whereas if it is just a single filename, todos will be stored in each project root.

(setq-default dotspacemacs-configuration-layers
  '((org :variables org-projectile-file "TODOs.org")))

The TODO files are not added to the agenda automatically. You can do this with the following snippet. Note that this may have unintended consequences until this bug is fixed.

(with-eval-after-load 'org-agenda
  (require 'org-projectile)
  (push (org-projectile:todo-files) org-agenda-files))

Mode line support

To temporarily enable mode line display of org clock, press SPC t m c.

To permanently enable mode line display of org clock, add this snippet to your dotspacemacs/user-config function:

(setq spaceline-org-clock-p t)

Key bindings

Org

Key BindingDescription
SPC a o #org agenda list stuck projects
SPC a o /org occur in agenda files
SPC a o aorg agenda list
SPC a o corg capture
SPC a o eorg store agenda views
SPC a o lorg store link
SPC a o morg tags view
SPC a o oorg agenda
SPC a o Oorg clock out
SPC a o sorg search view
SPC a o torg todo list
SPC C corg-capture

Org with evil-org-mode

Key BindingDescription
SPC m <dotspacemacs-major-mode-leader-key>org-ctrl-c-ctrl-c
SPC m *org-ctrl-c-star
SPC m RETorg-ctrl-c-ret
SPC m -org-ctrl-c-minus
SPC m '​org-edit-special
SPC m ^org-sort
SPC m /org-sparse-tree
SPC m .org-time-stamp
SPC m !org-time-stamp-inactive
SPC m aorg-agenda
SPC m borg-tree-to-indirect-buffer
SPC m Aorg-archive-subtree
SPC m corg-capture
SPC m Cevil-org-recompute-clocks
SPC m dorg-deadline
SPC m Dorg-insert-drawer
SPC m eorg-export-dispatch
SPC m forg-set-effort
SPC m Iorg-clock-in
SPC m lorg-open-at-point
SPC m norg-narrow-to-subtree
SPC m Nwiden
SPC m Oorg-clock-out
SPC m Porg-set-property
SPC m qorg-clock-cancel
SPC m Rorg-refile
SPC m sorg-schedule
SPC m Torg-show-todo-tree
SPC m Lorg-shiftright
SPC m Horg-shiftleft
SPC m Korg-shiftup
SPC m Jorg-shiftdown
SPC m C-S-lorg-shiftcontrolright
SPC m C-S-horg-shiftcontrolleft
SPC m C-S-jorg-shiftcontroldown
SPC m C-S-korg-shiftcontrolup
SPC s jspacemacs/jump-in-buffer (jump to a heading)

Tables

Key BindingDescription
SPC m t aAlign the table at point by aligning all vertical bars
SPC m t bBlank the current table field or active region
SPC m t cConvert from org-mode table to table.el and back
SPC m t d cDelete a column from the table
SPC m t d rDelete the current row or horizontal line from the table
SPC m t eReplace the table field value at the cursor by the result of a calculation
SPC m t EExport table to a file, with configurable format
SPC m t hGo to the previous field in the table
SPC m t HMove column to the left
SPC m t i cInsert a new column into the table
SPC m t i hInsert a horizontal-line below the current line into the table
SPC m t i HInsert a hline and move to the row below that line
SPC m t i rInsert a new row above the current line into the table
SPC m t IImport a file as a table
SPC m t jGo to the next row (same column) in the current table
SPC m t JMove table row down
SPC m t KMove table row up
SPC m t lGo to the next field in the current table, creating new lines as needed
SPC m t LMove column to the right
SPC m t nQuery for a size and insert a table skeleton
SPC m t NUse the table.el package to insert a new table
SPC m t pPlot the table using org-plot/gnuplot
SPC m t rRecalculate the current table line by applying all stored formulas
SPC m t sSort table lines according to the column at point
SPC m t t fToggle the formula debugger in tables
SPC m t t oToggle the display of Row/Column numbers in tables
SPC m t wWrap several fields in a column like a paragraph

Tree

Key BindingDescription
SPC m S lorg-demote-subtree
SPC m S horg-promote-subtree
SPC m S korg-move-subtree-up
SPC m S jorg-move-subtree-down
Key BindingDescription
TABorg-cycle
$org-end-of-line
^org-beginning-of-line
<org-metaleft
>org-metaright
ghoutline-up-heading
gjorg-forward-heading-same-level
gkorg-backward-heading-same-level
gloutline-next-visible-heading
torg-todo
Torg-insert-todo-heading nil
Horg-beginning-of-line
Lorg-end-of-line
oalways-insert-item
Oorg-open-above
Key BindingDescription
M-lorg-metaright
M-horg-metaleft
M-korg-metaup
M-jorg-metadown
M-Lorg-shiftmetaright
M-Horg-shiftmetaleft
M-Korg-shiftmetaup
M-Jorg-shiftmetadown
M-oorg-insert-heading+org-metaright
M-torg-insert-todo-heading nil+ org-metaright

Element insertion

Key BindingDescription
SPC m h iorg-insert-heading-after-current
SPC m h Iorg-insert-heading
SPC m h sorg-insert-subheading
SPC m i forg-insert-footnote
SPC m i lorg-insert-link

Links

Key BindingDescription
RETorg-open-at-point

Emphasis

Key BindingDescription
SPC m x bmake region bold
SPC m x cmake region code
SPC m x imake region italic
SPC m x rclear region emphasis
SPC m x smake region strike-through
SPC m x umake region underline
SPC m x vmake region verbose

Tagging

Key BindingDescription
SPC m :org-set-tags

Navigating in calendar

Key BindingDescription
M-lOne day forward
M-hOne day backward
M-jOne week forward
M-kOne week backward
M-LOne month forward
M-HOne month backward
M-JOne year forward
M-KOne year backward

Capture buffers and src blocks

org-capture-mode and org-src-mode both support the confirm and abort conventions.

Key BindingDescription
SPC m <dotspacemacs-major-mode-leader-key>confirm in org-capture-mode
SPC m '​confirm in org-src-mode
SPC m cconfirm
SPC m aabort
SPC m kabort
SPC m rorg-capture-refile in org-capture-mode

Org agenda

Keybindings

The evilified org agenda supports the following bindings:

Key BindingDescription
M-SPC or s-M-SPCorg-agenda transient state
SPC m :org-agenda-set-tags
SPC m aorg-agenda
SPC m dorg-agenda-deadline
SPC m forg-agenda-set-effort
SPC m Iorg-agenda-clock-in
SPC m Oorg-agenda-clock-out
SPC m porg-pomodoro (if package is used)
SPC m Porg-agenda-set-property
SPC m qorg-agenda-refile
SPC m Qorg-agenda-clock-cancel
SPC m sorg-agenda-schedule
M-jnext item
M-kprevious item
M-hearlier view
M-llater view
grrefresh
gdtoggle grid
C-vchange view
RETorg-agenda-goto
M-RETorg-agenda-show-and-scroll-up

Org agenda transient state

Use M-SPC or s-M-SPC in an org agenda buffer to activate its transient state. The transient state aims to list the most useful org agenda commands and visually organize them by category. The commands associated with each binding are listed bellow.

KeybindingDescriptionCommand
Entry
htset statusorg-agenda-todo
hkkillorg-agenda-kill
hrrefileorg-agenda-refile
hAarchiveorg-agenda-archive-default
hTset tagsorg-agenda-set-tags
hpset priorityorg-agenda-priority
Visit entry
SPCin other windoworg-agenda-show-and-scroll-up
TAB& go to locationorg-agenda-goto
RET& del other windowsorg-agenda-switch-to
olinklink-hint-open-link
Filter
ftby tagorg-agenda-filter-by-tag
frrefine by tagorg-agenda-filter-by-tag-refine
fcby categoryorg-agenda-filter-by-category
fhby top headlineorg-agenda-filter-by-top-headline
fxby regexporg-agenda-filter-by-regexp
fddelete all filtersorg-agenda-filter-remove-all
Date
dsscheduleorg-agenda-schedule
ddset deadlineorg-agenda-deadline
dttimestamporg-agenda-date-prompt
+do laterorg-agenda-do-date-later
-do earlierorg-agenda-do-date-earlier
Toggle
tffolloworg-agenda-follow-mode
tllogorg-agenda-log-mode
taarchiveorg-agenda-archives-mode
trclock reportorg-agenda-clockreport-mode
tddiariesorg-agenda-toggle-diary
View
vddayorg-agenda-day-view
vwweekorg-agenda-week-view
vtfortnightorg-agenda-fortnight-view
vmmonthorg-agenda-month-view
vyyearorg-agenda-year-view
vnnext spanorg-agenda-later
vpprev spanorg-agenda-earlier
vrresetorg-agenda-reset-view
Clock
ciinorg-agenda-clock-in
cooutorg-agenda-clock-out
ckcancelorg-agenda-clock-cancel
cjjumporg-agenda-clock-goto
Other
grreloadorg-agenda-redo
.go to todayorg-agenda-goto-today
gdgo to dateorg-agenda-goto-date

Pomodoro

Key BindingDescription
SPC m pstarts a pomodoro

Presentation

org-present must be activated explicitly by typing: SPC SPC org-present

Key BindingDescription
hprevious slide
lnext slide
qquit

Org-MIME

Key BindingDescription
SPC m Min message-mode buffers convert into html email
SPC m msend current buffer as HTML email message

Org-download

Key BindingDescription
SPC m i sTake screenshot
SPC m i yYank image url

Org-projectile

Key BindingDescription
SPC a o pCapture a TODO for the current project
SPC u SPC a o pCapture a TODO for any given project (choose from list)
SPC p oGo to the TODOs for the current project