diff --git a/CHANGES.md b/CHANGES.md index 8c444145..053eb8f1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,9 @@ - Allow `markdown-command` and `markdown-open-command` to be functions. ([GH-255][], [GH-263][]) + - Save the buffer before running `markdown-open-command`. + Thanks to Dmitry Safronov for a patch. + ([GH-248][]) * Bug fixes: @@ -34,6 +37,7 @@ [gh-229]: https://github.com/jrblevin/markdown-mode/pull/229 [gh-238]: https://github.com/jrblevin/markdown-mode/issues/238 [gh-246]: https://github.com/jrblevin/markdown-mode/issues/246 + [gh-248]: https://github.com/jrblevin/markdown-mode/issues/248 [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 diff --git a/markdown-mode.el b/markdown-mode.el index a6b2da2d..56649404 100644 --- a/markdown-mode.el +++ b/markdown-mode.el @@ -7837,6 +7837,7 @@ update this buffer's contents." (if (stringp markdown-open-command) (if (not buffer-file-name) (user-error "Must be visiting a file") + (save-buffer) (call-process markdown-open-command nil nil nil buffer-file-name)) (funcall markdown-open-command)) nil)