From unknown Sat Jun 21 03:26:49 2025 X-Loop: don@donarmstrong.com Subject: bug#227: partial-completion-mode and completion-ignore-case combine to make 'read-file-name return a subdirectory when user enters the parent Reply-To: Trey Jackson , 227@debbugs.gnu.org Resent-From: Trey Jackson Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 12 May 2008 18:30:02 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 227 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.12106166153672 (code B ref -1); Mon, 12 May 2008 18:30:02 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-0.9 required=4.0 tests=FOURLA,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 12 May 2008 18:23:35 +0000 Received: from mx10.gnu.org (mail.gnu.org [199.232.76.166]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4CINTU0003660 for ; Mon, 12 May 2008 11:23:31 -0700 Received: from relay1.mentorg.com ([192.94.38.131]:45359) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JvcgL-0002z7-CM for bug-gnu-emacs@gnu.org; Mon, 12 May 2008 14:23:29 -0400 Received: from em-wv03.wv.mentorg.com ([147.34.98.30]) by relay1.mentorg.com with esmtp id 1JvcgI-0001kE-8I from tjackson@wv.mentorg.com for bug-gnu-emacs@gnu.org; Mon, 12 May 2008 11:23:26 -0700 Received: from quartzville.wv.mentorg.com ([147.34.37.95]) by em-wv03.wv.mentorg.com (8.8.8/CF5.40R) Received: from quartzville.wv.mentorg.com (localhost [127.0.0.1]) by quartzville.wv.mentorg.com (8.13.1/8.13.1) with ESMTP id m4CINP4i021857 for ; Mon, 12 May 2008 11:23:25 -0700 Received: (from tjackson@localhost) by quartzville.wv.mentorg.com (8.13.1/8.13.1/Submit) id m4CINPxA021854; Mon, 12 May 2008 11:23:25 -0700 Date: Mon, 12 May 2008 11:23:25 -0700 Message-Id: <200805121823.m4CINPxA021854@quartzville.wv.mentorg.com> From: Trey Jackson To: bug-gnu-emacs@gnu.org X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-GNU-Loop: 1 scenario: you have a directory (/scratch2/rfn-bug) that contains some number of files, and one sub-directory (/scratch2/rfn-bug/frog). You are prompted for a file name via 'read-file-name, you enter "/scratch2/rfn-bug" and that is properly returned, you enter "/scratch2/rfn-bug/" and what is returned is "/scratch2/rfn-bug/frog" To reproduce: in a shell: mkdir /scratch2/rfn-bug touch /scratch2/rfn-bug/a touch /scratch2/rfn-bug/b mkdir /scratch2/rfn-bug/frog Run emacs, and then evaluate: (setq read-file-name-completion-ignore-case t) (require 'complete) (partial-completion-mode t) (read-file-name prompt dir dir 'must-match nil 'file-directory-p) When you enter "/scratch2/rfn-bug", you'll get back "/scratch2/rfn-bug" When you enter "/scratch2/rfn-bug/", you'll get back "/scratch2/rfn-bug/frog" If read-file-name-completion-ignore-case is nil, this problem does not happen. If there are more than one subdirectory, this problem does not happen. If the single subdirectory is a link, you get the same behavior. Running on linux (as seen below). I built this version of Emacs myself, but did nothing custom, just the standard ./configure, gmake, gmake install. This bug was reproduced running emacs w/out an initialization file. thanks, TJ In GNU Emacs 22.1.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-06-13 on quartzville Windowing system distributor `The X.Org Foundation', version 11.0.60802000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: partial-completion-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: C-p C-p C-p C-p C-p C-p C-p C-p C-p C-e C-b t C-e C-j C-n C-n C-n C-n C-n C-n C-n C-n C-n C-e C-p C-e C-j / ( r e q u i r e SPC ' c o m p l e t e ) C-j C-p C-p C-p C-p C-e C-j / C-n C-n C-n C-n ( p a r t i a l - c o m p l e t i o n - m o d e SPC t ) C-j C-p C-p C-p C-p C-p C-p C-p C-p C-e C-j / M-x e m a r e p o o r Recent messages: ("emacs" "-q") For information about the GNU Project and its goals, type C-h C-p. [2 times] Mark set prompt here after complete/scratch2/rfn-bug/ Loading advice...done prompt here after complete/scratch2/rfn-bug/ prompt here after complete/scratch2/rfn-bug/frog/ Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done From unknown Sat Jun 21 03:26:49 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) X-Loop: don@donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Trey Jackson Subject: bug#227 closed by Chong Yidong (Re: partial-completion-mode and completion-ignore-case combine to make 'read-file-name return a subdirectory when user enters the parent) Message-ID: References: <87prnfllez.fsf@cyd.mit.edu> <200805121823.m4CINPxA021854@quartzville.wv.mentorg.com> X-Emacs-PR-Message: they-closed 227 X-Emacs-PR-Package: emacs Reply-To: 227@debbugs.gnu.org Content-Type: multipart/mixed; boundary="----------=_1220821508-10698-1" This is a multi-part message in MIME format... ------------=_1220821508-10698-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #227: partial-completion-mode and completion-ignore-case combine to make 'r= ead-file-name return a subdirectory when user enters the parent It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 227: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D227 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1220821508-10698-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From cyd@stupidchicken.com Sun Sep 7 13:59:26 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-3.8 required=4.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 227-done) by emacsbugs.donarmstrong.com; 7 Sep 2008 20:59:27 +0000 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87KxOU9007920 for <227-done@emacsbugs.donarmstrong.com>; Sun, 7 Sep 2008 13:59:25 -0700 Received: by cyd.mit.edu (Postfix, from userid 1000) id 64A2157E355; Sun, 7 Sep 2008 17:02:12 -0400 (EDT) From: Chong Yidong To: Trey Jackson Cc: 227-done@debbugs.gnu.org Subject: Re: partial-completion-mode and completion-ignore-case combine to make 'read-file-name return a subdirectory when user enters the parent Date: Sun, 07 Sep 2008 17:02:12 -0400 Message-ID: <87prnfllez.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > mkdir /scratch2/rfn-bug > touch /scratch2/rfn-bug/a > touch /scratch2/rfn-bug/b > mkdir /scratch2/rfn-bug/frog > > Run emacs, and then evaluate: > > (setq read-file-name-completion-ignore-case t) > (require 'complete) > (partial-completion-mode t) > (read-file-name prompt dir dir 'must-match nil 'file-directory-p) > > When you enter "/scratch2/rfn-bug/", you'll get back > "/scratch2/rfn-bug/frog" I've checked in a fix into CVS. Thanks for the bug report. ------------=_1220821508-10698-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit >From tjackson@wv.mentorg.com Mon May 12 11:23:35 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-0.9 required=4.0 tests=FOURLA,RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 12 May 2008 18:23:35 +0000 Received: from mx10.gnu.org (mail.gnu.org [199.232.76.166]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m4CINTU0003660 for ; Mon, 12 May 2008 11:23:31 -0700 Received: from relay1.mentorg.com ([192.94.38.131]:45359) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JvcgL-0002z7-CM for bug-gnu-emacs@gnu.org; Mon, 12 May 2008 14:23:29 -0400 Received: from em-wv03.wv.mentorg.com ([147.34.98.30]) by relay1.mentorg.com with esmtp id 1JvcgI-0001kE-8I from tjackson@wv.mentorg.com for bug-gnu-emacs@gnu.org; Mon, 12 May 2008 11:23:26 -0700 Received: from quartzville.wv.mentorg.com ([147.34.37.95]) by em-wv03.wv.mentorg.com (8.8.8/CF5.40R) Received: from quartzville.wv.mentorg.com (localhost [127.0.0.1]) by quartzville.wv.mentorg.com (8.13.1/8.13.1) with ESMTP id m4CINP4i021857 for ; Mon, 12 May 2008 11:23:25 -0700 Received: (from tjackson@localhost) by quartzville.wv.mentorg.com (8.13.1/8.13.1/Submit) id m4CINPxA021854; Mon, 12 May 2008 11:23:25 -0700 Date: Mon, 12 May 2008 11:23:25 -0700 Message-Id: <200805121823.m4CINPxA021854@quartzville.wv.mentorg.com> From: Trey Jackson To: bug-gnu-emacs@gnu.org Subject: partial-completion-mode and completion-ignore-case combine to make 'read-file-name return a subdirectory when user enters the parent X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-GNU-Loop: 1 scenario: you have a directory (/scratch2/rfn-bug) that contains some number of files, and one sub-directory (/scratch2/rfn-bug/frog). You are prompted for a file name via 'read-file-name, you enter "/scratch2/rfn-bug" and that is properly returned, you enter "/scratch2/rfn-bug/" and what is returned is "/scratch2/rfn-bug/frog" To reproduce: in a shell: mkdir /scratch2/rfn-bug touch /scratch2/rfn-bug/a touch /scratch2/rfn-bug/b mkdir /scratch2/rfn-bug/frog Run emacs, and then evaluate: (setq read-file-name-completion-ignore-case t) (require 'complete) (partial-completion-mode t) (read-file-name prompt dir dir 'must-match nil 'file-directory-p) When you enter "/scratch2/rfn-bug", you'll get back "/scratch2/rfn-bug" When you enter "/scratch2/rfn-bug/", you'll get back "/scratch2/rfn-bug/frog" If read-file-name-completion-ignore-case is nil, this problem does not happen. If there are more than one subdirectory, this problem does not happen. If the single subdirectory is a link, you get the same behavior. Running on linux (as seen below). I built this version of Emacs myself, but did nothing custom, just the standard ./configure, gmake, gmake install. This bug was reproduced running emacs w/out an initialization file. thanks, TJ In GNU Emacs 22.1.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars) of 2007-06-13 on quartzville Windowing system distributor `The X.Org Foundation', version 11.0.60802000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 locale-coding-system: utf-8 default-enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: partial-completion-mode: t tooltip-mode: t tool-bar-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t unify-8859-on-encoding-mode: t utf-translate-cjk-mode: t auto-compression-mode: t line-number-mode: t Recent input: C-p C-p C-p C-p C-p C-p C-p C-p C-p C-e C-b t C-e C-j C-n C-n C-n C-n C-n C-n C-n C-n C-n C-e C-p C-e C-j / ( r e q u i r e SPC ' c o m p l e t e ) C-j C-p C-p C-p C-p C-e C-j / C-n C-n C-n C-n ( p a r t i a l - c o m p l e t i o n - m o d e SPC t ) C-j C-p C-p C-p C-p C-p C-p C-p C-p C-e C-j / M-x e m a r e p o o r Recent messages: ("emacs" "-q") For information about the GNU Project and its goals, type C-h C-p. [2 times] Mark set prompt here after complete/scratch2/rfn-bug/ Loading advice...done prompt here after complete/scratch2/rfn-bug/ prompt here after complete/scratch2/rfn-bug/frog/ Loading emacsbug... Loading regexp-opt...done Loading emacsbug...done ------------=_1220821508-10698-1--