From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Property inheritance for MAIL_FMT, MAIL_TO, MAIL_CC and MAIL_BCC Date: Thu, 13 Jan 2011 17:11:19 -0700 Message-ID: <87vd1s8cz7.fsf@gmail.com> References: <877he8xvxh.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=53847 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdYu6-000241-7l for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 20:56:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdYu4-0004oA-MG for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 20:56:38 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:41406) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdYu4-0004ku-H4 for emacs-orgmode@gnu.org; Thu, 13 Jan 2011 20:56:36 -0500 Received: by iyj17 with SMTP id 17so2335277iyj.0 for ; Thu, 13 Jan 2011 17:56:35 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: niels giesen Cc: emacs-orgmode@gnu.org This is now applied. Thanks for the patch, and for the motivating usage example. -- Eric niels giesen writes: > 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