GNU bug report logs - #14680
24.3.50; `locate-file-completion' gives wrong candidates - *.elc.elc and no *.el

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 20 Jun 2013 21:16:01 UTC

Severity: normal

Tags: moreinfo, unreproducible

Found in version 24.3.50

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14680 in the body.
You can then email your comments to 14680 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14680; Package emacs. (Thu, 20 Jun 2013 21:16:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 20 Jun 2013 21:16:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; `locate-file-completion' gives wrong candidates - *.elc.elc
 and no *.el
Date: Thu, 20 Jun 2013 14:15:08 -0700 (PDT)
emacs -Q

Add files named isearch+.el, isearch+.el~, and isearch+.elc to the
current directory, then (add-to-list 'load-path ".")  Then eval this:

(completing-read "Library name: " 
                 'locate-file-completion
                 (cons load-path (find-library-suffixes))
                 nil nil nil (thing-at-point 'symbol))

Then type `isearch+ TAB TAB'.  The candidates shown are these:

isearch+          isearch+.elc
isearch+.elc.elc  isearch+.el~

There should be no *.elc.elc here, and there should be *.el (missing).

The problem seems to arise when `locate-file-completion-table' invokes:
(file-name-all-completions "isearch+" ".").  That returns this:
("isearch+.el~" "isearch+.elc.elc" "isearch+.elc" "isearch+.el")

Then, since "isearch+.el" is matched by "\\(\\.el\\(?:\\.gz\\)?\\)\\'",
it is not included as a candidate.

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-06-18 on LEG570
Bzr revision: 113050 handa <at> gnu.org-20130618145521-fvpc5viqtc85j4j4
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/usr --enable-checking CFLAGS='-O0 -g3'
 CPPFLAGS='-DGLYPH_DEBUG=1 -I/c/usr/include''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14680; Package emacs. (Thu, 28 Apr 2016 23:59:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 14680 <at> debbugs.gnu.org
Subject: Re: bug#14680: 24.3.50;
 `locate-file-completion' gives wrong candidates - *.elc.elc and no
 *.el
Date: Fri, 29 Apr 2016 01:58:06 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Add files named isearch+.el, isearch+.el~, and isearch+.elc to the
> current directory, then (add-to-list 'load-path ".")  Then eval this:

[...]

> The problem seems to arise when `locate-file-completion-table' invokes:
> (file-name-all-completions "isearch+" ".").  That returns this:
> ("isearch+.el~" "isearch+.elc.elc" "isearch+.elc" "isearch+.el")

(file-name-all-completions "isearch+" ".")
=>
("isearch+.elc" "isearch+.el" "isearch+.el~")

So I'm unable to reproduce this error.  Is this from -Q?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 28 Apr 2016 23:59:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14680; Package emacs. (Fri, 29 Apr 2016 17:02:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 14680 <at> debbugs.gnu.org
Subject: RE: bug#14680: 24.3.50; `locate-file-completion' gives wrong
 candidates - *.elc.elc and no *.el
Date: Fri, 29 Apr 2016 10:01:40 -0700 (PDT)
> > Add files named isearch+.el, isearch+.el~, and isearch+.elc to the
> > current directory, then (add-to-list 'load-path ".")  Then eval this:
> [...]
> 
> So I'm unable to reproduce this error.  Is this from -Q?

Yes, it is reproducible (on MS Windows, at least), using (at least)
Emacs 24 and an Emacs 25 build of a month or so ago.

However, the recipe should have said to do this also, before 
evaluating the `completing-read' sexp:

(load-library "find-func")




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14680; Package emacs. (Tue, 30 Aug 2016 01:45:01 GMT) Full text and rfc822 format available.

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

From: npostavs <at> users.sourceforge.net
To: Drew Adams <drew.adams <at> oracle.com>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 14680 <at> debbugs.gnu.org
Subject: Re: bug#14680: 24.3.50;
 `locate-file-completion' gives wrong candidates - *.elc.elc and no
 *.el
Date: Mon, 29 Aug 2016 21:44:35 -0400
tags 14680 unreproducible
quit

Drew Adams <drew.adams <at> oracle.com> writes:
> Yes, it is reproducible (on MS Windows, at least), using (at least)
> Emacs 24 and an Emacs 25 build of a month or so ago.
>
> However, the recipe should have said to do this also, before 
> evaluating the `completing-read' sexp:
>
> (load-library "find-func")

Not able to reproduce on Windows 10; Emacs 24.3, 24.4, 24.5, 25.1-rc1

I tested in a directory with contents:

C:\Users\npostavs\src\emacs>dir /b bug-14680-locate-file-completion
bug-14680.el
isearch+.el
isearch+.elc
isearch+.el~

Evaluated the following from emacs -Q:

(load-library "find-func")
(add-to-list 'load-path ".")
(completing-read "Library name: "
                 'locate-file-completion
                 (cons load-path (find-library-suffixes))
                 nil nil nil (thing-at-point 'symbol))

I got

Possible completions are:
isearch+
isearch+.elc
isearch+.el~





Added tag(s) unreproducible. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Tue, 30 Aug 2016 01:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14680; Package emacs. (Tue, 30 Aug 2016 02:25:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: npostavs <at> users.sourceforge.net
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 14680 <at> debbugs.gnu.org
Subject: RE: bug#14680: 24.3.50; `locate-file-completion' gives wrong
 candidates - *.elc.elc and no *.el
Date: Mon, 29 Aug 2016 19:24:44 -0700 (PDT)
> tags 14680 unreproducible
> quit

Thanks for testing.  This was my bad, I think.  Sorry.




bug closed, send any further explanations to 14680 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Tue, 30 Aug 2016 11:14:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 27 Sep 2016 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 328 days ago.

Previous Next


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