GNU bug report logs - #7238
24.0.50; find-library gives wrong library - REGRESSION

Previous Next

Package: emacs;

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

Date: Mon, 18 Oct 2010 16:53:01 UTC

Severity: normal

Found in version 24.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 7238 in the body.
You can then email your comments to 7238 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 owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7238; Package emacs. (Mon, 18 Oct 2010 16:53: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. (Mon, 18 Oct 2010 16:53: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.0.50; find-library gives wrong library - REGRESSION
Date: Mon, 18 Oct 2010 09:55:16 -0700
emacs -Q
 
M-x find-library dired. TAB
 
TAB completes to dired.elc. It should, by priority, complete to
dired.el, as it used to do (Emacs 22, 23 etc.).

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2010-09-20 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.4) --no-opt --cflags
-Ic:/imagesupport/include'
 





Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Mon, 18 Oct 2010 21:20:03 GMT) Full text and rfc822 format available.

Notification sent to "Drew Adams" <drew.adams <at> oracle.com>:
bug acknowledged by developer. (Mon, 18 Oct 2010 21:20:03 GMT) Full text and rfc822 format available.

Message #10 received at 7238-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: "Drew Adams" <drew.adams <at> oracle.com>
Subject: Re: bug#7238: 24.0.50; find-library gives wrong library - REGRESSION
Date: Mon, 18 Oct 2010 17:02:29 -0400
> emacs -Q
> M-x find-library dired. TAB
 
> TAB completes to dired.elc. It should, by priority, complete to
> dired.el, as it used to do (Emacs 22, 23 etc.).

Indeed.  The behavior of M-x find-library RET dired TAB is odd, but the
one for dired. TAB is really a bug, which I fixed with the patch below.
Thanks,


        Stefan


=== modified file 'lisp/files.el'
--- lisp/files.el	2010-10-02 13:21:43 +0000
+++ lisp/files.el	2010-10-18 20:51:50 +0000
@@ -801,9 +801,10 @@
       ;; Switching from names to names+fullnames creates a non-monotonicity
       ;; which can cause problems with things like partial-completion.
       ;; To minimize the problem, filter out completion-regexp-list, so that
-      ;; M-x load-library RET t/x.e TAB finds some files.
-      (if completion-regexp-list
-          (setq names (all-completions "" names)))
+      ;; M-x load-library RET t/x.e TAB finds some files.  Also remove elements
+      ;; from `names' which only matched `string' when they still had
+      ;; their suffix.
+      (setq names (all-completions string names))
       ;; Remove duplicates of the first element, so that we can easily check
       ;; if `names' really only contains a single element.
       (when (cdr names) (setcdr names (delete (car names) (cdr names))))





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 16 Nov 2010 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 220 days ago.

Previous Next


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