From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/87412 Path: news.gmane.org!.POSTED!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Re: Set gnus-simplify-subject-functions in group parameters? Date: Fri, 24 Feb 2017 10:29:36 +0900 Organization: Emacsen advocacy group Message-ID: References: <87ino1vwvt.fsf@passepartout.tim-landscheidt.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1487899847 3242 195.159.176.226 (24 Feb 2017 01:30:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 24 Feb 2017 01:30:47 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (i686-pc-cygwin) To: ding@gnus.org Original-X-From: ding-owner+m35633@lists.math.uh.edu Fri Feb 24 02:30:42 2017 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from mxfilter-048034.atla03.us.yomura.com ([107.189.48.34]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ch4iV-0008Fn-Ih for ding-account@gmane.org; Fri, 24 Feb 2017 02:30:39 +0100 X-Yomura-MXScrub: 1.0 Original-Received: from lists1.math.uh.edu (unknown [129.7.128.208]) by mxfilter-048034.atla03.us.yomura.com (Halon) with ESMTPS id da374ace-fa30-11e6-b719-b499baa2b07a; Fri, 24 Feb 2017 01:30:41 +0000 (UTC) Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.87) (envelope-from ) id 1ch4hk-00077H-ND; Thu, 23 Feb 2017 19:29:52 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1ch4hi-00076e-Qv for ding@lists.math.uh.edu; Thu, 23 Feb 2017 19:29:50 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.87) (envelope-from ) id 1ch4hh-0007fG-3n for ding@lists.math.uh.edu; Thu, 23 Feb 2017 19:29:50 -0600 Original-Received: from mail-hampton.hostforweb.net ([205.234.186.191] helo=hampton.hostforweb.net) by quimby.gnus.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ch4hf-0005Ul-IE for ding@gnus.org; Fri, 24 Feb 2017 02:29:47 +0100 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:60000 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1ch4hV-004LYY-RS for ding@gnus.org; Thu, 23 Feb 2017 19:29:39 -0600 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( Cancel-Lock: sha1:sLYpl/TaZRIU00cSEP/FvdpFyfQ= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:87412 Archived-At: Er, first of all, does `gnus-simplify-subject-functions' really work? I tried this, (setq gnus-simplify-subject-functions '(gnus-simplify-subject-re)) and confirmed that `gnus-simplify-subject-re' runs. However I can still see "Re: "s in the summary lines. :( On Thu, 23 Feb 2017 13:51:02 +0000, Tim Landscheidt wrote: > How can I set gnus-simplify-subject-functions for a group to > a different value? If it works, something like the following will probably work: --8<---------------cut here---------------start------------->8--- (defun my-gnus-simplify-subject () (setq gnus-simplify-subject-functions (cond ((string-equal "nnfolder:foo.bar" gnus-newsgroup-name) '(tl-watchlist-subject-munger)) ((string-match "\\`nnimap:foo\\." gnus-newsgroup-name) '(tl-subject-filter-2)) (t nil)))) (add-hook 'gnus-select-group-hook 'my-gnus-simplify-subject) --8<---------------cut here---------------end--------------->8--- (string-equal "nnfolder:foo.bar" ...) matches the group. (string-match "\\`nnimap:foo\\." ...) matches the groups of which the group names begin with "nnimap:foo." . The last (t nil) must be there. Unfortunately Gnus isn't designed assuming `gnus-simplify-subject-functions' to be a group parameter, IIUC.