Subject: Re: bug#38265: 26.3; lock file is too easy to steal

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 11 Aug 2021 14:40:40 +0200

Allen Li <[email-masked]> writes:

> The default ask-user-about-lock is too easy to miss.
>
> For example, if one were typing "asparagus", they would likely steal the
> lock without even realizing that it happened (the "a" triggers the
> prompt on buffer modification and the "s" steals the lock).
>
> It would be nice to have the prompt be harder to hit accidentally, such
> as making all of the keys uppercase or having to type them out like
> yes/no (but the latter might be too heavyweight).  Or the prompt should
> have a short timeout before allowing the user to respond (like how
> yes-or-no-p does when you provide an invalid response).

I think making the lock prompt more extensive would be pretty
annoying -- we only use yes-or-no-p (and related) when doing something
destructive or dangerous, and stealing the lock isn't that dangerous.

So I think the current level of prompting is fine, and if you want more
prompting, then it should be easy enough to redefine/advice
ask-user-about-lock to be harder to get past, and I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no