bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains


From: Lars Ingebrigtsen
Subject: bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains
Date: Wed, 07 Jul 2021 21:22:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> Btw, we could avoid having 2 places that produces the default
> ".#"+FILENAME lock file name by exposing to Lisp a C primitive which
> does that.  So that problem can easily be solved.

Yes, that's definitely true.  We could even make it more general and
then use it, for instance, in the auto-save code path, too.

That is, with a signature of, say...

(file-name-surround file-name prefix &optional suffix)

(file-name-surround "/tmp/foo.txt" "#" "#")
=> "/tmp/#foo.txt#"

It'd be less consing than the current

(concat (file-name-directory filename) "#" (file-name-nondirectory filename) 
"#")

code we have.

A better name would be nice, though.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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