From: Juri Linkov <juri@linkov.net>
To: Allen Li <darkfeline@felesatra.moe>
Cc: 38265@debbugs.gnu.org
Subject: bug#38265: 26.3; lock file is too easy to steal
Date: Mon, 16 Dec 2019 02:04:39 +0200 [thread overview]
Message-ID: <87y2vd16g8.fsf@mail.linkov.net> (raw)
In-Reply-To: <804kyw35tp.fsf@felesatra.moe> (Allen Li's message of "Thu, 21 Nov 2019 20:14:58 -0800")
>>> 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).
>>
>> On the request in https://lists.gnu.org/archive/html/emacs-devel/2019-11/msg00517.html
>> recently ‘(discard-input)’ was removed from ‘read-char-from-minibuffer’.
>> Should it be put back?
>>
>> ask-user-about-supersession-threat uses read-char-from-minibuffer, so if
>> it contained ‘(discard-input)’ it could benefit from discarding such
>> inadvertent input as "s".
>>
>> But what about the case of keyboard macros like in the link above?
>> What if the user recorded a keyboard macro to input that "s" intentionally?
>
> We could check executing-kbd-macro and disable "interactive safety
> features". That seems like a valid use case of executing-kbd-macro.
Yes, executing-kbd-macro could help. Have you tried it?
next prev parent reply other threads:[~2019-12-16 0:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-19 8:35 bug#38265: 26.3; lock file is too easy to steal Allen Li
2019-11-20 22:28 ` Juri Linkov
[not found] ` <804kyw35tp.fsf@felesatra.moe>
2019-12-16 0:04 ` Juri Linkov [this message]
2019-12-26 19:22 ` Allen Li
2021-08-11 12:40 ` Lars Ingebrigtsen
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=87y2vd16g8.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=38265@debbugs.gnu.org \
--cc=darkfeline@felesatra.moe \
/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.