From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: [Patch] Create org-gnus links to real groups, not virtual groups Date: Thu, 12 Jun 2014 12:57:40 +0800 Message-ID: <8761k6912z.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wux1n-0001lC-DQ for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 00:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wux1h-0005at-8N for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 00:54:19 -0400 Received: from plane.gmane.org ([80.91.229.3]:40776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wux1h-0005an-1K for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 00:54:13 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Wux1f-0000BM-W7 for emacs-orgmode@gnu.org; Thu, 12 Jun 2014 06:54:11 +0200 Received: from 222.128.166.14 ([222.128.166.14]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jun 2014 06:54:11 +0200 Received: from eric by 222.128.166.14 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Jun 2014 06:54:11 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain If you create a link to a gnus message while in a nnvirtual group, the link will become un-followable as soon as you exit the virtual group. This patch checks to see if we're in a virtual group, and if so it creates the link to the original group instead. E --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Create-org-gnus-links-from-original-group-not-virtua.patch >From 2d1dbbeb071e256ff37be798e8e04689a40665c8 Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 12 Jun 2014 12:53:15 +0800 Subject: [PATCH] Create org-gnus links from original group, not virtual lisp/org-gnus.el (org-gnus-store-link): If we happen to be in a virtual group when storing a link to a message, we want the link to point to the message's "real" group, as a link to a virtual group can't be followed later. --- lisp/org-gnus.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el index 2c79347..48afb3c 100644 --- a/lisp/org-gnus.el +++ b/lisp/org-gnus.el @@ -170,6 +170,10 @@ If `org-store-link' was called with a prefix arg the meaning of (subject (copy-sequence (mail-header-subject header))) (to (cdr (assq 'To (mail-header-extra header)))) newsgroups x-no-archive desc link) + (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) + 'nnvirtual) + (setq group (car (nnvirtual-map-article + (gnus-summary-article-number))))) ;; Remove text properties of subject string to avoid Emacs bug ;; #3506 (set-text-properties 0 (length subject) nil subject) -- 2.0.0 --=-=-=--