* [Patch] Create org-gnus links to real groups, not virtual groups
@ 2014-06-12 4:57 Eric Abrahamsen
2014-06-13 9:54 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Eric Abrahamsen @ 2014-06-12 4:57 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Create-org-gnus-links-from-original-group-not-virtua.patch --]
[-- Type: text/x-diff, Size: 1219 bytes --]
From 2d1dbbeb071e256ff37be798e8e04689a40665c8 Mon Sep 17 00:00:00 2001
From: Eric Abrahamsen <eric@ericabrahamsen.net>
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] Create org-gnus links to real groups, not virtual groups
2014-06-12 4:57 [Patch] Create org-gnus links to real groups, not virtual groups Eric Abrahamsen
@ 2014-06-13 9:54 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2014-06-13 9:54 UTC (permalink / raw)
To: Eric Abrahamsen; +Cc: emacs-orgmode
Hi Eric,
Eric Abrahamsen <eric@ericabrahamsen.net> writes:
> 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.
applied, thanks. I slightly modified the change log.
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-13 9:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-12 4:57 [Patch] Create org-gnus links to real groups, not virtual groups Eric Abrahamsen
2014-06-13 9:54 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.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).