From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#31636: 27.0.50; lockfile syntax searchable from info manual Date: Fri, 01 Jun 2018 11:52:42 +0300 Message-ID: <83tvqmga79.fsf@gnu.org> References: <20180529073311.EEA09102DA@mailuser.nyi.internal> <876036hn2e.fsf@gmail.com> <87tvqqd7rp.fsf@gmail.com> <87r2lufvo9.fsf@gmail.com> <83r2luv28h.fsf@gnu.org> <87a7sib7ty.fsf@gmail.com> <83in75vp8l.fsf@gnu.org> <87wovkyv6l.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1527843064 7828 195.159.176.226 (1 Jun 2018 08:51:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2018 08:51:04 +0000 (UTC) Cc: mail@bradyt.com, 31636@debbugs.gnu.org, eggert@cs.ucla.edu, npostavs@gmail.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 01 10:51:00 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1fOflz-0001sY-Oh for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 10:51:00 +0200 Original-Received: from localhost ([::1]:48238 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOfo6-0005Xe-MB for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 04:53:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOfnz-0005XX-LM for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 04:53:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOfny-0001qN-Nz for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 04:53:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48893) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOfny-0001qF-K9 for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 04:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fOfny-0006IK-DA for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 04:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Jun 2018 08:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31636 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31636-submit@debbugs.gnu.org id=B31636.152784318024189 (code B ref 31636); Fri, 01 Jun 2018 08:53:02 +0000 Original-Received: (at 31636) by debbugs.gnu.org; 1 Jun 2018 08:53:00 +0000 Original-Received: from localhost ([127.0.0.1]:56790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOfnw-0006I4-3H for submit@debbugs.gnu.org; Fri, 01 Jun 2018 04:53:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOfnu-0006Hr-8e for 31636@debbugs.gnu.org; Fri, 01 Jun 2018 04:52:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOfno-0001jj-1R for 31636@debbugs.gnu.org; Fri, 01 Jun 2018 04:52:53 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOfnh-0001fs-6g; Fri, 01 Jun 2018 04:52:45 -0400 Original-Received: from [176.228.60.248] (port=3953 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fOfng-0008JD-Cz; Fri, 01 Jun 2018 04:52:44 -0400 In-reply-to: <87wovkyv6l.fsf@gmail.com> (message from Robert Pluim on Thu, 31 May 2018 12:29:54 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146809 Archived-At: > From: Robert Pluim > Cc: mail@bradyt.com, 31636@debbugs.gnu.org, eggert@cs.ucla.edu, npostavs@gmail.com > Date: Thu, 31 May 2018 12:29:54 +0200 > > Do we want a '.#' index entry in the lispref as well? Yes. > Do I need to explain that USER will be replaced by the current user, > etc? Yes, I think so. > --- i/doc/emacs/files.texi > +++ w/doc/emacs/files.texi > @@ -766,13 +766,16 @@ Interlocking > > @findex ask-user-about-lock > @cindex locking files > +@cindex .#, lock file names > +@cindex file locking > When you make the first modification in an Emacs buffer that is > visiting a file, Emacs records that the file is @dfn{locked} by you. > (It does this by creating a specially-named symbolic link@footnote{If > your file system does not support symbolic links, a regular file is > -used.} with special contents in the same directory.) Emacs removes the lock > -when you save the changes. The idea is that the file is locked > -whenever an Emacs buffer visiting it has unsaved changes. > +used.} with special contents in the same directory. @xref{File > +Locks,,, elisp} for more details.) Emacs removes the lock when you > +save the changes. The idea is that the file is locked whenever an > +Emacs buffer visiting it has unsaved changes. This is OK. > --- i/doc/lispref/files.texi > +++ w/doc/lispref/files.texi > @@ -720,8 +720,13 @@ File Locks > Emacs can then detect the first attempt to modify a buffer visiting a > file that is locked by another Emacs job, and ask the user what to do. > The file lock is really a file, a symbolic link with a special name, > -stored in the same directory as the file you are editing. (On file > -systems that do not support symbolic links, a regular file is used.) > +stored in the same directory as the file you are editing. The name is > +constructed by prepending @file{.#} to the filename of the buffer. > +The target of the symbolic link will be of the form > +@code{USER@@HOST.PID:BOOT}. @code{:BOOT} is omitted if the boot time > +is unavailable. (On file systems that do not support symbolic links, > +a regular file is used instead, with contents of the form > +@code{USER@@HOST.PID:BOOT}.) This should use @var{user}, @var{host} etc. for the components of the target file name, and it should explain shortly what each component stands for. > diff --git i/src/filelock.c w/src/filelock.c > index f2dc723407..4f7ec414f5 100644 > --- i/src/filelock.c > +++ w/src/filelock.c > @@ -849,7 +849,9 @@ syms_of_filelock (void) > Vtemporary_file_directory = Qnil; > > DEFVAR_BOOL ("create-lockfiles", create_lockfiles, > - doc: /* Non-nil means use lockfiles to avoid editing collisions. */); > + doc: /* Non-nil means use lockfiles to avoid editing collisions. > +The names of the lockfiles will start with `.#'. See also > +`lock-buffer' and Info node `(emacs)Interlocking'. */); Here I would say that the name of the lockfile is constructed by prepending a '.#' to the name of the file being locked. Thanks.