* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-13 14:39 ` bug#19368: 25.0.50; NSM prompt is not self-explanatory enough Eli Zaretskii
@ 2014-12-14 4:43 ` Stefan Monnier
2014-12-14 11:37 ` Ted Zlatanov
2016-02-05 3:43 ` Lars Ingebrigtsen
2014-12-14 8:12 ` Lars Magne Ingebrigtsen
` (2 subsequent siblings)
3 siblings, 2 replies; 17+ messages in thread
From: Stefan Monnier @ 2014-12-14 4:43 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 19368
Agreed. Two more nitpicks:
- The cursor is not displayed next to the prompt, contrary to the usual
behavior (e.g. of y-or-n-p).
- maybe this is a problem in my "popup frames galore" setup, but I'd
prefer that the explanation window be displayed in the current frame
when possible.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-14 4:43 ` Stefan Monnier
@ 2014-12-14 11:37 ` Ted Zlatanov
2016-02-05 3:43 ` Lars Ingebrigtsen
1 sibling, 0 replies; 17+ messages in thread
From: Ted Zlatanov @ 2014-12-14 11:37 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 19368
On Sat, 13 Dec 2014 23:43:37 -0500 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
SM> Agreed. Two more nitpicks:
SM> - The cursor is not displayed next to the prompt, contrary to the usual
SM> behavior (e.g. of y-or-n-p).
SM> - maybe this is a problem in my "popup frames galore" setup, but I'd
SM> prefer that the explanation window be displayed in the current frame
SM> when possible.
One more: if the query happens while starting Gnus, I end up with Gnus
on the left and the last connection info on the right in a 50/50
left-right split in the current frame.
Ted
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-14 4:43 ` Stefan Monnier
2014-12-14 11:37 ` Ted Zlatanov
@ 2016-02-05 3:43 ` Lars Ingebrigtsen
1 sibling, 0 replies; 17+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-05 3:43 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 19368
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> Agreed. Two more nitpicks:
> - The cursor is not displayed next to the prompt, contrary to the usual
> behavior (e.g. of y-or-n-p).
Ah, that's the (cursor-in-echo-area t) thing... Fixed now.
> - maybe this is a problem in my "popup frames galore" setup, but I'd
> prefer that the explanation window be displayed in the current frame
> when possible.
Let's see... It just calls
(with-help-window buffer
Shouldn't that do the right thing automatically? (This may have changed
since you made the comment, though.)
This is my test case for the nsm query, so you can just eval it and see
what you think about it now...
(nsm-query-user
"The fingerprint for the connection to %s:%s is new: %s"
'("ssl.gstatic.com" 443 "sha1:91:88:b2:9c:e1:fd:ca:e2:92:7d:a7:ce:12:ea:dc:ad:53:90:2d:c5")
#("Certificate information
Issued by: Google Internet Authority G2
Issued to: Google Inc
Hostname: *.google.com
Public key: EC, signature: RSA-SHA256
Protocol: TLS1.2, key: ECDHE-ECDSA, cipher: AES-128-GCM, mac: AEAD
Security level: High
Valid: From 2016-01-27 to 2016-04-26
" 280 284 (face bold))
)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-13 14:39 ` bug#19368: 25.0.50; NSM prompt is not self-explanatory enough Eli Zaretskii
2014-12-14 4:43 ` Stefan Monnier
@ 2014-12-14 8:12 ` Lars Magne Ingebrigtsen
2014-12-14 16:02 ` Eli Zaretskii
2016-02-05 3:35 ` Lars Ingebrigtsen
2016-06-02 14:31 ` Archived problem report bug#19368 (bug#19368: 25.0.50; NSM prompt is not self-explanatory enough) GNU bug Tracking System
3 siblings, 1 reply; 17+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-12-14 8:12 UTC (permalink / raw)
To: 19368
Eli Zaretskii <eliz@gnu.org> writes:
> It expects me to press either N, S, or A, but that is not clear enough
> from the prompt.
>
> I suggest to change the prompt to something like this:
>
> Continue connecting? ([N]o, [S]ession only, [A]lways)
>
> Alternatively, the first letter could be underlined (assuming we can
> rely on every supported terminal to be able to display underlined
> characters).
Yeah. But shouldn't we have a general multiple-choice library function
for these (sort of) extended y-or-n-p functions?
While writing the NSM function, I was looking around for one, but the
only thing I found was `gnus-multiple-choice'. :-) So I had
implemented this before. A call using that function here would be
(gnus-multiple-choice "Continue connecting?" '((?a "always")
(?s "session only")
(?n "no")))
Or something. If the user types something else, you get a help buffer
and stuff.
Shall I make that into a general function (it needs some tweaking in the
prompting department)?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-14 8:12 ` Lars Magne Ingebrigtsen
@ 2014-12-14 16:02 ` Eli Zaretskii
2014-12-14 22:48 ` Stefan Monnier
` (2 more replies)
0 siblings, 3 replies; 17+ messages in thread
From: Eli Zaretskii @ 2014-12-14 16:02 UTC (permalink / raw)
To: Lars Magne Ingebrigtsen; +Cc: 19368
> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 14 Dec 2014 09:12:21 +0100
>
> Yeah. But shouldn't we have a general multiple-choice library function
> for these (sort of) extended y-or-n-p functions?
>
> While writing the NSM function, I was looking around for one, but the
> only thing I found was `gnus-multiple-choice'. :-) So I had
> implemented this before. A call using that function here would be
>
> (gnus-multiple-choice "Continue connecting?" '((?a "always")
> (?s "session only")
> (?n "no")))
>
> Or something. If the user types something else, you get a help buffer
> and stuff.
>
> Shall I make that into a general function (it needs some tweaking in the
> prompting department)?
Sounds useful, thanks. Bonus points for optionally popping a dialog
(via x-popup-dialog) when the command was invoked by a mouse.
Btw, if you do that, userlock.el cries for using this functionality,
and likewise hack-local-variables-confirm.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-14 16:02 ` Eli Zaretskii
@ 2014-12-14 22:48 ` Stefan Monnier
2014-12-21 11:50 ` Lars Ingebrigtsen
2016-02-04 7:24 ` Lars Ingebrigtsen
2016-02-05 3:53 ` Lars Ingebrigtsen
2 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2014-12-14 22:48 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Lars Magne Ingebrigtsen, 19368
>> Yeah. But shouldn't we have a general multiple-choice library function
>> for these (sort of) extended y-or-n-p functions?
The closest is probably read-char-choice.
Stefan
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-14 22:48 ` Stefan Monnier
@ 2014-12-21 11:50 ` Lars Ingebrigtsen
0 siblings, 0 replies; 17+ messages in thread
From: Lars Ingebrigtsen @ 2014-12-21 11:50 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 19368
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>>> Yeah. But shouldn't we have a general multiple-choice library function
>>> for these (sort of) extended y-or-n-p functions?
>
> The closest is probably read-char-choice.
It's kinda close, but it doesn't tell the user what the expansions to
the choices are, which I think is kinda useful. Gnus has some
multiple-choice prompts that are longer than can be displayed in the
echo buffer nicely, and it would be nice if it auto-shortened the help
texts...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-14 16:02 ` Eli Zaretskii
2014-12-14 22:48 ` Stefan Monnier
@ 2016-02-04 7:24 ` Lars Ingebrigtsen
2016-02-04 16:47 ` Eli Zaretskii
2016-02-05 3:53 ` Lars Ingebrigtsen
2 siblings, 1 reply; 17+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-04 7:24 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 19368
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
>> Date: Sun, 14 Dec 2014 09:12:21 +0100
>>
>> Yeah. But shouldn't we have a general multiple-choice library function
>> for these (sort of) extended y-or-n-p functions?
>>
>> While writing the NSM function, I was looking around for one, but the
>> only thing I found was `gnus-multiple-choice'. :-) So I had
>> implemented this before. A call using that function here would be
>>
>> (gnus-multiple-choice "Continue connecting?" '((?a "always")
>> (?s "session only")
>> (?n "no")))
>>
>> Or something. If the user types something else, you get a help buffer
>> and stuff.
>>
>> Shall I make that into a general function (it needs some tweaking in the
>> prompting department)?
>
> Sounds useful, thanks. Bonus points for optionally popping a dialog
> (via x-popup-dialog) when the command was invoked by a mouse.
Ok, I'll start implementing this, and we can tweak the look a bit. This
will be on the trunk, and not in emacs-25.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2016-02-04 7:24 ` Lars Ingebrigtsen
@ 2016-02-04 16:47 ` Eli Zaretskii
0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2016-02-04 16:47 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 19368
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 19368@debbugs.gnu.org
> Date: Thu, 04 Feb 2016 18:24:30 +1100
>
> >> (gnus-multiple-choice "Continue connecting?" '((?a "always")
> >> (?s "session only")
> >> (?n "no")))
> >>
> >> Or something. If the user types something else, you get a help buffer
> >> and stuff.
> >>
> >> Shall I make that into a general function (it needs some tweaking in the
> >> prompting department)?
> >
> > Sounds useful, thanks. Bonus points for optionally popping a dialog
> > (via x-popup-dialog) when the command was invoked by a mouse.
>
> Ok, I'll start implementing this, and we can tweak the look a bit.
Thanks.
> This will be on the trunk, and not in emacs-25.
Yes, definitely.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-14 16:02 ` Eli Zaretskii
2014-12-14 22:48 ` Stefan Monnier
2016-02-04 7:24 ` Lars Ingebrigtsen
@ 2016-02-05 3:53 ` Lars Ingebrigtsen
2 siblings, 0 replies; 17+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-05 3:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 19368
Eli Zaretskii <eliz@gnu.org> writes:
> Sounds useful, thanks. Bonus points for optionally popping a dialog
> (via x-popup-dialog) when the command was invoked by a mouse.
I cargo culted the code from y-or-n-p to determine whether to use
x-popup-dialog, and it seems to be working...
> Btw, if you do that, userlock.el cries for using this functionality,
> and likewise hack-local-variables-confirm.
I think I'll leave that to somebody else to fix. :-)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2014-12-13 14:39 ` bug#19368: 25.0.50; NSM prompt is not self-explanatory enough Eli Zaretskii
2014-12-14 4:43 ` Stefan Monnier
2014-12-14 8:12 ` Lars Magne Ingebrigtsen
@ 2016-02-05 3:35 ` Lars Ingebrigtsen
2016-02-05 7:42 ` Eli Zaretskii
2016-06-02 14:31 ` Archived problem report bug#19368 (bug#19368: 25.0.50; NSM prompt is not self-explanatory enough) GNU bug Tracking System
3 siblings, 1 reply; 17+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-05 3:35 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 19368
Eli Zaretskii <eliz@gnu.org> writes:
> To reproduce:
>
> emacs -Q
> M-x eww RET www.google.com RET
> Click on the "Sign in" link
>
> The NSM shows a buffer with description of why it failed to verify the
> certificate of accounts.google.com, and prompts in the minibuffer like
> this:
>
> Continue connecting? (No, Session only, Always)
>
> It expects me to press either N, S, or A, but that is not clear enough
> from the prompt.
>
> I suggest to change the prompt to something like this:
>
> Continue connecting? ([N]o, [S]ession only, [A]lways)
>
> Alternatively, the first letter could be underlined (assuming we can
> rely on every supported terminal to be able to display underlined
> characters).
This has now been fixed, and it's using read-multiple-choice, which
makes the character choices underline and bold on graphical systems, and
"[l]ike this" on non-graphical ones.
Some terminals do have the capability to underline and bold stuff, but
have nil (display-graphic-p), right? Is there a way to determine
whether we're running on one of those terminals? Because
underlining/bolding is prettier than [t]his.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2016-02-05 3:35 ` Lars Ingebrigtsen
@ 2016-02-05 7:42 ` Eli Zaretskii
2016-02-05 7:46 ` Lars Ingebrigtsen
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2016-02-05 7:42 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 19368
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 19368@debbugs.gnu.org
> Date: Fri, 05 Feb 2016 14:35:13 +1100
>
> > I suggest to change the prompt to something like this:
> >
> > Continue connecting? ([N]o, [S]ession only, [A]lways)
> >
> > Alternatively, the first letter could be underlined (assuming we can
> > rely on every supported terminal to be able to display underlined
> > characters).
>
> This has now been fixed, and it's using read-multiple-choice, which
> makes the character choices underline and bold on graphical systems, and
> "[l]ike this" on non-graphical ones.
Thanks.
> Some terminals do have the capability to underline and bold stuff, but
> have nil (display-graphic-p), right? Is there a way to determine
> whether we're running on one of those terminals? Because
> underlining/bolding is prettier than [t]his.
I don't think you should be bothered by that, because 'underline' is a
standard face, and every terminal expresses it as best as they can.
Just use it.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2016-02-05 7:42 ` Eli Zaretskii
@ 2016-02-05 7:46 ` Lars Ingebrigtsen
2016-02-05 9:34 ` Eli Zaretskii
0 siblings, 1 reply; 17+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-05 7:46 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 19368
Eli Zaretskii <eliz@gnu.org> writes:
> I don't think you should be bothered by that, because 'underline' is a
> standard face, and every terminal expresses it as best as they can.
> Just use it.
But underline in addition to [t]his?
I guess I'm asking whether there are terminals that don't do underline
at all, and I would guess that there are... so we need to do [t]his on
all terminals, unless we have a way to query the terminal for whether it
supports underline?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2016-02-05 7:46 ` Lars Ingebrigtsen
@ 2016-02-05 9:34 ` Eli Zaretskii
2016-02-06 3:09 ` Lars Ingebrigtsen
0 siblings, 1 reply; 17+ messages in thread
From: Eli Zaretskii @ 2016-02-05 9:34 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 19368
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 19368@debbugs.gnu.org
> Date: Fri, 05 Feb 2016 18:46:13 +1100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > I don't think you should be bothered by that, because 'underline' is a
> > standard face, and every terminal expresses it as best as they can.
> > Just use it.
>
> But underline in addition to [t]his?
>
> I guess I'm asking whether there are terminals that don't do underline
> at all, and I would guess that there are... so we need to do [t]his on
> all terminals, unless we have a way to query the terminal for whether it
> supports underline?
I think you want this:
(display-supports-face-attributes-p '(:underline t) FRAME)
This returns non-nil only if underline is supported "in some way" by
FRAME's display. Where "in some way" means that the appearance will
be different from the default face.
^ permalink raw reply [flat|nested] 17+ messages in thread
* bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
2016-02-05 9:34 ` Eli Zaretskii
@ 2016-02-06 3:09 ` Lars Ingebrigtsen
0 siblings, 0 replies; 17+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-06 3:09 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 19368
Eli Zaretskii <eliz@gnu.org> writes:
> I think you want this:
>
> (display-supports-face-attributes-p '(:underline t) FRAME)
>
> This returns non-nil only if underline is supported "in some way" by
> FRAME's display. Where "in some way" means that the appearance will
> be different from the default face.
Thanks. I've now used that instead of display-graphic-p.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 17+ messages in thread
* Archived problem report bug#19368 (bug#19368: 25.0.50; NSM prompt is not self-explanatory enough)
2014-12-13 14:39 ` bug#19368: 25.0.50; NSM prompt is not self-explanatory enough Eli Zaretskii
` (2 preceding siblings ...)
2016-02-05 3:35 ` Lars Ingebrigtsen
@ 2016-06-02 14:31 ` GNU bug Tracking System
3 siblings, 0 replies; 17+ messages in thread
From: GNU bug Tracking System @ 2016-06-02 14:31 UTC (permalink / raw)
To: bug-gnu-emacs
You sent a message to the GNU bug tracking system, relating to bug#19368.
Your message was dated Thu, 02 Jun 2016 10:25:29 -0400 and was sent to
submit@debbugs.gnu.org. It had
Message-ID: <87a8j3llba.fsf@lifelogs.com>
and Subject: bug#19368: 25.0.50; NSM prompt is not self-explanatory enough
This bug is currently in a read-only state. This is because it has been
closed and has received no comments for more than 28 days, until now.
If you still wish to comment on or change this report, you must first
"unarchive" it. You can do this by sending a message to the control-server
(control@debbugs.gnu.org), with body containing:
unarchive 19368
This does not reopen the report. You might also want to do that,
but there is no need to if you just want to add a comment.
For more information, see http://debbugs.gnu.org/server-control.html,
or contact help-debbugs@gnu.org if you need assistance.
(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)
--
-1: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=-1
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
^ permalink raw reply [flat|nested] 17+ messages in thread