From 35441cfc364518c43db33a21f5e3e13ee02732f8 Mon Sep 17 00:00:00 2001 From: Jason Blevins Date: Mon, 25 Sep 2017 12:14:32 -0400 Subject: [PATCH] Update README.md and CHANGES.md Add documentation and notes related to issue GH-255 and the patch in GH-264. --- CHANGES.md | 5 +++++ README.md | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e5d713f..6cd3866 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,9 @@ * Improvements: + - Allow `markdown-command` and `markdown-open-command` to be + functions. ([GH-255][], [GH-263][]) + * Bug fixes: - Remove GFM checkbox overlays when switching major modes. @@ -28,11 +31,13 @@ [gh-246]: https://github.com/jrblevin/markdown-mode/issues/246 [gh-252]: https://github.com/jrblevin/markdown-mode/pull/252 [gh-254]: https://github.com/jrblevin/markdown-mode/issues/254 + [gh-255]: https://github.com/jrblevin/markdown-mode/issues/255 [gh-257]: https://github.com/jrblevin/markdown-mode/pull/257 [gh-258]: https://github.com/jrblevin/markdown-mode/pull/258 [gh-259]: https://github.com/jrblevin/markdown-mode/pull/259 [gh-260]: https://github.com/jrblevin/markdown-mode/pull/260 [gh-261]: https://github.com/jrblevin/markdown-mode/pull/261 + [gh-263]: https://github.com/jrblevin/markdown-mode/pull/263 # Markdown Mode 2.3 diff --git a/README.md b/README.md index 431f577..6652342 100644 --- a/README.md +++ b/README.md @@ -563,7 +563,10 @@ provides an interface to all of the possible customizations: * `markdown-command` - the command used to run Markdown (default: `markdown`). This variable may be customized to pass - command-line options to your Markdown processor of choice. + command-line options to your Markdown processor of choice. It can + also be a function; in this case `markdown` will call it with three + arguments: the beginning and end of the region to process, and + a buffer to write the output to. * `markdown-command-needs-filename` - set to `t` if `markdown-command` does not accept standard input (default: @@ -572,7 +575,9 @@ provides an interface to all of the possible customizations: When set to `t`, `markdown-mode` will pass the name of the file as the final command-line argument to `markdown-command`. Note that in the latter case, you will only be able to run - `markdown-command` from buffers which are visiting a file. + `markdown-command` from buffers which are visiting a file. If + `markdown-command` is a function, `markdown-command-needs-filename` + is ignored. * `markdown-open-command` - the command used for calling a standalone Markdown previewer which is capable of opening Markdown source files @@ -581,6 +586,8 @@ provides an interface to all of the possible customizations: A representative program is the Mac app [Marked 2][], a live-updating Markdown previewer which can be [called from a simple shell script](https://jblevins.org/log/marked-2-command). + This variable can also be a function; in this case `markdown-open` + will call it without arguments to preview the current buffer. * `markdown-hr-strings` - list of strings to use when inserting horizontal rules. Different strings will not be distinguished -- 2.11.4.GIT