Skip to content

Instantly share code, notes, and snippets.

@bdarcus
Last active December 30, 2020 19:57
Show Gist options
  • Save bdarcus/4c50f5c0eb49656298a9bb4c73e725ac to your computer and use it in GitHub Desktop.
Save bdarcus/4c50f5c0eb49656298a9bb4c73e725ac to your computer and use it in GitHub Desktop.
academic config.org for doom

My Doom Config

Introduction

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).

Me

(setq user-full-name "Bruce D'Arcus"
      user-mail-address "bdarcus@gmail.com")

An Integrated Academic Environment

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 or helm-bibtex and org-ref for bibliographic management
  • org-roam for zettlekasten-inspired note-taking, including of bibliographic notes (org-roam-bibtex provides the glue here); also incorporates org-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) or org, 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")

Editor

(setq doom-font (font-spec :family "JetBrainsMono" :size 14))
(setq doom-theme 'doom-one)
(setq display-line-numbers-type t)

Grammar and Spelling

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/*")

Paragraph Folding

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))
@bdarcus
Copy link
Author

bdarcus commented Dec 30, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment