doomemacs/modules/lang/org
Henrik Lissner c05822ab39
bump: :lang
Emacs-Kotlin-Mode-Maintainers/kotlin-mode@876cc27dc1 -> Emacs-Kotlin-Mode-Maintainers/kotlin-mode@3e0c34087b
FStarLang/fstar-mode.el@3afbf04e4e -> FStarLang/fstar-mode.el@c95c2a61a6
Fanael/edit-indirect@7fffd87ac3 -> Fanael/edit-indirect@e3d86416bc
Fuco1/sphinx-mode@b5ac514e21 -> Fuco1/sphinx-mode@9d4075c106
Groovy-Emacs-Modes/groovy-emacs-modes@84f89b68ec -> Groovy-Emacs-Modes/groovy-emacs-modes@bf732d367b
NixOS/nix-mode@8e20de5ba7 -> NixOS/nix-mode@20ee8d8890
OCamlPro/ocp-indent@9e26c0a269 -> OCamlPro/ocp-indent@7c4d434132
ProofGeneral/PG@df19c7ba0e -> ProofGeneral/PG@e1e29acb04
Raku/raku-mode@eaac071f17 -> Raku/raku-mode@977b14a7c1
Sarcasm/irony-mode@5063d6b16d -> Sarcasm/irony-mode@870d1576fb
agda/agda@2816605bfd -> agda/agda@2816605bfd
amake/flutter.el@81c524a43c -> amake/flutter.el@08138f8c95
ananthakumaran/exunit.el@5bb115f327 -> ananthakumaran/exunit.el@0715c2dc2d
ananthakumaran/tide@28137ed904 -> ananthakumaran/tide@b93e555858
asok/projectile-rails@30828afbfa -> asok/projectile-rails@772f4766b5
asok/rake@9c204334b0 -> asok/rake@452ea0caca
brotzeit/rustic@f4b5c288af -> brotzeit/rustic@6eec971387
cdominik/cdlatex@f215b70c5c -> cdominik/cdlatex@8e963c6853
clojure-emacs/cider@36277802a4 -> clojure-emacs/cider@86dd3fee9d
codesuki/add-node-modules-path@7d9be65b3b -> codesuki/add-node-modules-path@63f047fd84
crystal-lang-tools/emacs-crystal-mode@15998140b0 -> crystal-lang-tools/emacs-crystal-mode@96a8058205
cython/cython@5b325c9860 -> cython/cython@fdea2d6bed
diml/utop@c87b8b2817 -> diml/utop@5d72a0ab34
dominikh/go-mode.el@32cbd78c0a -> dominikh/go-mode.el@3273fcece5
elixir-editors/emacs-elixir@6bbc1e5ac4 -> elixir-editors/emacs-elixir@e0d0466d83
emacs-csharp/csharp-mode@9917e1b97d -> emacs-csharp/csharp-mode@856ecbc0a7
emacs-ess/ESS@a7ce81bb76 -> emacs-ess/ESS@39eba28300
emacs-geiser/geiser@c1cc4da1ed -> emacs-geiser/geiser@9507e81a07
emacs-geiser/guile@cfd9116dcb -> emacs-geiser/guile@c641fcc50b
emacs-lsp/lsp-dart@813d3c92db -> emacs-lsp/lsp-dart@fda433671f
emacs-lsp/lsp-haskell@4e62cf897d -> emacs-lsp/lsp-haskell@7cf64944ab
emacs-lsp/lsp-java@ce03cb6574 -> emacs-lsp/lsp-java@0968038b9a
emacs-lsp/lsp-metals@695291761b -> emacs-lsp/lsp-metals@b7f77de694
emacs-lsp/lsp-pyright@d428dbcf18 -> emacs-lsp/lsp-pyright@3598bc7c47
emacs-php/php-mode@535aec8173 -> emacs-php/php-mode@5f26bec865
emacs-php/phpactor.el@272217fbb6 -> emacs-php/phpactor.el@34195f1533
emacs-straight/auctex@3b0a080ae5 -> emacs-straight/auctex@830e40a063
emacs-straight/csv-mode@8da54e8b4e -> emacs-straight/csv-mode@43f6106f0d
emacs-typescript/typescript.el@e824162051 -> emacs-typescript/typescript.el@88f317f0b6
erlang/otp@c1ab4b5424 -> erlang/otp@9ba9f6e60d
ethereum/emacs-solidity@6f7bd1641e -> ethereum/emacs-solidity@20fb77e089
factor/factor@7b451bb813 -> factor/factor@1aeafdb87b
fsharp/emacs-fsharp-mode@c90d762c06 -> fsharp/emacs-fsharp-mode@b3aa4c53fc
fxbois/web-mode@61f057a6ba -> fxbois/web-mode@efa853e5cf
godotengine/emacs-gdscript-mode@b7bfa6a3b2 -> godotengine/emacs-gdscript-mode@4badcf6a0c
greghendershott/racket-mode@a879a8d67b -> greghendershott/racket-mode@af9b760e7b
hakimel/reveal.js@918ee5610a -> hakimel/reveal.js@e281b3234e
haskell/haskell-mode@8402caa341 -> haskell/haskell-mode@cb573c8db5
hhvm/hack-mode@4c1c2b0939 -> hhvm/hack-mode@a522f61c08
technomancy/fennel-mode@47152970a9 -> https://git.sr.ht/~technomancy/fennel-mode@50ef3c6246f3
hvesalai/emacs-sbt-mode@e29464a82b -> hvesalai/emacs-sbt-mode@9fe1e8807c
hylang/hy-mode@5253533ddb -> hylang/hy-mode@df814865a1
idris-hackers/idris-mode@3cc9361b4c -> idris-hackers/idris-mode@65d6db1b75
iyefrat/evil-tex@aa0ddf8e76 -> iyefrat/evil-tex@0fa85c3fc8
jcollard/elm-mode@f2e2d0053f -> jcollard/elm-mode@d4e434fa18
joaotavora/sly@2e00c3bd4b -> joaotavora/sly@4513c382f0
jorgenschaefer/emacs-buttercup@1de6be465c -> jorgenschaefer/emacs-buttercup@f5cbf97e10
joshwnj/json-mode@0e819e519a -> joshwnj/json-mode@eedb456003
jrblevin/markdown-mode@541bd7b48a -> jrblevin/markdown-mode@521658eb32
jschaf/powershell.el@d1b3f95669 -> jschaf/powershell.el@ce1f0ae0b2
jwiegley/emacs-async@5d365ffc6a -> jwiegley/emacs-async@c78bab7506
leanprover/lean-mode@bf32bb9793 -> leanprover/lean-mode@c1c68cc946
ledger/ledger-mode@19b84dc766 -> ledger/ledger-mode@b55384d9cd
necaris/conda.el@7a34e06931 -> necaris/conda.el@9c28d7a853
nonsequitur/inf-ruby@03dd9c9d4e -> nonsequitur/inf-ruby@dbf4386bac
ocaml-ppx/ocamlformat@22a3707da3 -> ocaml-ppx/ocamlformat@9324ea439a
ocaml/dune@4d0a47edd5 -> ocaml/dune@4bc7629a5e
ocaml/merlin@e4791e2298 -> ocaml/merlin@5d59c70659
ocaml/tuareg@00faf47a7c -> ocaml/tuareg@04f5ab6be9
osv/company-web@f0cc9187c9 -> osv/company-web@863fb84b81
pashky/restclient.el@176d9cb655 -> pashky/restclient.el@9e2cfa8652
pezra/rspec-mode@92ef785010 -> pezra/rspec-mode@4215ff1f2d
polymode/polymode@54888d6c15 -> polymode/polymode@2094c92403
seagle0128/grip-mode@9220a560b4 -> seagle0128/grip-mode@6b427143a8
sebasmonia/sharper@08277b6c30 -> sebasmonia/sharper@96edd4a1db
stan-dev/stan-mode@9bb858b9f1 -> stan-dev/stan-mode@150bbbe5fd
swift-emacs/swift-mode@800efe2910 -> swift-emacs/swift-mode@0d1ef0ef18
tpapp/julia-repl@e90b1ed2cc -> tpapp/julia-repl@6c1d63511f
wbolster/emacs-python-pytest@b603c5c7f2 -> wbolster/emacs-python-pytest@ea53891a21
yoshiki/yaml-mode@63b637f846 -> yoshiki/yaml-mode@535273d5a1
ziglang/zig-mode@aba01b6199 -> ziglang/zig-mode@aa20d630b8

- Refactors the :lang rust module to reflect changes upstream, in
  rustic (thanks to #6154).

Close: #6154
Fix: #6070
2022-03-31 21:09:38 +02:00
..
autoload fix(org): multiple fixes for +org--insert-item 2022-03-30 20:06:40 +02:00
contrib fix(org): move org-journal localleader keybinds to 'SPC m j' 2022-03-19 16:22:13 +01:00
test lang/org: fix tests to reflect f70f788df 2019-11-12 16:15:42 -05:00
config.el fix(org): don't show parent trees by default 2022-03-22 02:49:09 +01:00
doctor.el Update handling of the database 2021-07-25 02:20:41 +03:00
packages.el bump: :lang 2022-03-31 21:09:38 +02:00
README.org docs(org): fix link to org-roam v2 in readme 2021-09-11 22:41:58 +02:00

lang/org

Description

This module adds org-mode support to Doom Emacs, along with a number of adjustments, extensions and reasonable defaults to make it more performant and intuitive out of the box:

  • A custom, centralized attachment system that stores files in one place, rather than in the same directory as the input file(s) (only applies to attachments from files in/under org-directory).
  • Executable code blocks with support for a variety of languages and tools (depending on what :lang modules are enabled).
  • Supports an external org-capture workflow through the bin/org-capture shell script and +org-capture/open-frame.
  • A configuration for using org-mode for slide-show presentations or exporting org files to reveal.js slideshows.
  • Drag-and-drop support for images (with inline preview) and media files (drops a file icon and a short link) (requires +dragndrop flag).
  • Integration with pandoc, ipython, jupyter, reveal.js, beamer, and others (requires flags).
  • Export-to-clipboard functionality, for copying text into formatted html, markdown or rich text to the clipboard (see +org/export-to-clipboard and +org/export-to-clipboard-as-rich-text).

Org is a system for writing plain text notes with syntax highlighting, code execution, task scheduling, agenda management, and many more. The whole idea is that you can write notes and mix them with references to things like articles, images, and example code combined with the output of that code after it is executed.

https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode/

Module Flags

  • +brain Enables org-brain integration.
  • +dragndrop Enables drag-and-drop support for images and files; inserts inline previews for images and an icon+link for other media types.
  • +gnuplot Installs gnuplot & gnuplot-mode, which enables rendering images from gnuplot src blocks or plotting tables with org-plot/gnuplot (bound to SPC m b p, by default).
  • +hugo Enables integration with hugo to export from Emacs well-formed (blackfriday) markdown.
  • +ipython (DEPRECATED) Enables ipython integration for babel.
  • +journal Enables org-journal integration.
  • +jupyter Enables Jupyter integration for babel.
  • +noter Enables org-noter integration. Keeps notes in sync with a document. Requires pdf-tools (:tools pdf) or DocView or nov.el to be enabled.
  • +pandoc Enables pandoc integration into the Org exporter.
  • +pomodoro Enables a pomodoro timer for clocking time on tasks.
  • +present Enables integration with reveal.js, beamer and org-tree-slide, so Emacs can be used for presentations. It automatically downloads reveal.js.
  • +pretty Enables pretty unicode symbols for bullets and priorities, and better syntax highlighting for latex. Keep in mind: this can be expensive. If org becomes too slow, it'd be wise to disable this flag.
  • +roam Enables integration with org-roam v1. This requires sqlite3 to be installed on your system. Incompatible with +roam2.
  • +roam2 Enables integration with org-roam v2. This requires sqlite3 to be installed on your system. Incompatible with +roam.

Plugins

Hacks

  • Adds support for a :sync parameter for org src blocks. This overrides :async.
  • Gracefully degrades :async babel blocks to :sync when ob-async would cause errors or issues (such as with a :session parameter, which ob-async does not support, or when exporting org documents).
  • The window is recentered when following links.
  • The breadcrumbs displayed in eldoc when hovering over an org headline has been reworked to strip out link syntax and normalize font-size disparities.
  • If :ui workspaces is enabled, persp-mode won't register org agenda buffers that are temporarily opened in the background.
  • Temporary org agenda files aren't added to recentf.
  • file: links are highlighted with the error face if they are broken.
  • TAB was changed to toggle only the visibility state of the current subtree, rather than cycle through it recursively. This can be reversed with:

    (after! evil-org
      (remove-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h))
  • (Evil users) Nearby tables are formatted when exiting insert or replace mode (see +org-enable-auto-reformat-tables-h).
  • Statistics cookies are updated when saving the buffer of exiting insert mode (see +org-enable-auto-update-cookies-h).
  • Org-protocol has been lazy loaded (see +org-init-protocol-lazy-loader-h); loaded when the server receives a request for an org-protocol:// url.
  • Babel and babel plugins are now lazy loaded (see +org-init-babel-lazy-loader-h); loaded when a src block is executed. No need to use org-babel-do-load-languages in your config, just install your babel packages to extend language support (and ensure its org-babel-execute:* function is autoloaded).
  • If a variable is used as a file path in org-capture-template, it will be resolved relative to org-directory, instead of default-directory (see +org-capture-expand-variable-file-a).

Prerequisites

Org has a few soft dependencies that you will need to make use of Org's more esoteric features:

  • For inline LaTeX previews, latex and dvipng is needed.
  • To render GNUPlot images (with +gnuplot flag) the gnuplot program is needed.
  • To execute babel code blocks, you need whatever dependencies those languages need. It is recommended you enable the associated :lang module and ensure its dependencies are met, e.g. install the ruby executable for ruby support. To use jupyter kernels you need the +jupyter flag, the associated kernel as well as the jupyter program.
  • org-roam (with +roam or +roam2 flag) requires sqlite3 to be installed.

MacOS

brew install --cask mactex
brew install gnuplot

Arch Linux

pacman -S texlive-core texlive-bin texlive-science
pacman -S gnuplot
pacman -S jupyter # required by +jupyter

NixOS

environment.systemPackages = with pkgs; [
  # any less than medium isn't guaranteed to work
  texlive.combined.scheme-medium
  # required by +jupyter
  (python38.withPackages(ps: with ps; [jupyter]))
];

TODO Windows

Features

Invoking the org-capture frame from outside Emacs

The simplest way to use the org-capture frame is through the bin/org-capture script. I'd recommend binding a shortcut key to it. If Emacs isn't running, it will spawn a temporary daemon for you.

Alternatively, you can call +org-capture/open-frame directly, e.g.

emacsclient --eval '(+org-capture/open-frame INTIAL-INPUT KEY)'

Built-in custom link types

This module defines a number of custom link types in +org-init-custom-links-h. They are (with examples):

  • doom-docs:news/2.1.0 (~/.emacs.d/docs/%s)
  • doom-modules:editor/evil/README.org (~/.emacs.d/modules/%s)
  • doom-repo:issues (https://github.com/hlissner/doom-emacs/%s)
  • doom:core/core.el (~/.emacs.d/%s)
  • duckduckgo:search terms
  • gimages:search terms (Google Images)
  • github:hlissner/doom-emacs
  • gmap:Toronto, Ontario (Google Maps)
  • google:search terms
  • org:todo.org ({org-directory}/%s)
  • wolfram:sin(x^3)
  • wikipedia:Emacs
  • youtube:P196hEuA_Xc (link only)
  • yt:P196hEuA_Xc (like youtube, but includes an inline preview of the video)

Configuration

Changing org-directory

To modify org-directory it must be set before org has loaded:

;; ~/.doom.d/config.el
(setq org-directory "~/new/org/location/")

Changing org-noter-notes-search-path

To modify org-noter-notes-search-path set:

;; ~/.doom.d/config.el
(setq org-noter-notes-search-path '("~/notes/path/"))

Troubleshooting

org-roam

Should I go with +roam (v1) or +roam2 (v2)?

Long story short: if you're new to org-roam and haven't used it, then you should go with +roam2; if you already have an org-roam-directory with the v1 files in it, then you can keep use +roam for a time being.

V1 isn't actively maintained anymore and is now basically EOL. This means that the feature disparity between the both will continue to grow, while its existing bugs and problems won't be addressed, at least by the main maintainers. V2 can be considered as a complete rewrite of the package so it comes with a lot of breaking changes.

While v1 won't be actively maintained anymore, it still will be available in Doom for a while, at least until there will be a reliable tool that will migrate your data from v1 to v2.

To learn more about v2 you can use the next resources:

Migrating your existing files from v1 (+roam) to v2 (+roam2)

V2 comes with a migration wizard for v1 users. It's new, which means issues can appear during the migration process. Because of that, don't forget to backup your org-roam-directory before attempting to migrate.

In order to migrate from v1 to v2 using Doom follow the next steps:

  1. Enable +roam2 flag (and disable +roam if it was previously enabled) in your init.el.
  2. Ensure your org-roam-directory points to a directory with your v1 files.
  3. Run doom sync -u in your shell.
  4. Restart Emacs (if it was previously opened) and run org-roam-migrate-wizard command (M-x org-roam-migrate-wizard RET). The wizard will automatically attempt to backup your previous org-roam-directory to org-roam.bak, but just in case backup it yourself too.
  5. After the wizard is done you should be good to go. Verify the integrity of your data and whether it did everything as expected. In case of failure report your issue.