In my second tag-blogmore post (and first category-emacs post), I thought this would be
a good opportunity to explore the BlogMore API as well as markdown mode.
I immediately hit a problem because in Emacs on my Mac, M-3 does not
enter the "pound" symbol needed to mark a heading/subheading. Is
there an "insert heading function" command in markdown-mode? Fortunately there is and it's on the keyboard shortcut C-c C-s 2
(heading 2 because heading 1 is the post title).
This is what I found.
Blogmore commands discovered¶
blogmore-toggle-draft -- toggles the draft: true tag in the
current posts' metadata block.
blogmore-link-tag -- adds a link to a tag page in the current blog.
blogmore-link-category -- adds a link to the category page in the current blog.
blogmore-update-date -- updates the post's save date which is useful if you are writing a large post and you want the date to reflect the actual publication date.
Blogmore documentation¶
Both written by davep:
- BlogMore -- documemtation for the BlogMore tool that I am now using to create this blog.
- davep/blogmore.el -- provides tools that help in the creation of blog posts for a BlogMore blog.
Markdown mode commands discovered¶
C-c C-s 2 (markdown-insert-header-atx-2) -- inserts level 2 heading.
C-c C-c p (markdown-preview) -- previews content of the current markdown-mode buffer in the default web browser.
C-c C-l (markdown-insert-link) -- isert a URL or Reference link.
Markdown-mode documentation¶
Markdown Mode for Emacs
by Jason Blevins.
Fixing the M-3 issue on a Mac¶
[I found this fix some time ago but I hadn't gotten around to adding it
to my latest Emacs configuration.]
On a Mac with a UK keyboard, the keystroke to generate the "pound
sign" (S-3) literally produces the currency symbol £. To get
the hashtag symbol # we have to press Option-3 (M-3), but this is
intercepted by emacs. This makes it very difficult to deal with
markdown and org-mode files that use # extensively.
To fix this, we have to redefine the global key M-3:
;; Allow hash to be entered on Mac UK keyboard
(global-set-key (kbd "M-3") '(lambda () (interactive) (insert "#")))
On my prelude-based configuration, this code has been added to
../prelude/personal/01-settings.el.