emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <ucecesf@ucl.ac.uk>
To: "Sébastien Vauban" <wxhgmqzgwmuf@spammotel.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Enhancing the Org/Gnus experience
Date: Thu, 04 Nov 2010 15:11:49 +0000	[thread overview]
Message-ID: <87d3qlazt6.fsf@ucl.ac.uk> (raw)
In-Reply-To: <80sjzh9qtz.fsf@mundaneum.com> ("Sébastien Vauban"'s message of "Thu, 04 Nov 2010 14:11:04 +0100")

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)

  parent reply	other threads:[~2010-11-04 15:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-15 15:51 Enhancing the Org/Gnus experience Sébastien Vauban
2010-10-15 16:59 ` Eric Schulte
2010-10-18 15:55   ` Sébastien Vauban
2010-10-18 20:57     ` Sébastien Vauban
2010-10-31 17:30       ` Eric Schulte
2010-10-31 20:57         ` Dan Davison
2010-11-04 11:18         ` Sébastien Vauban
2010-11-04 11:40           ` Eric S Fraga
2010-11-04 12:22             ` Eric Schulte
2010-11-04 13:53               ` Eric S Fraga
2010-11-04 15:06                 ` Sébastien Vauban
2010-11-04 16:21                 ` Tassilo Horn
2010-11-05 12:48                   ` Eric S Fraga
2010-11-05 12:58                     ` Sébastien Vauban
2010-11-05 21:36                       ` Eric S Fraga
2010-11-04 13:11             ` Sébastien Vauban
2010-11-04 14:24               ` Eric S Fraga
2010-11-04 15:11               ` Eric S Fraga [this message]
2010-11-04 13:29           ` Eric Schulte
2010-11-04 14:16             ` Sébastien Vauban
2010-11-04 15:24               ` Eric Schulte
2010-11-04 18:18           ` Jambunathan K
2010-11-29 13:40         ` Julien Danjou
2010-11-29 14:11           ` Sébastien Vauban
2011-01-17 16:09             ` Julien Danjou
2011-01-19 13:28               ` Sébastien Vauban
2011-01-20 10:16                 ` Julien Danjou
2011-01-20 18:00                   ` Julien Danjou
2011-01-20 22:09                     ` Sébastien Vauban

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d3qlazt6.fsf@ucl.ac.uk \
    --to=ucecesf@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=wxhgmqzgwmuf@spammotel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).