This is my config file for Doom Emacs. It reflects my primary needs for an academic writing environment, with some coding.
Note: I work at the border of the social sciences and humanities, with qualitative data. So I have no need to integrate, say, statistics support. But that should be easy enough to do (see, for example, the ESS module).
(setq user-full-name "Bruce D'Arcus"
user-mail-address "bdarcus@gmail.com")
This sets up Doom Emacs for an academic research and writing workflow, with integrated bibliographic management, note-taking and document authoring.
Almost all of the initial work on this is now incorporated into Doom modules,
and you can install and set it all up with the following Doom modules and flags
in your init.el
file:
- :completion ivy or helm (I use ivy)
- :lang org (+roam +noter)
- :tools biblio
The above will give you the following:
ivy-bibtex
orhelm-bibtex
andorg-ref
for bibliographic managementorg-roam
for zettlekasten-inspired note-taking, including of bibliographic notes (org-roam-bibtex
provides the glue here); also incorporatesorg-noter
for notes synced to PDF files, so that you have a consistent environment to create, link, manage and access your notes- document authoring in either markdown mode (if you activate the
markdown
module) ororg
, including integrated citation access and insertion.
What follows is simply my customization of the above, which for now is configuring the following variables.
The +biblio
module provides these path directory and file variables and passes
them on to the relevant packages, so that one only has to set them once. There
is no need to set the path for bibliographic notes, as org-roam-bibtex
will
handle that.
(setq! +biblio-pdf-library-dir "~/org/pdf/"
+biblio-default-bibliography-files '("~/org/bib/academic.bib"))
While we’re at it, let’s set the default BibTeX dialect to BibLaTeX, which is more appropriate for social sciences and humanities.
(setq org-latex-compiler "lualatex")
(setq doom-font (font-spec :family "JetBrainsMono" :size 14))
(setq doom-theme 'doom-one)
(setq display-line-numbers-type t)
This just configures spelling and grammar checking support.
(add-to-list 'ispell-aspell-dictionary-alist (ispell-aspell-find-dictionary "en_US"))
(setq ispell-program-name (executable-find "hunspell")
ispell-dictionary "en_US")
(setq flyspell-correct-popup t)
(setq langtool-java-classpath "/usr/share/languagetool:/usr/share/java/languagetool/*")
Ideally, I want paragraph folding integrated into org visibility cycling. But this is close enough for now; folds all paragraphs in a document to the first line. This is helpful to visualize the argument structure of long documents.
(use-package! origami
:commands (origami-toggle-node origami-toggle-all-nodes)
:hook (text-mode . origami-mode)
:init
:config
(map! :leader
:prefix "t"
:desc "Origami-Toggle All Nodes" "O" #'origami-toggle-all-nodes
:desc "Origami-Toggle Node" "o" #'origami-toggle-node))