* Suggest renaming Emacs source file with '$' in name
@ 2021-01-01 10:18 Paul Eggert
2021-01-01 10:31 ` Andreas Schwab
2021-01-03 3:37 ` Stefan Monnier
0 siblings, 2 replies; 9+ messages in thread
From: Paul Eggert @ 2021-01-01 10:18 UTC (permalink / raw)
To: Stefan Kangas; +Cc: Emacs Development
Emacs master commit 2020-10-23T19:07:26Z!stefan@marxist.se
(72c9d4bee112a7e44316b04f361cc4ad3b16cf76) introduced a file with this name:
test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
Unfortunately that '$' causes trouble when I run shell commands like this:
$ git log test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
fatal: ambiguous argument
'test/lisp/minibuffer-resources/data/minibuffer-test-cttq': unknown
revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
plus, I had problems when I ran shell scripts etc. to update copyright
dates for 2021 and to merge emacs-27 into master.
I suggest renaming the file in the Emacs source tree. If the '$' is
needed for a filename test, the test can create a file with that name;
that should be less of a problem than having a '$' file in the repository.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggest renaming Emacs source file with '$' in name
2021-01-01 10:18 Suggest renaming Emacs source file with '$' in name Paul Eggert
@ 2021-01-01 10:31 ` Andreas Schwab
2021-01-01 16:54 ` Paul Eggert
2021-01-03 3:37 ` Stefan Monnier
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2021-01-01 10:31 UTC (permalink / raw)
To: Paul Eggert; +Cc: Stefan Kangas, Emacs Development
On Jan 01 2021, Paul Eggert wrote:
> Emacs master commit 2020-10-23T19:07:26Z!stefan@marxist.se
> (72c9d4bee112a7e44316b04f361cc4ad3b16cf76) introduced a file with this
> name:
>
> test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
>
> Unfortunately that '$' causes trouble when I run shell commands like this:
>
> $ git log test/lisp/minibuffer-resources/data/minibuffer-test-cttq$tion
$ git log test/lisp/minibuffer-resources/data/minibuffer-test-cttq\$tion
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggest renaming Emacs source file with '$' in name
2021-01-01 10:31 ` Andreas Schwab
@ 2021-01-01 16:54 ` Paul Eggert
2021-01-01 17:10 ` Andreas Schwab
2021-01-01 18:18 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: Paul Eggert @ 2021-01-01 16:54 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Stefan Kangas, Emacs Development
On 1/1/21 2:31 AM, Andreas Schwab wrote:
> $ git log test/lisp/minibuffer-resources/data/minibuffer-test-cttq\$tion
That solves that particular problem but the '$' caused other problems
for me during the semiautomated process of updating the copyright.
POSIX excludes '$' from the list of characters in portable filenames
<https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_282>
and we'll avoid these hassles by sticking to the POSIX character set.
I can of course redo the scripts to handle '$' in filenames on GNU
platforms. I could even hack them to handle other characters, too, like
newline etc. in filenames. And others who deal with Emacs sources could
do likewise. But that'd be a hassle and we all have better things to do.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggest renaming Emacs source file with '$' in name
2021-01-01 16:54 ` Paul Eggert
@ 2021-01-01 17:10 ` Andreas Schwab
2021-01-01 17:30 ` Paul Eggert
2021-01-01 18:18 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2021-01-01 17:10 UTC (permalink / raw)
To: Paul Eggert; +Cc: Stefan Kangas, Emacs Development
On Jan 01 2021, Paul Eggert wrote:
> On 1/1/21 2:31 AM, Andreas Schwab wrote:
>> $ git log test/lisp/minibuffer-resources/data/minibuffer-test-cttq\$tion
>
> That solves that particular problem but the '$' caused other problems for
> me during the semiautomated process of updating the copyright.
Since the file already existed for over a year, that cannot be the
problem.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggest renaming Emacs source file with '$' in name
2021-01-01 16:54 ` Paul Eggert
2021-01-01 17:10 ` Andreas Schwab
@ 2021-01-01 18:18 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-01-01 18:18 UTC (permalink / raw)
To: Paul Eggert; +Cc: stefan, schwab, Emacs-devel
> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Fri, 1 Jan 2021 08:54:38 -0800
> Cc: Stefan Kangas <stefan@marxist.se>, Emacs Development <Emacs-devel@gnu.org>
> On 1/1/21 2:31 AM, Andreas Schwab wrote:
> > $ git log test/lisp/minibuffer-resources/data/minibuffer-test-cttq\$tion
>
> That solves that particular problem but the '$' caused other problems
> for me during the semiautomated process of updating the copyright.
>
> POSIX excludes '$' from the list of characters in portable filenames
> <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_282>
> and we'll avoid these hassles by sticking to the POSIX character set.
>
> I can of course redo the scripts to handle '$' in filenames on GNU
> platforms. I could even hack them to handle other characters, too, like
> newline etc. in filenames. And others who deal with Emacs sources could
> do likewise. But that'd be a hassle and we all have better things to do.
I think Paul is right, and we should rename that file. It isn't an
important file, so renaming it shouldn't present problems we usually
try to avoid.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggest renaming Emacs source file with '$' in name
2021-01-01 10:18 Suggest renaming Emacs source file with '$' in name Paul Eggert
2021-01-01 10:31 ` Andreas Schwab
@ 2021-01-03 3:37 ` Stefan Monnier
2021-01-03 5:54 ` Jean Louis
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2021-01-03 3:37 UTC (permalink / raw)
To: Paul Eggert; +Cc: Stefan Kangas, Emacs Development
> I suggest renaming the file in the Emacs source tree. If the '$' is needed
> for a filename test, the test can create a file with that name; that should
> be less of a problem than having a '$' file in the repository.
IIRC, I added this file for a completion test, where the $ is very much
needed (the test is about the use of $ in `read-file-name` where it can
be used for ENVVARs, it can be escaped by doubling it, and it stays
untouched in case it ends up not referring to an existing ENVVAR).
So feel free to rename it, but please be careful to change the tests so
they first rename it back to its "name with dollar in it".
Stefan "who can't remember having problems with $ in file names"
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Suggest renaming Emacs source file with '$' in name
2021-01-03 3:37 ` Stefan Monnier
@ 2021-01-03 5:54 ` Jean Louis
0 siblings, 0 replies; 9+ messages in thread
From: Jean Louis @ 2021-01-03 5:54 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Paul Eggert, Stefan Kangas, Emacs Development
* Stefan Monnier <monnier@iro.umontreal.ca> [2021-01-03 06:38]:
> > I suggest renaming the file in the Emacs source tree. If the '$' is needed
> > for a filename test, the test can create a file with that name; that should
> > be less of a problem than having a '$' file in the repository.
>
> IIRC, I added this file for a completion test, where the $ is very much
> needed (the test is about the use of $ in `read-file-name` where it can
> be used for ENVVARs, it can be escaped by doubling it, and it stays
> untouched in case it ends up not referring to an existing ENVVAR).
>
> So feel free to rename it, but please be careful to change the tests so
> they first rename it back to its "name with dollar in it".
>
>
> Stefan "who can't remember having problems with $ in file names"
Good reference on file names:
https://dwheeler.com/essays/fixing-unix-linux-filenames.html
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-01-03 5:54 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-01 10:18 Suggest renaming Emacs source file with '$' in name Paul Eggert
2021-01-01 10:31 ` Andreas Schwab
2021-01-01 16:54 ` Paul Eggert
2021-01-01 17:10 ` Andreas Schwab
2021-01-01 17:30 ` Paul Eggert
2021-01-01 17:58 ` Andreas Schwab
2021-01-01 18:18 ` Eli Zaretskii
2021-01-03 3:37 ` Stefan Monnier
2021-01-03 5:54 ` Jean Louis
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).