From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Radon Rosborough Newsgroups: gmane.emacs.devel Subject: Re: Rename, delete and move current buffer and file Date: Thu, 10 May 2018 11:01:39 -0600 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000084c5db056bdcfb56" X-Trace: blaine.gmane.org 1525971726 21426 195.159.176.226 (10 May 2018 17:02:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 10 May 2018 17:02:06 +0000 (UTC) Cc: emacs-devel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 10 19:02:02 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fGox7-0005Tg-SB for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 19:02:01 +0200 Original-Received: from localhost ([::1]:34825 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGozE-0005y3-Sv for ged-emacs-devel@m.gmane.org; Thu, 10 May 2018 13:04:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGoxS-0005UN-Nz for emacs-devel@gnu.org; Thu, 10 May 2018 13:02:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGoxR-0001Ir-W3 for emacs-devel@gnu.org; Thu, 10 May 2018 13:02:22 -0400 Original-Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:33942) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fGoxR-0001Ib-NT for emacs-devel@gnu.org; Thu, 10 May 2018 13:02:21 -0400 Original-Received: by mail-lf0-x22a.google.com with SMTP id r25-v6so3982030lfd.1 for ; Thu, 10 May 2018 10:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XC2wLeNfLBBrtBCCX+xEODjEWCSnOG2KtTXfhC1sX38=; b=BG8tkm+AWH0CQ/+nV/fDLNVeMbAOBFZzrGgtEzIBM/qU8RueONXLaa1HwCvbU+BJd6 3bAPY1Uhq3ETSxiOuX+XsSje1ouAx/8qTha34fHyB0Cit9kRlRm285b9i90UNVwjcNMn PUOjiNXcH4B42DDYF3PqWTDwF+wrmVIbGcWETI+NVATSV0Q6/B/BxWrkc0iXJYpPemIl j0sowvfoUZlZMe2YYzmDLw2f9ZHvp9ioOyCS3ByBQxVLk7QPp8tHFXiZ+13Kmf2ln3ta KL/OS06r9huUstf4279ULiORiuUuf2+YvZ8WB4J14aO7HfbiSNLEfWdeiFFj8RKJw/80 Sdlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XC2wLeNfLBBrtBCCX+xEODjEWCSnOG2KtTXfhC1sX38=; b=g+HX9ca1+7QaYJJxtsaYXontyZILE+aRx5/k/cwQFvtPlQhNnA4VpQ3qr2rqvQkz8s r0BPxBhNljEIQu2yao+tiybSJ/ST447qm05mvCRGWU0EHEESWhGvrcIKcuMbjkX4RZln tUjbhdbxaIic4TcYDN++TsgNnXZEKHpp+UC1fnugBCL2sLLSN86FeNfkPlGBNevJSXBX s6fMHLNyRiJAkHsR8ul5CmVrTExVqpdm5X5AF7W32SoMyYNIjsLuv9AIBCN/H9awhSc9 0jj4KIZkSZRUnpU/j4xlcaHnvRtoltpYMZl5n0wkBJJ8VUbFt8XfOKWJBi6Ds34P/mcA azZw== X-Gm-Message-State: ALKqPwdQ/7yrlGIYoUigZB28fGvvBfCbFwlobyXM+DTCJXM7yoM3t+dt b4Ojof3jFqfEo1TSQqDxDUFg4ZohbV6Fi6JegeE= X-Google-Smtp-Source: AB8JxZpg3Hqw46nDTtPgQNcKFO/S3XUqP1pHV9OTbMuk5gtgo82/sr3Mbfh1fGUH1BvkhjswJe3exVLxeY9Wgg3o20M= X-Received: by 2002:a19:1498:: with SMTP id 24-v6mr1447490lfu.128.1525971740311; Thu, 10 May 2018 10:02:20 -0700 (PDT) Original-Received: by 2002:a19:268f:0:0:0:0:0 with HTTP; Thu, 10 May 2018 10:01:39 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225205 Archived-At: --00000000000084c5db056bdcfb56 Content-Type: text/plain; charset="UTF-8" > Emacs's handling of files tends to be fairly vague about how it handles > file identity, so I think the fine distinction between "cp+rm" and "mv" > in this case can be ignored. I would have to disagree here. At the very least, as a *user*, when I look for a command to rename a file, if I find a command that copies and deletes the original, then I'm going to keep looking. Also, renaming a file is atomic on many filesystems, whereas copy+delete is certainly not going to be. Why would we want the "official" way to rename a file be needlessly prone to race conditions, even if the problem doesn't come up in practice? --00000000000084c5db056bdcfb56 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Emacs's handling of files tends to be fairly= vague about how it handles
> file identity, so I think the fi= ne distinction between "cp+rm" and "mv"
> = in this case can be ignored.

I would have to disag= ree here. At the very least, as a *user*, when I
look for a comma= nd to rename a file, if I find a command that copies
and deletes = the original, then I'm going to keep looking. Also,
renaming = a file is atomic on many filesystems, whereas copy+delete is
cert= ainly not going to be. Why would we want the "official" way to
rename a file be needlessly prone to race conditions, even if the
problem doesn't come up in practice?

--00000000000084c5db056bdcfb56--