From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] fix-info-dups 6316172: Fix duplicates when completing Info files Date: Mon, 20 Apr 2015 10:58:36 -0400 Message-ID: References: <20150420122827.13008.83006@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1429541980 29339 80.91.229.3 (20 Apr 2015 14:59:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Apr 2015 14:59:40 +0000 (UTC) Cc: Oleh Krehel To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 20 16:59:27 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YkDAT-0003uE-JQ for ged-emacs-devel@m.gmane.org; Mon, 20 Apr 2015 16:59:25 +0200 Original-Received: from localhost ([::1]:54048 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkDAT-0007Nc-6K for ged-emacs-devel@m.gmane.org; Mon, 20 Apr 2015 10:59:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkDAF-0007NG-2f for emacs-devel@gnu.org; Mon, 20 Apr 2015 10:59:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YkDAA-0007xG-Dm for emacs-devel@gnu.org; Mon, 20 Apr 2015 10:59:11 -0400 Original-Received: from mercure.iro.umontreal.ca ([132.204.24.67]:49474) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YkDAA-0007wn-7B for emacs-devel@gnu.org; Mon, 20 Apr 2015 10:59:06 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id ACF4084810; Mon, 20 Apr 2015 10:59:02 -0400 (EDT) Original-Received: from lechon.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 85E4D1E5B8B; Mon, 20 Apr 2015 10:58:36 -0400 (EDT) Original-Received: by lechon.iro.umontreal.ca (Postfix, from userid 20848) id 6C5E8B40DC; Mon, 20 Apr 2015 10:58:36 -0400 (EDT) In-Reply-To: (Oleh Krehel's message of "Mon, 20 Apr 2015 12:28:27 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-2.82, requis 5, autolearn=not spam, ALL_TRUSTED -2.82, MC_TSTLAST 0.00) X-DIRO-MailScanner-From: monnier@iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 132.204.24.67 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:185706 Archived-At: > * 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 and 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). Stefan > + (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. Stefan