From: Florian Ragwitz <rafl@debian.org>
To: ding@gnus.org
Subject: Re: [PATCH] Introduce gnus-completing-read
Date: Thu, 30 Sep 2010 19:06:08 +0200 [thread overview]
Message-ID: <877hi317r3.fsf@tardis.home.perldition.org> (raw)
In-Reply-To: <87pqvv6utx.fsf@lifelogs.com> (Ted Zlatanov's message of "Thu, 30 Sep 2010 11:48:42 -0500")
[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Thu, 30 Sep 2010 18:33:44 +0200 Lars Magne Ingebrigtsen <larsi@gnus.org> 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 ...))
[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
next prev parent reply other threads:[~2010-09-30 17:06 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 15:35 Julien Danjou
2010-09-28 15:49 ` Eric Abrahamsen
2010-09-28 15:55 ` Florian Ragwitz
2010-09-28 16:04 ` Julien Danjou
2010-09-28 19:31 ` Florian Ragwitz
2010-09-28 20:47 ` Julien Danjou
2010-09-29 15:19 ` Lars Magne Ingebrigtsen
2010-09-29 21:47 ` Lars Magne Ingebrigtsen
2010-09-30 8:05 ` Julien Danjou
2010-09-30 9:42 ` Robert Pluim
2010-09-30 9:56 ` Julien Danjou
2010-09-30 6:46 ` Reiner Steib
2010-09-30 10:23 ` Florian Ragwitz
2010-09-30 10:44 ` Lars Magne Ingebrigtsen
2010-09-30 11:33 ` Florian Ragwitz
2010-09-30 11:36 ` Lars Magne Ingebrigtsen
2010-09-30 11:42 ` Florian Ragwitz
2010-09-30 12:20 ` Julien Danjou
2010-09-30 12:54 ` Florian Ragwitz
2010-09-30 13:29 ` Julien Danjou
2010-09-30 16:33 ` Lars Magne Ingebrigtsen
2010-09-30 16:48 ` Ted Zlatanov
2010-09-30 16:55 ` Lars Magne Ingebrigtsen
2010-09-30 17:13 ` Ted Zlatanov
2010-09-30 17:22 ` Florian Ragwitz
2010-09-30 17:39 ` Lars Magne Ingebrigtsen
2010-09-30 17:41 ` Florian Ragwitz
2010-09-30 17:49 ` Lars Magne Ingebrigtsen
2010-10-01 1:01 ` Florian Ragwitz
2010-10-01 9:43 ` Lars Magne Ingebrigtsen
2010-10-01 10:13 ` Lars Magne Ingebrigtsen
2010-09-30 17:47 ` Ted Zlatanov
2010-10-01 9:00 ` Julien Danjou
2010-09-30 17:06 ` Florian Ragwitz [this message]
2010-10-01 6:17 ` Copyright assignments, policies, conventions (was: [PATCH] Introduce gnus-completing-read) Reiner Steib
2010-10-01 13:51 ` Copyright assignments, policies, conventions Štěpán Němec
2010-09-30 12:13 ` [PATCH] Introduce gnus-completing-read Štěpán Němec
2010-09-28 15:55 ` Dan Christensen
2010-09-28 16:00 ` Julien Danjou
2010-09-28 16:02 ` Julien Danjou
2010-09-28 20:07 ` Ted Zlatanov
2010-09-28 20:36 ` Julien Danjou
2010-09-28 21:08 ` Ted Zlatanov
2010-10-01 15:57 ` Matt Lundin
2010-10-01 18:21 ` Lars Magne Ingebrigtsen
2010-10-01 23:45 ` Matt Lundin
2010-10-02 2:21 ` Lars Magne Ingebrigtsen
2010-10-02 17:48 ` Matt Lundin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877hi317r3.fsf@tardis.home.perldition.org \
--to=rafl@debian.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).