emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* proposed change of org-gnus-store-link for nnir groups
@ 2015-12-12  9:55 Thomas Alexander Gerds
  2015-12-16 21:09 ` Nicolas Goaziou
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Alexander Gerds @ 2015-12-12  9:55 UTC (permalink / raw)
  To: emacs-orgmode


sometimes after searching for mail with notmuch, I want to save a link
to one of the articles shown in the nnir summary. since nnir groups are
temporary I would like org-gnus-store-link to treat nnir groups
differently and to use the articles orginal group when creating the
link. the following 3 lines change of org-gnus-store-link does this for
me. if this is interesting for others maybe it could be integrated
... if not, I could either advice org-gnus-store-link or add a modified
version to org-store-link-functions. comments?

Thomas

lisp/org-gnus.el
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index c7b46af..b5cf9c9 100644
*** a/lisp/org-gnus.el
Highlight differences
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -173,9 +173,12 @@ If `org-store-link' was called with a prefix arg the meaning of
 	   (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)))))
+      (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name))
+		'nnir)
+	(setq group  (nnir-article-group (gnus-summary-article-number))))
       ;; Remove text properties of subject string to avoid Emacs bug
       ;; #3506
       (set-text-properties 0 (length subject) nil subject)

-- 
sent from nil

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

end of thread, other threads:[~2015-12-18 21:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-12  9:55 proposed change of org-gnus-store-link for nnir groups Thomas Alexander Gerds
2015-12-16 21:09 ` Nicolas Goaziou
2015-12-17  6:14   ` Thomas Alexander Gerds
2015-12-17  8:57     ` Nicolas Goaziou
2015-12-18  6:49       ` Thomas Alexander Gerds
2015-12-18 21:45         ` Nicolas Goaziou

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).