From: Tassilo Horn <tassilo@member.fsf.org>
To: emacs-orgmode@gnu.org
Subject: Re: [bug] org-store-link on gnus message fails
Date: Wed, 12 Jan 2011 17:45:17 +0100 [thread overview]
Message-ID: <87bp3moyua.fsf@member.fsf.org> (raw)
In-Reply-To: 87wrmaz0ip.fsf@ucl.ac.uk
Hi Eric,
this patch should do the trick. I think the issue was a malformed Date:
header that couldn't be converted to a timestamp.
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index 32641bf..ae5dc52 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -152,11 +152,16 @@ If `org-store-link' was called with a prefix arg the meaning of
(from (mail-header-from header))
(message-id (org-remove-angle-brackets (mail-header-id header)))
(date (org-trim (mail-header-date header)))
- (date-ts (and date (format-time-string
- (org-time-stamp-format t) (date-to-time date))))
- (date-ts-ia (and date (format-time-string
- (org-time-stamp-format t t)
- (date-to-time date))))
+ (date-ts (and date
+ (condition-case nil
+ (format-time-string
+ (org-time-stamp-format t)
+ (date-to-time date)))))
+ (date-ts-ia (and date
+ (condition-case nil
+ (format-time-string
+ (org-time-stamp-format t t)
+ (date-to-time date)))))
(subject (copy-sequence (mail-header-subject header)))
(to (cdr (assq 'To (mail-header-extra header))))
newsgroups x-no-archive desc link)
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
next prev parent reply other threads:[~2011-01-12 16:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 13:58 [bug] org-store-link on gnus message fails Eric S Fraga
2011-01-12 16:36 ` Tassilo Horn
2011-01-12 16:45 ` Tassilo Horn [this message]
2011-01-12 20:23 ` Eric S Fraga
2011-01-13 8:38 ` Sébastien Vauban
2011-01-14 8:48 ` Eric S Fraga
2011-01-13 11:53 ` [Accepted] " Carsten Dominik
2011-01-13 13:38 ` Tassilo Horn
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=87bp3moyua.fsf@member.fsf.org \
--to=tassilo@member.fsf.org \
--cc=emacs-orgmode@gnu.org \
/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).