Article View: gnu.emacs.bug
Article #694Re: File Completion Problem
From: Kevin Broadey
Date: Thu, 13 Aug 1992 14:33
Date: Thu, 13 Aug 1992 14:33
43 lines
2735 bytes
2735 bytes
In article <22385.9208111225@compton.cogsci.ed.ac.uk> robert@cogsci.edinburgh.ac.UK writes: I have just run into a file completion problem in Epoch 4.0.1, although the same problem manifests itself in Emacs 18.52.7. I have recently started using a program which creates, for its own use, lock/log files called ".-etc-motd-" and ".-export-local-share-etc-motd-" in my home directory. The bug appears when I tried to visit a "dot" file in my home directory, though I couldn't remember its precise name. I typed C-x C-f, and was prompted for the "Find file:" with a default of "~/". When I added a "." to this and pressed SPC for completions, Emacs behaved as if these two were the only "dot" files in my home directory, when in fact there were many others. In particular, it first completed as far as "~/.-", when I pressed SPC again it gave "~/.-e", and when I pressed SPC a third time, it gave a completion list of just these two files. If more of the file name is given as a "seed" for the completion, all is well, and all the relevant files become visible. I'm afraid I don't have time to look into this problem now, but I notice that these two files come, alphabetically, between "." and "..": could some mechanisms for suppressing ".." be fouling up? I think this counts as a feature, not a bug. The binding for SPC during file name completion is `minibuffer-complete-word', which causes emacs to do completion *no further* than the end of the next word. Now the character syntax for "." is *not* "word constituent", so you're already at the end of a word. In this case, emacs word-completion looks for what it's already got followed by a hyphen. This is why you only get your "~/.-foobar" files listed. The thing to do is to use "?" instead of "SPC" to get a filename completion list. Alternatively, you could rebind "SPC" in one of the minibuffer maps, but I wouldn't recommend this! -- Kevin Broadey, EDS-Scicon Mail: Wavendon Tower, Wavendon, Milton Keynes, MK17 8LX, England E-mail: kbroadey@edscom.demon.co.uk Phone: +44 908 284198 or +44 908 585858 ext 4198
Technical Details
Message-ID:
<KEVIN.92Aug13143305@buffalobill.edscom.demon.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!edscom.demon.co.uk!kevinReferences:
kevin@edscom.demon.co.uk (Kevin Broadey)Show Full Headers
Complete Article Headers
Newsgroups: gnu.emacs.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!edscom.demon.co.uk!kevin From: kevin@edscom.demon.co.uk (Kevin Broadey) Subject: Re: File Completion Problem Message-ID: <KEVIN.92Aug13143305@buffalobill.edscom.demon.co.uk> Sender: gnulists@ai.mit.edu Organization: EDS-Scicon, Milton Keynes, UK References: kevin@edscom.demon.co.uk (Kevin Broadey) Distribution: gnu Date: Thu, 13 Aug 1992 14:33:05 GMT Approved: bug-gnu-emacs@prep.ai.mit.edu Lines: 44