all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: finalpatch <fengli@gmail.com>
To: emacs-devel@gnu.org
Subject: org-gnus.el returns incorrect message subject in article mode
Date: Fri, 05 Jun 2009 11:19:25 +1000	[thread overview]
Message-ID: <873aafiijm.fsf@gmail.com> (raw)

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





             reply	other threads:[~2009-06-05  1:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-05  1:19 finalpatch [this message]
2009-06-05  7:28 ` org-gnus.el returns incorrect message subject in article mode Tassilo Horn
2009-06-05 10:08   ` Katsumi Yamaoka

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873aafiijm.fsf@gmail.com \
    --to=fengli@gmail.com \
    --cc=emacs-devel@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.