[Top][All Lists]

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

bug#14680: 24.3.50; `locate-file-completion' gives wrong candidates - *.

From: Drew Adams
Subject: bug#14680: 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: " 
                 (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 (i686-pc-mingw32)
 of 2013-06-18 on LEG570
Bzr revision: 113050 address@hidden
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''

reply via email to

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