Nick Dokos <nicholas.do...@hp.com> wrote: > Bill White <bi...@wolfram.com> wrote: > > > On Wed Mar 04 2009 at 12:38, Nick Dokos <nicholas.do...@hp.com> wrote: > > > > > Bill White <bi...@wolfram.com> wrote: > > > > > >> Hi all - > > >> > > >> "Buffer *temp* modified; kill anyway?" is driving me nuts. > > >> > > >> Has anyone seen this error message when html-exporting pages that > > >> contain #+begin_src ? I get this once for every #+begin_src > > >> ... #+end_src group on a page. I assume it's coming from htmlize.el, > > >> but I haven't been able to isolate the problem with edebug. I'm using > > >> the latest htmlize.el from > > >> http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el > > >> > > >> Any ideas what's going on and how to silence it? If it weren't for this > > >> I'd be able to publish without babysitting the process through > > >> source-heavy files. > > >> > > > > > > Bill, > > > > > .... > > So I don't understand the difference in behavior between the two cases, > but maybe this provides enough detail for a better elisper than me to > understand and explain to the rest of us. >
OK - I think I know why: the mode of the temp buffer is set according to the language in the begin_src construct: emacs-lisp-mode in one case, message-mode (and a bunch of minor modes) in the other. The difference is that the latter associates the buffer with a file, whereas the former does not. It's that difference that makes kill-buffer behave differently. I suspect that the thing to do is to mark the buffer unmodified. Here's a patch: diff --git a/lisp/org-exp.el b/lisp/org-exp.el index a0d1e5f..c20112f 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2472,6 +2472,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) Nick _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode