add org-drill, org export settings

This commit is contained in:
Inhji 2024-02-26 23:32:58 +05:45
parent e012005d9c
commit 18a255d5f4
6 changed files with 604 additions and 21 deletions

View File

@ -34,8 +34,8 @@
:config
(setq heaven-and-hell-theme-type 'dark) ;; Omit to use light by default
(setq heaven-and-hell-themes
'((light . doom-feather-light)
(dark . doom-feather-dark))) ;; Themes can be the list: (dark . (tsdh-dark wombat))
'((light . leuven)
(dark . doom-monokai-octagon))) ;; Themes can be the list: (dark . (tsdh-dark wombat))
;; Optionall, load themes without asking for confirmation.
(setq heaven-and-hell-load-theme-no-confirm t)
:hook (after-init . heaven-and-hell-init-hook)
@ -50,6 +50,31 @@
(add-to-list 'org-modules 'org-habit)
(after! org (
;; TOC Links will lead to errors when attempting
;; to export to HTML
setq org-export-exclude-tags '("toc")))
(defun my-org-inline-css-hook (exporter)
"Insert custom inline css"
(when (eq exporter 'html)
(let* ((dir (ignore-errors (file-name-directory (buffer-file-name))))
(path (concat dir "style.css"))
(fallback-style (or (null dir) (null (file-exists-p path))))
(final (if fallback-style "~/.config/doom/style.css" path))) ;; <- set your own style file path
(setq org-html-head-include-default-style t)
(setq org-html-head (concat
"<style type=\"text/css\">\n"
"<!--/*--><![CDATA[/*><!--*/\n"
(with-temp-buffer
(insert-file-contents final)
(buffer-string))
"/*]]>*/-->\n"
"</style>\n")))))
;; Org Export
(add-hook 'org-export-before-processing-hook 'my-org-inline-css-hook)
(after! org (setq +org-capture-notes-file (org-path "Notes.org")
+org-capture-todo-file (org-path "Todo.org")
+org-capture-journal-file (org-path "Journal.org")
@ -64,6 +89,10 @@
(file+headline +org-capture-notes-file "Inbox")
"* %u %?\n" :prepend t)
("w", "Nepali" entry
(file+headline +org-capture-notes-file "Nepali/Vocabulary")
"* " :prepend t)
("j" "Journal entries")
("jj" "Daily Journal" entry
@ -103,6 +132,9 @@
:config (setq org-auto-tangle-default nil)
:hook (org-mode . org-auto-tangle-mode))
(after! org-drill
(setq org-drill-scope 'agenda))
(after! doom-modeline
(setq doom-modeline-battery t)
(setq doom-modeline-major-mode-icon t))

View File

@ -0,0 +1,515 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2024-02-26 Mo 23:29 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Emacs Config</title>
<meta name="author" content="Jonathan Jenne / Inhji" />
<meta name="generator" content="Org Mode" />
<style>
#content { max-width: 60em; margin: auto; }
.title { text-align: center;
margin-bottom: .2em; }
.subtitle { text-align: center;
font-size: medium;
font-weight: bold;
margin-top:0; }
.todo { font-family: monospace; color: red; }
.done { font-family: monospace; color: green; }
.priority { font-family: monospace; color: orange; }
.tag { background-color: #eee; font-family: monospace;
padding: 2px; font-size: 80%; font-weight: normal; }
.timestamp { color: #bebebe; }
.timestamp-kwd { color: #5f9ea0; }
.org-right { margin-left: auto; margin-right: 0px; text-align: right; }
.org-left { margin-left: 0px; margin-right: auto; text-align: left; }
.org-center { margin-left: auto; margin-right: auto; text-align: center; }
.underline { text-decoration: underline; }
#postamble p, #preamble p { font-size: 90%; margin: .2em; }
p.verse { margin-left: 3%; }
pre {
border: 1px solid #e6e6e6;
border-radius: 3px;
background-color: #f2f2f2;
padding: 8pt;
font-family: monospace;
overflow: auto;
margin: 1.2em;
}
pre.src {
position: relative;
overflow: auto;
}
pre.src:before {
display: none;
position: absolute;
top: -8px;
right: 12px;
padding: 3px;
color: #555;
background-color: #f2f2f299;
}
pre.src:hover:before { display: inline; margin-top: 14px;}
/* Languages per Org manual */
pre.src-asymptote:before { content: 'Asymptote'; }
pre.src-awk:before { content: 'Awk'; }
pre.src-authinfo::before { content: 'Authinfo'; }
pre.src-C:before { content: 'C'; }
/* pre.src-C++ doesn't work in CSS */
pre.src-clojure:before { content: 'Clojure'; }
pre.src-css:before { content: 'CSS'; }
pre.src-D:before { content: 'D'; }
pre.src-ditaa:before { content: 'ditaa'; }
pre.src-dot:before { content: 'Graphviz'; }
pre.src-calc:before { content: 'Emacs Calc'; }
pre.src-emacs-lisp:before { content: 'Emacs Lisp'; }
pre.src-fortran:before { content: 'Fortran'; }
pre.src-gnuplot:before { content: 'gnuplot'; }
pre.src-haskell:before { content: 'Haskell'; }
pre.src-hledger:before { content: 'hledger'; }
pre.src-java:before { content: 'Java'; }
pre.src-js:before { content: 'Javascript'; }
pre.src-latex:before { content: 'LaTeX'; }
pre.src-ledger:before { content: 'Ledger'; }
pre.src-lisp:before { content: 'Lisp'; }
pre.src-lilypond:before { content: 'Lilypond'; }
pre.src-lua:before { content: 'Lua'; }
pre.src-matlab:before { content: 'MATLAB'; }
pre.src-mscgen:before { content: 'Mscgen'; }
pre.src-ocaml:before { content: 'Objective Caml'; }
pre.src-octave:before { content: 'Octave'; }
pre.src-org:before { content: 'Org mode'; }
pre.src-oz:before { content: 'OZ'; }
pre.src-plantuml:before { content: 'Plantuml'; }
pre.src-processing:before { content: 'Processing.js'; }
pre.src-python:before { content: 'Python'; }
pre.src-R:before { content: 'R'; }
pre.src-ruby:before { content: 'Ruby'; }
pre.src-sass:before { content: 'Sass'; }
pre.src-scheme:before { content: 'Scheme'; }
pre.src-screen:before { content: 'Gnu Screen'; }
pre.src-sed:before { content: 'Sed'; }
pre.src-sh:before { content: 'shell'; }
pre.src-sql:before { content: 'SQL'; }
pre.src-sqlite:before { content: 'SQLite'; }
/* additional languages in org.el's org-babel-load-languages alist */
pre.src-forth:before { content: 'Forth'; }
pre.src-io:before { content: 'IO'; }
pre.src-J:before { content: 'J'; }
pre.src-makefile:before { content: 'Makefile'; }
pre.src-maxima:before { content: 'Maxima'; }
pre.src-perl:before { content: 'Perl'; }
pre.src-picolisp:before { content: 'Pico Lisp'; }
pre.src-scala:before { content: 'Scala'; }
pre.src-shell:before { content: 'Shell Script'; }
pre.src-ebnf2ps:before { content: 'ebfn2ps'; }
/* additional language identifiers per "defun org-babel-execute"
in ob-*.el */
pre.src-cpp:before { content: 'C++'; }
pre.src-abc:before { content: 'ABC'; }
pre.src-coq:before { content: 'Coq'; }
pre.src-groovy:before { content: 'Groovy'; }
/* additional language identifiers from org-babel-shell-names in
ob-shell.el: ob-shell is the only babel language using a lambda to put
the execution function name together. */
pre.src-bash:before { content: 'bash'; }
pre.src-csh:before { content: 'csh'; }
pre.src-ash:before { content: 'ash'; }
pre.src-dash:before { content: 'dash'; }
pre.src-ksh:before { content: 'ksh'; }
pre.src-mksh:before { content: 'mksh'; }
pre.src-posh:before { content: 'posh'; }
/* Additional Emacs modes also supported by the LaTeX listings package */
pre.src-ada:before { content: 'Ada'; }
pre.src-asm:before { content: 'Assembler'; }
pre.src-caml:before { content: 'Caml'; }
pre.src-delphi:before { content: 'Delphi'; }
pre.src-html:before { content: 'HTML'; }
pre.src-idl:before { content: 'IDL'; }
pre.src-mercury:before { content: 'Mercury'; }
pre.src-metapost:before { content: 'MetaPost'; }
pre.src-modula-2:before { content: 'Modula-2'; }
pre.src-pascal:before { content: 'Pascal'; }
pre.src-ps:before { content: 'PostScript'; }
pre.src-prolog:before { content: 'Prolog'; }
pre.src-simula:before { content: 'Simula'; }
pre.src-tcl:before { content: 'tcl'; }
pre.src-tex:before { content: 'TeX'; }
pre.src-plain-tex:before { content: 'Plain TeX'; }
pre.src-verilog:before { content: 'Verilog'; }
pre.src-vhdl:before { content: 'VHDL'; }
pre.src-xml:before { content: 'XML'; }
pre.src-nxml:before { content: 'XML'; }
/* add a generic configuration mode; LaTeX export needs an additional
(add-to-list 'org-latex-listings-langs '(conf " ")) in .emacs */
pre.src-conf:before { content: 'Configuration File'; }
table { border-collapse:collapse; }
caption.t-above { caption-side: top; }
caption.t-bottom { caption-side: bottom; }
td, th { vertical-align:top; }
th.org-right { text-align: center; }
th.org-left { text-align: center; }
th.org-center { text-align: center; }
td.org-right { text-align: right; }
td.org-left { text-align: left; }
td.org-center { text-align: center; }
dt { font-weight: bold; }
.footpara { display: inline; }
.footdef { margin-bottom: 1em; }
.figure { padding: 1em; }
.figure p { text-align: center; }
.equation-container {
display: table;
text-align: center;
width: 100%;
}
.equation {
vertical-align: middle;
}
.equation-label {
display: table-cell;
text-align: right;
vertical-align: middle;
}
.inlinetask {
padding: 10px;
border: 2px solid gray;
margin: 10px;
background: #ffffcc;
}
#org-div-home-and-up
{ text-align: right; font-size: 70%; white-space: nowrap; }
textarea { overflow-x: auto; }
.linenr { font-size: smaller }
.code-highlighted { background-color: #ffff00; }
.org-info-js_info-navigation { border-style: none; }
#org-info-js_console-label
{ font-size: 10px; font-weight: bold; white-space: nowrap; }
.org-info-js_search-highlight
{ background-color: #ffff00; color: #000000; font-weight: bold; }
.org-svg { }
</style>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
/* Fallback Org Export Styles */
body {
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif !important;
}
/*]]>*/-->
</style>
</head>
<body>
<div id="content" class="content">
<h1 class="title">Emacs Config</h1>
<div id="table-of-contents" role="doc-toc">
<h2>Table of Contents</h2>
<div id="text-table-of-contents" role="doc-toc">
<ul>
<li><a href="#org628208d">1. Keybindings</a></li>
<li><a href="#org76bae20">2. Base Config</a>
<ul>
<li><a href="#org242c54d">2.1. Hooks</a></li>
</ul>
</li>
<li><a href="#org8b41262">3. Themes</a></li>
<li><a href="#orge1f23de">4. Org Mode</a>
<ul>
<li><a href="#org3a5d36e">4.1. General Settings</a></li>
<li><a href="#org9f30c51">4.2. Org Export</a></li>
<li><a href="#org7d6ea1c">4.3. Org Agenda</a></li>
</ul>
</li>
<li><a href="#org2f48627">5. Packages</a>
<ul>
<li><a href="#org2b1a9f6">5.1. hl-todo</a></li>
<li><a href="#orga24ab5a">5.2. org-auto-tangle</a></li>
<li><a href="#org0907011">5.3. org-drill</a></li>
<li><a href="#org54e4408">5.4. doom-modeline</a></li>
<li><a href="#org7639f0e">5.5. evil-snipe</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="outline-container-org628208d" class="outline-2">
<h2 id="org628208d"><span class="section-number-2">1.</span> Keybindings</h2>
<div class="outline-text-2" id="text-1">
<p>
These keybindings extend the default doom bindings, either because the defaults were confusing to me or because the binding did not yet exist.
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
<col class="org-left" />
</colgroup>
<thead>
<tr>
<th scope="col" class="org-left">Key</th>
<th scope="col" class="org-left">Description</th>
<th scope="col" class="org-left">State</th>
</tr>
</thead>
<tbody>
<tr>
<td class="org-left">F12</td>
<td class="org-left">Show Org-Agenda</td>
<td class="org-left">N</td>
</tr>
<tr>
<td class="org-left">Ctrl-Alt-+</td>
<td class="org-left">Increase Font Size</td>
<td class="org-left">&#xa0;</td>
</tr>
<tr>
<td class="org-left">Ctrl-#</td>
<td class="org-left">Toggle Line Comment</td>
<td class="org-left">&#xa0;</td>
</tr>
<tr>
<td class="org-left">F6</td>
<td class="org-left">Toggle Light/Dark Theme</td>
<td class="org-left">&#xa0;</td>
</tr>
<tr>
<td class="org-left">Ctrl-c F6</td>
<td class="org-left">Load Default Theme</td>
<td class="org-left">&#xa0;</td>
</tr>
<tr>
<td class="org-left">DEL</td>
<td class="org-left">Up Directory</td>
<td class="org-left">Dired</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-org76bae20" class="outline-2">
<h2 id="org76bae20"><span class="section-number-2">2.</span> Base Config</h2>
<div class="outline-text-2" id="text-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #B4A5C7; font-style: italic;">;;; </span><span style="color: #B4A5C7; font-style: italic;">$DOOMDIR/config.el -*- lexical-binding: t; -*-</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Basic User Settings</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">user-full-name</span> <span style="color: #5f8700;">"Jonathan Jenne"</span>
<span style="color: #513969;">user-mail-address</span> <span style="color: #5f8700;">"johnnie@posteo.de"</span><span style="color: #007daf;">)</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Default Shell</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Useful if default system shell is not bash</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">shell-file-name</span> <span style="color: #5f8700;">(</span><span style="color: #007daf;">executable-find</span> <span style="color: #5f8700;">"bash"</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Display Line numbers</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">display-line-numbers-type</span> t<span style="color: #007daf;">)</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">General Keybindings</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">map!</span> <span style="color: #007daf;">:n</span> <span style="color: #5f8700;">"&lt;f12&gt;"</span> <span style="color: #f4649b;">#'</span><span style="color: #f4649b;">org-agenda-list</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">map!</span> <span style="color: #5f8700;">"C-M-+"</span> <span style="color: #f4649b;">#'</span><span style="color: #f4649b;">doom/increase-font-size</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">map!</span> <span style="color: #5f8700;">"C-#"</span> <span style="color: #f4649b;">#'</span><span style="color: #f4649b;">comment-line</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">evil-define-key</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">normal</span> <span style="color: #513969;">dired-mode-map</span>
<span style="color: #5f8700;">(</span><span style="color: #007daf;">kbd</span> <span style="color: #5f8700;">"DEL"</span><span style="color: #5f8700;">)</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">dired-up-directory</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
<div id="outline-container-org242c54d" class="outline-3">
<h3 id="org242c54d"><span class="section-number-3">2.1.</span> Hooks</h3>
<div class="outline-text-3" id="text-2-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Org Mode</span>
<span style="color: #007daf;">(</span><span style="color: #007daf;">add-hook</span> <span style="color: #f4649b;">'</span><span style="color: #513969;">org-mode-hook</span> <span style="color: #f4649b;">#'</span><span style="color: #513969;">org-modern-mode</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #007daf;">add-hook</span> <span style="color: #f4649b;">'</span><span style="color: #513969;">org-mode-hook</span> <span style="color: #f4649b;">#'</span><span style="color: #513969;">hl-todo-mode</span><span style="color: #007daf;">)</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Org Agenda</span>
<span style="color: #007daf;">(</span><span style="color: #007daf;">add-hook</span> <span style="color: #f4649b;">'</span><span style="color: #513969;">org-agenda-finalize-hook</span> <span style="color: #f4649b;">#'</span><span style="color: #f4649b;">org-modern-agenda</span><span style="color: #007daf;">)</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Modeline</span>
<span style="color: #007daf;">(</span><span style="color: #007daf;">add-hook</span> <span style="color: #f4649b;">'</span><span style="color: #513969;">doom-after-init-hook</span> <span style="color: #f4649b;">#'</span><span style="color: #513969;">display-battery-mode</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #007daf;">add-hook</span> <span style="color: #f4649b;">'</span><span style="color: #513969;">doom-after-init-hook</span> <span style="color: #f4649b;">#'</span><span style="color: #513969;">display-time-mode</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org8b41262" class="outline-2">
<h2 id="org8b41262"><span class="section-number-2">3.</span> Themes</h2>
<div class="outline-text-2" id="text-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">use-package!</span> heaven-and-hell
<span style="color: #007daf;">:ensure</span> t
<span style="color: #007daf;">:config</span>
<span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">heaven-and-hell-theme-type</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">dark</span><span style="color: #5f8700;">)</span> <span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Omit to use light by default</span>
<span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">heaven-and-hell-themes</span>
<span style="color: #f4649b;">'</span><span style="color: #f4649b;">(</span><span style="color: #007daf;">(</span>light . leuven<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span>dark . doom-monokai-octagon<span style="color: #007daf;">)</span><span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span> <span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Themes can be the list: (dark . (tsdh-dark wombat))</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Optionall, load themes without asking for confirmation.</span>
<span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">heaven-and-hell-load-theme-no-confirm</span> t<span style="color: #5f8700;">)</span>
<span style="color: #007daf;">:hook</span> <span style="color: #5f8700;">(</span>after-init . heaven-and-hell-init-hook<span style="color: #5f8700;">)</span>
<span style="color: #007daf;">:bind</span> <span style="color: #5f8700;">(</span><span style="color: #f4649b;">(</span><span style="color: #5f8700;">"C-c &lt;f6&gt;"</span> . heaven-and-hell-load-default-theme<span style="color: #f4649b;">)</span>
<span style="color: #f4649b;">(</span><span style="color: #5f8700;">"&lt;f6&gt;"</span> . heaven-and-hell-toggle-theme<span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orge1f23de" class="outline-2">
<h2 id="orge1f23de"><span class="section-number-2">4.</span> Org Mode</h2>
<div class="outline-text-2" id="text-4">
</div>
<div id="outline-container-org3a5d36e" class="outline-3">
<h3 id="org3a5d36e"><span class="section-number-3">4.1.</span> General Settings</h3>
<div class="outline-text-3" id="text-4-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">setq</span> +user-org-path <span style="color: #5f8700;">"~/Notes/Org"</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">defun</span> <span style="color: #007daf;">org-path</span> <span style="color: #5f8700;">(</span>filename<span style="color: #5f8700;">)</span> <span style="color: #5f8700;">(</span><span style="color: #008070;">expand-file-name</span> filename +user-org-path<span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">after!</span> org <span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">org-directory</span> +user-org-path
<span style="color: #513969;">org-src-tab-acts-natively</span> t<span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #007daf;">add-to-list</span> <span style="color: #f4649b;">'</span><span style="color: #513969;">org-modules</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">org-habit</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org9f30c51" class="outline-3">
<h3 id="org9f30c51"><span class="section-number-3">4.2.</span> Org Export</h3>
<div class="outline-text-3" id="text-4-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp">
<span style="color: #007daf;">(</span><span style="color: #875faf;">after!</span> org <span style="color: #5f8700;">(</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">TOC Links will lead to errors when attempting</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">to export to HTML</span>
setq <span style="color: #513969;">org-export-exclude-tags</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">(</span><span style="color: #5f8700;">"toc"</span><span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">defun</span> <span style="color: #007daf;">my-org-inline-css-hook</span> <span style="color: #5f8700;">(</span>exporter<span style="color: #5f8700;">)</span>
<span style="color: #998ca9; font-style: italic;">"Insert custom inline css"</span>
<span style="color: #5f8700;">(</span><span style="color: #875faf;">when</span> <span style="color: #f4649b;">(</span><span style="color: #008070;">eq</span> exporter <span style="color: #f4649b;">'</span><span style="color: #f4649b;">html</span><span style="color: #f4649b;">)</span>
<span style="color: #f4649b;">(</span><span style="color: #875faf;">let*</span> <span style="color: #007daf;">(</span><span style="color: #007daf;">(</span>dir <span style="color: #5f8700;">(</span><span style="color: #875faf;">ignore-errors</span> <span style="color: #f4649b;">(</span><span style="color: #008070;">file-name-directory</span> <span style="color: #007daf;">(</span><span style="color: #513969;">buffer-file-name</span><span style="color: #007daf;">)</span><span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span>path <span style="color: #5f8700;">(</span><span style="color: #008070;">concat</span> dir <span style="color: #5f8700;">"style.css"</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span>fallback-style <span style="color: #5f8700;">(</span><span style="color: #875faf;">or</span> <span style="color: #f4649b;">(</span><span style="color: #008070;">null</span> dir<span style="color: #f4649b;">)</span> <span style="color: #f4649b;">(</span><span style="color: #008070;">null</span> <span style="color: #007daf;">(</span><span style="color: #008070;">file-exists-p</span> path<span style="color: #007daf;">)</span><span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span>final <span style="color: #5f8700;">(</span><span style="color: #875faf;">if</span> fallback-style <span style="color: #5f8700;">"~/.config/doom/style.css"</span> path<span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span><span style="color: #007daf;">)</span> <span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">&lt;- set your own style file path</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">org-html-head-include-default-style</span> t<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">org-html-head</span> <span style="color: #007daf;">(</span><span style="color: #008070;">concat</span>
<span style="color: #5f8700;">"&lt;style type=\"text/css\"&gt;\n"</span>
<span style="color: #5f8700;">"&lt;!--/*--&gt;&lt;![CDATA[/*&gt;&lt;!--*/\n"</span>
<span style="color: #5f8700;">(</span><span style="color: #875faf;">with-temp-buffer</span>
<span style="color: #f4649b;">(</span><span style="color: #008070;">insert-file-contents</span> final<span style="color: #f4649b;">)</span>
<span style="color: #f4649b;">(</span><span style="color: #008070;">buffer-string</span><span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span>
<span style="color: #5f8700;">"/*]]&gt;*/--&gt;\n"</span>
<span style="color: #5f8700;">"&lt;/style&gt;\n"</span><span style="color: #007daf;">)</span><span style="color: #007daf;">)</span><span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Org Export</span>
<span style="color: #007daf;">(</span><span style="color: #007daf;">add-hook</span> <span style="color: #f4649b;">'</span><span style="color: #513969;">org-export-before-processing-hook</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">my-org-inline-css-hook</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org7d6ea1c" class="outline-3">
<h3 id="org7d6ea1c"><span class="section-number-3">4.3.</span> Org Agenda</h3>
<div class="outline-text-3" id="text-4-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">after!</span> org <span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span>
<span style="color: #513969;">org-agenda-show-all-dates</span> nil
<span style="color: #513969;">org-agenda-span</span> <span style="color: #008070; font-weight: bold;">4</span>
<span style="color: #513969;">org-agenda-start-day</span> <span style="color: #5f8700;">"+0d"</span>
org-agenda-spillover-skip-function <span style="color: #f4649b;">'</span><span style="color: #f4649b;">(</span>org-agenda-skip-entry-if <span style="color: #f4649b;">'</span><span style="color: #f4649b;">todo</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">done</span><span style="color: #f4649b;">)</span>
<span style="color: #513969;">org-agenda-time-grid</span>
<span style="color: #f4649b;">'</span><span style="color: #f4649b;">(</span><span style="color: #007daf;">(</span>daily today require-timed<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #008070; font-weight: bold;">800</span> <span style="color: #008070; font-weight: bold;">1000</span> <span style="color: #008070; font-weight: bold;">1200</span> <span style="color: #008070; font-weight: bold;">1400</span> <span style="color: #008070; font-weight: bold;">1600</span> <span style="color: #008070; font-weight: bold;">1800</span> <span style="color: #008070; font-weight: bold;">2000</span><span style="color: #007daf;">)</span>
<span style="color: #5f8700;">" &#9476;&#9476;&#9476;&#9476;&#9476; "</span> <span style="color: #5f8700;">"&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;&#9476;"</span><span style="color: #f4649b;">)</span>
<span style="color: #513969;">org-agenda-current-time-string</span>
<span style="color: #5f8700;">"&#9664;&#9472;&#9472; now &#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472; \\o/"</span>
<span style="color: #513969;">org-agenda-block-separator</span> ?&#9472;
<span style="color: #B4A5C7; font-style: italic;">;; </span><span style="color: #B4A5C7; font-style: italic;">Consider all org files part of the org-agenda</span>
<span style="color: #513969;">org-agenda-files</span> <span style="color: #f4649b;">(</span><span style="color: #008070;">list</span> +user-org-path<span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
</div>
<div id="outline-container-org2f48627" class="outline-2">
<h2 id="org2f48627"><span class="section-number-2">5.</span> Packages</h2>
<div class="outline-text-2" id="text-5">
</div>
<div id="outline-container-org2b1a9f6" class="outline-3">
<h3 id="org2b1a9f6"><span class="section-number-3">5.1.</span> hl-todo</h3>
<div class="outline-text-3" id="text-5-1">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">after!</span> hl-todo <span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">hl-todo-keyword-faces</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">(</span><span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #a07000; font-weight: bold;">TODO</span><span style="color: #5f8700;">"</span> warning bold<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #dc322f; font-weight: bold;">FIXME</span><span style="color: #5f8700;">"</span> error bold<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #875faf; font-weight: bold;">EXAMPLE</span><span style="color: #5f8700;">"</span> <span style="color: #513969;">font-lock-keyword-face</span> bold<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #008070; font-weight: bold;">HACK</span><span style="color: #5f8700;">"</span> <span style="color: #513969;">font-lock-constant-face</span> bold<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #998ca9; font-weight: bold; font-style: italic;">DEPRECATED</span><span style="color: #5f8700;">"</span> <span style="color: #513969;">font-lock-doc-face</span> bold<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #5f8700; font-weight: bold;">NOTE</span><span style="color: #5f8700;">"</span> success bold<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #dc322f; font-weight: bold;">BUG</span><span style="color: #5f8700;">"</span> error bold<span style="color: #007daf;">)</span>
<span style="color: #007daf;">(</span><span style="color: #5f8700;">"</span><span style="color: #008070; font-weight: bold;">XXX</span><span style="color: #5f8700;">"</span> <span style="color: #513969;">font-lock-constant-face</span> bold<span style="color: #007daf;">)</span><span style="color: #f4649b;">)</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-orga24ab5a" class="outline-3">
<h3 id="orga24ab5a"><span class="section-number-3">5.2.</span> org-auto-tangle</h3>
<div class="outline-text-3" id="text-5-2">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">use-package!</span> org-auto-tangle
<span style="color: #007daf;">:defer</span> t
<span style="color: #007daf;">:config</span> <span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">org-auto-tangle-default</span> nil<span style="color: #5f8700;">)</span>
<span style="color: #007daf;">:hook</span> <span style="color: #5f8700;">(</span><span style="color: #007daf;">org-mode</span> . <span style="color: #513969;">org-auto-tangle-mode</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org0907011" class="outline-3">
<h3 id="org0907011"><span class="section-number-3">5.3.</span> org-drill</h3>
<div class="outline-text-3" id="text-5-3">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">after!</span> org-drill
<span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> org-drill-scope <span style="color: #f4649b;">'</span><span style="color: #f4649b;">agenda</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org54e4408" class="outline-3">
<h3 id="org54e4408"><span class="section-number-3">5.4.</span> doom-modeline</h3>
<div class="outline-text-3" id="text-5-4">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">after!</span> doom-modeline
<span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">doom-modeline-battery</span> t<span style="color: #5f8700;">)</span>
<span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">doom-modeline-major-mode-icon</span> t<span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
<div id="outline-container-org7639f0e" class="outline-3">
<h3 id="org7639f0e"><span class="section-number-3">5.5.</span> evil-snipe</h3>
<div class="outline-text-3" id="text-5-5">
<div class="org-src-container">
<pre class="src src-emacs-lisp"><span style="color: #007daf;">(</span><span style="color: #875faf;">after!</span> evil-snipe <span style="color: #5f8700;">(</span><span style="color: #875faf;">setq</span> <span style="color: #513969;">evil-snipe-scope</span> <span style="color: #f4649b;">'</span><span style="color: #f4649b;">whole-visible</span><span style="color: #5f8700;">)</span><span style="color: #007daf;">)</span>
</pre>
</div>
</div>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Jonathan Jenne / Inhji</p>
<p class="date">Created: 2024-02-26 Mo 23:29</p>
</div>
</body>
</html>

View File

@ -10,16 +10,20 @@
- [[#themes][Themes]]
- [[#org-mode][Org Mode]]
- [[#general-settings][General Settings]]
- [[#org-export][Org Export]]
- [[#org-capture][Org Capture]]
- [[#org-agenda][Org Agenda]]
- [[#packages][Packages]]
- [[#hl-todo][hl-todo]]
- [[#org-auto-tangle][org-auto-tangle]]
- [[#org-drill][org-drill]]
- [[#doom-modeline][doom-modeline]]
- [[#evil-snipe][evil-snipe]]
* Keybindings
These keybindings extend the default doom bindings, either because the defaults were confusing to me or because the binding did not yet exist.
| Key | Description | State |
|------------+-------------------------+-------|
| F12 | Show Org-Agenda | N |
@ -53,8 +57,6 @@
(kbd "DEL") 'dired-up-directory)
#+end_src
#+RESULTS:
** Hooks
#+begin_src emacs-lisp
;; Org Mode
@ -76,8 +78,8 @@
:config
(setq heaven-and-hell-theme-type 'dark) ;; Omit to use light by default
(setq heaven-and-hell-themes
'((light . doom-feather-light)
(dark . doom-feather-dark))) ;; Themes can be the list: (dark . (tsdh-dark wombat))
'((light . leuven)
(dark . doom-monokai-octagon))) ;; Themes can be the list: (dark . (tsdh-dark wombat))
;; Optionall, load themes without asking for confirmation.
(setq heaven-and-hell-load-theme-no-confirm t)
:hook (after-init . heaven-and-hell-init-hook)
@ -95,6 +97,38 @@
org-src-tab-acts-natively t))
(add-to-list 'org-modules 'org-habit)
#+end_src
** Org Export
#+begin_src emacs-lisp
(after! org (
;; TOC Links will lead to errors when attempting
;; to export to HTML
setq org-export-exclude-tags '("toc")))
(defun my-org-inline-css-hook (exporter)
"Insert custom inline css"
(when (eq exporter 'html)
(let* ((dir (ignore-errors (file-name-directory (buffer-file-name))))
(path (concat dir "style.css"))
(fallback-style (or (null dir) (null (file-exists-p path))))
(final (if fallback-style "~/.config/doom/style.css" path))) ;; <- set your own style file path
(setq org-html-head-include-default-style t)
(setq org-html-head (concat
"<style type=\"text/css\">\n"
"<!--/*--><![CDATA[/*><!--*/\n"
(with-temp-buffer
(insert-file-contents final)
(buffer-string))
"/*]]>*/-->\n"
"</style>\n")))))
;; Org Export
(add-hook 'org-export-before-processing-hook 'my-org-inline-css-hook)
#+end_src
** Org Capture :toc:
#+begin_src emacs-lisp
@ -112,6 +146,10 @@
(file+headline +org-capture-notes-file "Inbox")
"* %u %?\n" :prepend t)
("w", "Nepali" entry
(file+headline +org-capture-notes-file "Nepali/Vocabulary")
"* " :prepend t)
("j" "Journal entries")
("jj" "Daily Journal" entry
@ -140,9 +178,6 @@
org-agenda-files (list +user-org-path)))
#+end_src
#+RESULTS:
| ~/Notes/Org |
* Packages
** hl-todo
#+begin_src emacs-lisp
@ -156,16 +191,6 @@
("XXX" font-lock-constant-face bold))))
#+end_src
#+RESULTS:
| TODO | warning | bold |
| FIXME | error | bold |
| EXAMPLE | font-lock-keyword-face | bold |
| HACK | font-lock-constant-face | bold |
| DEPRECATED | font-lock-doc-face | bold |
| NOTE | success | bold |
| BUG | error | bold |
| XXX | font-lock-constant-face | bold |
** org-auto-tangle
#+begin_src emacs-lisp
(use-package! org-auto-tangle
@ -173,6 +198,11 @@
:config (setq org-auto-tangle-default nil)
:hook (org-mode . org-auto-tangle-mode))
#+end_src
** org-drill
#+begin_src emacs-lisp
(after! org-drill
(setq org-drill-scope 'agenda))
#+end_src
** doom-modeline
#+begin_src emacs-lisp
(after! doom-modeline

View File

@ -59,7 +59,7 @@
;;(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
;;multiple-cursors ; editing in many places at once
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
@ -155,7 +155,7 @@
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
php ; perl's insecure younger brother
;; php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
;;python ; beautiful is better than ugly

View File

@ -13,6 +13,7 @@
(package! org-modern)
(package! org-auto-tangle)
(package! org-habit-stats)
(package! org-drill)
(package! catppuccin-theme)
(package! heaven-and-hell)

View File

@ -0,0 +1,5 @@
/* Fallback Org Export Styles */
body {
font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif !important;
}