From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/72514 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: Symbol's function definition is void: remove-if-not Date: Mon, 04 Oct 2010 11:36:14 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <8762xhewzl.fsf@lifelogs.com> References: <87sk0n9umn.fsf@escher.home> <8739sn2tch.fsf@keller.adm.naquadah.org> <87eic6hb2h.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1286210412 7002 80.91.229.12 (4 Oct 2010 16:40:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Oct 2010 16:40:12 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M20886@lists.math.uh.edu Mon Oct 04 18:40:11 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 1P2o5C-0000fw-0H for ding-account@gmane.org; Mon, 04 Oct 2010 18:40:10 +0200 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 1P2o59-0007AZ-LV; Mon, 04 Oct 2010 11:40:07 -0500 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 1P2o58-0007AM-FO for ding@lists.math.uh.edu; Mon, 04 Oct 2010 11:40:06 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1P2o57-00047l-Dl for ding@lists.math.uh.edu; Mon, 04 Oct 2010 11:40:06 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1P2o56-00074M-00 for ; Mon, 04 Oct 2010 18:40:04 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1P2o56-0000eW-Gt for ding@gnus.org; Mon, 04 Oct 2010 18:40:04 +0200 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 ; Mon, 04 Oct 2010 18:40:04 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 04 Oct 2010 18:40:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 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:Q7QOWvvzEugwtokiArChTtbvT34= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:72514 Archived-At: On Mon, 04 Oct 2010 16:15:56 +0900 Katsumi Yamaoka wrote: KY> Ted Zlatanov wrote: KY> [...] >> Can you use `gnus-remove-if' with the predicate inverted? KY> It can be used, if the type of a sequence is `list'. I know, I meant for Julien's case specifically, I think he's just using lists. In general our (Gnus) usage is pretty trivial, without using all the bells and whistles of the CL function. KY> For a non- list sequence, we can convert it to a list as the KY> function `coerce' does (see cl-extra.el). Though the type of a KY> modified sequence has to be changed again into that of the original KY> (if needed). However, it may be hard to make it work for a hash KY> table. So is the genuine `remove-if-not'! >> It looks like `remove-if-not' is used in several places actually: >> gnus-art.el: (remove-if-not pred (mailcap-mime-types)) >> gnus-group.el: (remove-if-not 'symbolp collection))) >> gnus-score.el: (remove-if-not Those three should be able to use `gnus-remove-if' with the predicate inverted, I think. >> gnus-sum.el: (remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb) >> gnus-sum.el: prom (remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb) KY> The use of `remove-if-not' in gnus-sum.el is a wrong approach since KY> it doesn't necessarily recognize all the group names in KY> `gnus-active-hashtb'. That looks like a normal vector of which KY> the length is 4096, however it can hold more than 4096 group names KY> and `remove-if-not' cannot access all of them. So it's potentially a bug. I am no expert on ELisp data types, especially between Emacs and XEmacs. Should we take this to emacs-devel or does someone know a good solution? I think it's acceptable to simply provide `gnus-remove-hashtb-keys-if' rather than try to reimplement CL. So maybe that's the right way. Ted