Sébastian & Eric,
Just to follow up on this... (today is my "don't get any real work done
and spend some time on org instead" day, I guess ;-)
I'm starting to understand the mm-uu-* codes. I've added some
=(message...)= entries into the code you have written for fontifying org
blocks in gnus messages:
#+begin_src emacs-lisp
(defun my-display-org-inline (handle)
(condition-case nil
(let (ret)
(message "about to invoke mm-display-inline with handle=%s\n"
handle)
(setq ret (mm-display-inline-fontify handle 'org-mode))
(message "mm-display-inline-fontify returned %s\n" ret)
ret
)
(error
(progn
(message "Got an error in my-display-org-inline\n")
(insert (with-temp-buffer (mm-insert-part handle)
(buffer-string))
"\n")))))
#+end_src
The codes appear to be invoked when required. E.g. from *Messages*:
: about to invoke mm-display-inline with handle=( *mm-uu*<2> (text/org) nil nil
nil nil nil nil)
where the buffer =*mm-uu*<2>= actually has the right contents (an emacs
lisp source block):
#+begin_src emacs-lisp
;;*** 1.2 (info "(emacs-mime)Non-MIME")
;; regexp of Emacs sources groups
(setq mm-uu-emacs-sources-regexp "emacs")
[...]
(replace-match "" nil nil))))
#+end_src
An error does not appear to be thrown by this function. However, the
string returned by mm-display-inline-fontify is strange:
: mm-display-inline-fontify returned
: (lambda nil (let ((inhibit-read-only t)) (delete-region #<marker at 5064 in
*Article*> #<marker at 9862 in *Article*>)))
(I've broken the line after "returned".) Could there be some interaction
with, say, gnus article /washing/ treatments? I don't know what that
function should be returning but I am concerned about the
=delete-region= directive. Could somebody maybe show me what I should
be getting for the source block to be fontified correctly?
The marker positions appear correct for the source block, by the way.
Again, thanks for your time and effort!
--
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1
: using Org-mode version 7.02trans (release_7.3.18.g3818)
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-orgmode