info-gnus-english
[Top][All Lists]
Advanced

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

Re: Extra marking of inserted text


From: Sébastien Vauban
Subject: Re: Extra marking of inserted text
Date: Wed, 08 Dec 2010 15:46:42 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt)

Hi Lars,

Lars Magne Ingebrigtsen wrote:
> Sébastien Vauban <wxhgmqzgwmuf@spammotel.com> writes:
>
>> I would like to get such Org constructs:
>>
>> #+begin_src emacs-lisp
>> (setq org-latex-to-pdf-process '("sh -v -x texi2dvi -p -b -c -V %f"))
>> #+end_src
>>
>> or
>>
>> #+begin_src sh
>> ls
>> #+end_src
>>
>> to be *highlighted* when viewed (while reading received messages).
>
> Doesn't Org mode have hooks into Gnus to do stuff like that?

Isn't it entirely Gnus-related?

Anyway, my proposal (based on `mm-uu-type-alist' that you advertized to
someone else):

--8<---------------cut here---------------start------------->8---
      ;; regexp matching TeX groups
      (setq mm-uu-tex-groups-regexp ".*") ;; was "tex"

      (eval-after-load "mm-uu"
        '(progn
           (add-to-list 'mailcap-mime-extensions '(".org" . "text/org"))
           (add-to-list 'mm-automatic-display "text/org")
           ;; (add-to-list 'mm-inlined-types "text/org")
           (add-to-list 'mm-inline-media-tests
                        '("text/org"
                          my-display-org-inline
                          identity))

           (defun my-display-org-inline (handle)
             (mm-display-inline-fontify handle 'org-mode))

           (defun my-mm-org-babel-src-extract ()
             (mm-make-handle (mm-uu-copy-to-buffer start-point end-point)
                             '("text/org")
                             nil nil
                             (list mm-dissect-disposition
                                   (cons 'filename "Org Babel source file"))))

           (add-to-list 'mm-uu-type-alist
                        '(org-babel-block
                          "^#\\+begin_"
                          "^#\\+end_"
                          ;; (lambda nil
                          ;;   (mm-uu-verbatim-marks-extract 0 0))
                          my-mm-org-babel-src-extract
                          nil))
           (mm-uu-configure)))
--8<---------------cut here---------------end--------------->8---

Does this sound good to you?

Thanks.

Best regards,
  Seb

-- 
Sébastien Vauban


reply via email to

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