Export: Fix problem with exporting message mode src regions

Message-mode assigns auto-safe file names to temporary buffers, in the
draft directory.  This causes problems when running message-mode in a
temporary buffer with with-temp-buffer.  When the form tries to kill
the buffer, is asks for saving it....

This commit turns off the buffer-modified flag and so avoids the
query.

Patch by Nick Dokos.
This commit is contained in:
Carsten Dominik 2009-03-05 00:01:50 +01:00
parent f41f942e53
commit 6ccc6b4652
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,9 @@
2009-03-04 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-format-source-code-or-example): Mark
temporary buffer unmodified, so that it will be killed even if
mode like message mode has decided to assign a file name.
* org.el (org-scan-tags): Improve tag inheritance.
(org-scan-tags, org-make-tags-matcher): Make tag comparison
case-sensitive.

View File

@ -2471,6 +2471,7 @@ Numbering lines works for all three major backends (html, latex, and ascii)."
(funcall mode)
(fundamental-mode))
(font-lock-fontify-buffer)
(set-buffer-modified-p nil)
(org-export-htmlize-region-for-paste
(point-min) (point-max))))
(if (string-match "<pre\\([^>]*\\)>\n?" rtn)