Emacs: Refactor text/tools.el.
This commit is contained in:
parent
b724d880e4
commit
68282ed510
|
@ -1,6 +1,6 @@
|
|||
;;; tools.el --- Configure text tools. -*- lexical-binding: t; -*-
|
||||
|
||||
;; Time-stamp: <2020-03-27T17:10:08+0100>
|
||||
;; Time-stamp: <2020-03-27T18:11:00+0100>
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
|
@ -11,33 +11,25 @@
|
|||
;; Manual pages.
|
||||
(use-package man
|
||||
:defer t
|
||||
:custom
|
||||
(Man-width fill-column)
|
||||
:custom (Man-width fill-column)
|
||||
:custom-face
|
||||
(Man-overstrike ((t (:inherit font-lock-type-face :bold t))))
|
||||
(Man-underline ((t (:inherit font-lock-keyword-face :underline t))))
|
||||
:bind
|
||||
("<f1>" . man)
|
||||
)
|
||||
:bind ("<f1>" . man))
|
||||
|
||||
;; Manual pages, alternative implementation.
|
||||
(use-package woman
|
||||
:custom
|
||||
(woman-fill-frame t)
|
||||
|
||||
:config
|
||||
(defun my/woman-topic-at-point ()
|
||||
"Call woman and use the word at point as topic if it exists."
|
||||
(interactive)
|
||||
(let ((woman-use-topic-at-point t))
|
||||
(woman))
|
||||
)
|
||||
|
||||
;; Open manpages in new window.
|
||||
(setq display-buffer-alist '(("^\\*WoMan" display-buffer-pop-up-window)))
|
||||
:bind
|
||||
("C-<f1>" . my/woman-topic-at-point)
|
||||
)
|
||||
:custom (woman-fill-frame t)
|
||||
:config (progn
|
||||
(defun my/woman-topic-at-point ()
|
||||
"Call woman and use the word at point as topic if it exists."
|
||||
(interactive)
|
||||
(let ((woman-use-topic-at-point t))
|
||||
(woman)))
|
||||
;; Open manpages in new window.
|
||||
(setq display-buffer-alist
|
||||
'(("^\\*WoMan" display-buffer-pop-up-window))))
|
||||
:bind ("C-<f1>" . my/woman-topic-at-point))
|
||||
|
||||
;; Read RFC documents.
|
||||
(use-package rfc-mode
|
||||
|
@ -45,43 +37,33 @@
|
|||
:commands (rfc-mode-browse)
|
||||
:config (when (or (string= (system-name) "ventiloplattform")
|
||||
(string= (system-name) "sprotznog"))
|
||||
(customize-set-variable 'rfc-mode-directory "/var/rfc/"))
|
||||
)
|
||||
(customize-set-variable 'rfc-mode-directory "/var/rfc/")))
|
||||
|
||||
;; Mode for writing blog posts with hugo.
|
||||
(use-package easy-hugo
|
||||
:if (string= (system-name) "ventiloplattform")
|
||||
|
||||
:custom
|
||||
(easy-hugo-basedir "~/Projekte/www/blog.tastytea.de/")
|
||||
(easy-hugo-url "https://blog.tastytea.de")
|
||||
(easy-hugo-postdir "content/posts")
|
||||
(easy-hugo-previewtime "7200") ; 2 hours.
|
||||
(easy-hugo-default-ext ".adoc")
|
||||
(easy-hugo-asciidoc-extension "adoc")
|
||||
(easy-hugo-server-flags "-D")
|
||||
|
||||
(easy-hugo-bloglist ; Additional blogs.
|
||||
'(
|
||||
((easy-hugo-basedir . "~/Projekte/www/text-en.tastytea.de/")
|
||||
(easy-hugo-url . "https://text-en.tastytea.de")
|
||||
(easy-hugo-postdir . "content/posts")
|
||||
(easy-hugo-previewtime . "7200"))
|
||||
((easy-hugo-basedir . "~/Projekte/www/text-de.tastytea.de/")
|
||||
(easy-hugo-url . "https://text-de.tastytea.de")
|
||||
(easy-hugo-postdir . "content/posts")
|
||||
(easy-hugo-previewtime . "7200"))
|
||||
))
|
||||
|
||||
:bind
|
||||
("C-c h" . easy-hugo)
|
||||
)
|
||||
(when (string= (system-name) "ventiloplattform")
|
||||
(use-package easy-hugo
|
||||
:custom ((easy-hugo-basedir "~/Projekte/www/blog.tastytea.de/")
|
||||
(easy-hugo-url "https://blog.tastytea.de")
|
||||
(easy-hugo-postdir "content/posts")
|
||||
(easy-hugo-previewtime (* 60 60 2))
|
||||
(easy-hugo-default-ext ".adoc")
|
||||
(easy-hugo-asciidoc-extension "adoc")
|
||||
(easy-hugo-server-flags "-D")
|
||||
(easy-hugo-bloglist ; Additional blogs.
|
||||
'(((easy-hugo-basedir . "~/Projekte/www/text-en.tastytea.de/")
|
||||
(easy-hugo-url . "https://text-en.tastytea.de")
|
||||
(easy-hugo-postdir . "content/posts")
|
||||
(easy-hugo-previewtime . (* 60 60 2)))
|
||||
((easy-hugo-basedir . "~/Projekte/www/text-de.tastytea.de/")
|
||||
(easy-hugo-url . "https://text-de.tastytea.de")
|
||||
(easy-hugo-postdir . "content/posts")
|
||||
(easy-hugo-previewtime . (* 60 60 2))))))
|
||||
:bind ("C-c h" . easy-hugo)))
|
||||
|
||||
(use-package el2markdown
|
||||
:commands (el2markdown-view-buffer
|
||||
el2markdown-write-file
|
||||
el2markdown-write-readme)
|
||||
)
|
||||
el2markdown-write-readme))
|
||||
|
||||
(provide 'text/tools)
|
||||
;;; tools.el ends here
|
||||
|
|
Loading…
Reference in New Issue