emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Ethan Ligon <ligon@are.berkeley.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Sending org buffer as mail?
Date: Sun, 19 Dec 2010 18:46:44 -0700	[thread overview]
Message-ID: <871v5dusfv.fsf@gmail.com> (raw)
In-Reply-To: <loom.20101219T001941-702@post.gmane.org> (Ethan Ligon's message of "Sat, 18 Dec 2010 23:26:48 +0000 (UTC)")

Ethan Ligon <ligon@are.berkeley.edu> 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.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2010-12-20  1:46 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16  8:04 Sending org buffer as mail? Rainer M Krug
2010-12-16  8:17 ` Oscar Carlsson
2010-12-16  8:25   ` Jeff Horn
2010-12-16  8:54     ` Rainer M Krug
2010-12-16 10:38       ` Oscar Carlsson
2010-12-16 10:41         ` Rainer M Krug
2010-12-16 12:38           ` Rainer M Krug
2010-12-16 13:49             ` Oscar Carlsson
2010-12-16 21:27             ` Sebastian Rose
2010-12-16 21:34             ` Sebastian Rose
2010-12-17  1:06       ` Matt Lundin
2010-12-17  1:27         ` Eric Schulte
2010-12-17  6:48           ` Eric Schulte
2010-12-17  8:57             ` Rainer M Krug
2010-12-17 10:02               ` Eric Schulte
2010-12-17 11:54           ` Matt Lundin
2010-12-17 21:25             ` Eric Schulte
2010-12-19 12:21               ` Niels Giesen
2010-12-19 20:47                 ` Samuel Wales
2010-12-19 23:39                 ` Eric Schulte
2010-12-21 20:55                   ` Niels Giesen
2010-12-27 14:53                     ` Eric Schulte
2010-12-27 18:11                       ` Niels Giesen
2010-12-28  3:58                         ` Eric Schulte
2010-12-27 17:53                     ` Samuel Wales
2010-12-17 14:47           ` Jean-Marie Gaillourdet
2010-12-17 21:26             ` Eric Schulte
2010-12-18 23:26               ` Ethan Ligon
2010-12-20  1:46                 ` Eric Schulte [this message]
2010-12-20 10:20                   ` Sébastien Vauban
2010-12-16 10:37     ` Oscar Carlsson
2010-12-16 13:22       ` Eric Schulte
2010-12-16 13:39         ` Rainer M Krug
2010-12-16 14:45         ` Sébastien Vauban
2010-12-16 14:56           ` Eric Schulte
2010-12-16 16:19             ` Sébastien Vauban
2010-12-16 18:20               ` Eric Schulte
2010-12-16 18:29       ` Jeff Horn

Reply instructions:

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

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

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

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

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

  git send-email \
    --in-reply-to=871v5dusfv.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ligon@are.berkeley.edu \
    /path/to/YOUR_REPLY

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

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

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

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