From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: BEGIN_SRC..END_SRC Date: Sun, 06 May 2012 18:03:06 +0200 Organization: GNU Message-ID: <87fwbds3et.fsf@gnu.org> References: <871umzrvfw.fsf@gmail.com> <87wr4rqg6g.fsf@gmail.com> <83d36j59gv.fsf@gnu.org> <87r4uz58e3.fsf@sec.modprobe.de> <83aa1n57p4.fsf@gnu.org> <87d36islja.fsf@altern.org> <83pqai4l44.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1336320142 20655 80.91.229.3 (6 May 2012 16:02:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 6 May 2012 16:02:22 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 06 18:02:21 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SR3uf-0001Aw-Ha for ged-emacs-devel@m.gmane.org; Sun, 06 May 2012 18:02:21 +0200 Original-Received: from localhost ([::1]:50498 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3ue-0004fQ-V9 for ged-emacs-devel@m.gmane.org; Sun, 06 May 2012 12:02:20 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3ub-0004eq-NP for emacs-devel@gnu.org; Sun, 06 May 2012 12:02:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SR3ua-00020t-3Q for emacs-devel@gnu.org; Sun, 06 May 2012 12:02:17 -0400 Original-Received: from mail-wi0-f177.google.com ([209.85.212.177]:41096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SR3uW-00020T-Df; Sun, 06 May 2012 12:02:12 -0400 Original-Received: by wibhj13 with SMTP id hj13so2222227wib.12 for ; Sun, 06 May 2012 09:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:date:message-id:mime-version:content-type; bh=qOrkY5wY6Y7wfXYKlUqnXG5GUVPNXrrMwde+azPvZ7g=; b=hKmumNid77BJC2uKbWg8qhhK3sRJTBquehQT2GvTC4XBQJmYUkAYZw/+JHiZ+ZJz6S d8MKXolEwAUkh8WpbYL6P1ECLkq4tV93/0CF2Fs8r9/BPv+rmgG6PVG0ZgAtJH7TpSxu 5OMr0jJCaWbRnK9qpDvR1dsRRJX2kNSL/gGGjGxXUF4nanlhFAl6rXq5uUgJcw8JpsJ3 mpiGL8BvlFD8KQxRZ4Qah2qSTAEiDursvHiiE7tuEFZbg/7aUq1QQtnUAA2JFPNnYM3x MkHC+C6tkPeWLA7MwcSE0GYc8OXyZMCYxyTRqMJW6uPNsm9VGd4olKkDfVTWiDWCSgHl uqpw== Original-Received: by 10.216.198.154 with SMTP id v26mr8089110wen.74.1336320129500; Sun, 06 May 2012 09:02:09 -0700 (PDT) Original-Received: from myhost.localdomain (93.140.114.78.rev.sfr.net. [78.114.140.93]) by mx.google.com with ESMTPS id u9sm15049635wix.0.2012.05.06.09.02.08 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 May 2012 09:02:08 -0700 (PDT) Original-Received: by myhost.localdomain (Postfix, from userid 1000) id 0DA6B8777; Sun, 6 May 2012 18:03:06 +0200 (CEST) In-Reply-To: <83pqai4l44.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 May 2012 20:02:19 +0300") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.212.177 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150324 Archived-At: Eli Zaretskii writes: >> From: Bastien >> Cc: Tom Rauchenwald , emacs-devel@gnu.org >> Date: Sat, 05 May 2012 15:38:24 +0200 >> >> >> In recent Gnus builds it will font lock that part off the message >> >> appropriatly, making it look pretty. >> > >> > Thanks, but why isn't this done in general-purpose font-lock of email >> > messages? Why limit this to Gnus? >> >> Here is the relevant code in lisp/gnus/mm-view.el: >> >> (defun mm-display-org-inline (handle) >> "Show an Org mode text from HANDLE inline." >> (mm-display-inline-fontify handle 'org-mode)) >> >> I don't if we can use mm-view.el outside Gnus but if so, it would >> be great. > > It looks like the above fontifies the snippet in a separate buffer > (switching that buffer to the requested major mode), then copies the > result as a string to the display buffer. Yes. > But won't the string be > immediately re-fontified in the buffer that displays the email, as > appropriate for the major mode in the email buffer? I don't think so but I'm not sure. >From what I understand, Gnus takes care of fontifying at the right moment, i.e. as the final stage of rendering the message. -- Bastien