unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 14680@debbugs.gnu.org
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)	[thread overview]
Message-ID: <50f28bc4-3022-4373-bb20-04f234ef64ab@default> (raw)

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@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''





             reply	other threads:[~2013-06-20 21:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 21:15 Drew Adams [this message]
2016-04-28 23:58 ` bug#14680: 24.3.50; `locate-file-completion' gives wrong candidates - *.elc.elc and no *.el Lars Ingebrigtsen
2016-04-29 17:01   ` Drew Adams
2016-08-30  1:44     ` npostavs
2016-08-30  2:24       ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50f28bc4-3022-4373-bb20-04f234ef64ab@default \
    --to=drew.adams@oracle.com \
    --cc=14680@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).