From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "T.V Raman" Newsgroups: gmane.emacs.devel Subject: Re: Request: Please add a prompt to read-event Date: Tue, 21 Dec 2021 09:18:46 -0800 Message-ID: References: <87o85exsyv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=gb18030 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8523"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Dec 21 18:28:15 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mzivu-00021u-I9 for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Dec 2021 18:28:14 +0100 Original-Received: from localhost ([::1]:47556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzivt-0005kI-7G for ged-emacs-devel@m.gmane-mx.org; Tue, 21 Dec 2021 12:28:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:34688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzimt-0002uf-Do for emacs-devel@gnu.org; Tue, 21 Dec 2021 12:18:55 -0500 Original-Received: from [2607:f8b0:4864:20::435] (port=43597 helo=mail-pf1-x435.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzimq-00031G-FJ for emacs-devel@gnu.org; Tue, 21 Dec 2021 12:18:55 -0500 Original-Received: by mail-pf1-x435.google.com with SMTP id 196so8813667pfw.10 for ; Tue, 21 Dec 2021 09:18:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=t7j0FOCfsvprJamoO1wojUfdzJ1CEqHW+uuxCVq80CE=; b=LZNmclCPLpIhrEv5IPx6KR664KTUr4EckjpDJYIc4dZEdpWmkAqgoK3aVvBkcVqzEw x3+3DKJFrDtndvr2FZXBSHPRCEolF8ImSbNdKgEOJY3SmUwMrkwM01v8C64H7nw9baP3 Qe2P1nP37TM8rUyg9fM64a1R/K7QN4CYt2UoYSPKj2YUoxtYF3y1501Zdc+hBERGUUtd C6baJ/tB2Qaxx7IGW52HCEbgnLrNpEPmIgsgQvw26emlz7vTUcHx7c849sdW7pn5Xo+a 5ei5984Nz4nEkRHEsZqCrOBiKWlu6vfQ+4DYsH+O1fOT36q/igeMrdePC4guwLcos+jr /tkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=t7j0FOCfsvprJamoO1wojUfdzJ1CEqHW+uuxCVq80CE=; b=ozZJm2ZtjYRxPTHLro8yHdzWEG/mS81r2k7XPLs066DyIcG3gNcoEBm9xKE0sWtbFl vgxTdW0SbmA003/JuxMMSgL5yElliE/oQalw4cGdPmac6zofqeiHFBF6ogLO/ivXZlMk NfjOqRK3BtC7EViIIHpiZ1fir1QnREAd5UuZYc0ePmhYN8RU7XeYIxC+EJUg3kqaNIlH IXZxY8gHc7ePwuC2BodAh1ACeBynIK0zLDIiKYuI3eN4JMMXTJ2JTfe+5YRaCb34CheR fRLlYWJp7YHVBzupRYsQbaFwd9DsszfRMluO8DBbSyV4BYIavbgqLlNM/+pD2i6DDri5 iqcg== X-Gm-Message-State: AOAM530jMBb+BeDCDggcof6vxX7HQANHXu/IvIGYjPKo6l+CyhaO1Fw5 0eCVxKkJuEBznHYpT5QeTQW3vfdaRyaOlQ== X-Google-Smtp-Source: ABdhPJyCkJ7NuNql3yzTPPEq3AzzAX5VxwqSpEPToI6SlKxIhAilR7VyuxX41uFHJkU2aYtYYZyi1w== X-Received: by 2002:a63:8341:: with SMTP id h62mr3699360pge.283.1640107129987; Tue, 21 Dec 2021 09:18:49 -0800 (PST) Original-Received: from raman-glaptop (c-24-4-174-65.hsd1.ca.comcast.net. [24.4.174.65]) by smtp.gmail.com with ESMTPSA id b19sm22915817pfv.63.2021.12.21.09.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Dec 2021 09:18:48 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Tue, 21 Dec 2021 10:17:54 -0500") X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::435 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::435; envelope-from=raman@google.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -167 X-Spam_score: -16.8 X-Spam_bar: ---------------- X-Spam_report: (-16.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5, USER_IN_DEF_SPF_WL=-7.5 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:282606 Archived-At: Stefan Monnier writes: :-) not surprizing -- as a long term emacs user -- coincidentally started using emacs in 1990; I dont believe I've ever used the code in novice.el since then either:-) House-cleaning there would definitely help, though given how controversial touching anything in Emacs can be, I'm certainly not volunteering. > Lars Ingebrigtsen [2021-12-18 08:39:04] wrote: > >> "T.V Raman" writes: >> >>> Emacspeak advices read-event and read-char to speak their >>> prompt. There are a few places in Emacs where read-event and/or >>> read-char are called without a prompt; e.g. disabled-command-function >>> >>> Could we perhaps fix this? >> >> [...] >> >>> (message "Type y, n, ! or SPC (the space bar): ") >>> (let ((cursor-in-echo-area t)) >>> (while (progn (setq char (read-event)) >>> (or (not (numberp char)) >>> (not (memq (downcase char) >>> '(?! ?y ?n ?\s ?\C-g))))) >>> (ding) >>> (message "Please type y, n, ! or SPC (the space bar): ")))) >> >> Hm... that is pretty odd. Why is it using `message' here instead of >> just using that string as the prompt to `read-event'? > > This code dates back to 1989. It would benefit from a bit of > modernization, such as making it use `read-multiple-choice`. > > > Stefan > > --=20 Thanks, --Raman(I Search, I Find, I Misplace, I Research) =817=A94 Id: kg:/m/0285kf1 =950=DC8