unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* org-gnus.el returns incorrect message subject in article mode
@ 2009-06-05  1:19 finalpatch
  2009-06-05  7:28 ` Tassilo Horn
  0 siblings, 1 reply; 3+ messages in thread
From: finalpatch @ 2009-06-05  1:19 UTC (permalink / raw)
  To: emacs-devel

Hi group,

I found that running org-store-link inside a gnus article buffer gives
out incorrect message subject. This is because in gnus-article-mode the
gnus-summary-subject-string function returns the subject of the next
message instead of the current one. The following patch fixes this
problem for me.

--- c:\users\fengl\code\emacs\lisp\org\org-gnus.el	Tue Feb 24 09:05:12 2009
+++ c:\emacs\lisp\org\org-gnus.el	Fri Jun  5 11:02:31 2009
@@ -133,7 +133,9 @@
 	   (to (mail-header 'to header))
 	   (newsgroups (mail-header 'newsgroups header))
 	   (x-no-archive (mail-header 'x-no-archive header))
-	   (subject (gnus-summary-subject-string))
+	   (subject (if (eq major-mode 'gnus-article-mode)
+                    (message-fetch-field "subject")
+                  (gnus-summary-subject-string)))
 	   desc link)
       (org-store-link-props :type "gnus" :from from :subject subject
 			    :message-id message-id :group group :to to)

-- 
finalpatch





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-05 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05  1:19 org-gnus.el returns incorrect message subject in article mode finalpatch
2009-06-05  7:28 ` Tassilo Horn
2009-06-05 10:08   ` Katsumi Yamaoka

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).