changeset 428: |
af3d873a0312 |
parent 427: |
8a312fa72406 |
child 429: |
a698dd5de562 |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sat, 08 Jun 2024 00:20:52 -0400 |
files: |
emacs/default.el emacs/lib/publish.el emacs/lib/ulang.el |
description: |
clean.theme upgrades |
1.1--- a/emacs/default.el Fri Jun 07 18:08:36 2024 -0400
1.2+++ b/emacs/default.el Sat Jun 08 00:20:52 2024 -0400
1.3@@ -945,6 +945,25 @@
1.4 (org-agenda-remove-restriction-lock t)
1.5 (message nil))))
1.6
1.7+(defun org-export-translate-to-lang (term-translations &optional lang)
1.8+ "Adds desired translations to `org-export-dictionary'.
1.9+ TERM-TRANSLATIONS is alist consisted of term you want to translate
1.10+ and its corresponding translation, first as :default then as :html and
1.11+ :utf-8. LANG is language you want to translate to."
1.12+ (dolist (term-translation term-translations)
1.13+ (let* ((term (car term-translation))
1.14+ (translation-default (nth 1 term-translation))
1.15+ (translation-html (nth 2 term-translation))
1.16+ (translation-utf-8 (nth 3 term-translation))
1.17+ (term-list (assoc term org-export-dictionary))
1.18+ (term-langs (cdr term-list)))
1.19+ (setcdr term-list (append term-langs
1.20+ (list
1.21+ (list lang
1.22+ :default translation-default
1.23+ :html translation-html
1.24+ :utf-8 translation-utf-8)))))))
1.25+
1.26 ;;; Skel
1.27 (add-to-load-path user-emacs-lib-directory)
1.28 (require 'sk)
2.1--- a/emacs/lib/publish.el Fri Jun 07 18:08:36 2024 -0400
2.2+++ b/emacs/lib/publish.el Sat Jun 08 00:20:52 2024 -0400
2.3@@ -13,7 +13,7 @@
2.4 (defvar url "https://compiler.company")
2.5 (defvar vc-url "https://vc.compiler.company")
2.6 (defvar packy-url "https://packy.compiler.company")
2.7-(defvar html-nav (format "<div class=\"nav\"> (<a href = \"%s\">~</a> (<a href = \"%s/blog\">blog</a> <a href = \"%s/docs\">docs</a> <a href = \"%s/plan\">plan</a> <a href = \"%s/notes\">notes</a>) (<a href = \"%s\">vc</a> <a href = \"%s\">packy</a>))</div>"
2.8+(defvar html-nav (format "<div class=\"nav\" id=\"nav\"><h2 id=\"index\">*</h2><div id=\"text-index\"> (<a href = \"%s\">~</a><br> (<a href = \"%s/blog\">blog</a> <a href = \"%s/docs\">docs</a> <a href = \"%s/plan\">plan</a> <a href = \"%s/notes\">notes</a>)<br> (<a href = \"%s\">vc</a> <a href = \"%s\">packy</a>))</div></div>"
2.9 url url url url url vc-url packy-url))
2.10
2.11 (defvar html-foot "<footer><p>updated %C</p></footer>")
2.12@@ -52,6 +52,7 @@
2.13 :publishing-function org-html-publish-to-html)
2.14 ("blog"
2.15 :base-directory ,(expand-file-name "blog" project-dir)
2.16+ :recursive t
2.17 :base-extension "org"
2.18 :footnote-section-p t
2.19 :html-doctype "<!doctype html>"
2.20@@ -62,6 +63,7 @@
2.21 :html-postamble ,html-foot)
2.22 ("plan"
2.23 :base-directory ,(expand-file-name "plan" project-dir)
2.24+ :recursive t
2.25 :base-extension "org"
2.26 :footnote-section-p t
2.27 :html-doctype "<!doctype html>"
2.28@@ -72,6 +74,7 @@
2.29 :html-postamble ,html-foot)
2.30 ("notes"
2.31 :base-directory ,(expand-file-name "notes" project-dir)
2.32+ :recursive t
2.33 :base-extension "org"
2.34 :footnote-section-p t
2.35 :html-doctype "<!doctype html>"
3.1--- a/emacs/lib/ulang.el Fri Jun 07 18:08:36 2024 -0400
3.2+++ b/emacs/lib/ulang.el Sat Jun 08 00:20:52 2024 -0400
3.3@@ -39,6 +39,8 @@
3.4
3.5 (org-dynamic-block-define "links" 'ulang-dblock-insert-links)
3.6
3.7+(org-export-translate-to-lang (list '("Table of Contents" "☰")) "ulang")
3.8+
3.9 (cl-pushnew '("header" .
3.10 "#+TITLE: $1
3.11 #+AUTHOR: $2