* org-mime: improve handling of cc & bcc
@ 2017-01-11 20:20 Matt Price
2017-01-12 20:00 ` Nicolas Goaziou
0 siblings, 1 reply; 4+ messages in thread
From: Matt Price @ 2017-01-11 20:20 UTC (permalink / raw)
To: Org Mode
[-- Attachment #1.1: Type: text/plain, Size: 235 bytes --]
I have been having some trouble with org-mime & mu4e (iv cc & bcc are
empty, then buffer creation fails), and this patch seems to have fixed it.
Not 100% sure that this is really the origin of the problem but it fixed an
issue for me.
[-- Attachment #1.2: Type: text/html, Size: 274 bytes --]
[-- Attachment #2: other-headers-1.patch --]
[-- Type: text/x-patch, Size: 928 bytes --]
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 2ced42ec8..465fb3416 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -257,6 +257,10 @@ otherwise export the entire body."
(to (funcall mp "MAIL_TO"))
(cc (funcall mp "MAIL_CC"))
(bcc (funcall mp "MAIL_BCC"))
+ (other-headers (cond ((and cc bcc) `((cc . ,cc) (bcc . ,bcc)))
+ (cc `((cc . ,cc)))
+ (bcc `((bcc . ,bcc)))
+ (t nil)))
(body (buffer-substring
(save-excursion (goto-char (point-min))
(forward-line 1)
@@ -265,8 +269,7 @@ otherwise export the entire body."
(forward-char))
(point))
(point-max))))
- (org-mime-compose body (or fmt 'org) file to subject
- `((cc . ,cc) (bcc . ,bcc))))))
+ (org-mime-compose body (or fmt 'org) file to subject other-headers))))
(defun org-mime-send-buffer (&optional fmt)
(run-hooks 'org-mime-send-buffer-hook)
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: org-mime: improve handling of cc & bcc
2017-01-11 20:20 org-mime: improve handling of cc & bcc Matt Price
@ 2017-01-12 20:00 ` Nicolas Goaziou
2017-01-12 20:07 ` Kaushal Modi
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Goaziou @ 2017-01-12 20:00 UTC (permalink / raw)
To: Matt Price; +Cc: Org Mode
Hello,
Matt Price <moptop99@gmail.com> writes:
> I have been having some trouble with org-mime & mu4e (iv cc & bcc are
> empty, then buffer creation fails), and this patch seems to have fixed it.
> Not 100% sure that this is really the origin of the problem but it fixed an
> issue for me.
Thank you.
Could you send it again using git format-patch and with a proper commit
message?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-mime: improve handling of cc & bcc
2017-01-12 20:00 ` Nicolas Goaziou
@ 2017-01-12 20:07 ` Kaushal Modi
2017-01-13 1:13 ` Matt Price
0 siblings, 1 reply; 4+ messages in thread
From: Kaushal Modi @ 2017-01-12 20:07 UTC (permalink / raw)
To: Nicolas Goaziou, Matt Price; +Cc: chen bin, Org Mode
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
I happened just recently notice that org-mime was now added to Melpa:
https://melpa.org/#/org-mime
Would it be a better option to send the patches to
https://github.com/org-mime/org-mime and remove org-mime from contrib/ as
discussed here:
https://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg00055.html
?
On Thu, Jan 12, 2017 at 3:01 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:
> Thank you.
>
> Could you send it again using git format-patch and with a proper commit
> message?
>
> Regards,
>
> --
> Nicolas Goaziou
>
> --
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 1322 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: org-mime: improve handling of cc & bcc
2017-01-12 20:07 ` Kaushal Modi
@ 2017-01-13 1:13 ` Matt Price
0 siblings, 0 replies; 4+ messages in thread
From: Matt Price @ 2017-01-13 1:13 UTC (permalink / raw)
To: Kaushal Modi; +Cc: chen bin, Org Mode, Nicolas Goaziou
[-- Attachment #1.1: Type: text/plain, Size: 761 bytes --]
I'm attaching the patch anyway, but of course don't mind moving the PR to
the melpa repo.
On Thu, Jan 12, 2017 at 3:07 PM, Kaushal Modi <kaushal.modi@gmail.com>
wrote:
> I happened just recently notice that org-mime was now added to Melpa:
> https://melpa.org/#/org-mime
>
> Would it be a better option to send the patches to https://github.com/org-
> mime/org-mime and remove org-mime from contrib/ as discussed here:
> https://lists.gnu.org/archive/html/emacs-orgmode/2016-09/msg00055.html
> ?
>
> On Thu, Jan 12, 2017 at 3:01 PM Nicolas Goaziou <mail@nicolasgoaziou.fr>
> wrote:
>
>> Thank you.
>>
>> Could you send it again using git format-patch and with a proper commit
>> message?
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
>>
>> --
>
> Kaushal Modi
>
[-- Attachment #1.2: Type: text/html, Size: 2188 bytes --]
[-- Attachment #2: 0004-org-mime-improve-handling-of-cc-bcc-headers.patch --]
[-- Type: text/x-patch, Size: 1252 bytes --]
From ca4dfa5e5a83fe7243affbf7e34a1435cbc5b00a Mon Sep 17 00:00:00 2001
From: Matt Price <matt.price@utoronto.ca>
Date: Thu, 12 Jan 2017 20:07:55 -0500
Subject: [PATCH 4/4] org-mime: improve handling of cc & bcc headers
---
contrib/lisp/org-mime.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/contrib/lisp/org-mime.el b/contrib/lisp/org-mime.el
index 2ced42ec8..465fb3416 100644
--- a/contrib/lisp/org-mime.el
+++ b/contrib/lisp/org-mime.el
@@ -257,6 +257,10 @@ otherwise export the entire body."
(to (funcall mp "MAIL_TO"))
(cc (funcall mp "MAIL_CC"))
(bcc (funcall mp "MAIL_BCC"))
+ (other-headers (cond ((and cc bcc) `((cc . ,cc) (bcc . ,bcc)))
+ (cc `((cc . ,cc)))
+ (bcc `((bcc . ,bcc)))
+ (t nil)))
(body (buffer-substring
(save-excursion (goto-char (point-min))
(forward-line 1)
@@ -265,8 +269,7 @@ otherwise export the entire body."
(forward-char))
(point))
(point-max))))
- (org-mime-compose body (or fmt 'org) file to subject
- `((cc . ,cc) (bcc . ,bcc))))))
+ (org-mime-compose body (or fmt 'org) file to subject other-headers))))
(defun org-mime-send-buffer (&optional fmt)
(run-hooks 'org-mime-send-buffer-hook)
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-13 1:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-11 20:20 org-mime: improve handling of cc & bcc Matt Price
2017-01-12 20:00 ` Nicolas Goaziou
2017-01-12 20:07 ` Kaushal Modi
2017-01-13 1:13 ` Matt Price
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).