all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg via help-gnu-emacs <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Cc: Ingemar Holmgren <dag.h@hotmail.se>
Subject: Re: how to make find-file treat space/dashes like any other character?
Date: Thu, 30 May 2019 19:36:03 +0200	[thread overview]
Message-ID: <86woi73kvw.fsf@zoho.eu> (raw)
In-Reply-To: CAHGWWxFaBZoxw2z=WV1wm_6-qTVOrvGKU4mgpAJxMJ=8Vpmvsg@mail.gmail.com

Thouis (Ray) Jones wrote:

> Is there an easy way to configure find-file
> and its ilk to treat spaces & dashes like any
> other character in file completion?
>
> If I have three files in a directory with names:
> abc 123.txt
> abc-123.txt
> abc_123.txt

UAAAH!

Spaces in filenames are strictly forbidden! [1]

Dashes are the way to go. Even more so, it is
the-way-to-go!

Underscores are the_way_to_go when there is
a tradition behind it, e.g.
the C programming language.

> Completing filenames from "abc" in find-file
> will preferentially choose the first, then
> the second, then the last. I'd like for it to
> treat each of these the same (stopping at
> "abc" and prompting with a list of
> completions).

I just set up a test directory and touch(1)ed
3 files with the exact same filenames you
mention. Then I did `find-file', wrote "abc",
and when I hit TAB, I got a list of
completions, including all three files, just
as expected.

I wonder why you don't? :O


[1] RFC Emanuel Berg

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




      reply	other threads:[~2019-05-30 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-30 14:58 how to make find-file treat space/dashes like any other character? Thouis (Ray) Jones
2019-05-30 17:36 ` Emanuel Berg via help-gnu-emacs [this message]

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

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

  git send-email \
    --in-reply-to=86woi73kvw.fsf@zoho.eu \
    --to=help-gnu-emacs@gnu.org \
    --cc=dag.h@hotmail.se \
    --cc=moasenwood@zoho.eu \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.