From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#45412: File ... is large (... MiB), really open? (y)es or (n)o or (l)iterally Date: Sun, 11 Apr 2021 01:52:56 +0300 Message-ID: <874kgdagkf.fsf@mail.linkov.net> References: <87k0t72rhd.5.fsf@jidanni.org> <8735zuig9m.fsf@gnus.org> <87wnx62rpe.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40284"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 45412@debbugs.gnu.org, Lars Ingebrigtsen , =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 11 01:05:22 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lVMfK-000AOj-C6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Apr 2021 01:05:22 +0200 Original-Received: from localhost ([::1]:33582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVMfJ-0001tW-Cp for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Apr 2021 19:05:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVMf1-0001tF-E2 for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 19:05:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lVMf1-0000VZ-0k for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 19:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lVMf0-0005wO-HK for bug-gnu-emacs@gnu.org; Sat, 10 Apr 2021 19:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Apr 2021 23:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45412 X-GNU-PR-Package: emacs Original-Received: via spool by 45412-submit@debbugs.gnu.org id=B45412.161809587522785 (code B ref 45412); Sat, 10 Apr 2021 23:05:02 +0000 Original-Received: (at 45412) by debbugs.gnu.org; 10 Apr 2021 23:04:35 +0000 Original-Received: from localhost ([127.0.0.1]:53530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVMeZ-0005vP-I7 for submit@debbugs.gnu.org; Sat, 10 Apr 2021 19:04:35 -0400 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:38605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lVMeY-0005vB-3C for 45412@debbugs.gnu.org; Sat, 10 Apr 2021 19:04:34 -0400 X-Originating-IP: 91.129.96.157 Original-Received: from mail.gandi.net (m91-129-96-157.cust.tele2.ee [91.129.96.157]) (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id A3A05240004; Sat, 10 Apr 2021 23:04:25 +0000 (UTC) In-Reply-To: ("Daniel =?UTF-8?Q?Mart=C3=ADn?="'s message of "Sun, 11 Apr 2021 00:32:34 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:203822 Archived-At: >>>> Another approach could be to offer a C-h binding that opens a help >>>> window that describes the possible options and briefly links to the >>>> customization entry point that removes the prompt permanently. >>> >>> Yeah, that sounds like a good idea. >> >> I agree, this is really the best idea. > > OK, I've implemented it in the attached patch. Suggestions > welcome. > > + (while (null choice) > + (setq choice (read-char-choice > + (concat prompt " (y)es, (n)o, (l)iterally, (?)") > + '(?y ?Y ?n ?N ?l ?L ?? ?\C-h))) > + (when (memq choice '(?? ?\C-h)) > + (files--ask-user-about-large-file-help > + op-type (funcall byte-count-to-string-function size)) To avoid the additional loop, maybe it's easier just to let-bind the variable 'help-form' that is handled by 'read-char-choice'.