emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: Sending org buffer as mail?


From: Eric Schulte
Subject: Re: [Orgmode] Re: Sending org buffer as mail?
Date: Sun, 19 Dec 2010 18:46:44 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Ethan Ligon <address@hidden> writes:

> Eric Schulte <schulte.eric <at> gmail.com> writes:
>> 
>> Jean-Marie Gaillourdet <jmg <at> gaillourdet.net> writes:
>> 
>> > Hi Eric,
>> >
>> > "Eric Schulte" <schulte.eric <at> gmail.com> writes:
>> >
>> >> Hi Matt,
>> >>
>> >> This looks great, how would you feel about trying to fold this into
>> >> org-mime, or would you mind if I did so.  I've already mimicked your
>> >> function to set subjects of outgoing emails to match the title of the
>> >> org-mode buffer.  I think that generalizing the org-mime functions to
>> >> operate over either subtrees or whole files, and to output either html
>> >> or plain text should cover all use cases with maximal code re-use.
>> >
>> > does it also support using ascii exports as text part and the html
>> > export as html part in a multi part message?
>> >
>> 
>> It does now.  In the version I just pushed up an html and ascii export
>> can be accomplished by setting the :MAIL_FMT: property to html-ascii, or
>> by calling either `org-mime-send-buffer' or `org-mime-send-subtree' with
>> 'html-ascii as an argument.
>> 
>
> Eric-
>
> This is just great; thanks!  
>
> Two additional suggestions:
>
> 1. The subject line should be exported as ascii also, to avoid 
>    funky orgmode markup messing things up (I often have links in my
>    headlines, for example).
>

Unfortunately I don't know if any good/easy way to strip out these
emphasis markers.

>
> 2. Could we get some indication that the subtree's been mailed?  I'm
>    thinking of having org-mime-subtree set a property MAIL_SENT to a
>    time stamp or perhaps to the message id.  
>
>    This way, if we inspect the subtree later we'll know if and when
>    it was actually sent.  A possible bonus if we use the message id:
>    when we get to the point of getting replies *back* into the org
>    file it'll be possible to thread things properly.
>

I've added two hooks, `org-mime-send-subtree-hook' and
`org-mime-send-buffer-hook' which can be used to do this, for example
the following

#+begin_src emacs-lisp
  (add-hook 'org-mime-send-subtree-hook
            (lambda ()
              (org-entry-put (point) "mail_sent" (current-time-string))))
#+end_src

will add a mail_sent property with the current time when
org-mime-subtree is called.  The only downside here is that the property
is added before the email is sent, so choosing not to send the email
after reviewing it in the message buffer could result in a misleading
mail_sent property, in fact maybe mail_sent should be changed to
mail_composed.

Cheers -- Eric

>
> -Ethan
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



reply via email to

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