From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/78377 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: no gnus registry new dependency on ert? Date: Wed, 06 Apr 2011 08:10:19 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87vcyrr0ec.fsf@lifelogs.com> References: <8762qs3swu.fsf@ericabrahamsen.net> <87ipur8zny.fsf@lifelogs.com> <87aag38xah.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1302095494 22607 80.91.229.12 (6 Apr 2011 13:11:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2011 13:11:34 +0000 (UTC) Cc: emacs-devel@gnu.org To: ding@gnus.org Original-X-From: ding-owner+M26681@lists.math.uh.edu Wed Apr 06 15:11:28 2011 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 1Q7SW7-0003ZQ-53 for ding-account@gmane.org; Wed, 06 Apr 2011 15:11:27 +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 1Q7SVP-0001Er-5F; Wed, 06 Apr 2011 08:10:43 -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 1Q7SVM-0001Ef-Eo for ding@lists.math.uh.edu; Wed, 06 Apr 2011 08:10:40 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q7SVJ-00076H-Hy for ding@lists.math.uh.edu; Wed, 06 Apr 2011 08:10:39 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q7SVH-0006ju-EH for ding@gnus.org; Wed, 06 Apr 2011 15:10:35 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q7SVG-00030X-GM for ding@gnus.org; Wed, 06 Apr 2011 15:10:34 +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 ; Wed, 06 Apr 2011 15:10:34 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Apr 2011 15:10:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 187 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.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:kMmGw4UgGCvGQd/fIuqt70MXgvs= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:78377 gmane.emacs.devel:138232 Archived-At: --=-=-= Content-Type: text/plain On Wed, 06 Apr 2011 05:54:46 -0500 Ted Zlatanov wrote: TZ> On Wed, 06 Apr 2011 12:10:26 +0200 David Engster wrote: DE> Either that, or just do DE> (eval-when-compile DE> (when (null (require 'ert nil t)) DE> (defmacro* ert-deftest (name () &body docstring-keys-and-body)))) DE> to silence the byte-compiler. Your solution is less hacky, but then you DE> have to always remember to wrap ert-deftest in those featurep clauses. TZ> Oh, I like your solution better since I don't have to reindent ;) TZ> I made the change in *registry.el, thanks. Interesting. When I byte-compile in Gnus (just "make" in the Lisp directory), I get the attached backtrace. Sorry for the nasty backtrace but I can't load the code AND exhibit the problem. If I load gnus-registry.el and do `M-x eval-buffer' then it works properly. So something is off with the byte-compilation, at least the compilation that Gnus does. Ted --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=ert-backtrace.txt Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (void-function make-ert-test) make-ert-test(:name registry-instantiation-test :body #[nil "\304\305C=18= =19\306=1A\307=1B\310\216\311 \"\211=12)\204=19=00\312=0B!\210)\n+\207" [a= rgs-65 fn-64 value-66 form-description-68 registry-db "Testing" ert-form-ev= aluation-aborted-67 nil ((byte-code "\305C\306 BD\244\n\307=3D?\205=12=00\= 310\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D)\244=14\315\f!\207" [fn-6= 4 args-65 value-66 -explainer- form-description-68 (should (registry-db "Te= sting")) :form ert-form-evaluation-aborted-67 :value registry-db ert-explai= ner :explanation apply ert--signal-should-execution] 6)) apply ert-fail] 3]) byte-code("\301\302\303\304#\210\301\305\306\307#\210\301\310\311\312#\21= 0\301\313\314\315#\210\301\316\317\320#\210\321\322\323\324\322\325\326$\"\= 210\327B=10\321\330\323\324\330\325\331$\"\210\332B=10\301\207" [current-= load-list eieio-defmethod registry-search (((db registry-db) &rest spec)) #= [(db &rest spec) "\205 =00\306 \307\"\306 \310\"\306 \311\"=1A=1B=1C\312= =1D\313\314\315\316\"\"\210=0D\237,\207" [db spec regex member all --cl-va= r-- plist-get :all :member :regex nil maphash #[(k v) "\204=1C=00 \203=10= =00\306\307\n #\204=1C=00=0B\205!=00\306\310\n=0B#\205!=00\f=0DB\211=15\207= " [all member v regex k --cl-var-- registry--match :member :regex] 4] eieio= -oref :data] 5 "Search for SPEC across the registry-db THIS.\nFor example c= alling with :member '(a 1 2) will match entry '((a 3 1)).\nCalling with :al= l t (any non-nil value) will match all.\nCalling with :regex '(a \"h.llo\")= will match entry '((a \"hullo\" \"bye\").\nThe test order is to check :all= first, then :member, then :regex."] registry-delete (((db registry-db) key= s assert &rest spec)) #[(db keys assert &rest spec) "\306\307\"=19\n\206= =0E=00\310\311=0B#=1A\306\312\"=1C\n\313=1D\211=1E=14\203\246=00=0E=14@= =15\314=0D \"=1E=15=0E=16\2036=00=0E=15\2046=00\315\316=0D\"\210\f\313=1E= =17\211=1E=18\203\226=00=0E=18@=16=17\317=0E=17\"\203\215=00=0E=17=0E=15\2= 36\243\313=1E=19\211=1E=1A\203\214=00=0E=1A@=16=19\320=0E=17=0E=19#=1E=1B= =0D=0E=1B\235\203\202=00\320=0E=17=0E=19\321=0D=0E=1B\"\206\200=00\322$\21= 0)=0E=1AA\211=16=1A\204\\=00*=0E=18A\211=16=18\204@=00*\323=0D \"\210)=0E= =14A\211=16=14\204=1D=00*\n+\207" [db data keys spec tracked key eieio-oref= :data apply registry-search :tracked nil gethash error "Key %s does not ex= ists in database" registry-lookup-secondary registry-lookup-secondary-value= delete t remhash --cl-dolist-temp-- entry assert tr --cl-dolist-temp-- val= --cl-dolist-temp-- value-keys] 8 "Delete KEYS from the registry-db THIS.\n= If KEYS is nil, use SPEC to do a search.\nUpdates the secondary ('tracked')= indices as well.\nWith assert non-nil, errors out if the key does not exis= t already."] registry-insert (((db registry-db) key entry)) #[(db key entry= ) "\306\307 \310\"\"\203=0E=00\311\312!\210\313 !\307 \314\"W\204=1D=00\31= 1\315!\210\316\n\307 \310\"#\210\307 \317\"\320=1B\211=1C\203w=00\f@\211= =13\n\236\243\320=1D\211=1E=12\203o=00=0E=12@=15\321 =0B=0D#=1E=13=0E=13\2= 35\203W=00=0E=13\202[=00=0E=13B=16=13\321 =0B=0D=0E=13$\210)=0E=12A\211=16= =12\204@=00*\fA\211=14\2041=00*\n\207" [key db entry tr --cl-dolist-temp-- = val gethash eieio-oref :data error "Key already exists in database" registr= y-size :max-hard "max-hard size limit reached" puthash :tracked nil registr= y-lookup-secondary-value --cl-dolist-temp-- value-keys] 7 "Insert ENTRY und= er KEY into the registry-db THIS.\nUpdates the secondary ('tracked') indice= s as well.\nErrors out if the key exists already."] registry-size (((db reg= istry-db))) #[(db) "\301\302\303\"!\207" [db hash-table-count eieio-oref := data] 4 "Returns the size of the registry-db object THIS.\nThis is the key = count of the :data slot."] registry-prune (((db registry-db))) #[(db) "\306= \307\"=19\310=1A\306\311\"=1B\306\312\"=1C\313!=1D\314=1E=10\315\316=0B= \"\210=0E=10\237)\211=1E=11G=1E=12=0D\fV=1E=13=0E=12=0D\fZV\203G=00=0E=11\2= 03G=00=0E=12S=16=12=0E=11A=16=11\202,=00\317=0E=11\314#.\207" [db preciou= s precious-p data limit size eieio-oref :precious #[(entry-key) "@ >A\207"= [entry-key precious] 2] :data :max-soft registry-size nil maphash #[(k v) = " \306=1A=1B=1C\307\310\f=0B\n$+?\205=18=00=0D=0E B\211=16 \207" [precious= -p v cl-rest cl-seq cl-pred k nil apply some --cl-var--] 5] registry-delete= --cl-var-- candidates candidates-count prune-needed] 5 "Prunes the registr= y-db object THIS.\nRemoves only entries without the :precious keys."] ert-s= et-test registry-instantiation-test make-ert-test :name :body #[nil "\304\3= 05C=18=19\306=1A\307=1B\310\216\311 \"\211=12)\204=19=00\312=0B!\210)\n+\2= 07" [args-65 fn-64 value-66 form-description-68 registry-db "Testing" ert-f= orm-evaluation-aborted-67 nil ((byte-code "\305C\306 BD\244\n\307=3D?\205= =12=00\310\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D)\244=14\315\f!\207= " [fn-64 args-65 value-66 -explainer- form-description-68 (should (registry= -db "Testing")) :form ert-form-evaluation-aborted-67 :value registry-db ert= -explainer :explanation apply ert--signal-should-execution] 6)) apply ert-f= ail] 3] (ert-deftest . registry-instantiation-test) registry-match-test #[n= il "\306=18\307\310!\210\311\312\313E=19=1A\314=1B\315=1C\316\216\317\n \"= \211=13)\204!=00\320\f!\210)=0B\210+\311\312\321E=1D=1E,\322=1E-\315=1E.\3= 23\216\317=0E,=0D\"\211=16-)\204F=00\320=0E.!\210)=0E-\210+\311\312\324E= =1E/=1E0\325=1E1\315=1E2\326\216\317=0E0=0E/\"\211=161)\203n=00\320=0E2!\21= 0)=0E1\210+\311\312\327E=1E3=1E4\330=1E5\315=1E6\331\216\317=0E4=0E3\"\211= =165)\203\226=00\320=0E6!\210)=0E5\210+\307\332!\210\311\333\334E=1E7=1E8\= 335=1E9\315=1E:\336\216\317=0E8=0E7\"\211=169)\204\302=00\320=0E:!\210)=0E9= \210+\311\333\337E=1E;=1E<\340=1E=3D\315=1E>\341\216\317=0E<=0E;\"\211=16= =3D)\204\352=00\320=0E>!\210)=0E=3D\210+\311\333\342E=1E?=1E@\343=1EA\315= =1EB\344\216\317=0E@=0E?\"\211=16A)\203=12=01\320=0EB!\210)=0EA\210+\311\33= 3\345E=1EC=1ED\346=1EE\315=1EF\347\216\317=0ED=0EC\"\211=16E)\203:=01\320= =0EF!\210)=0EE\210+\311\333\350E=1EG=1EH\351=1EI\315=1EJ\352\216\317=0EH= =0EG\"\211=16I)\203b=01\320=0EJ!\210)=0EI\210,\307\353!\207" [entry args-70= fn-69 value-71 form-description-73 args-75 ((hello "goodbye" "bye") (blank= )) message "Testing :regex matching" registry--match :regex ((hello "nye" "= bye")) ert-form-evaluation-aborted-72 nil ((byte-code "\305C\306 BD\244\n\= 307=3D?\205=12=00\310\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D)\244=14= \315\f!\207" [fn-69 args-70 value-71 -explainer- form-description-73 (shoul= d (registry--match :regex entry ...)) :form ert-form-evaluation-aborted-72 = :value registry--match ert-explainer :explanation apply ert--signal-should-= execution] 6)) apply ert-fail ((hello "good")) ert-form-evaluation-aborted-= 77 ((byte-code "\305C\306 BD\244\n\307=3D?\205=12=00\310\nD\244\311\312N\2= 11=1B\205!=00\313\314=0B \"D)\244=14\315\f!\207" [fn-74 args-75 value-76 -e= xplainer- form-description-78 (should (registry--match :regex entry ...)) := form ert-form-evaluation-aborted-77 :value registry--match ert-explainer :e= xplanation apply ert--signal-should-execution] 6)) ((hello "nye")) ert-form= -evaluation-aborted-82 ((byte-code "\305C\306 BD\244\n\307=3D?\205=12=00\3= 10\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D)\244=14\315\f!\207" [fn-79= args-80 value-81 -explainer- form-description-83 (should-not (registry--ma= tch :regex entry ...)) :form ert-form-evaluation-aborted-82 :value registry= --match ert-explainer :explanation apply ert--signal-should-execution] 6)) = ((hello)) ert-form-evaluation-aborted-87 ((byte-code "\305C\306 BD\244\n\3= 07=3D?\205=12=00\310\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D)\244=14\= 315\f!\207" [fn-84 args-85 value-86 -explainer- form-description-88 (should= -not (registry--match :regex entry ...)) :form ert-form-evaluation-aborted-= 87 :value registry--match ert-explainer :explanation apply ert--signal-shou= ld-execution] 6)) "Testing :member matching" :member ((hello "bye")) ert-fo= rm-evaluation-aborted-92 ((byte-code "\305C\306 BD\244\n\307=3D?\205=12=00= \310\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D)\244=14\315\f!\207" [fn-= 89 args-90 value-91 -explainer- form-description-93 (should (registry--matc= h :member entry ...)) :form ert-form-evaluation-aborted-92 :value registry-= -match ert-explainer :explanation apply ert--signal-should-execution] 6)) (= (hello "goodbye")) ert-form-evaluation-aborted-97 ((byte-code "\305C\306 B= D\244\n\307=3D?\205=12=00\310\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D= )\244=14\315\f!\207" [fn-94 args-95 value-96 -explainer- form-description-9= 8 (should (registry--match :member entry ...)) :form ert-form-evaluation-ab= orted-97 :value registry--match ert-explainer :explanation apply ert--signa= l-should-execution] 6)) ((hello "good")) ert-form-evaluation-aborted-102 ((= byte-code "\305C\306 BD\244\n\307=3D?\205=12=00\310\nD\244\311\312N\211=1B= \205!=00\313\314=0B \"D)\244=14\315\f!\207" [fn-99 args-100 value-101 -expl= ainer- form-description-103 (should-not (registry--match :member entry ...)= ) :form ert-form-evaluation-aborted-102 :value registry--match ert-explaine= r :explanation apply ert--signal-should-execution] 6)) ((hello "nye")) ert-= form-evaluation-aborted-107 ((byte-code "\305C\306 BD\244\n\307=3D?\205=12= =00\310\nD\244\311\312N\211=1B\205!=00\313\314=0B \"D)\244=14\315\f!\207" [= fn-104 args-105 value-106 -explainer- form-description-108 (should-not (reg= istry--match :member entry ...)) :form ert-form-evaluation-aborted-107 :val= ue registry--match ert-explainer :explanation apply ert--signal-should-exec= ution] 6)) ((hello)) ert-form-evaluation-aborted-112 ((byte-code "\305C\306=  BD\244\n\307=3D?\205=12=00\310\nD\244\311\312N\211=1B\205!=00\313\314=0B = \"D)\244=14\315\f!\207" [fn-109 args-110 value-111 -explainer- form-descrip= tion-113 (should-not (registry--match :member entry ...)) :form ert-form-ev= aluation-aborted-112 :value registry--match ert-explainer :explanation appl= y ert--signal-should-execution] 6)) "Done with matching testing." fn-74 val= ue-76 form-description-78 args-80 fn-79 value-81 ...] 4] (ert-deftest . reg= istry-match-test)] 7) require(registry) byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\= 210\300\306!\210\300\307!\210\300\310!\207" [require gnus gnus-int gnus-sum= gnus-art gnus-util nnmail easymenu registry] 2) (gnus-registry-initialize) eval-buffer(# nil "/home/tzz/.gnus.el" nil t) ; Reading = at buffer position 1072 load-with-code-conversion("/home/tzz/.gnus.el" "/home/tzz/.gnus.el" nil t) load("~/.gnus" nil t) gnus-read-init-file() gnus-1(nil nil nil) gnus(nil) call-interactively(gnus t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil) --=-=-=--