[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell

From: Paul Eggert
Subject: Re: bug#57129: 29.0.50; Improve behavior of conditionals in Eshell
Date: Mon, 15 Aug 2022 13:55:35 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 8/15/22 11:58, Eli Zaretskii wrote:

Ah, okay.  It's a (mis)feature of Gnulib's gen_tempname function
(which is the guts of make-temp-file) in its implementation for
MS-Windows (and maybe other platforms?): it always begins from the
same "random" characters in the file name, and only generates other
random characters if there's already a file by that name.

Not sure I'd call it a misfeature, as gen_tempname is generating a uniquely-named file that is exclusive to Emacs, which is all it's supposed to do.

I do see a comment saying that gen_tempname generates "hard-to-predict" names, which as you note is not correct on MS-DOS, nor even strictly speaking on all POSIX platforms. I installed the first attached patch into Gnulib to fix that comment.

I'm not sure I'm entirely understanding the Emacs problem, but it appears to be that Emacs has its own set of filenames that it thinks it knows about, and Emacs wants the new temporary file's name to not be a member of that set. If I'm right, does the second attached patch (this patch is to Emacs) address the problem? I haven't tested or installed it.

Attachment: 0001-tempname-remove-incorrect-comment.patch
Description: Text Data

Attachment: 0001-Don-t-create-temp-file-with-same-name-as-visited.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]