- Top-level heading ** Second-level heading *** Third-level heading
- First ordered item
- Second ordered item
- Checkbox item
- Completed checkbox
#+BEGIN_EXAMPLE Verbatim text, no markup processing. #+END_EXAMPLE
#+BEGIN_CENTER Centered text. #+END_CENTER
#+BEGIN_VERSE Poetry or formatted text. #+END_VERSE
[fn:1] Footnote definition.
Or inline[fn:: inline footnote definition].
- TODO Buy groceries
- NEXT Write report
- WAITING Review from team :@john:
- DONE Complete project
- CANCELLED Obsolete task
(setq org-agenda-custom-commands '(("d" "Dashboard" ((agenda "" ((org-agenda-span 7))) (todo "NEXT" ((org-agenda-overriding-header "Next Actions"))) (todo "WAITING" ((org-agenda-overriding-header "Waiting For"))))) ("w" "Weekly Review" ((agenda "" ((org-agenda-span 7) (org-agenda-start-on-weekday 1))) (stuck "") (todo "TODO")))))
(setq org-refile-use-outline-path 'file) (setq org-outline-path-complete-in-steps nil) (setq org-refile-allow-creating-parent-nodes 'confirm) C-c C-w to refile entry, C-u C-c C-w to jump to target
(setq org-clock-persist t) (setq org-clock-in-resume t) (setq org-clock-out-remove-zero-time-clocks t) (setq org-clock-report-include-clocking-task t) C-c C-x C-i clock in, C-c C-x C-o clock out, C-c C-x C-r insert clock report
- TODO Call dentist :@phone:urgent:
(setq org-tag-alist '((:startgroup) ("@home" . ?h) ("@work" . ?w) (:endgroup) ("urgent" . ?u) ("important" . ?i)))
(setq org-archive-subtree-save-file-p t) C-c C-x C-a archive subtree, C-c C-x C-s archive sibling What is the current status of the task? TODO NEXT WAITING DONE CANCELLED
#+RESULTS: example-block : Hello from Python : Item 0 : Item 1 : Item 2
#+BEGIN_SRC shell :dir /tmp :results silent ls -la #+END_SRC
#+BEGIN_SRC python :session py :results output
Persistent session across blocks
import sys print(sys.version) #+END_SRC Header arguments:
- :results (value, output, silent, replace, append)
- :exports (code, results, both, none)
- :var (variable binding)
- :dir (working directory)
- :session (persistent session)
- :tangle (file to tangle to)
- :noweb (noweb reference expansion)
#+BEGIN_SRC python :tangle ./script.py :shebang "#!/usr/bin/env python3" def main(): print("Generated from org file")
if name == "main": main() #+END_SRC
#+BEGIN_SRC nix :tangle ./default.nix :mkdirp yes { pkgs ? import <nixpkgs> {} }: pkgs.hello #+END_SRC C-c C-v t to tangle current file, :mkdirp yes to create directories
#+NAME: main-function #+BEGIN_SRC python :noweb-ref main def main(): print("Running main") #+END_SRC
#+BEGIN_SRC python :tangle ./program.py :noweb yes <<imports>>
<<main>>
if name == "main": main() #+END_SRC
#+RESULTS: : 6
#+BEGIN_SRC python :results output print("line 1") print("line 2") #+END_SRC
#+RESULTS: : line 1 : line 2
#+BEGIN_SRC elisp :results table '(("Name" "Age") ("Alice" 30) ("Bob" 25)) #+END_SRC
#+RESULTS: | Name | Age | | Alice | 30 | | Bob | 25 |
(setq org-confirm-babel-evaluate nil) (setq org-src-preserve-indentation t) (setq org-src-tab-acts-natively t) (setq org-edit-src-content-indentation 0)
Today is src_elisp{(format-time-string "%Y-%m-%d")}. What kind of output do you need? :results value :results output :results table :results raw :results silent
#+SETUPFILE: ./theme.setup
(setq org-html-validation-link nil) (setq org-html-head-include-scripts nil) (setq org-html-head-include-default-style nil) (setq org-html-doctype "html5") (setq org-html-html5-fancy t) C-c C-e h h to export to HTML file
(setq org-latex-pdf-process '("latexmk -pdf -shell-escape %f"))
(add-to-list 'org-latex-classes '("report" "\documentclass{report}" ("\chapter{%s}" . "\chapter*{%s}") ("\section{%s}" . "\section*{%s}"))) C-c C-e l p to export to PDF via LaTeX
- Introduction ** First Slide
- Point one
- Point two
** Second Slide #+ATTR_BEAMER: :overlay <+->
- Appears first
- Appears second
- Appears third
- Conclusion ** Summary Key takeaways here.
(require 'ox-md) (require 'ox-gfm) ; GitHub Flavored Markdown C-c C-e m m to export to Markdown
- Not exported :noexport:
#+BEGIN_COMMENT This entire block is not exported. #+END_COMMENT
Text for export only. @@html:<br>@@ continues.
#+BEGIN_EXPORT html <div class="custom">Raw HTML here</div> #+END_EXPORT What is the target format? HTML (ox-html) PDF via LaTeX (ox-latex) Beamer (ox-beamer) Markdown (ox-md, ox-gfm) ODT (ox-odt)