commit c1fdcf4b24972b5812d83321cebb76097fdb65c8 Spenser Truex <spensertruexonline@gmail.com> 2019-06-15 21:36:31 -0700 Beta, not release!
coleslaw-mode.post | 82 +++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 44 deletions(-)
diff --git a/coleslaw-mode.post b/coleslaw-mode.post index fedcc2f..3f88fa9 100644 --- a/coleslaw-mode.post +++ b/coleslaw-mode.post @@ -7,20 +7,24 @@ image: /static/coleslaw.png url: coleslaw-mode ;;;;; (:h2 (esc "An Emacs mode for authoring Coleslaw posts and pages.")) +(:h3 (esc "Beta: Version 0.x.x")) (:h4 "Do What I Mean mode for editing coleslaw. There's not much to learn, just use it.") (:h4 (esc "What does it do?")) -(:p (esc "When opening a new .page or .post file, coleslaw mode will help you insert -the metadata headers for the post. It will also help you choose the right mode, -based on the format style for the page.")) +(:p (esc "When opening a new .page or .post file, coleslaw mode will help you +insert the metadata headers for the post. It will also help you choose the right +mode, based on the format style for the page. All this is done automatically, +when a file is opened but you can call it with +coleslaw-insert-header-or-dispatch after changing the \"format: \" field.")) (:p (esc "Example metadata header:") (:pre (esc ";;;;; -title: -format: user selected, maybe md -date: +title: Example +format: md +date: 1970-01-01 ;;;;;"))) (:h4 "Keybindings") -(:ul (:li (esc "M-; → Insert the header")) +(:ul (:li (esc "M-; → apply the mode based on the header, or insert a header in +this file if there isn't.")) (:li (esc "That's it."))) (:h4 (esc "How do I install it?")) (:p (esc "Either from source (via ") @@ -41,46 +45,36 @@ date: (:li (esc "Note that the eww (Emacs Web Wowser) has special OS level dependencies."))) (:h4 (esc "How do I customize it?")) -(:p (esc "If you don't like the setup the author chose, you can edit the source of -coleslaw-setup, and put that in your init file. Here I am reproducting the -source from version 1.1.2, though you should consult the source for an -up-to-date version.")) -(:pre (esc "(defun coleslaw-setup () - \"Setup your coleslaw like the Author suggests (conservative edits only). - Strongly recommended! Set M-; to `coleslaw-insert-header', enable - auto insertion for .page and .post files, enable markdown mode - and live preview.\" - (require 'markdown-mode) - (require 'autoinsert) - (require 'lisp-mode) - (require 'sgml-mode) - (require 'rst) - (coleslaw-auto-insert 1) - (coleslaw-markdown-mode 1) - (coleslaw-lisp-mode 1) - (coleslaw-html-mode 1) - (coleslaw-rst-mode 1) - ((do ((var1 init-form step-form) - (var2 init-form step-form)) - ((cond (test then) - (t else))ition return-value) - (body)) +(:p (esc "If you don't like ") + (:code (esc "(coleslaw-setup)")) + (esc " then consider modifying")) -list (type '(\".page\" \".post\")) - (cl-pushnew (cons type 'coleslaw-insert-header) auto-insert-alist)) - (add-hook 'coleslaw-mode-hook #'flyspell-mode) - (add-to-list 'auto-mode-alist '(\"\\.page\\'\" . coleslaw-mode)) - (add-to-list 'auto-mode-alist '(\"\\.post\\'\" . coleslaw-mode)) - (define-key coleslaw-mode-map (kbd \"M-;\") 'coleslaw-insert-header))")) -(:p (esc "There are some configuration choices not built into the default setup:") - (:pre (esc " (coleslaw-markdown-live 1)")) - (esc "hooks into markdown-live-mode when opening a format md file. This mode - opens an EWW browser buffer that updates in realtime as you edit! It also - puts annoying .html files all over your code (like the default emacs backup - files *~...), so I didn't set it automatically.")) +(:code (esc "coleslaw-default-format-modes")) +(:p (esc "for choosing which modes to dispatch based on the header.")) +(:code (esc "(add-to-list 'auto-insert-alist '(\".coleslaw\" . +coleslaw-insert-header))")):br +(:code (esc "(add-to-list 'auto-mode-alist '(\"\\\\.coleslaw\\\\'\" +. coleslaw-mode))")) +(:p (esc "are helpful templates for adding file types (in this case replace +.coleslaw with the file type of choice).")) + +(:p (esc "There are some configuration choices not built into the default setup, +since they are not conservative enough choices:") + :br + (:ul (:li "Markdown live preview for md, generates a web browser buffer to + help you edit.") + (:li "Lisp has a number of editing modes (useful with cl-who) which + overlap to a great extent and are highly personal. Add them as hooks to + lisp-mode, or write your own coleslaw-default-format-modes."))) (:h4 "How can I contribute or get help?") +(:p (esc "Coleslaw-mode is still an early project. It doesn't have (but would be +nice to have) customizable variables, realtime integration with slime or sly, +realtime integration with colesleaw, better and/or autogenerated docs, be added +to popular code repos, and is generally unfinished. The " + (:a :href "#todo" "TODO") (esc "is a good place to start."))) + (:p "Coleslaw has a channel on freenode: " (:strong (esc "#coleslaw"))) (:p "Coleslaw might get a mailing list at some point, and if it did, you could subscribe.") @@ -110,7 +104,7 @@ square (tombstone/halmos), □."))) "Contribute to coleslaw, the Common Lisp static content generator.")) -(:h4 "TODO") +(:h4 (:a :class "title" "#todo" "TODO")) (:ul (:li "Bind emacs commands for interacting with coleslaw via " (:a :href "https://common-lisp.net/project/slime/" "slime")