From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 07 21:32:56 2013 Received: (at submit) by debbugs.gnu.org; 8 Jan 2013 02:32:56 +0000 Received: from localhost ([127.0.0.1]:55846 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsOzn-00024W-Mk for submit@debbugs.gnu.org; Mon, 07 Jan 2013 21:32:55 -0500 Received: from mallet.cs.hmc.edu ([134.173.42.59]:58671 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsOzl-00024N-7L for submit@debbugs.gnu.org; Mon, 07 Jan 2013 21:32:54 -0500 Received: from bow.cs.hmc.edu (bow-vpn.cs.hmc.edu [192.168.6.5]) by mallet.cs.hmc.edu (Postfix) with ESMTP id 080F99F2E078 for ; Mon, 7 Jan 2013 18:32:46 -0800 (PST) Received: by bow.cs.hmc.edu (Postfix, from userid 13409) id 3AB3C153A02E; Mon, 7 Jan 2013 18:32:46 -0800 (PST) From: Geoff Kuenning To: submit@debbugs.gnu.org (The Gnus Bugfixing Girls + Boys) Subject: gnus-treat-predicate: allow function predicates X-Debbugs-Version: 5.13 X-Debbugs-Package: gnus Date: Mon, 07 Jan 2013 18:32:46 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Gnus v5.13 GNU Emacs 24.2.1 (x86_64-suse-linux-gnu, GTK+ Version 3.4.4) of 2012-10-10 on build20 Gnus-treat-predicate is a bit silly, because it limits you predicates the author thought of. It's easy to extend it to be generalized, which is what elisp is for in the first place. This version lets any function be called; it can access things via free variables. See "TWO NEW LINES" below: (defun gnus-treat-predicate (val) (cond ((null val) nil) (gnus-treat-condition (eq gnus-treat-condition val)) ((and (listp val) (stringp (car val))) (apply 'gnus-or (mapcar `(lambda (s) (string-match s ,(or gnus-newsgroup-name ""))) val))) ((listp val) (let ((pred (pop val))) (cond ((eq pred 'or) (apply 'gnus-or (mapcar 'gnus-treat-predicate val))) ((eq pred 'and) (apply 'gnus-and (mapcar 'gnus-treat-predicate val))) ((eq pred 'not) (not (gnus-treat-predicate (car val)))) ((eq pred 'typep) (equal (car val) gnus-treat-type)) ; TWO NEW LINES ((functionp pred) (funcall pred)) (t (error "%S is not a valid predicate" pred))))) ((eq val t) t) ((eq val 'head) nil) ((eq val 'first) (eq part-number 1)) ((eq val 'last) (eq part-number total-parts)) ((numberp val) (< gnus-treat-length val)) (t (error "%S is not a valid value" val)))) -- Geoff Kuenning geoff@cs.hmc.edu http://www.cs.hmc.edu/~geoff/ Orchestra retrospectively extremely satisfied with symphony [No. 1] as result of barrel of free beer. -- Gustav Mahler, post-premiere letter to Arnold Berliner From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 06 13:22:38 2013 Received: (at 13384) by debbugs.gnu.org; 6 Jul 2013 17:22:38 +0000 Received: from localhost ([127.0.0.1]:35045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvWBy-0002pF-Fr for submit@debbugs.gnu.org; Sat, 06 Jul 2013 13:22:38 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:58597) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvWBv-0002p4-N7 for 13384@debbugs.gnu.org; Sat, 06 Jul 2013 13:22:36 -0400 Received: from 46.157.223.218.tmi.telenormobil.no ([46.157.223.218] helo=building.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1UvWBj-0003Is-JG; Sat, 06 Jul 2013 19:22:23 +0200 From: Lars Ingebrigtsen To: Geoff Kuenning Subject: Re: bug#13384: gnus-treat-predicate: allow function predicates References: Date: Sat, 06 Jul 2013 19:22:11 +0200 In-Reply-To: (Geoff Kuenning's message of "Mon, 07 Jan 2013 18:32:46 -0800") Message-ID: <87a9lzob7g.fsf@building.gnus.org> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1UvWBj-0003Is-JG X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1373736144.68003@IgZ4F0Y7hoA9lSqsL/MOSA X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 13384 Cc: 13384@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Geoff Kuenning writes: > Gnus-treat-predicate is a bit silly, because it limits you predicates > the author thought of. It's easy to extend it to be generalized, which > is what elisp is for in the first place. This version lets any function > be called; it can access things via free variables. See "TWO NEW LINES" > below: Sounds good. Can you add this to the documentation, too, and send a patch for both changes? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 08 22:30:25 2013 Received: (at 13384) by debbugs.gnu.org; 9 Jul 2013 02:30:25 +0000 Received: from localhost ([127.0.0.1]:40763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UwNhB-0006yS-As for submit@debbugs.gnu.org; Mon, 08 Jul 2013 22:30:25 -0400 Received: from mallet.cs.hmc.edu ([134.173.42.59]:46782 ident=postfix) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UwNh8-0006yH-Fy for 13384@debbugs.gnu.org; Mon, 08 Jul 2013 22:30:23 -0400 Received: from bow.cs.hmc.edu (bow-vpn.cs.hmc.edu [192.168.6.5]) by mallet.cs.hmc.edu (Postfix) with ESMTP id 4A0669F2E07C; Mon, 8 Jul 2013 19:30:20 -0700 (PDT) Received: by bow.cs.hmc.edu (Postfix, from userid 13409) id 660EA1080672; Mon, 8 Jul 2013 19:30:19 -0700 (PDT) From: Geoff Kuenning To: Lars Ingebrigtsen Subject: Re: bug#13384: gnus-treat-predicate: allow function predicates References: <87a9lzob7g.fsf@building.gnus.org> Date: Mon, 08 Jul 2013 19:30:18 -0700 In-Reply-To: <87a9lzob7g.fsf@building.gnus.org> (Lars Ingebrigtsen's message of "Sat, 06 Jul 2013 19:22:11 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.3 (/) X-Debbugs-Envelope-To: 13384 Cc: 13384@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.3 (/) > Geoff Kuenning writes: > >> Gnus-treat-predicate is a bit silly, because it limits you predicates >> the author thought of. It's easy to extend it to be generalized, which >> is what elisp is for in the first place. This version lets any function >> be called; it can access things via free variables. See "TWO NEW LINES" >> below: > > Sounds good. Can you add this to the documentation, too, and send a > patch for both changes? Sorry, I don't know how to update the odd format of info pages. But what they should read is something like: 9. A function: the function is called with no arguments and should return t or f. The current article is available in the buffer named by gnus-article-buffer. As to a patch, I think it would have been quicker to insert the two lines than to post a reply, but whatever: Index: gnus-art.el --- - 2013-07-08 19:29:48.785369924 -0700 +++ /tmp/gnus-art.el 2013-07-08 19:28:55.916943064 -0700 @@ -8422,6 +8422,8 @@ (not (gnus-treat-predicate (car val)))) ((eq pred 'typep) (equal (car val) gnus-treat-type)) + ((functionp pred) + (funcall pred)) (t (error "%S is not a valid predicate" pred))))) ((eq val t) -- Geoff Kuenning geoff@cs.hmc.edu http://www.cs.hmc.edu/~geoff/ Orchestra retrospectively extremely satisfied with symphony [No. 1] as result of barrel of free beer. -- Gustav Mahler, post-premiere letter to Arnold Berliner From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 19 10:02:02 2013 Received: (at 13384) by debbugs.gnu.org; 19 Jul 2013 14:02:02 +0000 Received: from localhost ([127.0.0.1]:37470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0BFx-0007pc-1y for submit@debbugs.gnu.org; Fri, 19 Jul 2013 10:02:01 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:44690) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0BFu-0007pH-4M for 13384@debbugs.gnu.org; Fri, 19 Jul 2013 10:01:58 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1V0BFe-0002ds-HA; Fri, 19 Jul 2013 16:01:42 +0200 From: Lars Magne Ingebrigtsen To: Geoff Kuenning Subject: Re: bug#13384: gnus-treat-predicate: allow function predicates References: <87a9lzob7g.fsf@building.gnus.org> X-Now-Playing: Winston Tong's _Theoretically Chinese_: "Endgame" X-Hashcash: 1:23:130719:geoff@cs.hmc.edu::iOUu4fKS40oMOSOG:00TCt X-Hashcash: 1:23:130719:13384@debbugs.gnu.org::EQRNaDhzV+W1Bdza:0000000000000000000000000000000000000000la9E Date: Fri, 19 Jul 2013 16:01:42 +0200 In-Reply-To: (Geoff Kuenning's message of "Mon, 08 Jul 2013 19:30:18 -0700") Message-ID: User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1V0BFe-0002ds-HA X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1374847302.80507@lOhmvOjELy23pIwb5f+ONQ X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 13384 Cc: 13384@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Geoff Kuenning writes: > As to a patch, I think it would have been quicker to insert the two > lines than to post a reply, but whatever: Thanks; applied. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 19 10:02:10 2013 Received: (at control) by debbugs.gnu.org; 19 Jul 2013 14:02:10 +0000 Received: from localhost ([127.0.0.1]:37473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0BG5-0007qT-CP for submit@debbugs.gnu.org; Fri, 19 Jul 2013 10:02:10 -0400 Received: from hermes.netfonds.no ([80.91.224.195]:44704) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V0BFz-0007q6-Ed for control@debbugs.gnu.org; Fri, 19 Jul 2013 10:02:04 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1V0BFl-0002e2-4k for control@debbugs.gnu.org; Fri, 19 Jul 2013 16:01:49 +0200 Date: Fri, 19 Jul 2013 16:01:48 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #13384 X-MailScanner-ID: 1V0BFl-0002e2-4k X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1374847309.42106@LbxvrfxIG3zzD4rm7+lFhw X-Spam-Status: No X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) tags 13384 fixed close 13384 24.4 From unknown Sun Jun 15 08:34:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 17 Aug 2013 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator