From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: The netsec thread Date: Mon, 23 Jul 2018 15:46:36 +0100 Message-ID: References: <83bmb214ez.fsf@gnu.org> <837elq13me.fsf@gnu.org> <83h8kqwukq.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532357252 29890 195.159.176.226 (23 Jul 2018 14:47:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2018 14:47:32 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 23 16:47:28 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fhc7T-0007fc-Qz for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2018 16:47:27 +0200 Original-Received: from localhost ([::1]:35008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhc9a-0004FQ-NF for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2018 10:49:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhc6p-0002zV-Vc for emacs-devel@gnu.org; Mon, 23 Jul 2018 10:46:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhc6m-0001x7-Tl for emacs-devel@gnu.org; Mon, 23 Jul 2018 10:46:48 -0400 Original-Received: from [195.159.176.226] (port=46236 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhc6m-0001wr-Lu for emacs-devel@gnu.org; Mon, 23 Jul 2018 10:46:44 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fhc4d-0004FI-F0 for emacs-devel@gnu.org; Mon, 23 Jul 2018 16:44:31 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:Zl6U1/zFqdAXByjLmFTaqmd2gHE= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:227711 Archived-At: On Mon 23 Jul 2018, Jimmy Yuen Ho Wong wrote: > On Mon, Jul 23, 2018 at 2:31 PM, Andy Moreton wrote: >> On Mon 23 Jul 2018, Lars Ingebrigtsen wrote: >> >>> Eli Zaretskii writes: >>> >>>>> From: Jimmy Yuen Ho Wong >>>>> Date: Mon, 23 Jul 2018 02:52:23 +0100 >>>>> Cc: Eli Zaretskii , Emacs-Devel devel >>>>> >>>>> That sound great, but what is this select-safe-coding-system and how >>>>> do I look at its UI? >>>> >>>> lisp/international/mule-cmds.el, look at >>>> select-safe-coding-system-interactively, a subroutine of >>>> select-safe-coding-system. In a nutshell, it prepares and pops up a >>>> buffer with special content, then prompts the user to select one of >>>> several alternatives. >>> >>> Hm... I ran: >>> >>> (select-safe-coding-system-interactively 1 3 (find-coding-systems-region 1 3) nil) >>> >>> and it just popped up a buffer with some text and then called >>> `read-coding-system', which is kinda close to what the NSM prompt is >>> doing already. Only the NSM prompt calls a y-or-n-p-equivalent, so that >>> you can't enter any other keys then the required ones >> >> ... except if you do press a different key, NSM gets stuck and does not >> accept new valid keys (other than ^G to quit). > > That sounds like a lot of trouble just to deal with ^G You have not understood what I meant: the existing code is buggy. It is supposed to allow the user to press a limited number of keys to decide what to do with the presented certificate. however if you press any other key, the NSM gets stuck and you have to quit with ^G to kill it. AndyM