summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2021-08-13 10:52:37 +0800
committerJSDurand <mmemmew@gmail.com>2021-08-13 10:52:37 +0800
commita67a397377601d839c3b17372c4094d30ea2e2df (patch)
tree25ad8ec87b99d69b4be48e488ad4882a6f8d3802
parent321829e50d7d67697cce5df192c985a43454903a (diff)
fix comment headers and experiment with publish
Some comment should start with three semi-colons so that they are treated as outline headings. * org-conf.el (org-publish-project-alist): Experiment with this.
-rw-r--r--org-conf.el54
1 files changed, 45 insertions, 9 deletions
diff --git a/org-conf.el b/org-conf.el
index a3ce49b..1f1d8cd 100644
--- a/org-conf.el
+++ b/org-conf.el
@@ -1,28 +1,39 @@
-;;; -*- lexical-binding: t; -*-
+;; -*- lexical-binding: t; -*-
+
+;;; latex packages
(setq org-latex-packages-alist '(("" "amsfonts" t))
;; org-format-latex-options (plist-put org-format-latex-options :scale 1.5)
)
+;;; org capture bookmark
+
(setq org-capture-bookmark nil)
+;;; org adapt indentation
+
(setq org-adapt-indentation nil)
+
+;;; org modules
(setq org-modules '(ol-gnus ol-info ol-eww))
+;;; Hide unnecessary decorations
(setq org-hide-emphasis-markers nil)
(setq org-hide-macro-markers nil)
(setq org-hide-leading-stars nil)
+
+;;; follow link on return
(setq org-return-follows-link t)
-;; org-element
+;;; org-element
(require 'org-element)
-;; org-clock
+;;; org-clock
(require 'org-clock)
-;; tempo
+;;; tempo
(require 'org-tempo)
@@ -158,6 +169,8 @@ etc."
(t base-name))))
(find-file next-name)))
+;;; Set tags
+
;; NOTE: Modified by Durand to use `completing-read-multiple' instead of
;; `completing-read'.
;;;###autoload
@@ -273,6 +286,8 @@ in Lisp code use `org-set-tags' instead."
(require 'org-protocol)
+;;; Capture templates
+
(setq org-capture-templates
'(("d" "Record Diaries" entry
(file+olp+datetree "~/org/diary.org")
@@ -323,6 +338,8 @@ in Lisp code use `org-set-tags' instead."
'(("g" ((in-mode . "gnus-summary-mode")
(in-mode . "gnus-article-mode")))))
+;;; agenda custom commands
+
(setq org-agenda-custom-commands
'(("o" "Custom"
((agenda ""
@@ -430,7 +447,7 @@ in Lisp code use `org-set-tags' instead."
(find-file (expand-file-name file-name org-directory))
(goto-char (point-max))))
-;; filter title in the link
+;;; filter title in the link
;;;###autoload
(defun org-filtered-link ()
"Filter out some unnecessary parts in the link description"
@@ -447,7 +464,7 @@ in Lisp code use `org-set-tags' instead."
title))))
(org-link-make-string link filtered))))
-;; Determine tag based upon the URL
+;;; Determine tag based upon the URL
;;;###autoload
(defun org-determine-tag ()
"Determine tag based upon the URL"
@@ -478,9 +495,9 @@ in Lisp code use `org-set-tags' instead."
"Update the html link to a novel, or to a web_link.
If DESC is non-`nil', then it is the description of the new link."
(interactive)
-;;; HACK: Refocus the selected frame.
-;;; I was doing this in the applescript. But for some reason it is messed up. So
-;;; I let Emacs gain focus by itself now.
+;; HACK: Refocus the selected frame.
+;; I was doing this in the applescript. But for some reason it is messed up. So
+;; I let Emacs gain focus by itself now.
(select-frame-set-input-focus (selected-frame))
(let* ((tags (completing-read "tag: " '("roman-ARCHIVE"
"web_link-ARCHIVE")
@@ -522,3 +539,22 @@ If DESC is non-`nil', then it is the description of the new link."
(replace-match "\\1" nil nil title))
(t
title))))
+
+;;; publishing settings
+
+(setq org-publish-project-alist
+ (list
+ (list
+ "blog"
+ :base-directory (directory-file-name
+ (expand-file-name
+ "blog" org-directory))
+ :base-extension "org"
+ :publishing-directory (directory-file-name
+ (expand-file-name
+ "public" org-directory))
+ :publishing-function #'org-html-publish-to-html
+ :section-numbers nil
+ :with-toc nil
+ :html-preamble t)))
+