emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: niels giesen <niels.giesen@gmail.com>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Property inheritance for MAIL_FMT, MAIL_TO, MAIL_CC and MAIL_BCC
Date: Thu, 13 Jan 2011 23:47:54 +0100	[thread overview]
Message-ID: <877he8xvxh.fsf@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1773 bytes --]

Hi Eric,

Please see the patch below, it adds property inheritance for all
MAIL_* properties, based on the value of
`org-use-property-inheritance'.

#+begin_src diff
  diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
  index 68a3498..ae430fb 100644
  --- a/contrib/lisp/org-mime.el
  +++ b/contrib/lisp/org-mime.el
  @@ -232,9 +232,9 @@ export that region, otherwise export the entire body."
       (run-hooks 'org-mime-send-subtree-hook)
       (let* ((file (buffer-file-name (current-buffer)))
         (subject (nth 4 (org-heading-components)))
  -      (to (org-entry-get nil "MAIL_TO"))
  -      (cc (org-entry-get nil "MAIL_CC"))
  -      (bcc (org-entry-get nil "MAIL_BCC"))
  +      (to (org-entry-get nil "MAIL_TO" org-use-property-inheritance))
  +      (cc (org-entry-get nil "MAIL_CC" org-use-property-inheritance))
  +      (bcc (org-entry-get nil "MAIL_BCC" org-use-property-inheritance))
         (body (buffer-substring
            (save-excursion (goto-char (point-min))
                    (forward-line 1)
  @@ -311,6 +311,8 @@ export that region, otherwise export the entire body."
     exported to a org format or to the format specified by the
     MAIL_FMT property of the subtree."
     (interactive)
  -  (org-mime-send-subtree (or (org-entry-get nil "MAIL_FMT") 'org)))
  +  (org-mime-send-subtree (or (org-entry-get nil "MAIL_FMT"
  +                       org-use-property-inheritance)
  +                'org)))
   
   (provide 'org-mime)
#+end_src    

The current mail was sent with it, where some parent tree has the
mail_cc set to this list, but the mail_to set to your email address in
the subtree. I believe this functionality can be quite handy.

niels
--
http://pft.github.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 196 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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:[~2011-01-13 22:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 22:47 niels giesen [this message]
2011-01-14  0:11 ` Property inheritance for MAIL_FMT, MAIL_TO, MAIL_CC and MAIL_BCC Eric Schulte
2011-01-14  9:29   ` Sébastien Vauban
2011-01-14 13:32     ` Eric Schulte

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=877he8xvxh.fsf@gmail.com \
    --to=niels.giesen@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

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

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

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

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