Re: [Orgmode] Re: Enhancing the Org/Gnus experience
On Wed, Jan 19 2011, Sébastien Vauban wrote: I had sent all the needed code to add to Gnus onto the Gnus newsgroup, see http://osdir.com/ml/info-gnus-english-gnu/2011-01/msg00082.html. But Gnus asks me to... #+begin_verse ... post a patch for these changes to the d...@gnus.org mailing list? #+end_verse This will require me to: - find the right place to put such a code in Gnus code base, - see how to deal with the =(mm-uu-configure)= function call (integrate somehow its effect, instead of calling it), - etc. Not that obvious (for me) to make it perfect-looking. Being quite overloaded, this task is still in my log, but gets delayed from day to day. Feel free to post anything in that direction, if you're willing to help. Fine, I'll try to do that. I though you got already a patch against Gnus, but it seems no, so I'll probably make one soon. -- Julien Danjou ❱ http://julien.danjou.info pgpRBBl07ta7u.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
On Thu, Jan 20 2011, Julien Danjou wrote: Fine, I'll try to do that. I though you got already a patch against Gnus, but it seems no, so I'll probably make one soon. Pushed in Gnus. -- Julien Danjou ❱ http://julien.danjou.info pgp93GgSuVAkg.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Julien, Julien Danjou wrote: On Thu, Jan 20 2011, Julien Danjou wrote: Fine, I'll try to do that. I though you got already a patch against Gnus, but it seems no, so I'll probably make one soon. Pushed in Gnus. Waaow; that's fast. Good move! Thanks for pushing this. Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Julien, Julien Danjou wrote: On Mon, Nov 29 2010, Sébastien Vauban wrote: I've signed (like 2 weeks ago) the FSF papers, and am still waiting for the PDF file that proves it. As soon as I get them, I send a proper patch to Larsi for integration into Gnus. Eventually, I'd even like to add some other stuff (inlined code with = markers, etc.)... Any news on this? I had sent all the needed code to add to Gnus onto the Gnus newsgroup, see http://osdir.com/ml/info-gnus-english-gnu/2011-01/msg00082.html. But Gnus asks me to... #+begin_verse ... post a patch for these changes to the d...@gnus.org mailing list? #+end_verse This will require me to: - find the right place to put such a code in Gnus code base, - see how to deal with the =(mm-uu-configure)= function call (integrate somehow its effect, instead of calling it), - etc. Not that obvious (for me) to make it perfect-looking. Being quite overloaded, this task is still in my log, but gets delayed from day to day. Feel free to post anything in that direction, if you're willing to help. Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
On Mon, Nov 29 2010, Sébastien Vauban wrote: I've signed (like 2 weeks ago) the FSF papers, and am still waiting for the PDF file that proves it. As soon as I get them, I send a proper patch to Larsi for integration into Gnus. Eventually, I'd even like to add some other stuff (inlined code with = markers, etc.)... Any news on this? -- Julien Danjou ❱ http://julien.danjou.info pgpuVIh6l576r.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
On Sun, Oct 31 2010, Eric Schulte wrote: This is really great. I finally folded it into my gnus setup, and while it looks great when it works, I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. That looks like something I'd like to see added to Gnus. If one of you can provide a clean patch and have signed FSF papers I'd be happy to review and merge it. -- Julien Danjou // ᐰ jul...@danjou.info http://julien.danjou.info pgpWRwhNAtDoB.pgp Description: PGP signature ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Julien, Julien Danjou wrote: On Sun, Oct 31 2010, Eric Schulte wrote: This is really great. I finally folded it into my gnus setup, and while it looks great when it works, I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. That looks like something I'd like to see added to Gnus. If one of you can provide a clean patch and have signed FSF papers I'd be happy to review and merge it. This is undergoing... I've signed (like 2 weeks ago) the FSF papers, and am still waiting for the PDF file that proves it. As soon as I get them, I send a proper patch to Larsi for integration into Gnus. Eventually, I'd even like to add some other stuff (inlined code with = markers, etc.)... Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Tassilo Horn tass...@member.fsf.org writes: Eric S Fraga ucec...@ucl.ac.uk writes: Hi Eric, if it is working, then the following code block should be fontified as if in an Org-mode buffer #+begin_src emacs-lisp (message is it working?) #+end_src Definitely not working then! This comes out as simple text in gnus and doesn't look at all like it would in an org buffer for me. Hm, for me it's shown the same as verbatim blocks or stuff like Just to update you all. I found the problem and it had nothing to do with either gnus or org! The problem was that I had the following in my font-lock-mode-hook: : (show-ws-highlight-trailing-whitespace) This seemed to wipe out all other font locking information in gnus. Whether this is a problem with the whitespace highlighting codes or within gnus, I don't know but I can live without trailing spaces being highlighted! Apologies for all the noise and thanks to all that tried to help me! Thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 : using Org-mode version 7.02trans (release_7.3.26.g4d02) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Eric, Eric S Fraga wrote: Tassilo Horn tass...@member.fsf.org writes: Eric S Fraga ucec...@ucl.ac.uk writes: if it is working, then the following code block should be fontified as if in an Org-mode buffer #+begin_src emacs-lisp (message is it working?) #+end_src Definitely not working then! This comes out as simple text in gnus and doesn't look at all like it would in an org buffer for me. Hm, for me it's shown the same as verbatim blocks or stuff like Just to update you all. I found the problem and it had nothing to do with either gnus or org! The problem was that I had the following in my font-lock-mode-hook: : (show-ws-highlight-trailing-whitespace) This seemed to wipe out all other font locking information in gnus. Funny. I have this -- a lot in comments! -- in my .emacs file: #+begin_src emacs-lisp ;; highlight trailing whitespaces in all modes (setq-default show-trailing-whitespace t) ;; ;; FIXME When turned on, Gnus becomes black and white only... ;; ;;*** show-wspace (emacs-goodies-el) ;; (when (try-require 'show-wspace) ;; ;; Highlight tabs ;; (add-hook 'font-lock-mode-hook 'show-ws-highlight-tabs) ;; ;; ;; Highlight trailing whitespace ;; (add-hook 'font-lock-mode-hook 'show-ws-highlight-trailing-whitespace) ;; ;; ;; Highlight non-breaking spaces ;; (add-hook 'font-lock-mode-hook 'show-ws-highlight-hard-spaces)) ;; FIXME Same problem as above ;; ;; highlight tabs in all modes ;; (add-hook 'font-lock-mode-hook ;; '(lambda () ;; (font-lock-add-keywords ;; nil ;; '((\t 0 'trailing-whitespace prepend) ;; ;; show zero-width spaces ;; (font-lock-add-keywords ;; nil ;; `((,(format \\(%c\\) ?\u200b) ; #\ZERO_WIDTH_SPACE ;; (1 (progn (compose-region (match-beginning 1) (match-end 1) ;; ?\u2b1b ; #\BLACK_LARGE_SQUARE ;; 'decompose-region) ;; nil) #+end_src Hence, the same observation as yours regarding Gnus. I think I once asked help on the Emacs and Gnus newsgroups, but the answer is very low there, and I never got anybody even confirming it... Whether this is a problem with the whitespace highlighting codes or within gnus, I don't know but I can live without trailing spaces being highlighted! Though, I do have highlight of trailing whitespaces. The first 2 lines must be it. Apologies for all the noise and thanks to all that tried to help me! You're welcome. And... then... what's your impression? ;-) Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Eric, Eric S Fraga wrote: [...] Just to update you all. I found the problem and it had nothing to do with either gnus or org! The problem was that I had the following in my font-lock-mode-hook: : (show-ws-highlight-trailing-whitespace) This seemed to wipe out all other font locking information in gnus. Funny. I have this -- a lot in comments! -- in my .emacs file: #+begin_src emacs-lisp ;; highlight trailing whitespaces in all modes (setq-default show-trailing-whitespace t) ;; ;; FIXME When turned on, Gnus becomes black and white only... Yes, exactly what I had. Since I had the hook set *before* I started using gnus again (I did used to use it a couple of years ago), I hadn't realised that I was getting very little font locking happening! I'll try the =setq-default= to see if that works. [...] Apologies for all the noise and thanks to all that tried to help me! You're welcome. And... then... what's your impression? ;-) Love it! Having emacs-lisp and latex code blocks fontified within an email message is fantastic. Thanks! -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 : using Org-mode version 7.02trans (release_7.3.28.g8744.dirty) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Eric (and Dan), Eric Schulte wrote: This is really great. I finally folded it into my gnus setup, and while it looks great when it works Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that (and on some other posts[1]), I thought I'd been kill-filed ;-)[2] I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. I _never_ observed problems in my case. Anyway, adding such a protection is the code is a great addition. Thanks! I've just singed the FSF papers. Once received by the FSF, I'll propagate your update onto the Gnus newsgroup. ** Org-mode code block fontification Correctly fontify Org-mode attachments #+begin_src emacs-lisp (add-to-list 'mailcap-mime-extensions '(.org . text/org)) (add-to-list 'mm-automatic-display text/org) (add-to-list 'mm-inline-media-tests '(text/org my-display-org-inline (lambda (el) t))) (defun my-display-org-inline (handle) (condition-case nil (mm-display-inline-fontify handle 'org-mode) (error (insert (with-temp-buffer (mm-insert-part handle) (buffer-string)) \n #+end_src Update =org-src-lang-modes= to provide some leeway for posters #+begin_src emacs-lisp (add-to-list 'org-src-lang-modes '(elisp . emacs-lisp)) (add-to-list 'org-src-lang-modes '(emacs_lisp . emacs-lisp)) #+end_src Fontify code blocks in the text of messages #+begin_src emacs-lisp (defun my-mm-org-babel-src-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) '(text/org))) (add-to-list 'mm-uu-type-alist '(org-src-block ^[ \t]*#\\+begin_ ^[ \t]*#\\+end_ my-mm-org-babel-src-extract nil)) (mm-uu-configure) #+end_src When I have a bit of time (not directly ;-(), I will try adding missing bits: - colorization of such =org-verbatim= strings, and - of the =:results= blocks or lines. A difficulty, maybe, for the latter is the absence of explicit marker. Not that true: it's a newline... When that will be done, we will have a real Org experience when reading mails with Gnus. I love all this tools. Best regards, Seb Footnotes: [1] I will send an updated version on the one about sh session. [2] Just kidding. Using org-footnote BTW. -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Eric (and Dan), Eric Schulte wrote: This is really great. I finally folded it into my gnus setup, and while it looks great when it works Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that (and on some other posts[1]), I thought I'd been kill-filed ;-)[2] Sébastien et al., I have also included the code in my gnus configuration but I am not sure if it is actually doing anything or not. Well, actually, I think it *is* doing something but I haven't actually seen any fontification etc. On the other hand, I am still getting to grips with gnus article display functionality so I've probably done something wrong... If there are any obvious things I should be looking at, please let me know. I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. I _never_ observed problems in my case. Anyway, adding such a protection is the code is a great addition. Thanks! I've just singed the FSF papers. Once received by the FSF, I'll propagate your update onto the Gnus newsgroup. Please post here as well. I do follow the gnus newsgroup but less frequently. When that will be done, we will have a real Org experience when reading mails with Gnus. I love all this tools. Yes, there's great potential for the gnus+org combination to give a really nice email experience! Thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 : using Org-mode version 7.02trans (release_7.3.14.g106ad) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Eric, Eric S Fraga wrote: Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Eric (and Dan), Eric Schulte wrote: This is really great. I finally folded it into my gnus setup, and while it looks great when it works Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that (and on some other posts[1]), I thought I'd been kill-filed ;-)[2] Sébastien et al., I have also included the code in my gnus configuration but I am not sure if it is actually doing anything or not. Well, actually, I think it *is* doing something but I haven't actually seen any fontification etc. On the other hand, I am still getting to grips with gnus article display functionality so I've probably done something wrong... If there are any obvious things I should be looking at, please let me know. Not that I know of. For the sake of completeness, this is the part I have about my viewing customizations. Maybe take this into your .gnus and see what it gives? #+begin_src emacs-lisp ;;*** 1.2 (info (emacs-mime)Non-MIME) ;; regexp of Emacs sources groups (setq mm-uu-emacs-sources-regexp emacs) ;; regexp matching diff groups (setq mm-uu-diff-groups-regexp \\(diff\\|commit\\|cvs\\|bug\\|devel\\|reviews\\|mc\\|orgmode\\)) ;; regexp matching TeX groups (setq mm-uu-tex-groups-regexp .*) ;; 2010-10-21 was tex (eval-after-load mm-uu '(progn ;; correctly fontify Org-mode attachments (add-to-list 'mailcap-mime-extensions '(.org . text/org)) (add-to-list 'mm-automatic-display text/org) (add-to-list 'mm-inline-media-tests '(text/org my/display-org-inline (lambda (el) t))) (defun my/display-org-inline (handle) (condition-case nil (mm-display-inline-fontify handle 'org-mode) (error (insert (with-temp-buffer (mm-insert-part handle) (buffer-string)) \n ;; update `org-src-lang-modes' to provide some leeway for posters (add-to-list 'org-src-lang-modes '(elisp . emacs-lisp)) (add-to-list 'org-src-lang-modes '(emacs_lisp . emacs-lisp)) ;; fontify code blocks in the text of messages (defun my/mm-org-babel-src-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) '(text/org))) (add-to-list 'mm-uu-type-alist '(org-babel-block ^[ \t]*#\\+begin_ ^[ \t]*#\\+end_ my/mm-org-babel-src-extract nil)) (mm-uu-configure))) ;;*** 1.5 (info (emacs-mime)Display Customization) ;; You can view text/html parts of the current article with a WWW ;; browser by pressing `K H' (`gnus-article-browse-html-article') ;; ;; MIME type that will be displayed externally automatically ;; (add-to-list 'mm-automatic-external-display text/html) ;; do not treat inline images as real attachments (display them, ;; instead) (add-to-list 'mm-attachment-override-types image/.*) ; text/x-vcard... ;; don't render HTML automatically *when plain text alternative is ;; available* (eval-after-load mm-decode '(progn (add-to-list 'mm-discouraged-alternatives text/html) (add-to-list 'mm-discouraged-alternatives text/richtext) (add-to-list 'mm-discouraged-alternatives text/enriched) (add-to-list 'mm-discouraged-alternatives multipart/related))) ;; all images fit in the buffer (setq mm-inline-large-images t) ;; ;; always show HTML mails as attachments (even if they can be ;; ;; displayed) use `browse-url-browser-function' (firefox) to render ;; ;; HTML mails ;; (push text/html mm-inline-override-types) ;; use `w3m' browser (if installed) to render HTML-only mails (setq mm-text-html-renderer (cond ((executable-find w3m) 'w3m) (t 'html2text))) ;; Emacs built-in (eval-after-load w3m '(progn ;; (setq browse-url-browser-function 'w3m-browse-url) (setq mm-inline-text-html-renderer 'mm-inline-text-html-render-with-w3m) (setq gnus-article-wash-function 'gnus-article-wash-html-with-w3m) ;; Whenever you try to browse URLs found in articles, Gnus ;; (`emacs-w3m', in fact) complains that This link is considered ;; unsafe To turn it off, frob the variables ;; `w3m-safe-url-regexp' and `mm-w3m-safe-url-regexp'. )) ;; allow retrieving images in HTML contents with the img tags (setq mm-inline-text-html-with-images t) ;; Remove HTML tags from a buffer
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Eric S Fraga ucec...@ucl.ac.uk writes: Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Eric (and Dan), Eric Schulte wrote: This is really great. I finally folded it into my gnus setup, and while it looks great when it works Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that (and on some other posts[1]), I thought I'd been kill-filed ;-)[2] Sébastien et al., I have also included the code in my gnus configuration but I am not sure if it is actually doing anything or not. Well, actually, I think it *is* doing something but I haven't actually seen any fontification etc. On the other hand, I am still getting to grips with gnus article display functionality so I've probably done something wrong... if it is working, then the following code block should be fontified as if in an Org-mode buffer #+begin_src emacs-lisp (message is it working?) #+end_src If there are any obvious things I should be looking at, please let me know. the above should do it. My addition recovers from failures by inserting the unfontified text into the buffer, so it's possible that whatever issue I have that throws errors on non-src blocks is also an issue on your machine and is throwing errors on all blocks, which would explain why you aren't seeing any difference in your article buffers. I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. I _never_ observed problems in my case. Anyway, adding such a protection is the code is a great addition. Thanks! I've just singed the FSF papers. Once received by the FSF, I'll propagate your update onto the Gnus newsgroup. Please post here as well. I do follow the gnus newsgroup but less frequently. When that will be done, we will have a real Org experience when reading mails with Gnus. I love all this tools. Yes, there's great potential for the gnus+org combination to give a really nice email experience! Thanks, eric ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Hi Eric (and Dan), Eric Schulte wrote: This is really great. I finally folded it into my gnus setup, and while it looks great when it works Great you love it. I'm *VERY* pleased. Moreover, having no reaction on that (and on some other posts[1]), I thought I'd been kill-filed ;-)[2] I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. I _never_ observed problems in my case. Anyway, adding such a protection is the code is a great addition. Thanks! Hmm, I wonder what the difference could be in our setups. I've just singed the FSF papers. Once received by the FSF, I'll propagate your update onto the Gnus newsgroup. That sounds great. ** Org-mode code block fontification Correctly fontify Org-mode attachments #+begin_src emacs-lisp (add-to-list 'mailcap-mime-extensions '(.org . text/org)) (add-to-list 'mm-automatic-display text/org) (add-to-list 'mm-inline-media-tests '(text/org my-display-org-inline (lambda (el) t))) (defun my-display-org-inline (handle) (condition-case nil (mm-display-inline-fontify handle 'org-mode) (error (insert (with-temp-buffer (mm-insert-part handle) (buffer-string)) \n #+end_src Update =org-src-lang-modes= to provide some leeway for posters #+begin_src emacs-lisp (add-to-list 'org-src-lang-modes '(elisp . emacs-lisp)) (add-to-list 'org-src-lang-modes '(emacs_lisp . emacs-lisp)) #+end_src Fontify code blocks in the text of messages #+begin_src emacs-lisp (defun my-mm-org-babel-src-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) '(text/org))) (add-to-list 'mm-uu-type-alist '(org-src-block ^[ \t]*#\\+begin_ ^[ \t]*#\\+end_ my-mm-org-babel-src-extract nil)) (mm-uu-configure) #+end_src When I have a bit of time (not directly ;-(), I will try adding missing bits: - colorization of such =org-verbatim= strings, and - of the =:results= blocks or lines. I wonder if the mechanism used by gnus for underlining and italics could easily be extended for verbatim markers... A difficulty, maybe, for the latter is the absence of explicit marker. Not that true: it's a newline... When that will be done, we will have a real Org experience when reading mails with Gnus. I love all this tools. Agreed, I'm already finding the two to be a very comfortable pair. Best regards, Seb Footnotes: [1] I will send an updated version on the one about sh session. Sounds good. I often miss emails which don't have [Babel] in the subject string. Also, I currently have a list of 10 emails in my lists.babel folder marked for followup that I simply haven't had time to address. I know that at least one of those is from you. Cheers -- Eric [2] Just kidding. Using org-footnote BTW. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Eric, Eric Schulte wrote: Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Eric Schulte wrote: I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. I _never_ observed problems in my case. Anyway, adding such a protection is the code is a great addition. Thanks! Hmm, I wonder what the difference could be in our setups. If you have any interest in it, I can send you my .gnus file by private email.[3] When I have a bit of time (not directly ;-(), I will try adding missing bits: - colorization of such =org-verbatim= strings, and - of the =:results= blocks or lines. I wonder if the mechanism used by gnus for underlining and italics could easily be extended for verbatim markers... Right. This could be quite easy, in fact. [1] I will send an updated version on the one about sh session. Sounds good. I often miss emails which don't have [Babel] in the subject string. And I forgot to put that prefix in front of my posting (from 2 hours ago): --8---cut here---start-8--- + Sébastien Vauba 19k 2010-11-04 Thu 12:24o Executing sh code within sessions --8---cut here---end---8--- Also, I currently have a list of 10 emails in my lists.babel folder marked for followup that I simply haven't had time to address. I *really* can imagine. *If you don't mind*, I'll try to make a small list of the couple of requests for which you could give me little pieces of advice in order for me to go further. I know that at least one of those is from you. Great! Best regards, Seb Footnotes: [3] I still have email addresses and the like to clean before being able to really expose it publicly -- which is my ultimate goal. -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Eric Schulte schulte.e...@gmail.com writes: [...] if it is working, then the following code block should be fontified as if in an Org-mode buffer #+begin_src emacs-lisp (message is it working?) #+end_src Definitely not working then! This comes out as simple text in gnus and doesn't look at all like it would in an org buffer for me. [...] the above should do it. My addition recovers from failures by inserting the unfontified text into the buffer, so it's possible that whatever issue I have that throws errors on non-src blocks is also an issue on your machine and is throwing errors on all blocks, which would explain why you aren't seeing any difference in your article buffers. Looks like it. Is there any way to debug this? I don't get any messages in Emacs (*Messages*). I seem to have the same settings as Sébastien has posted along with your augmented error handling. I don't really understand all the mm-uu code (although I'm learning...) so I am not sure how gnus knows to invoke the specific org code you guys have posted. Maybe other gnus configurations, especially gnus-part-display-hook, may be interfering? thanks, eric -- : Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 23.2.1 : using Org-mode version 7.02trans (release_7.3.14.g106ad) ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Eric, Eric S Fraga wrote: [...] If there are any obvious things I should be looking at, please let me know. Not that I know of. For the sake of completeness, this is the part I have about my viewing customizations. Maybe take this into your .gnus and see what it gives? The only difference in your code (compared with mine) was: (eval-after-load mm-uu '(progn [... identical code follows until ...] (mm-uu-configure))) I was evaluating everything immediately on loading gnus. I've put in all this within the =eval-after-load= and restarted emacs but everything is the same. No fontification of src blocks. thanks again, eric -- : 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. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Eric, Eric S Fraga wrote: Eric Schulte schulte.e...@gmail.com writes: [...] if it is working, then the following code block should be fontified as if in an Org-mode buffer #+begin_src emacs-lisp (message is it working?) #+end_src Definitely not working then! This comes out as simple text in gnus and doesn't look at all like it would in an org buffer for me. [...] the above should do it. My addition recovers from failures by inserting the unfontified text into the buffer, so it's possible that whatever issue I have that throws errors on non-src blocks is also an issue on your machine and is throwing errors on all blocks, which would explain why you aren't seeing any difference in your article buffers. Looks like it. Is there any way to debug this? I don't get any messages in Emacs (*Messages*). I seem to have the same settings as Sébastien has posted along with your augmented error handling. I don't really understand all the mm-uu code (although I'm learning...) so I am not sure how gnus knows to invoke the specific org code you guys have posted. Maybe other gnus configurations, especially gnus-part-display-hook, may be interfering? The only thing that I have in that direction is: #+begin_src emacs-lisp ;; change a `\205' figure to ... (add-hook 'gnus-part-display-hook 'article-treat-dumbquotes) #+end_src Do you want me to send you my .gnus privately? Other ideas: - which version of Gnus? Gnus v5.13? - which fonts for your Org code? With colored *background*? Maybe have a try with my color-theme (see on Worg), or insert such lines into yours: #+begin_src emacs-lisp (let* ((inline-code '(:foreground blue1 :background #EAFFEA)) (block-code '(:foreground blue1 :background #EA))) ;; [...] (org-block ((t ,block-code))) (org-code ((t ,inline-code))) (org-column ((t ,column))) (org-document-info-keyword ((t (:foreground #008ED1 :background #EAEAFF (org-meta-line ((t (:foreground #008ED1 :background #EAEAFF (org-special-keyword ((t (:foreground #00BB00 :background #EAFFEA (org-table ((t (:foreground blue1 :background #EAFFEA (org-verbatim ((t ,inline-code))) #+end_src Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
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. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Also, I currently have a list of 10 emails in my lists.babel folder marked for followup that I simply haven't had time to address. I *really* can imagine. *If you don't mind*, I'll try to make a small list of the couple of requests for which you could give me little pieces of advice in order for me to go further. a small list of quick questions would be great. It's generally only the questions that require serious thought and/or development/debugging that I delay until I have time. -- Eric ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Eric S Fraga ucec...@ucl.ac.uk writes: Hi Eric, if it is working, then the following code block should be fontified as if in an Org-mode buffer #+begin_src emacs-lisp (message is it working?) #+end_src Definitely not working then! This comes out as simple text in gnus and doesn't look at all like it would in an org buffer for me. Hm, for me it's shown the same as verbatim blocks or stuff like --8---cut here---start-8--- this --8---cut here---end---8--- with the difference that the markers are still visible, which is a good thing, cause else the language wouldn't be visible. I've added only --8---cut here---start-8--- ;; Highlight org-babel source code blocks and results like verbatim marks. (add-to-list 'mm-uu-type-alist '(org-babel-block ^#\\+begin_src ^#\\+end_src (lambda nil (mm-uu-verbatim-marks-extract 0 0)) nil)) (add-to-list 'mm-uu-type-alist '(org-babel-results ^#\\+results: \n\n (lambda nil (mm-uu-verbatim-marks-extract 0 0)) nil)) (mm-uu-configure) --8---cut here---end---8--- to my ~/.gnus.el. I use the gnus version from its git repository, but that shouldn't make a difference. Bye, Tassilo ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
I've just singed the FSF papers. You are not supposed to do this. How will your changes get in to Emacs then? Hint: http://www.merriam-webster.com/dictionary/singed Jambunathan K. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: Enhancing the Org/Gnus experience
Hi Seb, This is really great. I finally folded it into my gnus setup, and while it looks great when it works, I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. ** Org-mode code block fontification Correctly fontify Org-mode attachments #+begin_src emacs-lisp (add-to-list 'mailcap-mime-extensions '(.org . text/org)) (add-to-list 'mm-automatic-display text/org) (add-to-list 'mm-inline-media-tests '(text/org my-display-org-inline (lambda (el) t))) (defun my-display-org-inline (handle) (condition-case nil (mm-display-inline-fontify handle 'org-mode) (error (insert (with-temp-buffer (mm-insert-part handle) (buffer-string)) \n #+end_src Update =org-src-lang-modes= to provide some leeway for posters #+begin_src emacs-lisp (add-to-list 'org-src-lang-modes '(elisp . emacs-lisp)) (add-to-list 'org-src-lang-modes '(emacs_lisp . emacs-lisp)) #+end_src Fontify code blocks in the text of messages #+begin_src emacs-lisp (defun my-mm-org-babel-src-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) '(text/org))) (add-to-list 'mm-uu-type-alist '(org-src-block ^[ \t]*#\\+begin_ ^[ \t]*#\\+end_ my-mm-org-babel-src-extract nil)) (mm-uu-configure) #+end_src Best -- Eric Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Hi, Eric Schulte wrote: Sébastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: I don't have in mind full fontification like we now have in Org. No: *just the basic yellow background*, so that code blocks are outstanding in any mail, exactly *like it is now* but for the cut here markers (or v+/v-). While we're at it, why not go all the way to full fontification code block fontification? Is the current code in org-src portable enough to be applied to this (or maybe be applied whenever org-struct mode is enabled)? Yes, we can!? No idea... Maybe David could answer on such a topic? Though, I don't know where to begin... Can some Org/Gnus expert give a hint? This strays out of my narrow areas of expertise, but I hereby throw my +1 onto the request. Playing a bit around, I've succeeded to make it work for the blocks, and almost for the results. Put this in your .emacs file: ;; regexp matching TeX groups (setq mm-uu-tex-groups-regexp .*) (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))) This is an enhanced version of what I sent previously: here, the identified block is highlighted as an Org-mode buffer. In other words, it's not in yellow background anymore, but really using the faces you've customized for such an Org-Babel block in a standard Org buffer. What'd be an good extra is the colorization of such =org-verbatim= strings... Still true; no clue for that one... Best regards, Seb ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Seb, Wow, magic. I've totally got no idea how it works, but thanks! Dan Eric Schulte schulte.e...@gmail.com writes: Hi Seb, This is really great. I finally folded it into my gnus setup, and while it looks great when it works, I was getting frequent errors throw by the org-mode fontification engine recursing too deeply. I've changed it to the following which augments what you sent with some simple error handling. ** Org-mode code block fontification Correctly fontify Org-mode attachments #+begin_src emacs-lisp (add-to-list 'mailcap-mime-extensions '(.org . text/org)) (add-to-list 'mm-automatic-display text/org) (add-to-list 'mm-inline-media-tests '(text/org my-display-org-inline (lambda (el) t))) (defun my-display-org-inline (handle) (condition-case nil (mm-display-inline-fontify handle 'org-mode) (error (insert (with-temp-buffer (mm-insert-part handle) (buffer-string)) \n #+end_src Update =org-src-lang-modes= to provide some leeway for posters #+begin_src emacs-lisp (add-to-list 'org-src-lang-modes '(elisp . emacs-lisp)) (add-to-list 'org-src-lang-modes '(emacs_lisp . emacs-lisp)) #+end_src Fontify code blocks in the text of messages #+begin_src emacs-lisp (defun my-mm-org-babel-src-extract () (mm-make-handle (mm-uu-copy-to-buffer start-point end-point) '(text/org))) (add-to-list 'mm-uu-type-alist '(org-src-block ^[ \t]*#\\+begin_ ^[ \t]*#\\+end_ my-mm-org-babel-src-extract nil)) (mm-uu-configure) #+end_src Best -- Eric Sébastien Vauban wxhgmqzgw...@spammotel.com writes: Hi, Eric Schulte wrote: Sébastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: I don't have in mind full fontification like we now have in Org. No: *just the basic yellow background*, so that code blocks are outstanding in any mail, exactly *like it is now* but for the cut here markers (or v+/v-). While we're at it, why not go all the way to full fontification code block fontification? Is the current code in org-src portable enough to be applied to this (or maybe be applied whenever org-struct mode is enabled)? Yes, we can!? No idea... Maybe David could answer on such a topic? Though, I don't know where to begin... Can some Org/Gnus expert give a hint? This strays out of my narrow areas of expertise, but I hereby throw my +1 onto the request. Playing a bit around, I've succeeded to make it work for the blocks, and almost for the results. Put this in your .emacs file: ;; regexp matching TeX groups (setq mm-uu-tex-groups-regexp .*) (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))) This is an enhanced version of what I sent previously: here, the identified block is highlighted as an Org-mode buffer. In other words, it's not in yellow background anymore, but really using the faces you've customized for such an Org-Babel block in a standard Org buffer. What'd be an good extra is the colorization of such =org-verbatim= strings... Still true; no clue for that one... Best regards, Seb ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi Eric, Eric Schulte wrote: Sébastien Vauban wxhgmqzgw...@spammotel.com writes: I don't have in mind full fontification like we now have in Org. No: *just the basic yellow background*, so that code blocks are outstanding in any mail, exactly *like it is now* but for the cut here markers (or v+/v-). While we're at it, why not go all the way to full fontification code block fontification? Is the current code in org-src portable enough to be applied to this (or maybe be applied whenever org-struct mode is enabled)? Yes, we can!? No idea... Maybe David could answer on such a topic? Though, I don't know where to begin... Can some Org/Gnus expert give a hint? This strays out of my narrow areas of expertise, but I hereby throw my +1 onto the request. Playing a bit around, I've succeeded to make it work for the blocks, and almost for the results. Add the following to your =.gnus=: #+begin_src emacs-lisp (add-to-list 'mm-uu-type-alist '(org-babel-block ^#\\+begin_src ^#\\+end_src (lambda nil (mm-uu-verbatim-marks-extract 0 0)) nil)) (add-to-list 'mm-uu-type-alist '(org-babel-results ^#\\+results: \n\n (lambda nil (mm-uu-verbatim-marks-extract 0 0)) nil)) (mm-uu-configure) #+end_src If anybody can help for the results part... I must admit I've more cloned existing parts than really understood every bit... What'd be an good extra is the colorization of such =org-verbatim= strings... Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Enhancing the Org/Gnus experience
Hi, Eric Schulte wrote: Sébastien Vauban wxhgmqzgwmuf-genee64ty+gs+fvcfc7...@public.gmane.org writes: I don't have in mind full fontification like we now have in Org. No: *just the basic yellow background*, so that code blocks are outstanding in any mail, exactly *like it is now* but for the cut here markers (or v+/v-). While we're at it, why not go all the way to full fontification code block fontification? Is the current code in org-src portable enough to be applied to this (or maybe be applied whenever org-struct mode is enabled)? Yes, we can!? No idea... Maybe David could answer on such a topic? Though, I don't know where to begin... Can some Org/Gnus expert give a hint? This strays out of my narrow areas of expertise, but I hereby throw my +1 onto the request. Playing a bit around, I've succeeded to make it work for the blocks, and almost for the results. Put this in your .emacs file: --8---cut here---start-8--- ;; regexp matching TeX groups (setq mm-uu-tex-groups-regexp .*) (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--- This is an enhanced version of what I sent previously: here, the identified block is highlighted as an Org-mode buffer. In other words, it's not in yellow background anymore, but really using the faces you've customized for such an Org-Babel block in a standard Org buffer. What'd be an good extra is the colorization of such =org-verbatim= strings... Still true; no clue for that one... Best regards, Seb -- Sébastien Vauban ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode