Sébastien Vauban wrote:
>> The Attached patch avoids this bug by removing all text properties from the
>> subject (the same is done in org-wl.el).

>I've applied your patch. That hinders, indeed, the bug to occur. So, it
>perfectly shows you're right about the cause.

>Though, the patch you gave me causes me troubles in my Gnus buffers: the
>*Group* and *Summary* buffers are now black and white only. All my colors
>disappeared...

This is indeed the patch's fault.  Something I don't completely
understand yet, is when and why this kind of side effect occurs.
Anyway, attached patch supersedes the last one and should work.  It
creates and uses a copy of the subject string.

HTH
  -- David
-- 
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmj...@jabber.org
Email..... dm...@ictsoc.de
From 43db1365040528e3245b68e422f687bd4628e5df Mon Sep 17 00:00:00 2001
From: David Maus <dm...@ictsoc.de>
Date: Sat, 17 Jul 2010 08:37:40 +0200
Subject: [PATCH] Remove text properties of subject to avoid Emacs bug #3506

* org-gnus.el (org-gnus-store-link): Remove text properties of
subject to avoid Emacs bug #3506.
---
 lisp/org-gnus.el |   22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index a41de2e..642e438 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -120,22 +120,26 @@ If `org-store-link' was called with a prefix arg the 
meaning of
 
    ((memq major-mode '(gnus-summary-mode gnus-article-mode))
     (let* ((group gnus-newsgroup-name)
-          (header (with-current-buffer gnus-summary-buffer
+          (header (with-current-buffer gnus-summary-buffer
                     (gnus-summary-article-header)))
           (from (mail-header-from header))
           (message-id (org-remove-angle-brackets (mail-header-id header)))
           (date (mail-header-date header))
-          (subject (mail-header-subject header))
-           (to (cdr (assq 'To (mail-header-extra header))))
-           newsgroups x-no-archive desc link)
+          (subject (copy-sequence (mail-header-subject header)))
+          (to (cdr (assq 'To (mail-header-extra header))))
+          newsgroups x-no-archive desc link)
+      ;; Remove text properties of subject string to avoid Emacs bug
+      ;; #3506
+      (set-text-properties 0 (length subject) nil subject)
+
       ;; Fetching an article is an expensive operation; newsgroup and
       ;; x-no-archive are only needed for web links.
       (when (org-xor current-prefix-arg org-gnus-prefer-web-links)
-        ;; Make sure the original article buffer is up-to-date
-        (save-window-excursion (gnus-summary-select-article))
-        (setq to (or to (gnus-fetch-original-field "To"))
-              newsgroups (gnus-fetch-original-field "Newsgroups")
-              x-no-archive (gnus-fetch-original-field "x-no-archive")))
+       ;; Make sure the original article buffer is up-to-date
+       (save-window-excursion (gnus-summary-select-article))
+       (setq to (or to (gnus-fetch-original-field "To"))
+             newsgroups (gnus-fetch-original-field "Newsgroups")
+             x-no-archive (gnus-fetch-original-field "x-no-archive")))
       (org-store-link-props :type "gnus" :from from :subject subject
                            :message-id message-id :group group :to to)
       (setq desc (org-email-link-description)
-- 
1.7.1

Attachment: pgpAYVlDZn48r.pgp
Description: PGP signature

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to