From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/72314 Path: news.gmane.org!not-for-mail From: Florian Ragwitz Newsgroups: gmane.emacs.gnus.general Subject: Re: [PATCH] Introduce gnus-completing-read Date: Thu, 30 Sep 2010 19:06:08 +0200 Message-ID: <877hi317r3.fsf@tardis.home.perldition.org> References: <1285688153-19680-1-git-send-email-julien@danjou.info> <87wrq5ammm.fsf@tardis.home.perldition.org> <87eicdacn6.fsf@tardis.home.perldition.org> <87hbh9tx2x.fsf@keller.adm.naquadah.org> <87y6aj7mp2.fsf@marauder.physik.uni-ulm.de> <87y6aj4jjk.fsf@tardis.home.perldition.org> <87hbh74gb5.fsf@tardis.home.perldition.org> <87d3rv4fvz.fsf@tardis.home.perldition.org> <87sk0r2xzc.fsf@tardis.home.perldition.org> <87pqvv6utx.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1285866435 3142 80.91.229.12 (30 Sep 2010 17:07:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 30 Sep 2010 17:07:15 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M20687@lists.math.uh.edu Thu Sep 30 19:07:14 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 1P1MbB-0000cG-Is for ding-account@gmane.org; Thu, 30 Sep 2010 19:07:13 +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 1P1Mb4-0004pL-NC; Thu, 30 Sep 2010 12:07:06 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1P1Mb2-0004p6-QF for ding@lists.math.uh.edu; Thu, 30 Sep 2010 12:07:04 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1P1May-0000AU-2K for ding@lists.math.uh.edu; Thu, 30 Sep 2010 12:07:04 -0500 Original-Received: from kief.perldition.org ([78.47.20.161]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1P1Max-0001Uj-00 for ; Thu, 30 Sep 2010 19:06:59 +0200 Original-Received: from p4fd7608c.dip.t-dialin.net ([79.215.96.140] helo=tardis.home.perldition.org) by kief.perldition.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1P1Maw-0000BL-Ae for ding@gnus.org; Thu, 30 Sep 2010 19:06:58 +0200 Original-Received: from rafl by tardis.home.perldition.org with local (Exim 4.72) (envelope-from ) id 1P1MaA-00044e-Pm for ding@gnus.org; Thu, 30 Sep 2010 19:06:10 +0200 Mail-Copies-To: never In-Reply-To: <87pqvv6utx.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 30 Sep 2010 11:48:42 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) X-Spam_score: -3.8 X-Spam_score_int: -37 X-Spam_bar: --- X-Spam_report: Spam detection software, running on the system "kief.perldition.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Ted Zlatanov writes: > On Thu, 30 Sep 2010 18:33:44 +0200 Lars Magne Ingebrigtsen wrote: > > LMI> If there are more than ten lines of code, then it can't be counted as a > LMI> (tiny change), and we need to revert it. If it is, could you create a > LMI> patch to revert those lines? > > The biggest chunk of the patch are these three functions. The two > wrappers are trivially rewritten. `gnus-icompleting-read' can be > rewritten pretty easily; I think the main portion (the lambda) can be > rewritt X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:72314 Archived-At: --=-=-= Content-Type: text/plain Ted Zlatanov writes: > On Thu, 30 Sep 2010 18:33:44 +0200 Lars Magne Ingebrigtsen wrote: > > LMI> If there are more than ten lines of code, then it can't be counted as a > LMI> (tiny change), and we need to revert it. If it is, could you create a > LMI> patch to revert those lines? > > The biggest chunk of the patch are these three functions. The two > wrappers are trivially rewritten. `gnus-icompleting-read' can be > rewritten pretty easily; I think the main portion (the lambda) can be > rewritten as: > > ... > (let ((iswitchb-make-buflist-hook > (lambda () > (setq iswitchb-temp-buflist > (let ((choices (append > (when initial-input (list initial-input)) > history collection)) > filtered-choices) > (dolist (x choices) > (setq filtered-choices (adjoin x filtered-choices))) > (nreverse filtered-choices)))))) > ... > > Which is inspired by the original patch but not a copy (Florian, can you > check for correctness?). If that's reasonable I can rewrite more, as > much as needed to make the remainder trivial. This appears to be as correct as my initial version of it. However, Julien made some follow-up changes to it, fixing a bug regarding handling of history. Your version makes the same mistake I initially did. Julien's fix needs to be adapted for the new code. > This did make me wish for a "collect unique x" option for the CL loop > :) That'd be nice, but with cl, there's also `remove-duplicates'. Without cl, the following is probably much more elegant than the original patch: (delq nil (delete-dups ...)) --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkykw4AACgkQdC8qQo5jWl63OwCfYO3HPvEURgYj1WRRYb4pF19Z u2UAnjuQwOgUo+8gARhrAE/pAos4jgww =2YML -----END PGP SIGNATURE----- --=-=-=--