emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BEGIN_SRC..END_SRC


From: Bastien
Subject: Re: BEGIN_SRC..END_SRC
Date: Sun, 06 May 2012 18:03:06 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Bastien <address@hidden>
>> Cc: Tom Rauchenwald <address@hidden>,  address@hidden
>> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]