From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] To-header support in org-gnus-store-link Date: Wed, 3 Sep 2008 11:37:01 +0200 Message-ID: <6FD7C2A0-B14D-444C-8DAF-A08D1EA93AB6@uva.nl> References: <87ljz38g55.fsf@gmail.com> Mime-Version: 1.0 (Apple Message framework v926) Content-Type: multipart/mixed; boundary="===============1612309052==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kaonb-0005hO-Nu for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 05:37:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KaonZ-0005fV-A6 for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 05:37:14 -0400 Received: from [199.232.76.173] (port=56505 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KaonY-0005ep-Vo for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 05:37:13 -0400 Received: from ug-out-1314.google.com ([66.249.92.171]:49629) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KaonY-0005gQ-Qk for emacs-orgmode@gnu.org; Wed, 03 Sep 2008 05:37:13 -0400 Received: by ug-out-1314.google.com with SMTP id m2so2428766uge.17 for ; Wed, 03 Sep 2008 02:37:12 -0700 (PDT) In-Reply-To: <87ljz38g55.fsf@gmail.com> 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: Tommy Lindgren Cc: emacs-orgmode@gnu.org --===============1612309052== Content-Type: multipart/alternative; boundary=Apple-Mail-20--538230957 --Apple-Mail-20--538230957 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Appied, thanks. - Carsten On Aug 11, 2008, at 10:12 PM, Tommy Lindgren wrote: > Hi, > > Patch below adds support for the To-header in org-gnus-store-link. > This > makes %:toname-escapes in remember templates work when invoked from > Gnus. (I have a special template I use when realize I have to finish > a reply later.) > > Haven't written many lines of elisp, not sure if I'm retrieving the > header the right way. The code works for me. > > > diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el > index e1d8232..db78afe 100644 > --- a/lisp/org-gnus.el > +++ b/lisp/org-gnus.el > @@ -87,10 +87,12 @@ negates this setting for the duration of the > command." > (from (mail-header-from header)) > (message-id (mail-header-id header)) > (date (mail-header-date header)) > + (extra (mail-header-extra header)) > + (to (cdr (assoc 'To extra))) > (subject (gnus-summary-subject-string)) > desc link) > (org-store-link-props :type "gnus" :from from :subject subject > - :message-id message-id :group group) > + :message-id message-id :group group :to > to) > (setq desc (org-email-link-description)) > (if (org-xor current-prefix-arg org-usenet-links-prefer-google) > (setq link > > > BTW, org-mode is awesome. > > Regards, > Tommy > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode --Apple-Mail-20--538230957 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Appied, = thanks.

- Carsten

On Aug 11, = 2008, at 10:12 PM, Tommy Lindgren wrote:

Hi,

Patch below adds support for the To-header = in org-gnus-store-link. This
makes %:toname-escapes in remember = templates work when invoked from
Gnus. (I have a special template I = use when realize I have to finish
a reply later.)

Haven't = written many lines of elisp, not sure if I'm retrieving the
header = the right way. The code works for me.


diff --git = a/lisp/org-gnus.el b/lisp/org-gnus.el
index e1d8232..db78afe = 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -87,10 = +87,12 @@ negates this setting for the duration of the
command."
=           (from = (mail-header-from header))
=           (message-id = (mail-header-id header))
=           (date = (mail-header-date header))
+ =          (extra = (mail-header-extra header))
+ =          (to (cdr (assoc = 'To extra)))
=           (subject = (gnus-summary-subject-string))
=           desc = link)
      (org-store-link-props = :type "gnus" :from from :subject subject
- =             &n= bsp;           &nbs= p; :message-id message-id :group group)
+ =             &n= bsp;           &nbs= p; :message-id message-id :group group :to to)
=       (setq desc = (org-email-link-description))
=       (if (org-xor current-prefix-arg = org-usenet-links-prefer-google)
=          (setq = link


BTW, org-mode is = awesome.

Regards,
Tommy


_____________________________= __________________
Emacs-orgmode mailing list
Remember: use `Reply = All' to send replies to the list.
Emacs-orgmode@gnu.org
http://= lists.gnu.org/mailman/listinfo/emacs-orgmode
<= br>
= --Apple-Mail-20--538230957-- --===============1612309052== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1612309052==--