From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrea Rossetti Subject: Re: "#+BEGIN_SRC mail" and org-src-fontify-natively Date: Sun, 21 Dec 2014 17:58:41 +0100 Message-ID: <84y4q1uegu.fsf@gmail.com> References: <8461ds6wza.fsf@gmail.com> <874mtaiifz.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45439) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2jqF-0003J2-H7 for emacs-orgmode@gnu.org; Sun, 21 Dec 2014 11:58:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y2jqB-0007kH-3p for emacs-orgmode@gnu.org; Sun, 21 Dec 2014 11:58:51 -0500 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:42056) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y2jqA-0007jt-U2 for emacs-orgmode@gnu.org; Sun, 21 Dec 2014 11:58:47 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so5077298wgg.33 for ; Sun, 21 Dec 2014 08:58:45 -0800 (PST) Received: from LAPTOP-ANDREA (adsl-ull-135-182.49-151.net24.it. [151.49.182.135]) by mx.google.com with ESMTPSA id be2sm18841224wjb.38.2014.12.21.08.58.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 21 Dec 2014 08:58:44 -0800 (PST) In-Reply-To: <874mtaiifz.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Fri, 05 Dec 2014 09:56:00 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Nicolas Goaziou writes: > Hello, > > Andrea Rossetti writes: >> when I start emacs -Q and do the following recipe: >> >> 1) open the test file "prova.org" (see attach) >> 2) confirm at the file-local variable prompt, by typing "y" >> 3) quit with C-x C-c >> >> then Emacs unexpectedly asks for a confirm to save the >> modified buffer "org-src-fontify:mail-mode", even if I took care >> to avoid any editing between steps 2) and 3). > > I cannot reproduce it on development branch. It may have been fixed. Hello Nicolas and everyone else reading. Sorry for the late reply, it took some time and edebugging for me to understand the problem. 1) in summary: it was a mail-mode "fault", not Org's. Or better: it was my fault, not knowing in depth mail-mode. 2) in detail: when you create a #+BLOCK_SRC mail and fontify it with M-x org-src-fontify-block RET, a buffer is created with name " org-src-fontify:mail-mode" (notice the initial space character). This buffer usually have a buffer-local variable `buffer-offer-save' set to nil, but mail-mode forces it to t. That doesn't seem a wrong workflow: you don't accidentally lose the mail you just composed. 3) lesson learnt: you can't fontify whatever you want in a SRC block. Some modes work perfectly, some don't, some "almost" work (like mail-mode). 4) future plans: I'm now curious and I'll probably try fontification of whatever mode I can think of (M-x apropos RET -mode$ RET) :) Thanks for your time and attention, kindest regards. Andrea