unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Trey Jackson <tjackson@wv.mentorg.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#227: partial-completion-mode and completion-ignore-case combine to make 'read-file-name return a subdirectory when user enters the parent
Date: Mon, 12 May 2008 11:23:25 -0700	[thread overview]
Message-ID: <200805121823.m4CINPxA021854@quartzville.wv.mentorg.com> (raw)

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:
<down-mouse-2> <mouse-2> <down-mouse-2> <mouse-2> C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-e C-b <backspace> 
<backspace> <backspace> 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 / <return> <help-echo> 
( 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 / <return> 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 / <return> 
<help-echo> M-x e m a <backspace> <backspace> <backspace> 
r e p o <tab> <backspace> o r <tab> <return>

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






             reply	other threads:[~2008-05-12 18:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87prnfllez.fsf@cyd.mit.edu>
2008-05-12 18:23 ` Trey Jackson [this message]
2008-09-07 21:05   ` bug#227: marked as done (partial-completion-mode and completion-ignore-case combine to make 'read-file-name return a subdirectory when user enters the parent) Emacs bug Tracking System

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=200805121823.m4CINPxA021854@quartzville.wv.mentorg.com \
    --to=tjackson@wv.mentorg.com \
    --cc=227@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@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).