From: Allen Li <darkfeline@felesatra.moe>
To: Juri Linkov <juri@linkov.net>
Cc: 38265@debbugs.gnu.org
Subject: bug#38265: 26.3; lock file is too easy to steal
Date: Thu, 26 Dec 2019 11:22:14 -0800 [thread overview]
Message-ID: <80a77eopsp.fsf@felesatra.moe> (raw)
In-Reply-To: <87y2vd16g8.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 16 Dec 2019 02:04:39 +0200")
Juri Linkov <juri@linkov.net> 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).
>>>
>>> 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?
Tried how? I have not tried to patch the (discard-input) change to
check executing-kbd-macro, nor tried whether the (discard-input) change
addresses the concern in the original bug.
next prev parent reply other threads:[~2019-12-26 19:22 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
2019-12-26 19:22 ` Allen Li [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80a77eopsp.fsf@felesatra.moe \
--to=darkfeline@felesatra.moe \
--cc=38265@debbugs.gnu.org \
--cc=juri@linkov.net \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).