GNU bug report logs - #49261
28.0.50; File Locking Breaks Presumptuous Toolchains

Previous Next

Package: emacs;

Reported by: Mallchad Skeghyeph <ncaprisunfan <at> gmail.com>

Date: Mon, 28 Jun 2021 18:28:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: michael.albinus <at> gmx.de, ncaprisunfan <at> gmail.com, 49261 <at> debbugs.gnu.org
Subject: bug#49261: 28.0.50; File Locking Breaks Presumptuous Toolchains
Date: Wed, 07 Jul 2021 21:22:32 +0200
Eli Zaretskii <eliz <at> 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




This bug report was last modified 3 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.