From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#31636: 27.0.50; lockfile syntax searchable from info manual Date: Tue, 29 May 2018 15:17:26 +0200 Message-ID: <87r2lufvo9.fsf@gmail.com> References: <20180529073311.EEA09102DA@mailuser.nyi.internal> <876036hn2e.fsf@gmail.com> <87tvqqd7rp.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1527599777 26398 195.159.176.226 (29 May 2018 13:16:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 May 2018 13:16:17 +0000 (UTC) Cc: Brady Trainor , 31636@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 29 15:16:13 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 1fNeTz-0006j3-IG for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2018 15:16:12 +0200 Original-Received: from localhost ([::1]:32971 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNeW6-0002dH-Cv for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2018 09:18:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNeVr-0002YP-8P for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:18:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNeVn-0002iW-5P for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:18:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45392) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNeVm-0002i2-SC for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:18:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fNeVm-0004k5-MS for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 09:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 29 May 2018 13:18: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.152759985618189 (code B ref 31636); Tue, 29 May 2018 13:18:02 +0000 Original-Received: (at 31636) by debbugs.gnu.org; 29 May 2018 13:17:36 +0000 Original-Received: from localhost ([127.0.0.1]:53288 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNeVL-0004jI-LX for submit@debbugs.gnu.org; Tue, 29 May 2018 09:17:35 -0400 Original-Received: from mail-wm0-f48.google.com ([74.125.82.48]:56004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNeVJ-0004j5-Sl for 31636@debbugs.gnu.org; Tue, 29 May 2018 09:17:34 -0400 Original-Received: by mail-wm0-f48.google.com with SMTP id a8-v6so40456132wmg.5 for <31636@debbugs.gnu.org>; Tue, 29 May 2018 06:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-copies-to:gmane-reply-to-list :date:in-reply-to:message-id:mime-version; bh=XaXC5tcaSiQ7u/xJR9zDvbcfJDjTINBy2tQhp4oxjYM=; b=kNi7FprN/p2sHyTxtUWRtUhim/30fzx6xNmFtBM1mHN76mv4gfWjUgIPSxaLb25l0T td44wLk5kl3PCIjae7qSv4n/RmgtN9YSoRm8Nf14tGzmWFmWZ4h9U++rIHm3LCZIOgPl WNKT2FS6vOdC4QOJf7qS85H9Smyuer5kT8YVtfZcEO+94yJWgWr+xtuncoByFaR1IENz V0mIwpZGInr2Aqu6UCdW+Q2b4M4AmJAPauAVBKyB3u3lnNwa4TIbx2x5KlKYLtRO/ueF uFSZOyuotN6wyrx7Xiv8gwKVC0KeYDVCwjvWUR/AsdQvp+IqPvS+31MWFF6Unk8vAzD+ AEBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=XaXC5tcaSiQ7u/xJR9zDvbcfJDjTINBy2tQhp4oxjYM=; b=fIigV//LuYoS8hctXRIQFJPX3G72nlRQuz6v5YQuswBT1cQ0S4tSyuhz91pWIuNH4a Ta0e8NJSLnsooIPScyixBtA9DfLAijZWelBCFNy8nDdzLW/XZjNIYX3Kew63bsnMSNaD 8G7nyi8OWJ3nNOtJgPORyPFq7HqF6+jURAPoUAK5cY9tQNMW7oiqMAzg8XO3bKyCOxKh UOLO1A+6ESchcSZZuZnrbaeV23PZb0eK+ShSvO4ALc8DXFUpEvGVw1OlkwQ273+1u7AK JoAH0QiHl3H07QIopdbDff8pUo2mMdTDRxKrI4WbCuRe1fkU1sEJYo58pHTAzsI/3+d4 L1rA== X-Gm-Message-State: ALKqPwdEeviNUUgNIFEAFxlRLb3m5ab0lJyDcV7LVqqMQvhtFMmlJ2kk 0WKBR5+KJ4tuJ3Atl4TzIzszwtHu6B4= X-Google-Smtp-Source: ADUXVKLxCxS+BHaLPYiPwtWaUBSJXraU500bLdlglMJ8v2VCaRTJRAJlUZUYSD2aRNxsOsEskqTSDg== X-Received: by 2002:a1c:e182:: with SMTP id y124-v6mr12634187wmg.57.1527599847868; Tue, 29 May 2018 06:17:27 -0700 (PDT) Original-Received: from rpluim ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id m134-v6sm16403796wmg.13.2018.05.29.06.17.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 06:17:26 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <87tvqqd7rp.fsf@gmail.com> (Noam Postavsky's message of "Tue, 29 May 2018 07:24:26 -0400") 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:146696 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Noam Postavsky writes: > Robert Pluim writes: > >> This does mean that if the implementation of locking ever changes, >> we=CA=BCd need to update those docs, but I don=CA=BCt think there=CA=BCs= much chance >> of that. > > Yes, that's usually the case. I think you can drop the word "currently" > from your patch. OK. V2 attached. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-more-discoverable-documentation-for.patch >From 03525a8319ba7a1fb9d1375fa989db0bf9f7feb1 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 29 May 2018 10:19:16 +0200 Subject: [PATCH] Add more discoverable documentation for '.#' To: emacs-devel@gnu.org * doc/emacs/files.texi (Interlocking): Add index entry for '.#' and mention its use in lockfile names. * src/filelock.c (Flock_buffer): Mention '.#' string, add reference to Interlocking info node. --- doc/emacs/files.texi | 4 +++- src/filelock.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 1ced7ca07c..72d538161a 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -766,9 +766,11 @@ Interlocking @findex ask-user-about-lock @cindex locking files +@cindex .# 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 +(It does this by creating a specially-named symbolic link, whose name +contains the string @code{.#} @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 diff --git a/src/filelock.c b/src/filelock.c index f2dc723407..042fe9e00b 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -773,7 +773,9 @@ DEFUN ("lock-buffer", Flock_buffer, Slock_buffer, FILE defaults to current buffer's visited file, or else nothing is done if current buffer isn't visiting a file. -If the option `create-lockfiles' is nil, this does nothing. */) +If the option `create-lockfiles' is nil, this does nothing. +The name of the lockfile used contains '.#', see +Info node `(emacs)Interlocking' for more information. */) (Lisp_Object file) { if (NILP (file)) -- 2.17.0.775.ge144d126d7 --=-=-=--