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 10:40:25 +0200 Message-ID: <876036hn2e.fsf@gmail.com> References: <20180529073311.EEA09102DA@mailuser.nyi.internal> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1527583157 22968 195.159.176.226 (29 May 2018 08:39:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 May 2018 08:39:17 +0000 (UTC) Cc: 31636@debbugs.gnu.org To: Brady Trainor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 29 10:39: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 1fNa9u-0005km-PR for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2018 10:39:11 +0200 Original-Received: from localhost ([::1]:59618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNaBw-0001sz-OT for geb-bug-gnu-emacs@m.gmane.org; Tue, 29 May 2018 04:41:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fNaBm-0001s8-DD for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 04:41:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fNaBi-0004v8-Fi for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 04:41:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fNaBi-0004uv-AR for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 04:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fNaBi-0000aE-0D for bug-gnu-emacs@gnu.org; Tue, 29 May 2018 04:41: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 08:41:01 +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.15275832352201 (code B ref 31636); Tue, 29 May 2018 08:41:01 +0000 Original-Received: (at 31636) by debbugs.gnu.org; 29 May 2018 08:40:35 +0000 Original-Received: from localhost ([127.0.0.1]:53117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNaBH-0000ZR-Cz for submit@debbugs.gnu.org; Tue, 29 May 2018 04:40:35 -0400 Original-Received: from mail-wm0-f41.google.com ([74.125.82.41]:50476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fNaBG-0000ZE-7z for 31636@debbugs.gnu.org; Tue, 29 May 2018 04:40:34 -0400 Original-Received: by mail-wm0-f41.google.com with SMTP id t11-v6so38169387wmt.0 for <31636@debbugs.gnu.org>; Tue, 29 May 2018 01:40:34 -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=3DMkeQCkrUbskcIstzVTCcQzT25Hn7kA9FkJ0LrVdMM=; b=WMEjdXS1IT9XZprMI4TtFwrjZlakb+iw4tWfsFw5UFa9ue/a7dtWHXEtuCbIHIjpCM q84MB/ZuFMxwYZIoOG0ifVs/1lZ64ELxQk5rdUqw9mXkLYzAWPYlU0Euy2pxIeRpTPgl mnDxnYiBYy0ZHgJSJO5236F45thy7FtlNFNrMcaPRvwBPQlr0+de7zFuMosLljcRRSN+ Rni1vZlzYMdEm5J6PIOPKfQlWdn3Z2QzBBjh8RihjvnsGUQoUzMFxKuanT8lUKPfrDh+ effPkBeF2ZmigzR2FVpej9ZB7lnZ9SQ8iR6ie43Jr00tY4bWenOEF7Clnjq39nDC+qkE 83xA== 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=3DMkeQCkrUbskcIstzVTCcQzT25Hn7kA9FkJ0LrVdMM=; b=TfOKl2LbdmXBFrutwq3iIq5tbi+ccSUoV4aVmW/K0/6JPxSwfdWUxCsU6T8BUv5/IM ifX+IpFK0fG7cz1EjgP+Wk0q7G/2cOq8/ODaqyIZ96KYTttXd85zbCizsWqiG1n4kapD rlupJntl0jj0hnoFnTLHkE+QJevvQ1UQum3OTbZ6Qso6QiF6Ag65IxE5RJkr8o3oU1v3 kfPQK3CGhQ/CMuiNe0YHzs3u1HzC1CIJHg21K/8LmoVI259kE5T9lwJd8TX/7FHU8RQe DwVkR7hi3ORIR/zy20lEHjTmx5yDbkS67jo/x/PH5YoZe8xyy999RSsxJN8jlPQ30MAv N+TA== X-Gm-Message-State: ALKqPwe87OwRdqhpTnLaj8gPCDQOXFWFKPDh8tZku2Cf9QLacnN3QyuO XFsK4gq7rNZjPzk5x9wCHZt6CPmcr80= X-Google-Smtp-Source: ADUXVKL+tM8QVim4i+xjgBCh5ZnZ30hBer1P+qeUhL9RA4JAe9zene9wM3Yf4nHBPj9BBLaQEY9UHQ== X-Received: by 2002:a1c:4249:: with SMTP id p70-v6mr10790718wma.17.1527583228062; Tue, 29 May 2018 01:40:28 -0700 (PDT) Original-Received: from rpluim ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id u8-v6sm12371177wmc.40.2018.05.29.01.40.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 01:40:26 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <20180529073311.EEA09102DA@mailuser.nyi.internal> (Brady Trainor's message of "Tue, 29 May 2018 00:33:10 -0700") 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:146681 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Brady Trainor writes: > I had hoped to find about files such as `/tmp/.#fileA` by searching in > the info manual for ".#". But I did not find such a string there, nor > via `apropos-documentation`. > > If a user encounters such a file in a directory, I think it would lead > to good discoverability if a manual or docstring had some mention of the > string ".#", so that one might search for it. > > I'm sending this report without having spent a lot of time on it now, > not sure if this ".#" convention comes from outside of emacs. We could add an index entry to the info manual. Adding a reference inside the docstring of 'lock-buffer' would enable 'apropos-documentation' to find it as well. 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 mu= ch chance of that. Proposed patch (for emacs-26?) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Add-more-discoverable-documentation-for.patch >From 2655d523a8136365e00076e1162598913f58277c 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..f80ad5bbd7 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 +currently 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..d93adf8e81 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 currently contains '.#', see +Info node `(emacs)Interlocking' for more information. */) (Lisp_Object file) { if (NILP (file)) -- 2.17.0.775.ge144d126d7 --=-=-=--