Browse Source

Require message.el in org-gnus-store-link if needed.

Conflicts:

	lisp/org-gnus.el
Tassilo Horn 16 years ago
parent
commit
118ee1deaf
2 changed files with 9 additions and 1 deletions
  1. 5 0
      lisp/ChangeLog
  2. 4 1
      lisp/org-gnus.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-06-07  Tassilo Horn  <tassilo@member.fsf.org>
+
+	* org-gnus.el (org-gnus-store-link): Require message.el in
+	org-gnus-store-link.
+
 2009-06-07  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-src.el: New file, split out of org.el

+ 4 - 1
lisp/org-gnus.el

@@ -135,7 +135,10 @@ If `org-store-link' was called with a prefix arg the meaning of
 	   (newsgroups (mail-header 'newsgroups header))
 	   (x-no-archive (mail-header 'x-no-archive header))
 	   (subject (if (eq major-mode 'gnus-article-mode)
-			(message-fetch-field "subject")
+			(save-restriction
+			  (require 'message)
+			  (message-narrow-to-head-1)
+			  (message-fetch-field "subject"))
 		      (gnus-summary-subject-string)))
 	   desc link)
       (org-store-link-props :type "gnus" :from from :subject subject