[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] fix-info-dups 6316172: Fix duplicates when completing

From: Stefan Monnier
Subject: Re: [Emacs-diffs] fix-info-dups 6316172: Fix duplicates when completing Info files
Date: Mon, 20 Apr 2015 10:58:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

>     * lisp/info.el (Info-read-node-name-2): Use the STRING argument a lot
>       less, it's actually always "".

What makes you think it's always ""?

I haven't actually tested your patch, but the way I read it, I get the
impression that it will break things like

    C-h i g (emacs-23/e TAB
    C-h i g (/usr/sh TAB

> Update the regex to remove the split files, the old one wasn't
> working properly.

But the new one only handles those cases where the ".info" extension is
present, which is sadly not always the case (yup, the conventions about how
to name info files suck).


> +                     (not (string-match "\.info-[0-9]+" file))
You forgot to double the backslash.

> +    (complete-with-action action (cl-delete-duplicates
> +                                  (nreverse names) :test 'equal) string 
> pred)))

There's `delete-dups' for that.
But I also wonder whether we couldn't try to reduce the amount of
duplication (at least in some of the common cases) even before passing
the result through delete-dups.
IOW, I'm wondering where the duplication actually comes from.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]