all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Matt Armstrong <matt@rfc20.org>
Cc: 46397@debbugs.gnu.org, eggert@cs.ucla.edu, craven@gmx.net
Subject: bug#46397: 27.1; Cannot delete buffer pointing to a file in a path that includes a file
Date: Sat, 20 Mar 2021 12:43:34 +0200	[thread overview]
Message-ID: <83k0q2cdgp.fsf@gnu.org> (raw)
In-Reply-To: <87o8fh1gqv.fsf@rfc20.org> (message from Matt Armstrong on Wed, 17 Mar 2021 16:51:20 -0700)

> From: Matt Armstrong <matt@rfc20.org>
> Cc: eggert@cs.ucla.edu, 46397@debbugs.gnu.org, craven@gmx.net
> Date: Wed, 17 Mar 2021 16:51:20 -0700
> 
> Thank you for the review Eli.  I've incorporated your feedback in the
> attached patches.

Thanks, we are close.

> I made the warning message even more terse than you suggested because
> before doing so the warnings looked like this:
> 
>     Warning (unlock-file): Error unlocking file Unlocking file:
>     Permission denied, /tmp/inaccessible/foo, ignored [Disable showing]
>     [Disable logging]
> 
> ...which says "unlock file" too many times.  With the current patch it
> is a little bit better:
> 
>     Warning (unlock-file): Unlocking file: Permission denied,
>     /tmp/inaccessible/foo, ignored [Disable showing] [Disable logging]

Fine with me.

> * src/filelock.c (unlock_file_body): New function, do what
> unlock_file() used to.

Please don't use "foo()" to refer to a function 'foo': that looks like
a call of 'foo' with no arguments, which is not what you want.  Our
convention is to use 'foo' instead, quoted 'like this'.

> --- a/doc/lispref/files.texi
> +++ b/doc/lispref/files.texi
> @@ -764,6 +764,8 @@ File Locks
>  if the buffer is modified.  If the buffer is not modified, then
>  the file should not be locked, so this function does nothing.  It also
>  does nothing if the current buffer is not visiting a file, or is not locked.
> +Handles file system errors by calling @code{display-warning} and continuing
   ^^^^^^^
"This function handles ..."

> +** 'unlock-buffer' displays warnings instead of signaling.
> +Instead of signaling 'file-error' conditions for file system level
> +errors, the function now calls 'display-warning' and continues as if
> +the error did not occur.                         ^^^^^^^^^^^^^^^^^^^
   ^^^^^^^^^^^^^^^^^^^^^^^
I'd rephrase "... and otherwise ignores the error".

> +(defun userlock--handle-unlock-error (err)
> +  "Report an error ERR that occurred while unlocking a file."

This will sound better if you rename the argument:

  (defun userlock--handle-unlock-error (error)
    "Report an ERROR that occurred while unlocking a file."






  reply	other threads:[~2021-03-20 10:43 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  9:47 bug#46397: 27.1; Cannot delete buffer pointing to a file in a path that includes a file Peter
2021-02-09 23:47 ` Matt Armstrong
2021-02-10  0:23   ` Matt Armstrong
2021-02-10 15:05     ` Eli Zaretskii
2021-02-10 19:23       ` Paul Eggert
2021-02-10 19:45         ` Eli Zaretskii
2021-02-10 22:39           ` Matt Armstrong
2021-02-12  7:43             ` Eli Zaretskii
2021-02-12  9:36               ` Paul Eggert
2021-02-12 11:33                 ` Eli Zaretskii
2021-02-12 23:59                   ` Matt Armstrong
2021-02-13  8:07                     ` Eli Zaretskii
2021-02-11 22:14         ` Matt Armstrong
2021-02-12  2:20           ` Paul Eggert
2021-02-12  7:15             ` Eli Zaretskii
2021-02-13  1:15               ` Matt Armstrong
2021-02-13  1:26                 ` Paul Eggert
2021-02-13  8:21                   ` Eli Zaretskii
2021-02-13  8:28                 ` Eli Zaretskii
2021-02-14  0:49                   ` Matt Armstrong
2021-02-14 19:22                     ` Eli Zaretskii
2021-02-14 22:16                       ` Matt Armstrong
2021-02-15 15:09                         ` Eli Zaretskii
2021-02-16  0:49                           ` Matt Armstrong
2021-02-16  1:55                             ` Paul Eggert
2021-02-16 15:06                               ` Eli Zaretskii
2021-02-16 11:53                             ` Lars Ingebrigtsen
2021-02-22 19:24                             ` bug#46397: [PATCH] " Matt Armstrong
2021-02-19 19:10                           ` Matt Armstrong
2021-02-19 19:23                             ` Eli Zaretskii
2021-02-19 21:46                               ` Matt Armstrong
2021-02-20  9:09                                 ` Eli Zaretskii
2021-02-21  0:36                                   ` Matt Armstrong
2021-02-21 23:43                                     ` Mike Kupfer
2021-02-22  1:42                                       ` Matt Armstrong
2021-03-14 18:03                                         ` Bill Wohler
2021-03-17 23:36                                           ` Matt Armstrong
2021-02-24 17:37                                     ` Matt Armstrong
2021-02-24 18:50                                       ` Eli Zaretskii
2021-03-01 16:59                                       ` Eli Zaretskii
2021-03-05 22:19                                         ` Matt Armstrong
2021-03-06  9:36                                           ` Eli Zaretskii
2021-03-06 23:39                                             ` Matt Armstrong
2021-03-07  2:50                                             ` Paul Eggert
2021-03-07  5:57                                               ` Matt Armstrong
2021-02-19 19:45                             ` Paul Eggert
2021-02-19 21:52                               ` Matt Armstrong
2021-03-08  2:18                               ` Matt Armstrong
2021-03-11 14:34                                 ` Eli Zaretskii
2021-03-17 23:49                                   ` Matt Armstrong
2021-03-17 23:51                                   ` Matt Armstrong
2021-03-20 10:43                                     ` Eli Zaretskii [this message]
2021-03-22  1:43                                       ` Matt Armstrong
2021-03-27  9:20                                         ` Eli Zaretskii
2021-02-10  0:26   ` Matt Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k0q2cdgp.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=46397@debbugs.gnu.org \
    --cc=craven@gmx.net \
    --cc=eggert@cs.ucla.edu \
    --cc=matt@rfc20.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.