diff --git a/doom.org b/doom.org
index 72087cc..fe37942 100644
--- a/doom.org
+++ b/doom.org
@@ -1,23 +1,29 @@
-#+TITLE: Doom Emacs Configuration
-#+STARTUP: overview
+#+title: Doom Emacs Configuration
+#+startup: overview
-#+LANGUAGE: en
-#+EMAIL: dehaeze.thomas@gmail.com
-#+AUTHOR: Dehaeze Thomas
+#+language: en
+#+email: dehaeze.thomas@gmail.com
+#+author: Dehaeze Thomas
-#+HTML_LINK_HOME: ./index.html
-#+HTML_LINK_UP: ./index.html
+#+html_link_home: ./index.html
+#+html_link_up: ./index.html
-#+HTML_HEAD:
-#+HTML_HEAD:
-#+PROPERTY: header-args :tangle ~/.config/doom/config.el :results none :padline no
+#+html_head:
+#+html_head:
+#+property: header-args:emacs-lisp :tangle ~/.config/doom/config.el :results none :padline no
-* Introduction and Resources :ignore:
+* Installation
+#+begin_src bash :tangle no
+ yay -Ss aspell aspell-fr aspell-en
+#+end_src
+
+* Introduction and Resources
https://medium.com/urbint-engineering/emacs-doom-for-newbies-1f8038604e3b
https://noelwelsh.com/posts/2019-01-10-doom-emacs.html
https://dotdoom.netlify.com/config.html
https://emacs.christianbaeuerlein.com/
https://github.com/nmartin84/.doom.d/blob/master/config.org
+https://tecosaur.github.io/emacs-config/config.html#intro
Documentation:
- https://github.com/hlissner/doom-emacs/blob/develop/docs/index.org
@@ -509,6 +515,11 @@ General configuration
;; Open agenda in current window
(setq org-agenda-window-setup 'current-window)
+ ;; Set default first day of agenda
+ (setq org-agenda-start-day nil)
+ (setq org-agenda-start-on-weekday 1)
+ (setq org-agenda-span 7)
+
(setq org-agenda-prefix-format
'((agenda . " %?-12t% s")
(todo . "") ;; Don't show the filename for reading agenda
@@ -634,12 +645,7 @@ https://emacs.stackexchange.com/questions/3844/good-methods-for-setting-up-alarm
#+end_src
*** appt-notification script
-:PROPERTIES:
-:header-args: :tangle ~/.config/doom/bin/appt-notification
-:header-args+: :comments none :mkdirp yes
-:header-args+: :shebang "#!/usr/bin/env bash"
-:END:
-#+begin_src bash
+#+begin_src bash :tangle ~/.config/doom/bin/appt-notification :shebang "#!/usr/bin/env bash" :comments none :mkdirp yes
TIME="$1"TODO
MSG="$2"
@@ -726,7 +732,7 @@ Documentation:
"Org-Protocol text"
entry
(file+headline "~/Cloud/org/work-notebook.org" "Inbox")
- "* %:description\nSource: %:link\nCaptured On: %U\n\n#+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n"
+ "* %:description\nSource: %:link\nCaptured On: %U\n\n#+begin_quote\n%i\n#+end_quote\n\n"
:immediate-finish t
)
)))
@@ -801,24 +807,28 @@ Do not export headline with the =:ignore:= tag:
#+begin_src emacs-lisp
(after! org
(setq org-html-mathjax-template
- "
- ")
+ "
+ ")
(setq org-html-mathjax-options
- '((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js")
- (scale "100")
- (align "center")
- (font "TeX")
- (linebreaks "false")
- (autonumber "AMS")
- (indent "0em")
- (multlinewidth "85%")
+ '((path "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js" )
+ (scale "1")
+ (autonumber "ams")
(tagindent ".8em")
(tagside "right")))
)
@@ -886,7 +896,10 @@ This is not working
cells)
(when (org-element-property :raw-value datum)
;; Heading with a title
- (unpackaged/org-export-new-title-reference datum cache))
+ (unpackaged/org-export-new-named-reference datum cache))
+ (when (member (car datum) '(src-block table example fixed-width property-drawer))
+ ;; Nameable elements
+ (unpackaged/org-export-new-named-reference datum cache))
;; NOTE: This probably breaks some Org Export
;; feature, but if it does what I need, fine.
(org-export-format-reference
@@ -903,7 +916,7 @@ This is not working
(plist-put info :internal-references cache)
reference-string))))
- (defun unpackaged/org-export-new-title-reference (datum cache)
+ (defun unpackaged/org-export-new-named-reference (datum cache)
"Return new reference for DATUM that is unique in CACHE."
(cl-macrolet ((inc-suffixf (place)
`(progn
@@ -919,9 +932,25 @@ This is not working
(string-to-number suffix)
0)))
(setf ,place (format "%s--%s" s1 (cl-incf suffix)))))))
- (let* ((title (org-element-property :raw-value datum))
- (ref (url-hexify-string (substring-no-properties title)))
- (parent (org-element-property :parent datum)))
+ (let* ((headline-p (eq (car datum) 'headline))
+ (title (if headline-p
+ (org-element-property :raw-value datum)
+ (or (org-element-property :name datum)
+ (concat (org-element-property :raw-value
+ (org-element-property :parent
+ (org-element-property :parent datum)))))))
+ ;; get ascii-only form of title without needing percent-encoding
+ (ref (concat (org-reference-contraction (substring-no-properties title))
+ (unless (or headline-p (org-element-property :name datum))
+ (concat ","
+ (pcase (car datum)
+ ('src-block "code")
+ ('example "example")
+ ('fixed-width "mono")
+ ('property-drawer "properties")
+ (_ (symbol-name (car datum))))
+ "--1"))))
+ (parent (when headline-p (org-element-property :parent datum))))
(while (--any (equal ref (car it))
cache)
;; Title not unique: make it so.
@@ -929,11 +958,14 @@ This is not working
;; Append ancestor title.
(setf title (concat (org-element-property :raw-value parent)
"--" title)
- ref (url-hexify-string (substring-no-properties title))
- parent (org-element-property :parent parent))
+ ;; get ascii-only form of title without needing percent-encoding
+ ref (org-reference-contraction (substring-no-properties title))
+ parent (when headline-p (org-element-property :parent parent)))
;; No more ancestors: add and increment a number.
(inc-suffixf ref)))
ref)))
+
+ (add-hook 'org-load-hook #'unpackaged/org-export-html-with-useful-ids-mode)
#+end_src
*** TODO Folded Drawers
@@ -1446,6 +1478,21 @@ https://www.reddit.com/r/orgmode/comments/7u2n0h/tip_for_defining_latex_macros_f
)
#+end_src
+** Some function
+#+begin_src emacs-lisp
+(defun org-syntax-convert-case-to-lower ()
+ "Convert all #+keywords to #+keywords."
+ (interactive)
+ (save-excursion
+ (goto-char (point-min))
+ (let ((count 0)
+ (case-fold-search nil))
+ (while (re-search-forward "#\\+[A-Z_]+" nil t)
+ (replace-match (downcase (match-string 0)) t)
+ (setq count (1+ count)))
+ (message "Replaced %d occurances" count))))
+#+end_src
+
** TODO Insert ScreenShot or Picture from Phone
http://pragmaticemacs.com/emacs/a-workflow-to-quickly-add-photos-to-org-mode-notes/
@@ -1628,13 +1675,12 @@ https://www.reddit.com/r/emacs/comments/d3a8or/pretty_org_tables_in_the_buffer_c
#+end_src
** Citeproc-Org
-#+BEGIN_SRC emacs-lisp
+#+begin_src emacs-lisp
(use-package! citeproc-org
- :ensure t
:after ox-hugo
:config
(citeproc-org-setup))
-#+END_SRC
+#+end_src
** Org Wild Notifier
#+begin_src emacs-lisp
@@ -1975,9 +2021,8 @@ Use the current window for C-c ' source editing
** Indentation
#+begin_src emacs-lisp
(after! org
- (setq org-edit-src-content-indentation 2
- org-src-tab-acts-natively nil
- org-src-preserve-indentation nil)
+ ;; Don't change indentation when toggling
+ (setq org-src-preserve-indentation t)
)
#+end_src
@@ -2494,9 +2539,9 @@ Nice Functions:
`(("d" "default" plain (function org-roam--capture-get-point)
"%?"
:file-name "${slug}"
- :head ,(concat "#+TITLE: ${title}\n"
- "#+SETUPFILE: ./setup/org-setup-file.org\n"
- "#+HUGO_SECTION: zettels\n"
+ :head ,(concat "#+title: ${title}\n"
+ "#+setupfile: ./setup/org-setup-file.org\n"
+ "#+hugo_section: zettels\n"
"\n"
"- Tags ::\n"
"\n"
@@ -2508,10 +2553,10 @@ Nice Functions:
`(("r" "ref" plain (function org-roam--capture-get-point)
"%?"
:file-name "${slug}"
- :head ,(concat "#+TITLE: ${title}\n"
- "#+SETUPFILE: ./setup/org-setup-file.org\n"
- "#+HUGO_SECTION: websites\n"
- "#+ROAM_KEY: ${ref}\n"
+ :head ,(concat "#+title: ${title}\n"
+ "#+setupfile: ./setup/org-setup-file.org\n"
+ "#+hugo_section: websites\n"
+ "#+roam_key: ${ref}\n"
"\n"
"- Tags ::\n"
)
@@ -2561,9 +2606,9 @@ Create Org-Roam file from heading ([[https://ag91.github.io/blog/2020/11/12/writ
"Insert org roam file in FILE-PATH with TITLE, LINKS, SOURCES, TEXT, QUOTE."
(with-temp-file file-path
(insert
- "#+TITLE: " title "\n"
- "#+SETUPFILE: ./setup/org-setup-file.org\n"
- "#+HUGO_SECTION: zettels\n"
+ "#+title: " title "\n"
+ "#+setupfile: ./setup/org-setup-file.org\n"
+ "#+hugo_section: zettels\n"
"\n"
"- Tags ::\n"
"\n"
@@ -2624,10 +2669,10 @@ Create Org-Roam file from heading ([[https://ag91.github.io/blog/2020/11/12/writ
(setq bibtex-completion-notes-symbol "✎")
;; Template used when creating new Note file
- (setq bibtex-completion-notes-template-multiple-files (concat "#+TITLE: ${title}\n"
- "#+SETUPFILE: ./setup/org-setup-file.org\n"
- "#+HUGO_SECTION: ${=type=}\n"
- "#+ROAM_KEY: ${=key=}\n"
+ (setq bibtex-completion-notes-template-multiple-files (concat "#+title: ${title}\n"
+ "#+setupfile: ./setup/org-setup-file.org\n"
+ "#+hugo_section: ${=type=}\n"
+ "#+roam_key: ${=key=}\n"
"\n"
"- Tags ::\n"
"- Reference :: cite:${=key=}\n"
@@ -2738,10 +2783,10 @@ Provides nice functions such as:
(setq orb-templates
`(("r" "ref" plain (function org-roam-capture--get-point) ""
:file-name "${=key=}"
- :head ,(concat "#+TITLE: ${title}\n"
- "#+SETUPFILE: ./setup/org-setup-file.org\n"
- "#+HUGO_SECTION: ${=type=}\n"
- "#+ROAM_KEY: ${ref}\n"
+ :head ,(concat "#+title: ${title}\n"
+ "#+setupfile: ./setup/org-setup-file.org\n"
+ "#+hugo_section: ${=type=}\n"
+ "#+roam_key: ${ref}\n"
"\n"
"- Tags ::\n"
"- Reference :: ${ref}\n"
@@ -3087,11 +3132,7 @@ Choose account label to feed msmtp -a option based on From header in Message buf
#+end_src
* Doom =init.el=
-:PROPERTIES:
-:header-args: :tangle ~/.config/doom/init.el
-:END:
-
-#+begin_src emacs-lisp
+#+begin_src emacs-lisp :tangle ~/.config/doom/init.el
(when noninteractive
(after! undo-tree
(global-undo-tree-mode -1)))
@@ -3151,7 +3192,7 @@ Choose account label to feed msmtp -a option based on From header in Message buf
:checkers
syntax ; tasing you for every semicolon you forget
- spell ; tasing you for misspelling mispelling
+ (spell +aspell) ; tasing you for misspelling mispelling
:lang
data ; config/data formats
@@ -3167,6 +3208,7 @@ Choose account label to feed msmtp -a option based on From header in Message buf
+dragndrop ; drag & drop files/images into org buffers
+hugo ; use Emacs for hugo blogging
+roam ;
+ +gnuplot
+present) ; using org-mode for presentations
python ; beautiful is better than ugly
(sh ; she sells {ba,z,fi}sh shells on the C xor