unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Karl Fogel <kfogel@red-bean.com>
To: Jens Schmidt <jschmidt4gnu@vodafonemail.de>
Cc: Eli Zaretskii <eliz@gnu.org>,
	 Stefan Kangas <stefankangas@gmail.com>,
	emacs-devel@gnu.org
Subject: Re: [PATCH] Keep network security info buffers after use
Date: Sat, 23 Dec 2023 17:57:22 -0500	[thread overview]
Message-ID: <87plywedd9.fsf@red-bean.com> (raw)
In-Reply-To: <bcfb1ce8-cb1b-4751-b8b0-34d38c2ac0eb@vodafonemail.de> (Jens Schmidt's message of "Fri, 22 Dec 2023 22:58:38 +0100")

Jens Schmidt wrote:
>How about the following variation of Karl's patch, which 
>hopefully
>meets his request for simplicity and hopefully also these 
>requests of
>yours (as long as you do not count the additional multiple choice
>option as something that must be revertable by option):

FWIW, my request is not for simplicity but for discoverability.

If we have a new, separate command for getting access to cert info 
that has already passed by on the screen (during the 
`read-multiple-choice' prompt), I don't think most users are ever 
going to know that that command exists -- unless we somehow tell 
them about it *at the time when they need to know it*.

Getting prompted by `nsm-query-user' is already quite rare and is 
usually a surprise when it happens (because it's an unexpected 
interruption in what is normally a familiar UI interaction), so 
it's not a situation conducive to pre-emptive investment in an 
exploratory acquisition of knowledge.  Whatever guidance the user 
is going to get about how to handle the surprise is best provided 
in real time during the surprise itself.

Now, maybe a solution like this would work:

* During `nsm-query-user', preserve the cert info.

* After `nsm-query-user' is done, display a message saying
  something like "Use `M-x nsm-display-certificates' to view
  certificate information.".

That message would be logged in the "*Messages*" buffer, of 
course, and these days experienced users know to look there.

I don't know if the new message would be left in the minibuffer 
for long after `nsm-query-user' is done, because I don't know what 
other things typically happen immediately afterwards that might 
replace that message with their own messages in the minibuffer. 
But at least the new message would be in "*Messages*".

Thoughts?

Eli Zaretskii wrote:
> If read-multiple-choice expects a single key, then we cannot
> allow "C-x o", because those are two keys, not one.

Well, note that it already allows one to enter a recursive edit, 
which can be thought of as an arbitrary number of keys (since the 
r-m-c prompt doesn't end until after the recursive edit ends).

I think maybe I haven't really understood your objection.  I can't 
tell which of these objections you're making:

a) An implementation objection (we have no technical way to treat 
   `C-x o' specially -- it can't be done), or

b) A UX objection (the user expects the next keystroke to take 
   some final action, therefore we shouldn't confuse the user by
   doing something that breaks that pattern), or

c) A security objection (the question that `nsm-query-user' is 
   asking via r-m-c is a sensitive question, and we would open up
   new security vulnerabilities by treating `C-x o' specially).

You might be making more than one of these?

> read-multiple-choice _does_ have a way of accepting responses 
> longer
> than one key -- that's what the LONG-FORM argument is for -- but 
> that
> comes with a price, and in the case in point we don't want to 
> pay that
> price.  In other cases, if a non-modal dialog is desired, the 
> caller
> should use LONG-FORM.

I have never argued for using the LONG-FORM style in this case, 
and never argued for paying that price.

> > Take it on faith, for now, that we could make this happen. 
> > Let's 
> > just discuss whether we *want* it, assuming we can have it. 
> > If we 
> > decide we want it, I'll try to implement it, and I'll ask for 
> > help 
> > if I don't see the way.  If in the end we can't do it, fine, 
> > then 
> > we would be in exactly the situation we're now anyway.
> 
> You have already heard from me what we want (and I repeat that 
> above).

We have heard from you what *you* want.  As per above, I -- 
perhaps among others -- haven't really understood the reasons why 
you want the thing you want, and why you don't want the other 
thing I proposed.  My question above is meant to elicit that 
understanding.

Best regards,
-Karl



  parent reply	other threads:[~2023-12-23 22:57 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-17 19:02 [PATCH] Keep network security info buffers after use Karl Fogel
2023-12-17 19:27 ` Eli Zaretskii
2023-12-17 23:27   ` Karl Fogel
2023-12-18 17:36     ` Eli Zaretskii
2023-12-19  0:00       ` Karl Fogel
2023-12-19  5:31         ` tomas
2023-12-19 12:34         ` Eli Zaretskii
2023-12-19 12:50           ` tomas
2023-12-19 13:05             ` Eli Zaretskii
2023-12-20 22:43           ` Andreas Schwab
2023-12-21  6:45             ` Eli Zaretskii
2023-12-17 21:03 ` Andreas Schwab
2023-12-19  3:49 ` Richard Stallman
2023-12-19  5:56   ` Karl Fogel
2023-12-19 12:51     ` Eli Zaretskii
2023-12-19 13:10       ` tomas
2023-12-19 18:57       ` Karl Fogel
2023-12-19 19:08         ` Eli Zaretskii
2023-12-19 20:18           ` Karl Fogel
2023-12-20 21:34             ` Jens Schmidt
2023-12-20 22:26               ` Andreas Schwab
2023-12-21  6:29               ` Eli Zaretskii
2023-12-21 17:38                 ` Karl Fogel
2023-12-21 18:43                   ` Andreas Schwab
2023-12-21 23:10                     ` Karl Fogel
2023-12-22  7:29                       ` Eli Zaretskii
2023-12-22 10:00 ` Stefan Kangas
2023-12-22 11:51   ` Eli Zaretskii
2023-12-22 21:58     ` Jens Schmidt
2023-12-22 22:10       ` Jens Schmidt
2023-12-23  7:15       ` Eli Zaretskii
2023-12-23 10:46         ` Jens Schmidt
2023-12-23 22:57       ` Karl Fogel [this message]
2023-12-24  6:14         ` Eli Zaretskii
2023-12-24 13:52     ` Stefan Kangas
2023-12-24 14:51       ` Eli Zaretskii
2023-12-24 15:34         ` Karl Fogel
2023-12-24 16:28           ` Eli Zaretskii
2023-12-25 17:35             ` Kévin Le Gouguec
2023-12-25 18:51               ` Eli Zaretskii
2023-12-25 20:23                 ` Tomas Hlavaty
2023-12-26 14:43                 ` Kévin Le Gouguec
2023-12-26 17:01                   ` Eli Zaretskii
2023-12-26 22:09                     ` Stefan Kangas
2023-12-27 12:54                       ` Eli Zaretskii
2023-12-25 20:18               ` Tomas Hlavaty
2023-12-27 12:35                 ` Eli Zaretskii
2023-12-24 18:42       ` [External] : " Drew Adams

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=87plywedd9.fsf@red-bean.com \
    --to=kfogel@red-bean.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=jschmidt4gnu@vodafonemail.de \
    --cc=stefankangas@gmail.com \
    /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).