From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/74019 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: nnir and move Date: Wed, 10 Nov 2010 12:54:16 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87mxphko13.fsf@lifelogs.com> References: <87wrox5jyh.fsf@andy.bu.edu> <87sjzl5jis.fsf@andy.bu.edu> <8739rl5d9d.fsf@andy.bu.edu> <87vd4h3xmh.fsf@andy.bu.edu> <87sjzap2yk.fsf@lifelogs.com> <87oc9xt9mi.fsf@andy.bu.edu> <87sjz9m83m.fsf@lifelogs.com> <87k4klt3zf.fsf@andy.bu.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1289415292 32285 80.91.229.12 (10 Nov 2010 18:54:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 10 Nov 2010 18:54:52 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M22387@lists.math.uh.edu Wed Nov 10 19:54:48 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PGFom-0003Ab-9s for ding-account@gmane.org; Wed, 10 Nov 2010 19:54:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PGFoW-0008R6-PN; Wed, 10 Nov 2010 12:54:32 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PGFoU-0008Qr-Uz for ding@lists.math.uh.edu; Wed, 10 Nov 2010 12:54:30 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PGFoT-00014U-SE for ding@lists.math.uh.edu; Wed, 10 Nov 2010 12:54:30 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PGFoT-0005Ps-00 for ; Wed, 10 Nov 2010 19:54:29 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PGFoS-00031k-M2 for ding@gnus.org; Wed, 10 Nov 2010 19:54:28 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Nov 2010 19:54:28 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 10 Nov 2010 19:54:28 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Ac2AH4DYtwAKliEaFv+XBaHZgv0= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:74019 Archived-At: On Wed, 10 Nov 2010 13:42:28 -0500 Andrew Cohen wrote: >>>>>> "Ted" == Ted Zlatanov writes: Ted> Could you use nnir-original-group and nnir-original-subject in Ted> the let you said you would do? I'll make the names more Ted> general if anyone else needs it but I was thinking this way Ted> it's clear that it's a nnir requirement. Ted> That way the registry will not care what nnir does to the Ted> subject or group name, it will just take the originals from the Ted> let-bound variables. AC> In fact I'm thinking about a different way (but this might not be best AC> way): AC> 1. nnir ends up replacing the parsed header with a new one, so the AC> original subject isn't available anymore, but its easy enough to get AC> back with a simple string-match. And the only place the original subject AC> is used is in the registry, which is why I thought that it was best to AC> just modify gnus-registry-simplify-subject to: AC> (defun gnus-registry-simplify-subject (subject) AC> (if (stringp subject) AC> (progn AC> (string-match "^\\[[0-9]+:.+/[0-9]+\\] " subject) AC> (setq subject (substring subject (match-end 0))) AC> (gnus-simplify-subject subject)) AC> nil)) I don't like this: it will fail if a user has that subject accidentally. Better to get the original unambigously as we get the group. AC> 2. As for the original newsgroup name, I am trying to avoid anything AC> nnir specific outside the nnir.el file. OK. AC> Its also possible that other/future virtual backends might want to AC> do something similar so I've tried an approach that won't require AC> special-casing. The trick is to pass the original newsgroup name AC> back in to gnus-summary-move-article. I think this is easy---just AC> introduce a let-bound variable gnus-original-newsgroup-name AC> initialized to gnus-newsgroup-name and let the backend-specific AC> 'request-move-article replace it as needed. So only a few lines of AC> changes and no need for nnir-specific code. OK, but the variable should not be defined in nnir.el. I would define `gnus-original-article-group' and `gnus-original-article-subject' in gnus.el. Ted