From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: proposed change of org-gnus-store-link for nnir groups Date: Wed, 16 Dec 2015 22:09:25 +0100 Message-ID: <871tamaynu.fsf@nicolasgoaziou.fr> References: <86bn9whtym.fsf@biostat.ku.dk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9JIQ-0005sO-Og for emacs-orgmode@gnu.org; Wed, 16 Dec 2015 16:07:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9JIM-00013p-NP for emacs-orgmode@gnu.org; Wed, 16 Dec 2015 16:07:38 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:60235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9JIM-00013U-HF for emacs-orgmode@gnu.org; Wed, 16 Dec 2015 16:07:34 -0500 In-Reply-To: <86bn9whtym.fsf@biostat.ku.dk> (Thomas Alexander Gerds's message of "Sat, 12 Dec 2015 10:55:29 +0100") 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: Thomas Alexander Gerds Cc: emacs-orgmode@gnu.org Hello, Thomas Alexander Gerds writes: > 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? Sounds good. Thank you. > (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)))) I think the above could be wrapped within a cl-case, if only to compute (car (gnus-find-method-for-group gnus-newsgroup-name)) only once. Also, it may require an entry in ORG-NEWS, and a proper commit message. Would you mind sending an updated patch? Regards, -- Nicolas Goaziou