@ -16,9 +16,22 @@
:bind ( " C-c r e " . 'keychain-refresh-environment )
:bind ( " C-c r e " . 'keychain-refresh-environment )
:init ( keychain-refresh-environment ) )
:init ( keychain-refresh-environment ) )
( use-package auto-minor-mode )
( use-package ox-slimhtml )
( org-export-define-derived-backend 'custom-html-exporter
'slimhtml
:translate-alist
' ( ( code . org-html-code )
( timestamp . org-html-timestamp ) ) )
( use-package projectile
:config ( projectile-mode 1 ) )
( use-package diminish )
( use-package diminish
:init
( diminish 'eldoc-mode )
( diminish 'org-src-mode ) )
( use-package auto-minor-mode )
( use-package company
( use-package company
:diminish 'company-mode
:diminish 'company-mode
@ -54,7 +67,7 @@
( slime-lisp-implementations
( slime-lisp-implementations
' ( ( sbcl ( " sbcl " " --core " " /usr/lib64/sbcl/sbcl.core " )
' ( ( sbcl ( " sbcl " " --core " " /usr/lib64/sbcl/sbcl.core " )
:env ( " SBCL_HOME=/usr/lib64/sbcl/ " ) ) ) )
:env ( " SBCL_HOME=/usr/lib64/sbcl/ " ) ) ) )
:diminish 'slime-mode
:diminish ( slime-mode slime-autodoc-mode )
:init
:init
( use-package slime-company )
( use-package slime-company )
( add-hook 'lisp-mode-hook 'slime-mode )
( add-hook 'lisp-mode-hook 'slime-mode )
@ -84,8 +97,6 @@
( dashboard-items ' ( ( recents . 5 ) ) )
( dashboard-items ' ( ( recents . 5 ) ) )
:config ( dashboard-setup-startup-hook ) )
:config ( dashboard-setup-startup-hook ) )
( setq initial-buffer-choice ( lambda ( ) ( get-buffer " *dashboard* " ) ) )
( use-package transpose-frame
( use-package transpose-frame
:ensure t
:ensure t
:bind ( ( " C-c f t " . transpose-frame )
:bind ( ( " C-c f t " . transpose-frame )
@ -154,7 +165,12 @@
;; Don't indent whole file with org-mode
;; Don't indent whole file with org-mode
( eval-after-load " org-mode " ( local-set-key ( kbd " s-i " ) nil ) )
( eval-after-load " org-mode " ( local-set-key ( kbd " s-i " ) nil ) )
( add-to-list 'org-structure-template-alist ' ( " el " " #+BEGIN_SRC emacs-lisp \n ? \n #+END_SRC " ) )
( setq org-structure-template-alist
( append
' ( ( " el " " #+BEGIN_SRC emacs-lisp \n ? \n #+END_SRC " )
( " lisp " " #+BEGIN_SRC lisp \n ? \n #+END_SRC " )
( " sh " " #+BEGIN_SRC shell \n ? \n #+END_SRC " ) )
org-structure-template-alist ) )
( setq org-src-tab-acts-natively t
( setq org-src-tab-acts-natively t
org-edit-src-content-indentation 0
org-edit-src-content-indentation 0
@ -163,13 +179,63 @@
( setq org-html-doctype " html5 " )
( setq org-html-doctype " html5 " )
( definteractive manx/save-org-to-html ( )
( defun manx/eval-these ( lang body )
( when ( equal major-mode 'org-mode )
( not ( string-equal " \" \\ n \" " body ) ) )
( save-buffer )
( org-html-export-to-html ) ) )
( setq org-confirm-babel-evaluate 'manx/eval-these )
( add-hook 'org-mode-hook
( defun manx-publish/local-dir ( dir )
( local-keybind " C-c s h " manx/save-org-to-html ) )
( concat " ~/Documents/org/ " dir ) )
( defun manx-publish/remote-dir ( dir )
( concat " /ssh:plum@plum.moe|sudo:78: " dir ) )
( defvar manx-publish/html-head " <link rel= \" stylesheet \" href= \" /static/css/style.css \" /> " )
( defun sitemap ( title list )
( concat " #+title: " title " \n "
" #+setupfile:~/Documents/org/includes/setup.org \n \n "
( format " @@html:<h1>%s</h1>@@ " title )
" @@html:<archive>@@ "
( string-join ( mapcar #' car ( cdr list ) ) )
" @@html:</archive>@@ " ) )
( setq org-publish-project-alist
` ( ( " plum "
:base-directory , ( manx-publish/local-dir " plum " )
:publishing-directory , ( manx-publish/remote-dir " /var/www/plum.moe " )
:publishing-function ox-slimhtml-publish-to-html
:html-head , manx-publish/html-head
:recursive t )
( " words "
:base-directory , ( manx-publish/local-dir " words " )
:publishing-directory , ( manx-publish/remote-dir " /var/www/words.plum.moe " )
:publishing-function ox-slimhtml-publish-to-html
:auto-sitemap t
:sitemap-filename " index.html "
:sitemap-title " Words by Manx "
:sitemap-sort-files anti-chronologically
:sitemap-file-entry-format " %d - %t "
:sitemap-function sitemap
:author-info t
:creator-info t
:html-head , manx-publish/html-head )
( " flags "
:base-directory , ( manx-publish/local-dir " flags " )
:publishing-directory , ( manx-publish/remote-dir " /var/www/flags " )
:publishing-function ox-slimhtml-publish-to-html
:html-head , manx-publish/html-head )
( " static "
:base-directory , ( manx-publish/local-dir " static " )
:base-extension " css \\ |js \\ |svg "
:publishing-function org-publish-attachment
:recursive t
:publishing-directory , ( manx-publish/remote-dir " /var/www/plum.moe/static " ) ) ) )
( definteractive manx/blog ( )
( load-theme 'spacemacs-light )
( org-publish-project " words " )
( load-theme 'spacemacs-dark ) )
( definteractive manx/delete-org-link ( )
( definteractive manx/delete-org-link ( )
( when ( org-in-regexp org-bracket-link-regexp 1 )
( when ( org-in-regexp org-bracket-link-regexp 1 )
@ -193,6 +259,7 @@
( save-excursion
( save-excursion
( indent-region ( point-min ) ( point-max ) nil ) ) )
( indent-region ( point-min ) ( point-max ) nil ) ) )
( global-set-key ( kbd " C-c M-w " ) ( lambdainteractive ( ) ( kill-ring-save ( point-min ) ( point-max ) ) ) )
( global-set-key ( kbd " C-c k l " ) 'manx/kill-line )
( global-set-key ( kbd " C-c k l " ) 'manx/kill-line )
( global-set-key ( kbd " s-i " ) 'manx/format-whole-buffer )
( global-set-key ( kbd " s-i " ) 'manx/format-whole-buffer )
( global-set-key ( kbd " C-c r b " ) 'revert-buffer )
( global-set-key ( kbd " C-c r b " ) 'revert-buffer )
@ -202,6 +269,10 @@
( switch-to-buffer ( get-buffer-create " *scratch* " ) )
( switch-to-buffer ( get-buffer-create " *scratch* " ) )
( lisp-interaction-mode ) )
( lisp-interaction-mode ) )
( definteractive manx/lisp-buffer ( )
( switch-to-buffer ( get-buffer-create " *lisp playground* " ) )
( lisp-mode ) )
( definteractive manx/kill-all ( )
( definteractive manx/kill-all ( )
( mapc 'kill-buffer ( buffer-list ) )
( mapc 'kill-buffer ( buffer-list ) )
( manx/scratch-buffer ) )
( manx/scratch-buffer ) )