From d852bf8fda293b7d059f584733ec28868cd22e41 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Wed, 16 Jun 2021 15:05:17 +0200 Subject: [PATCH] [Emacs] Add org export backends for SSH config, Epub and Markdown --- org/config/emacs.org | 48 +++++++++++++++++++++++++++++++----------- org/config/sitemap.org | 2 +- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/org/config/emacs.org b/org/config/emacs.org index 2388fce..20e4f94 100644 --- a/org/config/emacs.org +++ b/org/config/emacs.org @@ -2551,15 +2551,6 @@ extended however we like! <>) #+end_src -#+RESULTS: -| config-website-org | :base-directory | ~/org/config/ | :base-extension | org | :publishing-directory | /rsync:Tilo:~/www/phundrak.com/config | :recursive | t | :language | en | :publishing-function | org-html-publish-to-html | :headline-levels | 5 | :auto-sitemap | t | :auto-preamble | t | | | | | | | -| config-website-static | :base-directory | ~/org/config/ | :base-extension | png\ | jpg\ | gif\ | webp\ | svg\ | jpeg\ | ttf\ | woff\ | txt\ | epub\ | md | :publishing-directory | /rsync:Tilo:~/www/phundrak.com/config | :recursive | t | :language | en | :publishing-function | org-publish-attachment | | | -| config-website | :components | (config-website-org config-website-static) | | | | | | | | | | | | | | | | | | | | | | | -| langue-phundrak-com-org | :base-directory | ~/Documents/conlanging/content/ | :base-extension | org | :exclude | \./\(CONTRIB\ | README\ | head\ | temp\ | svg-ink\).* | :publishing-directory | /rsync:Tilo:~/www/phundrak.com/langue/ | :recursive | t | :language | fr | :publishing-function | org-html-publish-to-html | :headline-levels | 5 | :auto-sitemap | t | :auto-preamble | t | -| langue-phundrak-com-pdf | :base-directory | ~/Documents/conlanging/content/ | :base-extension | org | :exclude | \./\(CONTRIB\ | README\ | index\ | head\ | temp\ | svg-ink\).* | :publishing-directory | /rsync:Tilo:~/www/phundrak.com/langue/ | :recursive | t | :language | fr | :publishing-function | org-latex-publish-to-pdf | :headline-levels | 5 | :auto-preamble | t | | -| langue-phundrak-com-static | :base-directory | ~/Documents/conlanging/content/ | :base-extension | png\ | jpg\ | gif\ | webp\ | svg\ | jpeg\ | ttf\ | woff\ | txt\ | epub | :publishing-directory | /rsync:Tilo:~/www/phundrak.com/langue/ | :recursive | t | :language | fr | :publishing-function | org-publish-attachment | | | | -| langue-phundrak-com | :components | (langue-phundrak-com-org langue-phundrak-com-static langue-phundrak-com-pdf) | | | | | | | | | | | | | | | | | | | | | | | - The main feature from ~evil-org~ that I love is how easy it is to modify some keybindings for keyboards layouts that do not have ~hjkl~, such as the bépo layout (or Dvorak or Colemak if you are into that). But it @@ -2679,7 +2670,6 @@ exporter I use afterwards. Its installation is pretty simple: *** File export :PROPERTIES: -:header-args:emacs-lisp: :tangle no :exports code :results silent :CUSTOM_ID: Packages-Configuration-Org-mode-File-exportik95fl6184j0 :END: I want to disable by default behavior of ~^~ and ~_~ for only one @@ -2688,16 +2678,50 @@ respectively. This is due to my frequent usage of the underscore in my org files as a regular character and not a markup one, especially when describing phonetics evolution. So, let’s disable it: #+NAME: org-use-sub-superscripts -#+BEGIN_SRC emacs-lisp +#+BEGIN_SRC emacs-lisp :tangle no (setq org-use-sub-superscripts (quote {})) #+END_SRC #+begin_src emacs-lisp (use-package htmlize - :straigh (:build t) :defer t) #+end_src +There’s not really any unified Markdown specification, meaning +everyone can pretty much do whatever they want with the syntax and +still call it Markdown. Great… But something I appreciate is Github +supports some extra HTML to make our files extra spicy! And lucky me, +there’s a package for exporting my org files to Github-flavored +Markdown! +#+begin_src emacs-lisp + (use-package ox-gfm + :after ox + :straight (:build t) + :init + (require 'ox-gfm)) +#+end_src + +Another backend for exporting files through org I like is ~ox-epub~ +which, as you can guess, exports org files to the [[https://www.w3.org/publishing/epub32/][Epub format]]. +#+begin_src emacs-lisp + (use-package ox-epub + :after ox + :straight (:build t) + :init + (require 'ox-epub)) +#+end_src + +Yet another exporter I enjoy is [[https://github.com/dantecatalfamo/ox-ssh][~ox-ssh~]] with which I manage my +~$HOME/.ssh/config~ file. You won’t find my org file for managing my +servers on my repos though. +#+begin_src emacs-lisp + (use-package ox-ssh + :after ox + :straight (:build t) + :init + (require 'ox-ssh)) +#+end_src + **** LaTeX :PROPERTIES: :CUSTOM_ID: Packages-Configuration-Org-mode-File-export-LaTeXg2b5fl6184j0 diff --git a/org/config/sitemap.org b/org/config/sitemap.org index 5bb5dfc..461423b 100644 --- a/org/config/sitemap.org +++ b/org/config/sitemap.org @@ -2,6 +2,7 @@ - [[file:bootstrap.org][Arch Linux, Phundrak-flavored]] - [[file:awesome.org][AwesomeWM configuration]] +- [[file:emacs.org][Emacs Configuration]] - [[file:bin.org][Executable scripts]] - [[file:fish.org][Fish config]] - [[file:neofetch.org][Neofetch configuration]] @@ -10,7 +11,6 @@ - [[file:rustfmt.org][Rust format config]] - [[file:spacemacs.org][Spacemacs Configuration]] - [[file:tmux.org][Tmux config]] -- [[file:emacs.org][Vanilla Emacs Configuration]] - Deprecated - [[file:Deprecated/nano.org][Nano configuration]] - [[file:Deprecated/polybar.org][Polybar config]]