Re: [O] org-mime-htmlize ignores org-mime-export-options

2019-01-17 Thread Uwe Brauer
>>> "UB" == Uwe Brauer  writes:

   > Please look at the following

   > * Lisp :noexport:
   >(setq org-mime-export-options '(:section-numbers nil
   >:with-author nil
   >:with-toc nil))


This is a typo :with-toc t

Is what I have set and it does not work

Uwe Brauer 


smime.p7s
Description: S/MIME cryptographic signature


[O] org-mime-htmlize ignores org-mime-export-options

2019-01-17 Thread Uwe Brauer


Please look at the following

* Lisp :noexport:
   (setq org-mime-export-options '(:section-numbers nil
   :with-author nil
   :with-toc nil))

* Test 

Bblabla

When I run org-mime-htmlize then *no* toc is generated, contrary to the
setting.

Anybody has tried that out?

Regards

Uwe Brauer 




[O] org-mime with recent versions of org and emacs

2018-10-25 Thread Matt Price
I had some problems with the MELPA version of org-mime, and wasn't able to
solve my issues using the current version. I've rebased off of a PR
submitted to the upstream repo by John Kitchin. Core org-mime functions
once again work for me and I've added a couple of new features:

- mu4e support
- initial, primitive support for blockquoting paragraphs that start with
">" -- this is pretty ugly right now but maybe it will be possible to
improve later on.

My tree is here: https://github.com/titaniumbones/org-mime/tree/file-eqns
I'm developing against recent git versions of org and emacs.
I'd love to hear comments from others.

On Sun, Oct 21, 2018 at 10:04 PM Matt Price  wrote:

> I'm having a whole bunch of trouble getting org-mime to work, and I
> wondered ifo ther people are using it productively?
>
> Two biggest issues so far, both reproduced with emacs -Q on recent emacs
> git, org-mode git, and org-mime git:
>
> - org-mime-org-subtree-htmlize fails for me with "org-back-to-heading:
> before first heading"
> - org-mime-org-buffer-htmlize runs successfully, but only produces the
> html mime part; the text/plain message part is empty.
>
> org-mime-htmlize, when run in a mail buffer, still seems to work & produce
> a 2-part message with text/plain and text/html working well.
>
> Have folks seen this before & do you have a fix? thank you!
>
>


Re: [O] org-mime-htmlize gives JSON readtable error

2018-09-25 Thread Adrian Bradd



Bit of a late response here, but if you are using ob-ipython it 
now uses 'jupyter' instead of 'ipython' and installing jupyter 
resolves the issue of random json readtable errors for me. The 
error would turn up in unrelated locations like org-capture as 
well.


Cheers,

--
Adrian Bradd



Re: [O] org-mime-htmlize gives JSON readtable error

2018-08-17 Thread Joseph Vidal-Rosset
Le ven.  17 août 2018 à  12:32:43 , Eric S  Fraga  a
envoyé ce message:
> On Thursday, 16 Aug 2018 at 18:16, Joseph Vidal-Rosset wrote:
>
> [...]
>
>> I reply to my own email: installing jupyter solve the problem. I do not
>> know why, but I already met this.
>
> I do not have jupyter installed and yet htmlize works for me.

Thanks Eric for your reply. I really do not know why jupyter solved my
problem with org-mime-htmlize. (A possible  explanation it is because I
am  French and  our  President  Macron who  is  also called  "Jupiter"
believes that he can solve all problems. :) ). 

Best wishes, 

-- 
Joseph 



Re: [O] org-mime-htmlize gives JSON readtable error

2018-08-17 Thread Eric S Fraga
On Thursday, 16 Aug 2018 at 18:16, Joseph Vidal-Rosset wrote:

[...]

> I reply to my own email: installing jupyter solve the problem. I do not
> know why, but I already met this.

I do not have jupyter installed and yet htmlize works for me.

-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-753-g2ec5d3



Re: [O] org-mime-htmlize gives JSON readtable error

2018-08-17 Thread Eric S Fraga
#+OPTIONS: latex:t toc:nil H:3
On Thursday, 16 Aug 2018 at 15:22, Joseph Vidal-Rosset wrote:
> Hello the list, Hello Eric, 
>
> I meet a problem with org-mime-htmlize, it does not work no more.
>
> Here the error message:
>
> json-read: JSON readtable error

Hello Joseph,

some more details would be welcome.  What version of org?  I'm not quite up to 
date on my system and things are working fine for me.  Maybe a recent change?

I've htmlized this email for confirmation.  Apologies for an HTML email!


-- 
Eric S Fraga via Emacs 27.0.50, Org release_9.1.13-753-g2ec5d3


Re: [O] org-mime-htmlize gives JSON readtable error

2018-08-16 Thread Joseph Vidal-Rosset
Le   jeu.   16   août   2018à   03:22:42   ,   Joseph   Vidal-Rosset
 a envoyé ce message:
> Hello the list, Hello Eric, 
>
> I meet a problem with org-mime-htmlize, it does not work no more.
>
> Here the error message:
>
> json-read: JSON readtable error
>
> I do not find the solution. Your help is welcome. 
>
>  Best wishes,

I reply to my own email: installing  jupyter solve the problem. I do not
know why, but I already met this.

Best wishes, 

-- 
Joseph 


[O] org-mime-htmlize gives JSON readtable error

2018-08-16 Thread Joseph Vidal-Rosset
Hello the list, Hello Eric, 

I meet a problem with org-mime-htmlize, it does not work no more.

Here the error message:

json-read: JSON readtable error

I do not find the solution. Your help is welcome. 

 Best wishes,
-- 
Jo.



Re: [O] org-mime-htmlize transforms ' into ? in gmail_quote

2018-04-26 Thread Bastien
Hi Joseph,

org-mime is not living in Org's repository anymore, I suggest to
report issues on org-mime's repository, that's where other users
will report it I guess:

https://github.com/org-mime/org-mime

Best,

-- 
 Bastien



[O] org-mime-htmlize transforms ' into ? in gmail_quote

2018-04-21 Thread Joseph Vidal-Rosset
Hello,

I meet a problem with a transformation of ' into ? with French emails in
gnus. I guess that is a bug in org-mime-htmlize. Here is an example: 

Le   ven.20   avril   2018à   09:43:54   ,G.  D.
 a envoyé ce message:

> Possibilité d'utiliser son propre matériel ou d'en louer sur place...

Of course the ? in this gmail_quote are incorrect.

Your help is welcome. 

 Best wishes,
-- 
Jo.

[O] org-mime-htmlize with $\int$ only dvipng

2017-03-15 Thread Uwe Brauer
Hi

Is it correct, that org-mime-htmlize only works with dvipn when
exporting latex formulas. Mathjax still does not work?

Thanks

Uwe Brauer 




Re: [O] org-mime-buffer-htmlize with BEGIN_EXPORT latex

2017-03-14 Thread Jérémie Juste
The previous latex codes don't run. My apologies should have checked the
latex code first. Now it does.

#+BEGIN_EXPORT latex
\begin{table}[!htbp]
\centering
\caption{Descriptive statistics}
\begin{tabular}{ l c r }

  1 & 2 & 3 \\

  4 & 5 & 6 \\
  7 & 8 & 9 \\
\end{tabluar}

\end{table}
#+END_EXPORT

work

\begin{table}[!htbp]
\centering
\caption{Descriptive statistics}
\begin{tabular}{ l c r }

  1 & 2 & 3 \\

  4 & 5 & 6 \\
  7 & 8 & 9 \\
\end{tabular}

\end{table}

work as well

#+BEGIN_latex
\begin{table}
\centering
\caption{Descriptive statistics}
\begin{tabular}{ l c r
}

  1 & 2 & 3
\\

  4 & 5 & 6 \\
  7 & 8 & 9
\\

\end{tabular}
\end{table}
#+END_latex

Best,

Jeremie


On Tue, Mar 14, 2017 at 10:35 AM, Jérémie Juste 
wrote:

>
> Hello,
>
> I'm trying the org-mime-buffer-htmlize function but notice that it does
> not convert latex codes to image if they are in between export blocks.
> It is possible to have this feature enabled ?
>
> #+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t tex:imagemagick
> #+LATEX_HEADER: \usepackage [margin=1in]{geometry}
> #+LATEX_CLASS: myclass
> #+LATEX_HEADER: \newcommand\numberEq{\addtocounter{equation}{1}\tag{
> \theequation}}
> #+LATEX_HEADER:\usepackage{setspace}
> #+LATEX_HEADER: \usepackage{tikz}
> #+LATEX_HEADER: \usepackage{longtable}
> #+LATEX_HEADER: \usepackage{bbm}
> #+LATEX_HEADER: \usepackage{rotating}
> #+LATEX_HEADER: \doublespace
>
> Does not work
>
> #+BEGIN_EXPORT latex
> \begin{table}[!htbp]
> \centering
> \caption{Descriptive statistics}
> \begin{tabular}{ l c r }
>
>   1 & 2 & 3 \\
>
>   4 & 5 & 6 \\
>   7 & 8 & 9 \\
>
> \end{table}
> #+END_EXPORT
>
> work
>
> \begin{table}[!htbp]
> \centering
> \caption{Descriptive statistics}
> \begin{tabular}{ l c r }
>
>   1 & 2 & 3 \\
>
>   4 & 5 & 6 \\
>   7 & 8 & 9 \\
>
> \end{table}
>
>
> Best regards,
> Jeremie
>
>


-- 
Jérémie Juste


[O] org-mime-buffer-htmlize with BEGIN_EXPORT latex

2017-03-14 Thread Jérémie Juste
Hello,

I'm trying the org-mime-buffer-htmlize function but notice that it does
not convert latex codes to image if they are in between export blocks.
It is possible to have this feature enabled ?

#+OPTIONS: H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t tex:imagemagick
#+LATEX_HEADER: \usepackage [margin=1in]{geometry}
#+LATEX_CLASS: myclass
#+LATEX_HEADER:
\newcommand\numberEq{\addtocounter{equation}{1}\tag{\theequation}}
#+LATEX_HEADER:\usepackage{setspace}
#+LATEX_HEADER: \usepackage{tikz}
#+LATEX_HEADER: \usepackage{longtable}
#+LATEX_HEADER: \usepackage{bbm}
#+LATEX_HEADER: \usepackage{rotating}
#+LATEX_HEADER: \doublespace

Does not work

#+BEGIN_EXPORT latex
\begin{table}[!htbp]
\centering
\caption{Descriptive statistics}
\begin{tabular}{ l c r
}

  1 & 2 & 3
\\

  4 & 5 & 6 \\
  7 & 8 & 9
\\

\end{table}
#+END_EXPORT

work

\begin{table}[!htbp]
\centering
\caption{Descriptive statistics}
\begin{tabular}{ l c r
}

  1 & 2 & 3
\\

  4 & 5 & 6 \\
  7 & 8 & 9
\\

\end{table}


Best regards,
Jeremie


Re: [O] org-mime: improve handling of cc & bcc

2017-01-12 Thread Matt Price
I'm attaching the patch anyway, but of course don't mind moving the PR to
the melpa repo.

On Thu, Jan 12, 2017 at 3:07 PM, Kaushal Modi 
wrote:

> I happened just recently notice that org-mime was now added to Melpa:
> https://melpa.org/#/org-mime
>
> Would it be a better option to send the patches to https://github.com/org-
> mime/org-mime and remove org-mime from contrib/ as discussed here:
> https://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg00055.html
> ?
>
> On Thu, Jan 12, 2017 at 3:01 PM Nicolas Goaziou 
> wrote:
>
>> Thank you.
>>
>> Could you send it again using git format-patch and with a proper commit
>> message?
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>> --
>
> Kaushal Modi
>
From ca4dfa5e5a83fe7243affbf7e34a1435cbc5b00a Mon Sep 17 00:00:00 2001
From: Matt Price 
Date: Thu, 12 Jan 2017 20:07:55 -0500
Subject: [PATCH 4/4] org-mime: improve handling of cc & bcc headers

---
 contrib/lisp/org-mime.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 2ced42ec8..465fb3416 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -257,6 +257,10 @@ otherwise export the entire body."
 	   (to (funcall mp "MAIL_TO"))
 	   (cc (funcall mp "MAIL_CC"))
 	   (bcc (funcall mp "MAIL_BCC"))
+	   (other-headers (cond ((and cc bcc) `((cc . ,cc) (bcc . ,bcc)))
+(cc `((cc . ,cc)))
+(bcc `((bcc . ,bcc)))
+(t nil)))
 	   (body (buffer-substring
 		  (save-excursion (goto-char (point-min))
   (forward-line 1)
@@ -265,8 +269,7 @@ otherwise export the entire body."
 (forward-char))
   (point))
 		  (point-max
-  (org-mime-compose body (or fmt 'org) file to subject
-			`((cc . ,cc) (bcc . ,bcc))
+  (org-mime-compose body (or fmt 'org) file to subject other-headers
 
 (defun org-mime-send-buffer ( fmt)
   (run-hooks 'org-mime-send-buffer-hook)
-- 
2.11.0



Re: [O] org-mime: improve handling of cc & bcc

2017-01-12 Thread Kaushal Modi
I happened just recently notice that org-mime was now added to Melpa:
https://melpa.org/#/org-mime

Would it be a better option to send the patches to
https://github.com/org-mime/org-mime and remove org-mime from contrib/ as
discussed here:
https://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg00055.html
?

On Thu, Jan 12, 2017 at 3:01 PM Nicolas Goaziou 
wrote:

> Thank you.
>
> Could you send it again using git format-patch and with a proper commit
> message?
>
> Regards,
>
> --
> Nicolas Goaziou
>
> --

Kaushal Modi


Re: [O] org-mime: improve handling of cc & bcc

2017-01-12 Thread Nicolas Goaziou
Hello,

Matt Price  writes:

> I have been having some trouble with org-mime & mu4e (iv cc & bcc are
> empty, then buffer creation fails), and this patch seems to have fixed it.
> Not 100% sure that this is really the origin of the problem but it fixed an
> issue for me.

Thank you.

Could you send it again using git format-patch and with a proper commit
message?

Regards,

-- 
Nicolas Goaziou



[O] org-mime: improve handling of cc & bcc

2017-01-11 Thread Matt Price
I have been having some trouble with org-mime & mu4e (iv cc & bcc are
empty, then buffer creation fails), and this patch seems to have fixed it.
Not 100% sure that this is really the origin of the problem but it fixed an
issue for me.
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 2ced42ec8..465fb3416 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -257,6 +257,10 @@ otherwise export the entire body."
 	   (to (funcall mp "MAIL_TO"))
 	   (cc (funcall mp "MAIL_CC"))
 	   (bcc (funcall mp "MAIL_BCC"))
+	   (other-headers (cond ((and cc bcc) `((cc . ,cc) (bcc . ,bcc)))
+(cc `((cc . ,cc)))
+(bcc `((bcc . ,bcc)))
+(t nil)))
 	   (body (buffer-substring
 		  (save-excursion (goto-char (point-min))
   (forward-line 1)
@@ -265,8 +269,7 @@ otherwise export the entire body."
 (forward-char))
   (point))
 		  (point-max
-  (org-mime-compose body (or fmt 'org) file to subject
-			`((cc . ,cc) (bcc . ,bcc))
+  (org-mime-compose body (or fmt 'org) file to subject other-headers
 
 (defun org-mime-send-buffer ( fmt)
   (run-hooks 'org-mime-send-buffer-hook)


Re: [O] org-mime-htmlize with latex math, no png

2016-04-19 Thread Uwe Brauer
>>> "Uwe" == Uwe Brauer  writes:

   > Hi

   > Is there a similar possibility for org-mime-HTML?


To answer my own question, looking into org-mime.el
the answer is *no* sorry for the noise.

Uwe Brauer 




[O] org-mime-htmlize with latex math, no png

2016-04-19 Thread Uwe Brauer


Hi

I am very happy with org-mime-htmlize which allows me to send latex
equations as png.

However I just changed the setting of org-html-with-latex from png to
mathjax, since when I export from org to html it is sometimes difficult
to use that generated HTML (and the relevant pngs) in other HTML
documents. So that is where mathjax seems more appropriate.

Is there a similar possibility for org-mime-htmlize?

thanks

Uwe Brauer 



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Rasmus
Peter Davis  writes:

> Actually, after re-reading the old exchange more carefully, it seems
> that I already had (require 'ox-org) in my startup file, but
> still got the error. However, manually loading the ox-org library
> avoided the error.
>
> So it seems that:
>
>  1) the cause of the problem was never identified,
>  2) manually loading ox-org avoids the problem, and,
>  3) I guess I just haven't been using org-mime-org-buffer-htmlize on
> this machine for a while, so I forgot about it.
>
> Interestingly, this all works with no problems on my other MacBook.

Could you check that it doesn't load an old version of ox-org or similar?
E.g. check that find-library finds the right version.

Also, does the backtrace reveal anything useful?

Thanks,
Rasmus

-- 
When in doubt, do it!



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis


On 4/7/16 5:23 PM, Rasmus wrote:

Peter Davis  writes:


Actually, after re-reading the old exchange more carefully, it seems
that I already had (require 'ox-org) in my startup file, but
still got the error. However, manually loading the ox-org library
avoided the error.

So it seems that:

  1) the cause of the problem was never identified,
  2) manually loading ox-org avoids the problem, and,
  3) I guess I just haven't been using org-mime-org-buffer-htmlize on
this machine for a while, so I forgot about it.

Interestingly, this all works with no problems on my other MacBook.

Could you check that it doesn't load an old version of ox-org or similar?
E.g. check that find-library finds the right version.

Also, does the backtrace reveal anything useful?

I'll try to check when I get a chance.

Thanks,
-pd


--

Peter Davis
http://www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis
Peter Davis  writes:

> Peter Davis  writes:
>
>> Rasmus  writes:
>>
>>> Hi Peter,
>>>
>>> Peter Davis  writes:
>>>
 I used to be able to use org-buffer-org-mime-htmlize to send my org
 documents as multipart/alternative html & text email. For some
 reason, this is stopped working, and now displays

 Unknown "nil" back-end: Aborting export

 In the *Messages* buffer, I see

 org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export

 So how is the back-end supposed to be defined? (And why might it have
 broken?) I haven't not made any related changes in a *long*
 time.
>>>
>>> Could you provide a reproducible example starting with emacs -q?
>>>
>>> I can't reproduce it here by
>>>
>>> 1. starting from emacs -q with latest org from master
>>> 2. creating an org buffer with the content:
>>>- 1
>>>- 2
>>> 3. calling org-mime-org-buffer-htmlize on this buffer.
>>
>> Thank you, Rasmus, but ...
>>
>> If I start emacs with -q, it doesn't know about org. It can't set org-mode, 
>> or run org-mime commands. Is there a way to load this
>> manually?
>>
>> Also, can "the latest org from master" be gotten through package manager?
>
>
> Hmmm. It seems I had this same problem last October, and manually loading 
> ox-org solved it, as it does now. That was suggested by
> Aaron Ecay.
>
> Then, as suggested by Nicolas, I added (require 'ox-org) to my .emacs. I 
> guess that worked for the time being. I haven't changed
> much in my startup file since then, and almost everything following that is 
> commented out. I did, however, try to add startup
> commands for hyperbole, but I never got that working. Perhaps that broke 
> things somehow.


Actually, after re-reading the old exchange more carefully, it seems that I 
already had (require 'ox-org) in my startup file, but
still got the error. However, manually loading the ox-org library avoided the 
error.

So it seems that:

 1) the cause of the problem was never identified,
 2) manually loading ox-org avoids the problem, and,
 3) I guess I just haven't been using org-mime-org-buffer-htmlize on this 
machine for a while, so I forgot about it.

Interestingly, this all works with no problems on my other MacBook.

Thanks,

-pd



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis
Peter Davis  writes:

> Rasmus  writes:
>
>> Hi Peter,
>>
>> Peter Davis  writes:
>>
>>> I used to be able to use org-buffer-org-mime-htmlize to send my org
>>> documents as multipart/alternative html & text email. For some
>>> reason, this is stopped working, and now displays
>>>
>>> Unknown "nil" back-end: Aborting export
>>>
>>> In the *Messages* buffer, I see
>>>
>>> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>>>
>>> So how is the back-end supposed to be defined? (And why might it have
>>> broken?) I haven't not made any related changes in a *long*
>>> time.
>>
>> Could you provide a reproducible example starting with emacs -q?
>>
>> I can't reproduce it here by
>>
>> 1. starting from emacs -q with latest org from master
>> 2. creating an org buffer with the content:
>>- 1
>>- 2
>> 3. calling org-mime-org-buffer-htmlize on this buffer.
>
> Thank you, Rasmus, but ...
>
> If I start emacs with -q, it doesn't know about org. It can't set org-mode, 
> or run org-mime commands. Is there a way to load this
> manually?
>
> Also, can "the latest org from master" be gotten through package manager?


Hmmm. It seems I had this same problem last October, and manually loading 
ox-org solved it, as it does now. That was suggested by
Aaron Ecay.

Then, as suggested by Nicolas, I added (require 'ox-org) to my .emacs. I guess 
that worked for the time being. I haven't changed
much in my startup file since then, and almost everything following that is 
commented out. I did, however, try to add startup
commands for hyperbole, but I never got that working. Perhaps that broke things 
somehow.

Thanks again!

-pd



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Peter Davis

Rasmus  writes:

> Hi Peter,
>
> Peter Davis  writes:
>
>> I used to be able to use org-buffer-org-mime-htmlize to send my org
>> documents as multipart/alternative html & text email. For some
>> reason, this is stopped working, and now displays
>>
>> Unknown "nil" back-end: Aborting export
>>
>> In the *Messages* buffer, I see
>>
>> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>>
>> So how is the back-end supposed to be defined? (And why might it have
>> broken?) I haven't not made any related changes in a *long*
>> time.
>
> Could you provide a reproducible example starting with emacs -q?
>
> I can't reproduce it here by
>
> 1. starting from emacs -q with latest org from master
> 2. creating an org buffer with the content:
>- 1
>- 2
> 3. calling org-mime-org-buffer-htmlize on this buffer.

Thank you, Rasmus, but ...

If I start emacs with -q, it doesn't know about org. It can't set org-mode, or 
run org-mime commands. Is there a way to load this
manually?

Also, can "the latest org from master" be gotten through package manager?

Thanks!
-pd



Re: [O] org-mime-org-buffer-htmlize can't find back-end

2016-04-07 Thread Rasmus
Hi Peter,

Peter Davis  writes:

> I used to be able to use org-buffer-org-mime-htmlize to send my org
> documents as multipart/alternative html & text email. For some
> reason, this is stopped working, and now displays
>
> Unknown "nil" back-end: Aborting export
>
> In the *Messages* buffer, I see
>
> org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export
>
> So how is the back-end supposed to be defined? (And why might it have
> broken?) I haven't not made any related changes in a *long*
> time.

Could you provide a reproducible example starting with emacs -q?

I can't reproduce it here by

1. starting from emacs -q with latest org from master
2. creating an org buffer with the content:
   - 1
   - 2
3. calling org-mime-org-buffer-htmlize on this buffer.

Thanks,
Rasmus

-- 
Together we'll stand, divided we'll fall




[O] org-mime-org-buffer-htmlize can't find back-end

2016-04-06 Thread Peter Davis

I used to be able to use org-buffer-org-mime-htmlize to send my org documents 
as multipart/alternative html & text email. For some
reason, this is stopped working, and now displays

Unknown "nil" back-end: Aborting export

In the *Messages* buffer, I see

org-export-barf-if-invalid-backend: Unknown "nil" back-end: Aborting export

So how is the back-end supposed to be defined? (And why might it have broken?) 
I haven't not made any related changes in a *long*
time.


Thank you.

-pd




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-22 Thread Alan Schmitt
On 2014-07-21 19:45, Peter Davis p...@pfdstudio.com writes:

 Alas, despite years of emacs abuse, I have not managed to master even
 the rudiments of emacs lisp, and don't even know how to edebug.

To get you started, you could try the following.

- set up two emacs frames
- in one frame, do a M-x describe-function then type the name of the
  function of interest (smtpmail-send-it iirc)
- there will be a link to smtpmail.el, follow it
- this will take you to the definition of the function, there type C-u
  C-M-x to tell emacs you want to edebug it
- now in the other frame, do what you need to do to trigger the bug
- when the function is called, you should see a small triangle in the
  fringe showing the point being executed. You can step through the
  different instructions by hitting space, and you will see in the echo
  area the results of the computations

You can interrupt the debugging at any time by hitting 'q'. And if you
no longer want to debug that function, hit C-M-x while in the
function's source code, or restart emacs.

Try it, it's fun! ;-)

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


pgpGDmMDt8dt5.pgp
Description: PGP signature


Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-22 Thread Peter Davis
Alan Schmitt alan.schm...@polytechnique.org writes:

 On 2014-07-21 19:45, Peter Davis p...@pfdstudio.com writes:

 Alas, despite years of emacs abuse, I have not managed to master even
 the rudiments of emacs lisp, and don't even know how to edebug.

 To get you started, you could try the following.

 - set up two emacs frames
 - in one frame, do a M-x describe-function then type the name of the
   function of interest (smtpmail-send-it iirc)
 - there will be a link to smtpmail.el, follow it
 - this will take you to the definition of the function, there type C-u
   C-M-x to tell emacs you want to edebug it
 - now in the other frame, do what you need to do to trigger the bug
 - when the function is called, you should see a small triangle in the
   fringe showing the point being executed. You can step through the
   different instructions by hitting space, and you will see in the echo
   area the results of the computations

 You can interrupt the debugging at any time by hitting 'q'. And if you
 no longer want to debug that function, hit C-M-x while in the
 function's source code, or restart emacs.

 Try it, it's fun! ;-)

This sounds like something even I could do! Thanks, Alan. I'll give it a
shot.

-pd



[O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis
I've used org-mode-org-mime-htmlize in the past to send email from org, 
via Gnus. However, recently I've discovered that after I edit the To: 
field and enter C-c C-c, I get Sending via mail... in the mini-buffer, 
and then emacs just sits there, apparently hung. Typing C-g enough times 
brings it back, but the mail never gets sent.


I have started running Gnus in a different emacs concurrently on the 
same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus in 
Aquamacs), using the same .gnus.el, but I would not expect that to cause 
any problems.


Any suggestions as to what may be going on here, or how to trouble shoot 
it? I really like sending nicely formatted emails from org.


Thanks!
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Thorsten Jolitz
Peter Davis p...@pfdstudio.com writes:

 I've used org-mode-org-mime-htmlize in the past to send email from
 org, via Gnus. However, recently I've discovered that after I edit the
 To: field and enter C-c C-c, I get Sending via mail... in the
 mini-buffer, and then emacs just sits there, apparently hung. Typing
 C-g enough times brings it back, but the mail never gets sent.

Does Emacs really hang or is it still responsive? Did you try moving
point or so? These messages sometimes don't disappear although the work
is long finished.  Did you try

,
| top
`

on the command-line to see if Emacs uses 100pc CPU?

 I have started running Gnus in a different emacs concurrently on the
 same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
 in Aquamacs), using the same .gnus.el, but I would not expect that to
 cause any problems.

 Any suggestions as to what may be going on here, or how to trouble
 shoot it? I really like sending nicely formatted emails from org.

Just had a similar problem.
Try this, if Emacs actually really hangs:

1. M-x load-library RET org-elements.el

2. do as described (- make Emacs hang)

3. send from command line

,
| kill -s usr2 4352
`

(get the PID with 'ps -e | grep emacs')

or, equivalently (?)

,
| pkill --signal usr2 emacs
`

4. go back to emacs and check/copysend the *Backtrace* buffer

-- 
cheers,
Thorsten




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis

Thank you, Thorsten,

Thorsten Jolitz tjol...@gmail.com writes:

 Peter Davis p...@pfdstudio.com writes:

 I've used org-mode-org-mime-htmlize in the past to send email from
 org, via Gnus. However, recently I've discovered that after I edit the
 To: field and enter C-c C-c, I get Sending via mail... in the
 mini-buffer, and then emacs just sits there, apparently hung. Typing
 C-g enough times brings it back, but the mail never gets sent.

 Does Emacs really hang or is it still responsive? Did you try moving
 point or so? These messages sometimes don't disappear although the work
 is long finished.  Did you try

Actually, Emacs itself does not hang, but the sending process appears to
hang. I've waited 10 or 15 minutes, and the message in the mini-buffer
never changes and the operation never completes. (I've noticed on
another system that after the Sending via mail... message, the
mini-buffer displays other messages as the message is sent.)

 ,
 | top
 `

 on the command-line to see if Emacs uses 100pc CPU?

I don't think it's using 100%, but it's using enough CPU that the Mac
keeps displaying the spinning beachball as I hover over the Emacs window.

 I have started running Gnus in a different emacs concurrently on the
 same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
 in Aquamacs), using the same .gnus.el, but I would not expect that to
 cause any problems.

 Any suggestions as to what may be going on here, or how to trouble
 shoot it? I really like sending nicely formatted emails from org.

 Just had a similar problem.
 Try this, if Emacs actually really hangs:

 1. M-x load-library RET org-elements.el

 2. do as described (- make Emacs hang)

 3. send from command line

 ,
 | kill -s usr2 4352
 `

 (get the PID with 'ps -e | grep emacs')

 or, equivalently (?)

 ,
 | pkill --signal usr2 emacs
 `

 4. go back to emacs and check/copysend the *Backtrace* buffer

Emacs isn't hung, but maybe there's some useful information somewhere
else?

Thanks very much!

-pd




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis
On more observation: I tried quitting Aquamacs, and then quitting and 
re-starting Emacs. The same problem occurred.


I also looked in the *trace of SMTP session to ... * buffer, and it was 
empty.


Thanks!
-pd


On 7/21/14, 10:14 AM, Peter Davis wrote:

Thank you, Thorsten,

Thorsten Jolitz tjol...@gmail.com writes:


Peter Davis p...@pfdstudio.com writes:


I've used org-mode-org-mime-htmlize in the past to send email from
org, via Gnus. However, recently I've discovered that after I edit the
To: field and enter C-c C-c, I get Sending via mail... in the
mini-buffer, and then emacs just sits there, apparently hung. Typing
C-g enough times brings it back, but the mail never gets sent.

Does Emacs really hang or is it still responsive? Did you try moving
point or so? These messages sometimes don't disappear although the work
is long finished.  Did you try

Actually, Emacs itself does not hang, but the sending process appears to
hang. I've waited 10 or 15 minutes, and the message in the mini-buffer
never changes and the operation never completes. (I've noticed on
another system that after the Sending via mail... message, the
mini-buffer displays other messages as the message is sent.)


,
| top
`

on the command-line to see if Emacs uses 100pc CPU?

I don't think it's using 100%, but it's using enough CPU that the Mac
keeps displaying the spinning beachball as I hover over the Emacs window.


I have started running Gnus in a different emacs concurrently on the
same machine (On OS X, I run org-mode in emacs-mac-port, and run Gnus
in Aquamacs), using the same .gnus.el, but I would not expect that to
cause any problems.

Any suggestions as to what may be going on here, or how to trouble
shoot it? I really like sending nicely formatted emails from org.

Just had a similar problem.
Try this, if Emacs actually really hangs:

1. M-x load-library RET org-elements.el

2. do as described (- make Emacs hang)

3. send from command line

,
| kill -s usr2 4352
`

(get the PID with 'ps -e | grep emacs')

or, equivalently (?)

,
| pkill --signal usr2 emacs
`

4. go back to emacs and check/copysend the *Backtrace* buffer

Emacs isn't hung, but maybe there's some useful information somewhere
else?

Thanks very much!

-pd



--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Nick Dokos
Peter Davis p...@pfdstudio.com writes:

 On more observation: I tried quitting Aquamacs, and then quitting and
 re-starting Emacs. The same problem occurred.

 I also looked in the *trace of SMTP session to ... * buffer, and it
 was empty.


C-h v message-send-mail-function RET

What the value is depends on which package you use to send mail.  For
smtpmail, this is probably `message-smtpmail-send-it' which just
executes a hook and then calls `smtpmail-send-it'. I would edebug this
function and step through it until it goes off the rails, then do the
same thing on the next level down until you either find the culprit or
give up in disgust. Even a partial descent into it however should be
helpful to whoever you can beg/coerce to look at the problem (most
probably you :-) )

If not smtpmail, then do the same thing with whatever function
you *do* use.

Check any buffers generated and watch out for any debug settings as you
follow the flow. You might want to set any debug variables you find
before doing it again for the Nth time where 2 = N ...

At least, that's how I would go about it.

Nick




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis

Thank you, Nick.


On 7/21/14, 12:23 PM, Nick Dokos wrote:

Peter Davis p...@pfdstudio.com writes:


On more observation: I tried quitting Aquamacs, and then quitting and
re-starting Emacs. The same problem occurred.

I also looked in the *trace of SMTP session to ... * buffer, and it
was empty.


C-h v message-send-mail-function RET

What the value is depends on which package you use to send mail.  For
smtpmail, this is probably `message-smtpmail-send-it' which just
executes a hook and then calls `smtpmail-send-it'.


Actually, it was set to just smtpmail-send-it (no message-). I tried 
changing it back but that seems to have made no difference. For some 
reason, my .gnus.el had this:


+
| (setq send-mail-function 'smtpmail-send-it
|  message-send-mail-function 'smtpmail-send-it)
+

I changed the second one, so it's now:

+
| (setq send-mail-function 'smtpmail-send-it
|   message-send-mail-function 'message-smtpmail-send-it)
+

Still no good.



I would edebug this
function and step through it until it goes off the rails, then do the
same thing on the next level down until you either find the culprit or
give up in disgust. Even a partial descent into it however should be
helpful to whoever you can beg/coerce to look at the problem (most
probably you :-) )

If not smtpmail, then do the same thing with whatever function
you *do* use.

Check any buffers generated and watch out for any debug settings as you
follow the flow. You might want to set any debug variables you find
before doing it again for the Nth time where 2 = N ...

At least, that's how I would go about it.


Alas, despite years of emacs abuse, I have not managed to master even 
the rudiments of emacs lisp, and don't even know how to edebug.


Thanks!
-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Nick Dokos
Peter Davis p...@pfdstudio.com writes:


 At least, that's how I would go about it.

 Alas, despite years of emacs abuse, I have not managed to master even
 the rudiments of emacs lisp, and don't even know how to edebug.


So this is your opportunity to learn!

This might be a bit too complicated to learn on, but I would encourage
you (and everybody else too) to learn both. My favorite quote in this
respect was somebody's post on this list, who was caught completely by
surprise at having learnt enough lisp to do useful things, and he wasn't
even trying :-) I wish I had kept a reference to that mail: if anybody
(perhaps the author) recognizes it and can find a reference, please let
me know!

I'll also mention that I'm pretty sure that neither John Hendy
nor Tom Dye knew much (anything?) about emacs lisp before org-mode
entangled them[fn:1] - and look at them now!

Footnotes:

[fn:1] That's a little known feature of org-mode: in addition to
   exporting documents and tangling programs, it also entangles
   people. Instead of a unicorn, the logo should be an octopus :-)

Nick




Re: [O] org-mime-org-buffer-htmlize sending hangs ...

2014-07-21 Thread Peter Davis


On 7/21/14, 2:25 PM, Nick Dokos wrote:

Peter Davis p...@pfdstudio.com writes:


At least, that's how I would go about it.

Alas, despite years of emacs abuse, I have not managed to master even
the rudiments of emacs lisp, and don't even know how to edebug.


So this is your opportunity to learn!


Learning emacs lisp is definitely on my bucket list, but not, I confess, 
at the top.


;^)

-pd

--
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com




Re: [O] org-mime spurious alternative

2014-06-12 Thread Eric Schulte
Sébastien Delafond sdelaf...@gmail.com writes:

 Hello,

 from Debian bug #751014 (http://bugs.debian.org/751014):

   When org-mime-library is set to semi, org-mime generates a spurious
   alternative section around the HTML part.  This is due to two bugs in
   the function org-mime-multipart:

   1. it attempts to put a multipart/alternative section around the HTML,
  where it should be putting a multipart/related part;

   2. it tests for the presence of images by doing (when images ...),
  which triggers when images is the empty string (somebody has been
  programming in Python or Javascript?).

   To repeat:

 M-x load-library org-mime RET
 M-: (setq org-mime-library 'semi) RET
 M-x wl RET
 w

   Then insert some text below the separator line, and do

 M-x org-mime-htmlize

   and see the breakage.

 Cheers,

 --Seb



Does the attached patch fix these problems?

Thanks,
Eric

From 9af18107bd82fb9778b87b5891b1772fb847cc74 Mon Sep 17 00:00:00 2001
From: Eric Schulte schulte.e...@gmail.com
Date: Thu, 12 Jun 2014 14:40:32 -0400
Subject: [PATCH] fix semi-backend bug in org-mime

* contrib/lisp/org-mime.el (org-mime-multipart): Fix bug in use of the
  semi org-mime-library when converting emails to HTML.
---
 contrib/lisp/org-mime.el | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 5f874d9..44bf91b 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -163,10 +163,13 @@ and images in a multipart/related part.
 ('semi (concat
 -- alternative-{\n
 -- [[text/plain]]\n plain
-	(when images (concat -- alternative-{\n))
--- [[text/html]]\n  html
-	images
-	(when images (concat -- }-alternative\n))
+	(if (and images ( (length images) 0))
+		(concat -- related-{\n
+			-- [[text/html]]\n  html
+			images
+			-- }-related\n)
+	  (concat -- [[text/html]]\n  html
+		  images))
 -- }-alternative\n))
 ('vm ?)))
 
-- 
2.0.0


-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)


[O] org-mime spurious alternative

2014-06-10 Thread Sébastien Delafond
Hello,

from Debian bug #751014 (http://bugs.debian.org/751014):

  When org-mime-library is set to semi, org-mime generates a spurious
  alternative section around the HTML part.  This is due to two bugs in
  the function org-mime-multipart:

  1. it attempts to put a multipart/alternative section around the HTML,
 where it should be putting a multipart/related part;

  2. it tests for the presence of images by doing (when images ...),
 which triggers when images is the empty string (somebody has been
 programming in Python or Javascript?).

  To repeat:

M-x load-library org-mime RET
M-: (setq org-mime-library 'semi) RET
M-x wl RET
w

  Then insert some text below the separator line, and do

M-x org-mime-htmlize

  and see the breakage.

Cheers,

--Seb




[O] org-mime-htmlize problem: org-indent-line

2013-07-03 Thread Martin Marier
Hi,

I had an issue with org-mime-htmlize lately.  Whenever I try to htmlize
a Messoage mode buffer (M-x org-mime-htmlize), I get this error message:

eval: Symbol's value as variable is void: org-indent-line

I am using Org-mode version 8.0.3 (8.0.3-61-g5381eb-elpa @ 
~/.emacs.d/elpa/org-20130701/)

Has anyone else had the same issue?
Thank you very much.

Martin
-- 
Martin Marier
http://www.martinmarier.com



Re: [O] org-mime

2013-05-16 Thread Joseph Vidal-Rosset
I thank you Eric and Uwe for your help. Many thanks also to all the
developers of emacs and org-mode.

In fact I just spent two days in configuring my emacs24 and gnus. (Eric, I
did not understand how worked your emacs24-starter-kit , which is a nice
tool indeed).

The last problem that I meet on my laptop is  an error message :
smtp-server not defined , and , until now, I do not find how to fix it :(
(if someone has a suggestion, thanks in advance).

My goal is to succeed to stay in emacs, for LaTeX as well as for emails,
but I have to work again. Every help on LaTeX and emails via org-mode will
be welcome.


Best,

Jo.



2013/5/15 Eric Schulte schulte.e...@gmail.com

 Uwe Brauer o...@mat.ucm.es writes:

  Eric == Eric Schulte schulte.e...@gmail.com writes:
 
  Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:
 
  -
 
  A while back Org-mode switched its method of exporting latex
 equations
  to HTML.  Equations used to be exported as png images, however they
 are
  now exported as markup which may then be processed on the fly by
  client-side javascript.  Most mail readers do not allow javascript
 in
  html email, and I doubt that the required javascript headers are
  included in the mail html mime part.
 
  I don't know if it is currently possible to do the javascript
  pre-processing as part of the HTML export, but that would probably
 be
  the best solution in this case.
 
  Couldn't the old functionality (converting to png) be reactivated, at
  least optionally?? For me this change are bad news, since the feature
  (to export LaTeX math to something visible) is very important to me and
  even if this approach may have disadvantages, it seems to me more
  universal than the  javascript business.
 

 Indeed the old latex-png functionality is still available, I just had
 to update org-mime to work with the new exporter.  Export of latex to
 attached png images should once again be working in the master branch of
 the git repo.

 Best,

 
 
  Uwe Brauer
 
 

 --
 Eric Schulte
 http://cs.unm.edu/~eschulte




Re: [O] org-mime

2013-05-16 Thread Feng Shu
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 I thank you Eric and Uwe for your help. Many thanks also to all the
 developers of emacs and org-mode. 

 In fact I just spent two days in configuring my emacs24 and gnus.
 (Eric, I did not understand how worked your emacs24-starter-kit ,
 which is a nice tool indeed). 

 The last problem that I meet on my laptop is an error message :
 smtp-server not defined , and , until now, I do not find how to fix it
 :(
 (if someone has a suggestion, thanks in advance). 

 My goal is to succeed to stay in emacs, for LaTeX as well as for
 emails, but I have to work again. Every help on LaTeX and emails via
 org-mode will be welcome. 

Your setting may be  same as  my emacs configure ,I use 
1. gnus + offlineimap + dovecot + gmail + org-contacts.el
2. org-mode + xelatex 

May be my configure can help you 

#+begin_src emacs-lisp
;;; eh-org.el --- Tumashu's org-mode configuation 

;; Copyright (c) 2012, Feng Shu

;; Author: Feng Shu tuma...@gmail.com
;; URL: https://github.com/tumashu/tumashu.github.com
;; Version: 0.0.2
;; Package-Requires: ((org 7.8.00))
;; This file is not part of GNU Emacs.

;;; Commentary:

;;  这个文件是tumashu个人专用的emacs配置文件,emacs中文用户可以参考。

;;; License:

;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License
;; as published by the Free Software Foundation; either version 3
;; of the License, or (at your option) any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Code:

(require 'org)
(require 'ox-ascii)
(require 'ox-latex)
(require 'ox-beamer)
(require 'ox-html)
(require 'ox-deck)
(require 'ox-s5)
(require 'ox-rss)
(require 'ox-md)
(require 'ox-odt)
(require 'org-contacts)
(require 'org-mime)
(require 'org-bookmark)
(require 'org-protocol)
(require 'ob-R)

(setq org-export-backends
  '(ascii beamer html latex md odt deck rss s5))

(add-to-list 'auto-mode-alist '(\.\(org\|org_archive\)$ . org-mode))   
(setq org-log-done t)   
(setq org-startup-indented nil)
(setq org-confirm-babel-evaluate nil)

;; org-bable设置
; font-lock in src code blocks
(setq org-src-fontify-natively t)
(org-babel-do-load-languages
 'org-babel-load-languages
 '((R . t)
   (ditaa . t)
   (dot . t)
   (emacs-lisp . t)
   (gnuplot . t)
   (haskell . nil)
   (mscgen . t)
   (latex . t) 
   (ocaml . nil)
   (perl . t)
   (python . t)
   (ruby . nil)
   (screen . nil)
   (sh . t)
   (sql . nil)
   (sqlite . nil)))

;; org-babel hook
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images)

;; use Cairo graphics device by default,which can get better graphics quality.
;; you shoule add require(Cairo) to you ~/.Rprofile
(setq org-babel-R-graphics-devices
  '((:bmp bmp filename)
(:jpg jpeg filename)
(:jpeg jpeg filename)
(:tikz tikz file)
(:tiff tiff filename)
(:png CairoPNG filename)
(:svg CairoSVG file)
(:pdf CairoPDF file)
(:ps CairoPS file)
(:postscript postscript file)))

;;export
(setq org-default-language zh-CN)

;; html
(setq org-html-coding-system 'utf-8)
(setq org-html-head-include-default-style nil)
(setq org-html-head-include-scripts nil)

;; latex
(setq org-latex-coding-system 'utf-8)
(setq org-latex-date-format %Y-%m-%d)
(setq org-export-with-LaTeX-fragments 'imagemagick)
(setq org-latex-create-formula-image-program 'imagemagick)
(setq org-latex-pdf-process '(xelatex -interaction nonstopmode 
-output-directory %o %f 
 xelatex -interaction nonstopmode 
-output-directory %o %f 
 xelatex -interaction nonstopmode 
-output-directory %o %f))


(add-to-list 'org-latex-classes
 '(ctexart
   \\documentclass{ctexart}
   (\\section{%s} . \\section*{%s})
   (\\subsection{%s} . \\subsection*{%s})
   (\\subsubsection{%s} . \\subsubsection*{%s})
   (\\paragraph{%s} . \\paragraph*{%s})
   (\\subparagraph{%s} . \\subparagraph*{%s})))
(add-to-list 'org-latex-classes
 '(ctexrep
   \\documentclass{ctexrep}
   (\\part{%s} . \\part*{%s})
   (\\chapter{%s} . \\chapter*{%s})
   (\\section{%s} . \\section*{%s})
   (\\subsection{%s} . \\subsection*{%s})
   (\\subsubsection{%s} . \\subsubsection*{%s})))
(add-to-list 'org-latex-classes
 '(ctexbook
   \\documentclass{ctexbook}
   (\\part{%s} . \\part*{%s})
   (\\chapter{%s} . \\chapter*{%s})
  

Re: [O] org-mime

2013-05-16 Thread Joseph Vidal-Rosset
2013/5/16 Feng Shu tuma...@gmail.com

 Your setting may be  same as  my emacs configure ,I use 1. gnus +
 offlineimap + dovecot + gmail + org-contacts.el 2. org-mode + xelatex
 May be my configure can help you


Of course it could be helpful and I thank you warmly for your email. At the
moment I'm using neither offlineimap neither xelatex, but why not.
My worry of the day is to understand why, on my laptop only, I meet this
error message of smtp-server not defined; I do not understand, and I see
via Google that I am not alone...
We stay in touch, no doubt that you can help me to succeed in improving my
use of  emacs and LaTeX.

Thanks again !

Jo.


Re: [O] org-mime

2013-05-16 Thread Eric Schulte
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 I thank you Eric and Uwe for your help. Many thanks also to all the
 developers of emacs and org-mode.

 In fact I just spent two days in configuring my emacs24 and gnus. (Eric, I
 did not understand how worked your emacs24-starter-kit , which is a nice
 tool indeed).

 The last problem that I meet on my laptop is  an error message :
 smtp-server not defined , and , until now, I do not find how to fix it :(
 (if someone has a suggestion, thanks in advance).


Maybe you need to define the `smtpmail-smtp-server' variable?  The
following provides fairly simple step-by-step instructions for
configuring gnus to work with gmail.

  http://www.emacswiki.org/emacs/GnusGmail

Gnus provides so many options that it can be daunting to configure.
However a simple configuration (just reading and writing email) should
be simple to configure (and should end up with a short 20 line
configuration).  The trick is to avoid including the sophisticated fancy
extra options until *after* you have the basics working.

Hope this helps,


 My goal is to succeed to stay in emacs, for LaTeX as well as for emails,
 but I have to work again. Every help on LaTeX and emails via org-mode will
 be welcome.


 Best,

 Jo.



 2013/5/15 Eric Schulte schulte.e...@gmail.com

 Uwe Brauer o...@mat.ucm.es writes:

  Eric == Eric Schulte schulte.e...@gmail.com writes:
 
  Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:
 
  -
 
  A while back Org-mode switched its method of exporting latex
 equations
  to HTML.  Equations used to be exported as png images, however they
 are
  now exported as markup which may then be processed on the fly by
  client-side javascript.  Most mail readers do not allow javascript
 in
  html email, and I doubt that the required javascript headers are
  included in the mail html mime part.
 
  I don't know if it is currently possible to do the javascript
  pre-processing as part of the HTML export, but that would probably
 be
  the best solution in this case.
 
  Couldn't the old functionality (converting to png) be reactivated, at
  least optionally?? For me this change are bad news, since the feature
  (to export LaTeX math to something visible) is very important to me and
  even if this approach may have disadvantages, it seems to me more
  universal than the  javascript business.
 

 Indeed the old latex-png functionality is still available, I just had
 to update org-mime to work with the new exporter.  Export of latex to
 attached png images should once again be working in the master branch of
 the git repo.

 Best,

 
 
  Uwe Brauer
 
 

 --
 Eric Schulte
 http://cs.unm.edu/~eschulte



-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] org-mime

2013-05-16 Thread Feng Shu
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 2013/5/16 Feng Shu tuma...@gmail.com

 Your setting may be same as my emacs configure ,I use 1. gnus +
 offlineimap + dovecot + gmail + org-contacts.el 2. org-mode +
 xelatex
 May be my configure can help you

 Of course it could be helpful and I thank you warmly for your email.
 At the moment I'm using neither offlineimap neither xelatex, but why
 not. 
 My worry of the day is to understand why, on my laptop only, I meet
 this error message of smtp-server not defined; I do not understand,
 and I see via Google that I am not alone...

some guess:
1. you can try the newest devel version from gnus.git
2. install gnutls, openssl, and so on
3. Is your authinfo correct?
4. reinstall emacs

 We stay in touch, no doubt that you can help me to succeed in
 improving my use of emacs and LaTeX.

 Thanks again !

 Jo. 

-- 



Re: [O] org-mime

2013-05-16 Thread Joseph Vidal-Rosset
Hi , the solution to the smtp-server not defined was there:

http://lists.gnu.org/archive/html/info-gnus-english/2010-02/msg00060.html

Re: `smtp-server' not defined
--
*From*:Katsumi Yamaoka*Subject*:Re: `smtp-server' not defined *Date*:Thu,
18 Feb 2010 20:11:42 +0900*User-agent*:Gnus/5.110011 (No Gnus v0.11)
Emacs/23.1.92 (gnu/linux)
--

* evan wrote:*
* Any idea why I get the message `smtp-server' not defined when I try*
* to send mail via gnus? I have tried to see what is wrong but I cannot*
* find anything.*

Remove smtpmail.el(c) that comes from the FLIM package (not the
one of Emacs).  You can find it by performing:

M-x locate-library RET smtpmail RET

The FLIM package contains the different version of smtpmail.el,
that issues the error message in question, though it will not be
installed normally.


-- end of quotation.

Thanks to all of you,

I will work on emacs and gnus next days ( it is very time consuming ).

Jo.



2013/5/16 Feng Shu tuma...@gmail.com

 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

  2013/5/16 Feng Shu tuma...@gmail.com
 
  Your setting may be same as my emacs configure ,I use 1. gnus +
  offlineimap + dovecot + gmail + org-contacts.el 2. org-mode +
  xelatex
  May be my configure can help you
 
  Of course it could be helpful and I thank you warmly for your email.
  At the moment I'm using neither offlineimap neither xelatex, but why
  not.
  My worry of the day is to understand why, on my laptop only, I meet
  this error message of smtp-server not defined; I do not understand,
  and I see via Google that I am not alone...

 some guess:
 1. you can try the newest devel version from gnus.git
 2. install gnutls, openssl, and so on
 3. Is your authinfo correct?
 4. reinstall emacs

  We stay in touch, no doubt that you can help me to succeed in
  improving my use of emacs and LaTeX.
 
  Thanks again !
 
  Jo.

 --



Re: [O] org-mime

2013-05-15 Thread Eric Schulte
Uwe Brauer o...@mat.ucm.es writes:

 Eric == Eric Schulte schulte.e...@gmail.com writes:

 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:
 
 -

 A while back Org-mode switched its method of exporting latex equations
 to HTML.  Equations used to be exported as png images, however they are
 now exported as markup which may then be processed on the fly by
 client-side javascript.  Most mail readers do not allow javascript in
 html email, and I doubt that the required javascript headers are
 included in the mail html mime part.

 I don't know if it is currently possible to do the javascript
 pre-processing as part of the HTML export, but that would probably be
 the best solution in this case.

 Couldn't the old functionality (converting to png) be reactivated, at
 least optionally?? For me this change are bad news, since the feature
 (to export LaTeX math to something visible) is very important to me and
 even if this approach may have disadvantages, it seems to me more
 universal than the  javascript business.


Indeed the old latex-png functionality is still available, I just had
to update org-mime to work with the new exporter.  Export of latex to
attached png images should once again be working in the master branch of
the git repo.

Best,



 Uwe Brauer 



-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] org-mime

2013-05-14 Thread Joseph Vidal-Rosset
2013/5/13 Eric Schulte schulte.e...@gmail.com

 A while back Org-mode switched its method of exporting latex equations
 to HTML.  Equations used to be exported as png images, however they are
 now exported as markup which may then be processed on the fly by
 client-side javascript.  Most mail readers do not allow javascript in
 html email, and I doubt that the required javascript headers are
 included in the mail html mime part.


Thanks Eric for your precise reply. Does it means that there is a sort of
bug in Thunderbrid or that another configuration of Thunderbird could solve
this problem? In this case, I consider that I can write succesfully LaTeX
equations in Gnus or Wanderlust and that is a good news !

Thanks again.

Jo.


Re: [O] org-mime

2013-05-14 Thread Uwe Brauer
 Eric == Eric Schulte schulte.e...@gmail.com writes:

Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

-

A while back Org-mode switched its method of exporting latex equations
to HTML.  Equations used to be exported as png images, however they are
now exported as markup which may then be processed on the fly by
client-side javascript.  Most mail readers do not allow javascript in
html email, and I doubt that the required javascript headers are
included in the mail html mime part.

I don't know if it is currently possible to do the javascript
pre-processing as part of the HTML export, but that would probably be
the best solution in this case.

Couldn't the old functionality (converting to png) be reactivated, at
least optionally?? For me this change are bad news, since the feature
(to export LaTeX math to something visible) is very important to me and
even if this approach may have disadvantages, it seems to me more
universal than the  javascript business.


Uwe Brauer 




Re: [O] org-mime

2013-05-13 Thread Eric Schulte
Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

Hello,

I just made a clean installation of org packages and contrib in order
to
be able to convert latex equations in gnus. But I meet the following
problem that I am going to describe:

Generating a png image seems to work via M-x org-preview-latex-fragment
\begin{equation} ((A \to B) \to A) \to A \end{equation}

But with M-x org-mime-htmlize, the png image is not loaded. Why? Your
help is welcome.

-

A while back Org-mode switched its method of exporting latex equations
to HTML.  Equations used to be exported as png images, however they are
now exported as markup which may then be processed on the fly by
client-side javascript.  Most mail readers do not allow javascript in
html email, and I doubt that the required javascript headers are
included in the mail html mime part.

I don't know if it is currently possible to do the javascript
pre-processing as part of the HTML export, but that would probably be
the best solution in this case.

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



[O] org-mime

2013-05-12 Thread Joseph Vidal-Rosset

Hello,



I just made a clean installation of org packages and contrib in order to
be able to convert latex equations in gnus. But I meet the following
problem that I am going to describe:



Generating a png image seems to work via M-x org-preview-latex-fragment


\begin{equation}
((A \to B) \to A) \to A
\end{equation}


But with M-x org-mime-htmlize, the png image is not loaded. Why? Your
help is welcome. 







Re: [O] org-mime-htmlize

2013-01-01 Thread Bastien
Hi George,

George McNinch gmcni...@gmail.com writes:

 I waited for a new org-plus-contrib elpa package to try this...  I
 installed the new one just now, and

   M-x org-mime-htmlize 

 in a message buffer now gives a Wrong number of arguments error.

 Maybe I've done something boneheaded, but I can't work out what it is...

I fixed this, the first patch applied was wrong.

Thanks for reporting this error!

-- 
 Bastien



Re: [O] org-mime-htmlize

2013-01-01 Thread Bastien
Hi George,

George McNinch gmcni...@gmail.com writes:

 I git cloned just now, compiled, restarted emacs.

 Now when I do M-x org-mime-htmlize in a message buffer, I get

org-export-as-org: Wrong type argument: listp, string

I forgot org-export-as-org -- this should now be fixed.
Also for org-export-as-docbook...  

 (Is a backtrace useful?)

It should not be this time, but for other errors yes!

Thanks,

-- 
 Bastien



Re: [O] org-mime-htmlize

2013-01-01 Thread George McNinch
Hi Bastien,

 I waited for a new org-plus-contrib elpa package to try this...
 I installed the new one just now, and
 
 M-x org-mime-htmlize
 
 in a message buffer now gives a Wrong number of arguments
 error.

Bastien I fixed this, the first patch applied was wrong.

I git cloned just now, compiled, restarted emacs.

Now when I do M-x org-mime-htmlize in a message buffer, I get

   org-export-as-org: Wrong type argument: listp, string

(Is a backtrace useful?)

-g


-- 
  George McNinch gmcni...@gmail.com
  http://gmcninch.math.tufts.edu 



Re: [O] org-mime-htmlize

2012-12-31 Thread George McNinch
Hi,

Concerning:

Bastien Hi George, thanks for reporting this.

Bastien Eric Schulte schulte.e...@gmail.com writes:

 From cf2128fb320f714f78fa54b953405d01fa73bf33 Mon Sep 17 00:00:00
 2001 From: Eric Schulte eric.schu...@gmx.com Date: Fri, 28 Dec
 2012 08:20:56 -0700 Subject: [PATCH] Pass the dir option on
 through org-export-as-string
 
 * lisp/org-exp.el (org-export-string): Pass the dir option on
 through to any subsequent export functions.

Bastien Applied, thanks!

I waited for a new org-plus-contrib elpa package to try this...  I
installed the new one just now, and

  M-x org-mime-htmlize 

in a message buffer now gives a Wrong number of arguments error.

Maybe I've done something boneheaded, but I can't work out what it is...

Here is a backtrace: 



backtrace-dec31
Description: Binary data

-george


-- 
  George McNinch gmcni...@gmail.com
  http://gmcninch.math.tufts.edu 


[O] org-mime-htmlize

2012-12-28 Thread George McNinch
Hi--

I did a clean install of elpa package

  org-plus-contrib-20121224

(i.e. removed old package, restarted emacs with -q flag, installed above
package, restarted emacs again...)

Then I started gnus, started composing a message, and executed the command

  M-x org-mime-htmlize

The result is the following error:

  org-export-as-html: Wrong type argument: stringp, t

Here is the backtrace:



backtrace
Description: Binary data

-gm


-- 
  George McNinch gmcninch(at)gmail.com
  http://gmcninch.math.tufts.edu 


Re: [O] org-mime-htmlize

2012-12-28 Thread Eric Schulte
George McNinch gmcni...@gmail.com writes:

 Hi--

 I did a clean install of elpa package

   org-plus-contrib-20121224

 (i.e. removed old package, restarted emacs with -q flag, installed above
 package, restarted emacs again...)

 Then I started gnus, started composing a message, and executed the command

   M-x org-mime-htmlize

 The result is the following error:

   org-export-as-html: Wrong type argument: stringp, t

 Here is the backtrace:


Thanks for the report.

This looks like a bug in `org-export-as-html', specifically in line 1258
or so of org-html.el the following form returns t while its calling
function requires a string argument.

  (or pub-dir (org-export-directory :html opt-plist))

The attached patch should fix this problem, and should be an improvement
generally, but I'll wait for someone more familiar with the export
system than myself to approve and apply it.

Best,

From cf2128fb320f714f78fa54b953405d01fa73bf33 Mon Sep 17 00:00:00 2001
From: Eric Schulte eric.schu...@gmx.com
Date: Fri, 28 Dec 2012 08:20:56 -0700
Subject: [PATCH] Pass the dir option on through org-export-as-string

* lisp/org-exp.el (org-export-string): Pass the dir option on through to
  any subsequent export functions.
---
 lisp/org-exp.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index f7155b0..3dc9a98 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -3050,7 +3050,7 @@ to the value of `temporary-file-directory'.
 	  (eval ;; convert to fmt -- mimicking `org-run-like-in-org-mode'
 	   (list 'let org-local-vars
 		 (list (intern (format org-export-as-%s fmt))
-		   nil nil nil ''string t
+		   nil nil nil ''string t dir
   (delete-file tmp-file
 
 ;;;###autoload
-- 
1.8.0.2


-- 
Eric Schulte
http://cs.unm.edu/~eschulte


Re: [O] org-mime-htmlize

2012-12-28 Thread Bastien
Hi George,

thanks for reporting this.

Eric Schulte schulte.e...@gmail.com writes:

 From cf2128fb320f714f78fa54b953405d01fa73bf33 Mon Sep 17 00:00:00 2001
 From: Eric Schulte eric.schu...@gmx.com
 Date: Fri, 28 Dec 2012 08:20:56 -0700
 Subject: [PATCH] Pass the dir option on through org-export-as-string

 * lisp/org-exp.el (org-export-string): Pass the dir option on through to
   any subsequent export functions.

Applied, thanks!

-- 
 Bastien



[O] org-mime and linked files

2012-08-22 Thread Bart Bunting
Good morning,

I am trying to setup org-mime to send html email.

In the simple case it appears to work very well.
However I am struggling when I try and include a link to a file in the email.

When I hit send I get the following error:
mm-insert-file-contents: Opening input file: No such file or directory,
/var/folders/t6/_1lpjhbj45d10st5clmr5zzhgn/T/file:/tmp/netplan-yearly-graphs.png

The contents of the email is below.  Can anyone give me an idea as to
what might be going wrong here?

-

- Another graph

Lets link to it:

[[file:/tmp/netplan-yearly-graphs.png]]

and it should be there
-

Kind regards

Bart
-- 


Kind regards

Bart



Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-12 Thread Uwe Brauer
 On Wed, 11 Apr 2012 09:38:46 -0400, Eric Schulte eric.schu...@gmx.com 
 wrote:

Hi Uwe,
Uwe Brauer o...@mat.ucm.es writes:


OK, for my own edification I had changed the message body from
(I'm hoping these are sufficiently quoted to survive mailing)

,[original]
| 
| 
|   text alternative...
| 
| html alternative... |

|   images for html...
`

to

,[revised (and more broken in TB)]
| 
| 
|   text alternative...
| 
|

|   html alternative...
|   images for html...
| 
| 
`

which wraps the html and images into a multipart/related type.

Why is this later structure illegal?  Are nested multi type parts not
allowed?  Also, it seems that everything I've tried works in gnus and in
most web user agents.  Is thunderbird simply a stickler for the letter
of the RFC law?


I cannot answer this. However I rechecked everything and the
issue is the following.

Which brings me to the good news. After I wrote to you
I received a message from the TB developers which
emphasised that, besides the information I have gave
you, the main point is the header, which should be

Content-type: multipart/related; boundary==-=-=
and the thunderbird developers insist that this is the 
RFC 2387 standard.

Gnus actually generate  via the mml-generate-mime function
the header 
Content-type: multipart/mixed; boundary==-=-=
which is wrong.


OK, I've just reverted my change, but I'm keeping the change of image
disposition to inline.


I own you an apology!  If I leave mml-generate-mime
untouched, that is I neither use my modification nor do I
use  use Lars new code, but  I use your *new* code then the
generated and sent message is displayed *correctly* in
thunderbird.

The resulting  message contains 

Content-type: multipart/alternative; boundary==-=-=

Instead of 

Content-type: multipart/related; boundary==-=-=

As it would in my case, but it seems that thunderbird is OK
with that.

The reason I wrote you earlier that your changes made things
worse was that I did make a mistake in my modification of
mml-generate-mime. I also thought I checked your code with
the old mml function but  for some reason the old version was
not used even after a restart.

Sorry for the trouble!

Uwe 




Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-12 Thread Eric Schulte
Uwe Brauer o...@mat.ucm.es writes:

 On Wed, 11 Apr 2012 09:38:46 -0400, Eric Schulte eric.schu...@gmx.com 
 wrote:

 Hi Uwe,
 Uwe Brauer o...@mat.ucm.es writes:
 

 OK, for my own edification I had changed the message body from
 (I'm hoping these are sufficiently quoted to survive mailing)

 ,[original]
 | 
 | 
 |   text alternative...
 | 
 | html alternative... |

 |   images for html...
 `

 to

 ,[revised (and more broken in TB)]
 | 
 | 
 |   text alternative...
 | 
 |

 |   html alternative...
 |   images for html...
 | 
 | 
 `

 which wraps the html and images into a multipart/related type.

 Why is this later structure illegal?  Are nested multi type parts not
 allowed?  Also, it seems that everything I've tried works in gnus and in
 most web user agents.  Is thunderbird simply a stickler for the letter
 of the RFC law?


 I cannot answer this. However I rechecked everything and the
 issue is the following.
 
 Which brings me to the good news. After I wrote to you
 I received a message from the TB developers which
 emphasised that, besides the information I have gave
 you, the main point is the header, which should be
 
 Content-type: multipart/related; boundary==-=-=
 and the thunderbird developers insist that this is the 
 RFC 2387 standard.
 
 Gnus actually generate  via the mml-generate-mime function
 the header 
 Content-type: multipart/mixed; boundary==-=-=
 which is wrong.
 

 OK, I've just reverted my change, but I'm keeping the change of image
 disposition to inline.


 I own you an apology!  If I leave mml-generate-mime
 untouched, that is I neither use my modification nor do I
 use  use Lars new code, but  I use your *new* code then the
 generated and sent message is displayed *correctly* in
 thunderbird.

 The resulting  message contains 

 Content-type: multipart/alternative; boundary==-=-=

 Instead of 

 Content-type: multipart/related; boundary==-=-=

 As it would in my case, but it seems that thunderbird is OK
 with that.

 The reason I wrote you earlier that your changes made things
 worse was that I did make a mistake in my modification of
 mml-generate-mime. I also thought I checked your code with
 the old mml function but  for some reason the old version was
 not used even after a restart.

 Sorry for the trouble!

 Uwe 


Hi Uwe,

No problem at all.  I just reverted by reversion in git, so if I read
this email correctly everything should be working now in TB.  Please let
me know if this is not the case.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-11 Thread Eric Schulte
Uwe Brauer o...@mat.ucm.es writes:

 On Sun, 01 Apr 2012 12:38:12 -0400, Eric Schulte eric.schu...@gmx.com 
 wrote:
 

 I'm not clear on how this differs from the messages produced using
 org-mime-htmlize, and it has been a while since I've looked into email
 mime mechanics.  However, since the emails generated using
 org-mime-htmlize display correctly in Gmail and in gnus I'm inclined to
 say that this is a Thunderbird issue and leave it for them to debug.

 I send a bug report to the Thunderbird developer and the
 answer was that *one* source of the problem is 

 ,
 | Here, the message has a multipart/mixed structure at the top
 | with cid: references to the image/png part which is inside
 | that structure (the text/html part is correctly in a
 | multipart/alternative but there is no multipart/related;
 | both images are in the multipart/mixed context). Also, the
 | images have a Content-Disposition: attachment, both
 | reasons to show them as attachment as Thunderbird does it.
 | 
 | Now it seems that Gmail completely ignores multipart/related
 | vs. mixed and simply takes the reference regardless of that
 | context, which would explain what you see. Strictly
 | speaking, the message is incorrectly formed. Please file a
 | bug with Emacs, the latexit structure appears to be correct.
 `


 So how could Content-Disposition: attachment be changed to
 Content-Disposition: inline in your code? I can't find the
 relevant piece of code.

 Thanks

 Uwe 


Hi Uwe,

Thanks for sending along this helpful review.  I've just pushed two
changes to org-mime so that it now (1) wraps html and images in a
multipart/related mime structure and (2) marks images as disposition
inline so that they don't show up as attachments.

I can confirm this new version works in gnus and in the gmx webmail
client as expected, but I don't have access to Thunderbird to check the
behavior there.  Please let me know if this fixes the problem.

Thanks,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-11 Thread Uwe Brauer
 On Wed, 11 Apr 2012 00:23:54 -0400, Eric Schulte eric.schu...@gmx.com 
 wrote:

Uwe Brauer o...@mat.ucm.es writes:

Uwe 


Hi Uwe,

Thanks for sending along this helpful review.  I've just pushed two
changes to org-mime so that it now (1) wraps html and images in a
multipart/related mime structure and (2) marks images as disposition
inline so that they don't show up as attachments.

Hi Eric, 

Thanks for your efforts. I have good and bad news. The bad
news is your changes make things worse in Thunderbird, for
reasons I don't understand the header of the resulting
messages reads:
Content-type: text/plain; charset=us-ascii
which is wrong and now png are displayed!

Which brings me to the good news. After I wrote to you I
received a message from  the TB developers  which emphasised
that, besides the information I have gave you, the main
point is the header, which should be 

  Content-type: multipart/related; boundary==-=-=
 and the thunderbird developers insist that this is the 
 RFC 2387 standard.

Gnus actually generate  via the mml-generate-mime function
the header 
  Content-type: multipart/mixed; boundary==-=-=
which is wrong.

I brought up the issue in the gnus mailing list and the
developers agreed that in the case of a html message with
png the Content-type should follow the RFC standard.

I checked this explicitly: your old code but with a different
mml-generate-mime function generates a message which is
correctly displayed in thunderbird and GMail and Ipod for
that manner. 

BTW I don't know how this issue, of the Content-type in the
header,  is treated in VM or Wanderlust.

Now the question is how to proceed:
I had the idea of introducing a new variable mml-mime-use-related and wrap it
into the mml-generate-mime code. Then org-mime-htmlize
should set this variable to t, and later a different
function should be added to the mail-send-hook setting the
variable to nil again.

Lars didn't like the idea and came up with a different
implementation. However I don't see how to use it easily. So
I include both solutions and let you decide which fits best
for org-mime-htmlize.
But as it is now you should undo your recent changes because
even with  the *new* mml-generate-mime function and your
*new* code the resulting mail is not displayed correctly in
TB.

I have now added lars and the ding mailing list to the CC.

Regards

Uwe 

My solution:
,
| (defvar mml-mime-use-related t
| *Variable to control whether to use `multipart/mixed' or 
`multipart/related'.)
| 
| (defun mml-generate-mime ()
|   Generate a MIME message based on the current MML document.
|   (let ((cont (mml-parse))
|   (mml-multipart-number mml-multipart-number))
| (if (not cont)
|   nil
|   (mm-with-multibyte-buffer
|   (if (and (consp (car cont))
|(= (length cont) 1))
|   (mml-generate-mime-1 (car cont))
| (if mml-mime-use-related
| (mml-generate-mime-1 (nconc (list 'multipart '(type . 
related))
|   
  cont))
|   (mml-generate-mime-1 (nconc (list 'multipart '(type . 
mixed))
|   
cont)))
|   (buffer-string))
`


Lars solution 

,
| (defun mml-generate-mime (optional multipart-type)
|   Generate a MIME message based on the current MML document.
| MULTIPART-TYPE defaults to \mixed\, but can also
| be \related\ or \alternate\.
|   (let ((cont (mml-parse))
|   (mml-multipart-number mml-multipart-number)
|   (options message-options))
| (if (not cont)
|   nil
|   (prog1
| (mm-with-multibyte-buffer
|   (setq message-options options)
|   (if (and (consp (car cont))
|(= (length cont) 1))
|   (mml-generate-mime-1 (car cont))
| (mml-generate-mime-1
|  (nconc (list 'multipart (cons 'type (or multipart-type mixed)))
| cont)))
|   (setq options message-options)
|   (buffer-string))
|   (setq message-options options)
`




Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-11 Thread Eric Schulte
Hi Uwe,

Uwe Brauer o...@mat.ucm.es writes:

 On Wed, 11 Apr 2012 00:23:54 -0400, Eric Schulte eric.schu...@gmx.com 
 wrote:

 Uwe Brauer o...@mat.ucm.es writes:
 
 Uwe 
 

 Hi Uwe,

 Thanks for sending along this helpful review.  I've just pushed two
 changes to org-mime so that it now (1) wraps html and images in a
 multipart/related mime structure and (2) marks images as disposition
 inline so that they don't show up as attachments.

 Hi Eric, 

 Thanks for your efforts. I have good and bad news. The bad
 news is your changes make things worse in Thunderbird, for
 reasons I don't understand the header of the resulting
 messages reads:
 Content-type: text/plain; charset=us-ascii
 which is wrong and now png are displayed!


OK, for my own edification I had changed the message body from
(I'm hoping these are sufficiently quoted to survive mailing)

,[original]
| |   text alternative...
| |   images for html...
`

to

,[revised (and more broken in TB)]
| | `

which wraps the html and images into a multipart/related type.

Why is this later structure illegal?  Are nested multi type parts not
allowed?  Also, it seems that everything I've tried works in gnus and in
most web user agents.  Is thunderbird simply a stickler for the letter
of the RFC law?


 Which brings me to the good news. After I wrote to you I
 received a message from  the TB developers  which emphasised
 that, besides the information I have gave you, the main
 point is the header, which should be 

   Content-type: multipart/related; boundary==-=-=
  and the thunderbird developers insist that this is the 
  RFC 2387 standard.

 Gnus actually generate  via the mml-generate-mime function
 the header 
   Content-type: multipart/mixed; boundary==-=-=
 which is wrong.


OK, I've just reverted my change, but I'm keeping the change of image
disposition to inline.


 I brought up the issue in the gnus mailing list and the
 developers agreed that in the case of a html message with
 png the Content-type should follow the RFC standard.

 I checked this explicitly: your old code but with a different
 mml-generate-mime function generates a message which is
 correctly displayed in thunderbird and GMail and Ipod for
 that manner. 


OK.  Then I will assume that this issue is out of my hands and wait for
gnus to change its mime wrapping behavior upstream.


 BTW I don't know how this issue, of the Content-type in the
 header,  is treated in VM or Wanderlust.


I do my best to provide reasonable implementations for these other two
mailers and assume that if anything goes wrong then someone will submit
a bug report.


 Now the question is how to proceed:
 I had the idea of introducing a new variable mml-mime-use-related and wrap it
 into the mml-generate-mime code. Then org-mime-htmlize
 should set this variable to t, and later a different
 function should be added to the mail-send-hook setting the
 variable to nil again.

 Lars didn't like the idea and came up with a different
 implementation. However I don't see how to use it easily. So
 I include both solutions and let you decide which fits best
 for org-mime-htmlize.
 But as it is now you should undo your recent changes because
 even with  the *new* mml-generate-mime function and your
 *new* code the resulting mail is not displayed correctly in
 TB.

 I have now added lars and the ding mailing list to the CC.


While Lars' solution does look cleaner it is not clear to me how this
would be used from an external tool (such as org-mime) which does not
call `mml-generate-mime' explicitly, but rather relies on the normal
mailing process to handle these specifics.  Wouldn't it make the most
sense for the mailing process to inspect the email and set the
appropriate multipart type automatically.

Thanks,


 Regards

 Uwe 

 My solution:
 ,
 | (defvar mml-mime-use-related t
 | *Variable to control whether to use `multipart/mixed' or 
 `multipart/related'.)
 | 
 | (defun mml-generate-mime ()
 |   Generate a MIME message based on the current MML document.
 |   (let ((cont (mml-parse))
 | (mml-multipart-number mml-multipart-number))
 | (if (not cont)
 | nil
 |   (mm-with-multibyte-buffer
 | (if (and (consp (car cont))
 |  (= (length cont) 1))
 | (mml-generate-mime-1 (car cont))
 |   (if mml-mime-use-related
 |   (mml-generate-mime-1 (nconc (list 'multipart '(type . 
 related))
 | 
   cont))
 | (mml-generate-mime-1 (nconc (list 'multipart '(type . 
 mixed))
 | 
 cont)))
 | (buffer-string))
 `


 Lars solution 

 ,
 | (defun mml-generate-mime (optional multipart-type)
 |   Generate a MIME message based on the current MML document.
 | MULTIPART-TYPE defaults 

Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-10 Thread Uwe Brauer
 On Sun, 01 Apr 2012 12:38:12 -0400, Eric Schulte eric.schu...@gmx.com 
 wrote:


I'm not clear on how this differs from the messages produced using
org-mime-htmlize, and it has been a while since I've looked into email
mime mechanics.  However, since the emails generated using
org-mime-htmlize display correctly in Gmail and in gnus I'm inclined to
say that this is a Thunderbird issue and leave it for them to debug.

I send a bug report to the Thunderbird developer and the
answer was that *one* source of the problem is 

,
| Here, the message has a multipart/mixed structure at the top
| with cid: references to the image/png part which is inside
| that structure (the text/html part is correctly in a
| multipart/alternative but there is no multipart/related;
| both images are in the multipart/mixed context). Also, the
| images have a Content-Disposition: attachment, both
| reasons to show them as attachment as Thunderbird does it.
| 
| Now it seems that Gmail completely ignores multipart/related
| vs. mixed and simply takes the reference regardless of that
| context, which would explain what you see. Strictly
| speaking, the message is incorrectly formed. Please file a
| bug with Emacs, the latexit structure appears to be correct.
`


So how could Content-Disposition: attachment be changed to
Content-Disposition: inline in your code? I can't find the
relevant piece of code.

Thanks

Uwe 






Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-01 Thread Uwe Brauer

Eric Schulte wrote:

 However thunderbird does not and I apply the resulting eml
 file below (I presume a screenshot is not appropriated)


 This sounds like a thunderbird bug -- not properly displaying multi-part
 messages.

Hm I will try to send them a bug report then


 Now tunderbird itself has an extension (latex-it) which does
 something similar to org-mime-htmlize, it sends latex math
 as png. However there are better* displayed, I attach the
 relevant eml file below.


 The difference between org-mime-htmlize and latex-it is that the former
 converts each formulas to its own png image, while the later converts
 the entire message to one large pdf file which is then attached as a
 single image.


yes and no: latexit can do what you describe (and the author admits that 
it only makes sense for documents whose size does not exceed one page. 
latexit can also embed in html pages latex formulas, however only
$$ are allowed no equations (which makes it inferior to 
org-preview-latex-fragments)


In any case I attached the wrong eml file (the one with just one page) I 
now attach the eml with the embedded formula. Maybe some useful 
information can be extracted.


Uwe Brauer

---BeginMessage---


  
  
Integral 


And 

  

---End Message---


Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-04-01 Thread Eric Schulte

 yes and no: latexit can do what you describe (and the author admits
 that it only makes sense for documents whose size does not exceed one
 page. latexit can also embed in html pages latex formulas, however
 only $$ are allowed no equations (which makes it inferior to
 org-preview-latex-fragments)

 In any case I attached the wrong eml file (the one with just one page)
 I now attach the eml with the embedded formula. Maybe some useful
 information can be extracted.


I'm not clear on how this differs from the messages produced using
org-mime-htmlize, and it has been a while since I've looked into email
mime mechanics.  However, since the emails generated using
org-mime-htmlize display correctly in Gmail and in gnus I'm inclined to
say that this is a Thunderbird issue and leave it for them to debug.

Sorry I'm not more helpful,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-mime-htmlize: visual representation (thunderbird)

2012-03-31 Thread Eric Schulte
Uwe Brauer o...@mat.ucm.es writes:

 Hello

 Now that the bug in org-mime-htmlize is fixed, I would like
 to comment on the visual representation. Most likely this
 has to do with the mml package.

 When I write the following message 
 Integral


 $$\int fdx=0$$
 And


 \begin{equation} 
 \sum_{\alpha} 
 \end{equation}

 and apply org-preview-latex-fragment and then
 org-mime-htmlize and send this message to gmail. 
 The 'gmail-reader' displays them fine.

 However thunderbird does not and I apply the resulting eml 
 file below (I presume a screenshot is not appropriated)


This sounds like a thunderbird bug -- not properly displaying multi-part
messages.


 Now tunderbird itself has an extension (latex-it) which does
 something similar to org-mime-htmlize, it sends latex math
 as png. However there are better* displayed, I attach the
 relevant eml file below.


The difference between org-mime-htmlize and latex-it is that the former
converts each formulas to its own png image, while the later converts
the entire message to one large pdf file which is then attached as a
single image.


 Could org-mime-htmlize use the structure of latex-it?


The ability to convert the entire message to one monolithic image
(through latex and pdf) could certainly be added as an export option
(patches welcome), but I would not want this behavior to be the default,
as sending messages as large images is not (to my mind at least) a
desirable option.

Best,


 Thanks

 Uwe Brauer 

 Attachments: first org, then latex-it


 From: Uwe Brauer o...@mat.ucm.es
 Subject: test-org-mime
 To: Uwe Brauer oub.oub@gmail.com
 Date: Tue, 27 Mar 2012 12:55:48 +0200 (4 days, 6 hours, 13 minutes ago)
 Reply-To: Uwe Brauer o...@mat.ucm.es

 Integral 

 $$\int fdx=0$$ 
 And

 \begin{equation}
 \sum_{\alpha}
 \end{equation}


 --


 From: Uwe Brauer oub.oub@gmail.com
 Subject: test latex
 To: Uwe Brauer oub.oub@gmail.com
 Date: Tue, 27 Mar 2012 12:43:30 +0200 (4 days, 6 hours, 26 minutes ago)

\documentclass{article} \usepackage[utf8x]{inputenc} \pagestyle{empty}
\begin{document} Integral $$\int f dx=0$$ And \begin{equation}
\sum_{\alpha} \end{equation} \end{document}
 --


-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Uwe Brauer
 On Mon, 26 Mar 2012 07:31:19 -0400, Eric Schulte
 eric.schu...@gmx.com wrote:

Uwe Brauer o...@mat.ucm.es writes:


This functionality certainly used to work (and was one of my main
reasons for using org-mime-htmlize).  There is a new error in the
`org-export-string' function when `org-export-with-LaTeX-fragments' is
set to dvipng which is causing export to fail.  To exercise this bug
run the following elisp snippet.

  (let ((org-export-with-LaTeX-fragments dvipng))
(org-export-string A fraction $\\frac{1}{2}$. 'html /tmp/))

Which throws the following error.

  org-format-latex: Unknown conversion type nil for latex fragments

Once this bug is fixed the use of LaTeX to generated inline images with
Org-mime should work once again.

I confirm this error for Xemacs 21.5.31. Is this bug already
being reported and registered?

Thanks

Uwe 




Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Bastien
Eric Schulte eric.schu...@gmx.com writes:

 I am very confused the code in question contains a line of
 the sort:
   (org-export-with-LaTeX-fragments dvipng)

Me too.  This should be 

  (org-export-with-LaTeX-fragments 'dvipng)

Fixed.

Please confirm the original issue is fixed.

Best,

-- 
 Bastien



Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Uwe Brauer
 On Tue, 27 Mar 2012 12:22:53 +0200, Bastien b...@gnu.org wrote:

Eric Schulte eric.schu...@gmx.com writes:
 I am very confused the code in question contains a line of
 the sort:
   (org-export-with-LaTeX-fragments dvipng)

Me too.  This should be 

  (org-export-with-LaTeX-fragments 'dvipng)

Fixed.

Please confirm the original issue is fixed.
I confirm this for Xemacs 21.5.31 (Mule)

Thanks

Uwe 




[O] org-mime-htmlize: visual representation (thunderbird)

2012-03-27 Thread Uwe Brauer
Hello

Now that the bug in org-mime-htmlize is fixed, I would like
to comment on the visual representation. Most likely this
has to do with the mml package.

When I write the following message 
Integral


$$\int fdx=0$$
And


\begin{equation} 
\sum_{\alpha} 
\end{equation}

and apply org-preview-latex-fragment and then
org-mime-htmlize and send this message to gmail. 
The 'gmail-reader' displays them fine.

However thunderbird does not and I apply the resulting eml 
file below (I presume a screenshot is not appropriated)

Now tunderbird itself has an extension (latex-it) which does
something similar to org-mime-htmlize, it sends latex math
as png. However there are better* displayed, I attach the
relevant eml file below.

Could org-mime-htmlize use the structure of latex-it?

Thanks 

Uwe Brauer 

Attachments: first org, then latex-it

---BeginMessage---
Integral 

$$\int fdx=0$$ 
And

\begin{equation}
\sum_{\alpha}
\end{equation}attachment: org-GPEs_h_2696bae90081ac8f178e62db0820e52dd36d4691.pngattachment: org-GPEs_h_baef2fd9f63b971ab4ebc763e998857ceda7aeab.png---End Message---
---BeginMessage---


  
  

  

---End Message---


Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-27 Thread Eric Schulte
Bastien b...@gnu.org writes:

 Eric Schulte eric.schu...@gmx.com writes:

 I am very confused the code in question contains a line of
 the sort:
  (org-export-with-LaTeX-fragments dvipng)

 Me too.  This should be 

   (org-export-with-LaTeX-fragments 'dvipng)

 Fixed.

 Please confirm the original issue is fixed.

 Best,

Confirmed, I can once again send inline LaTeX fragments in email.

Thanks for taking care of this.

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-26 Thread Eric Schulte
Uwe Brauer o...@mat.ucm.es writes:

 On Thu, 22 Mar 2012 23:34:08 +0100, Uwe Brauer o...@mat.ucm.es wrote:


 Now org-mime-htmlize allows me to htmlize a message buffer
 but seems not to work with org-preview-latex-fragment
 either the png is not exported or I obtain an error message
 of the sort:

 Unknown conversion type nil for latex fragments.
 I am very confused the code in question contains a line of
 the sort:
(org-export-with-LaTeX-fragments dvipng)

 Uwe Brauer 
 So the functionality seems to be implemented?


This functionality certainly used to work (and was one of my main
reasons for using org-mime-htmlize).  There is a new error in the
`org-export-string' function when `org-export-with-LaTeX-fragments' is
set to dvipng which is causing export to fail.  To exercise this bug
run the following elisp snippet.

  (let ((org-export-with-LaTeX-fragments dvipng))
(org-export-string A fraction $\\frac{1}{2}$. 'html /tmp/))

Which throws the following error.

  org-format-latex: Unknown conversion type nil for latex fragments

Once this bug is fixed the use of LaTeX to generated inline images with
Org-mime should work once again.

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



[O] org-mime-htmlize and org-preview-latex-fragment

2012-03-22 Thread Uwe Brauer
Hello

I love org-preview-latex-fragment and I would like to use it
for scientific correspondence. There exists a couple of
extensions for Thunderbird which insert latex generated png
into an (html) email.

Now org-mime-htmlize allows me to htmlize a message buffer
but seems not to work with org-preview-latex-fragment
either the png is not exported or I obtain an error message
of the sort:

Unknown conversion type nil for latex fragments.

Is this easy to implement the org-preview-latex-fragment
support for  org-mime-htmlize?

Thanks

Uwe Brauer 




Re: [O] org-mime-htmlize and org-preview-latex-fragment

2012-03-22 Thread Uwe Brauer
 On Thu, 22 Mar 2012 23:34:08 +0100, Uwe Brauer o...@mat.ucm.es wrote:


Now org-mime-htmlize allows me to htmlize a message buffer
but seems not to work with org-preview-latex-fragment
either the png is not exported or I obtain an error message
of the sort:

Unknown conversion type nil for latex fragments.
I am very confused the code in question contains a line of
the sort:
 (org-export-with-LaTeX-fragments dvipng)

Uwe Brauer 
So the functionality seems to be implemented?