forked from mirrors/org-mode
org-mime: inherit of MAIL_ properties with `org-mime-use-property-inheritance'
* contrib/lisp/org-mime.el (org-mime-use-property-inheritance): User configurable variable to control inheritance of MAIL_ properties. (org-mime-send-subtree): Using new custom variable. (org-mime-subtree): Using new custom variable.
This commit is contained in:
parent
6b5953818b
commit
079c4a026d
|
@ -55,6 +55,11 @@
|
|||
;;; Code:
|
||||
(require 'cl)
|
||||
|
||||
(defcustom org-mime-use-property-inheritance nil
|
||||
"Non-nil means al MAIL_ properties apply also for sublevels."
|
||||
:group 'org-mime
|
||||
:type 'boolean)
|
||||
|
||||
(defcustom org-mime-default-header
|
||||
"#+OPTIONS: latex:t\n"
|
||||
"Default header to control html export options, and ensure
|
||||
|
@ -232,9 +237,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" 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))
|
||||
(to (org-entry-get nil "MAIL_TO" org-mime-use-property-inheritance))
|
||||
(cc (org-entry-get nil "MAIL_CC" org-mime-use-property-inheritance))
|
||||
(bcc (org-entry-get nil "MAIL_BCC" org-mime-use-property-inheritance))
|
||||
(body (buffer-substring
|
||||
(save-excursion (goto-char (point-min))
|
||||
(forward-line 1)
|
||||
|
@ -312,6 +317,6 @@ export that region, otherwise export the entire body."
|
|||
MAIL_FMT property of the subtree."
|
||||
(interactive)
|
||||
(org-mime-send-subtree
|
||||
(or (org-entry-get nil "MAIL_FMT" org-use-property-inheritance) 'org)))
|
||||
(or (org-entry-get nil "MAIL_FMT" org-use-mime-property-inheritance) 'org)))
|
||||
|
||||
(provide 'org-mime)
|
||||
|
|
Loading…
Reference in a new issue