Refactor puml/plantuml support/no load on startup
This commit is contained in:
parent
d710d380e5
commit
6868bba1f9
@ -2420,6 +2420,7 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
|||||||
(add-hook 'org-mode-hook 'imalison:disable-linum-mode)
|
(add-hook 'org-mode-hook 'imalison:disable-linum-mode)
|
||||||
(add-hook 'org-mode-hook (lambda () (setq org-todo-key-trigger t)))
|
(add-hook 'org-mode-hook (lambda () (setq org-todo-key-trigger t)))
|
||||||
(add-hook 'org-agenda-mode-hook 'imalison:disable-linum-mode)
|
(add-hook 'org-agenda-mode-hook 'imalison:disable-linum-mode)
|
||||||
|
|
||||||
(defun org-archive-if (condition-function)
|
(defun org-archive-if (condition-function)
|
||||||
(if (funcall condition-function)
|
(if (funcall condition-function)
|
||||||
(let ((next-point-marker
|
(let ((next-point-marker
|
||||||
@ -2544,20 +2545,23 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
|||||||
(add-to-list 'org-show-context-detail '(org-goto . lineage))
|
(add-to-list 'org-show-context-detail '(org-goto . lineage))
|
||||||
(sp-local-pair 'org-mode "~" "~")
|
(sp-local-pair 'org-mode "~" "~")
|
||||||
|
|
||||||
|
(add-to-list
|
||||||
|
'org-src-lang-modes '("plantuml" . puml))
|
||||||
|
|
||||||
(org-babel-do-load-languages
|
(org-babel-do-load-languages
|
||||||
'org-babel-load-languages
|
'org-babel-load-languages
|
||||||
'((sh . t)
|
'((sh . t)
|
||||||
(python . t)
|
(python . t)
|
||||||
(ruby . t)
|
(ruby . t)
|
||||||
(octave . t)
|
(octave . t)
|
||||||
(sqlite . t)))
|
(sqlite . t)
|
||||||
|
(plantuml . t)))
|
||||||
|
|
||||||
(setq org-log-into-drawer t
|
(setq org-log-into-drawer t
|
||||||
org-log-reschedule t
|
org-log-reschedule t
|
||||||
org-log-redeadline t
|
org-log-redeadline t
|
||||||
org-treat-insert-todo-heading-as-state-change t)
|
org-treat-insert-todo-heading-as-state-change t)
|
||||||
|
|
||||||
|
|
||||||
(when nil
|
(when nil
|
||||||
;; Enable appointment notifications.
|
;; Enable appointment notifications.
|
||||||
(defadvice org-agenda-to-appt (before wickedcool activate)
|
(defadvice org-agenda-to-appt (before wickedcool activate)
|
||||||
@ -2960,21 +2964,22 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
|
|||||||
(progn
|
(progn
|
||||||
(add-hook 'markdown-mode-hook 'imalison:disable-linum-mode)))
|
(add-hook 'markdown-mode-hook 'imalison:disable-linum-mode)))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
**** puml-mode
|
**** puml-mode (plantuml-support)
|
||||||
This mode seems to be better maintained than plantuml-mode
|
This mode seems to be better maintained than plantuml-mode
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(use-package puml-mode
|
(use-package puml-mode
|
||||||
:after org
|
:commands puml-mode
|
||||||
:mode ("\\.puml\\'" "\\.plantuml\\'")
|
:mode ("\\.puml\\'" "\\.plantuml\\'")
|
||||||
:preface
|
:preface
|
||||||
|
(progn
|
||||||
(if (equal system-type 'darwin)
|
(if (equal system-type 'darwin)
|
||||||
(let* ((plantuml-dir
|
(let* ((plantuml-dir
|
||||||
(s-trim (shell-command-to-string "brew --prefix plantuml")))
|
(s-trim (shell-command-to-string "brew --prefix plantuml")))
|
||||||
(filename
|
(filename
|
||||||
(--first (s-ends-with? ".jar" it) (directory-files plantuml-dir))))
|
(--first (s-ends-with? ".jar" it) (directory-files plantuml-dir)))
|
||||||
(setq puml-plantuml-jar-path (imalison:join-paths plantuml-dir filename))))
|
(filepath (imalison:join-paths plantuml-dir filename)))
|
||||||
:config
|
(setq puml-plantuml-jar-path filepath
|
||||||
(progn
|
org-plantuml-jar-path filepath)))
|
||||||
(add-to-list
|
(add-to-list
|
||||||
'org-src-lang-modes '("plantuml" . puml))))
|
'org-src-lang-modes '("plantuml" . puml))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
Loading…
Reference in New Issue
Block a user