GNU bug report logs - #27841
25.2; Patch for completion-table-with-predicate

Previous Next

Package: emacs;

Reported by: Ryan <rct <at> thompsonclan.org>

Date: Wed, 26 Jul 2017 18:38:02 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.2

Fixed in version 26.1

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

Bug is archived. No further changes may be made.

Full log


Message #22 received at 27841 <at> debbugs.gnu.org (full text, mbox):

From: Ryan Thompson <rct <at> thompsonclan.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>, npostavs <at> users.sourceforge.net
Cc: 27841 <at> debbugs.gnu.org
Subject: Re: bug#27841: 25.2; Patch for completion-table-with-predicate
Date: Sat, 05 Aug 2017 06:22:39 +0000
[Message part 1 (text/plain, inline)]
Ok, here is the revised patch. I added a test and reformatted the commit
message in (hopefully) ChangeLog format. The test includes a few basic
tests of "completion-table-with-predicate" including one which is fixed by
this patch (noted in the test comments).

I've dropped the second patch entirely, because I realized it was
inappropriately optimizing for a rare case (i.e. PRED1 being nil).

Also, a few other related things: First, I noticed that while the test file
name is minibuffer-tests.el, the lisp header and provide statement both
contain "completion-tests.el" instead. Presumably this file was renamed at
some point without updating its contents.

Second, I notice that there is not much in this file, in particular nothing
testing interactive completion in the minibuffer. I recently wrote a
package for simulating interactive input to a command in order to implement
tests for my ido-comrpleting-read+ package, and it might be useful for
adding more tests here. You can view it here:
https://github.com/DarwinAwardWinner/with-simulated-input and view example
usage in the ido-cr+ test suite here:
https://github.com/DarwinAwardWinner/ido-completing-read-plus/blob/master/tests/test-ido-completing-read%2B.el


Let me know if there is interest in using such an approach to add automated
tests for some of the core interactive Emacs functions like
"completing-read".

On Fri, Aug 4, 2017 at 4:11 PM Dmitry Gutov <dgutov <at> yandex.ru> wrote:

> On 8/5/17 2:00 AM, Ryan Thompson wrote:
> > Would you also like me
> > to provide an example where the old code does the wrong thing?
>
> Adding a test case or two to test/lisp/minibuffer-tests.el would be
> ideal (in the same patch that fixes it).
>
[Message part 2 (text/html, inline)]
[0001-Fix-a-bug-in-completion-table-with-predicate.patch (application/octet-stream, attachment)]

This bug report was last modified 7 years and 201 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.