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.devel Subject: Re: emacs-28 a866674b2a: Fix inaccuracies in "lax search" documentation Date: Wed, 31 Aug 2022 20:13:45 +0300 Organization: LINKOV.NET Message-ID: <86a67kjpyu.fsf@mail.linkov.net> References: <165875050243.3275.8867100069985547389@vcs2.savannah.gnu.org> <20220725120142.D1283C0F203@vcs2.savannah.gnu.org> <87r1298hxp.fsf@gmail.com> <864jz513nb.fsf@mail.linkov.net> <83h735dpno.fsf@gnu.org> <86tu75doeq.fsf@mail.linkov.net> <867d41dlc8.fsf@mail.linkov.net> <87ilnk8fuc.fsf@gmail.com> <86o7w2196j.fsf@mail.linkov.net> <87mtbkkdb5.fsf@gmail.com> <867d2ol9yl.fsf@mail.linkov.net> <87edwwjrp4.fsf@gmail.com> <83ilm8s6xh.fsf@gnu.org> <87a67kjqqw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3116"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 31 19:16:57 2022 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 1oTRKj-0000ef-Cx for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Aug 2022 19:16:57 +0200 Original-Received: from localhost ([::1]:35542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTRKi-0000mu-BC for ged-emacs-devel@m.gmane-mx.org; Wed, 31 Aug 2022 13:16:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTRJp-0008Vy-02 for emacs-devel@gnu.org; Wed, 31 Aug 2022 13:16:01 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56971) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTRJl-0001p0-1J; Wed, 31 Aug 2022 13:16:00 -0400 Original-Received: (Authenticated sender: juri@linkov.net) by mail.gandi.net (Postfix) with ESMTPSA id EDFF0C0004; Wed, 31 Aug 2022 17:15:51 +0000 (UTC) In-Reply-To: <87a67kjqqw.fsf@gmail.com> (Robert Pluim's message of "Wed, 31 Aug 2022 18:56:55 +0200") Received-SPF: pass client-ip=217.70.183.198; envelope-from=juri@linkov.net; helo=relay6-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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:294447 Archived-At: > Juri> Wouldn't it be cleaner to use just (read-char-from-minibuffer "Character: ") > Juri> where you can either type a character directly or use 'C-x 8 RET' > Juri> to insert a character by its name. > >> > >> I guess that works as well, but then youʼre assuming knowledge of 'C-x > >> 8 RETʼ. I canʼt come up with a strong argument either ways, so Iʼm > >> going to chicken out here and see what Eli says ☺️ > > Eli> Eli says that he was mightily surprised to see that just typing a > Eli> character at the prompt didn't take that character literally, but > Eli> instead interpreted it as a hex codepoint. > > That pleads for `read-char-from-minibuffer', except that > > (read-char-from-minibuffer "Character: ") RET > C-x 8 RET > LATIN SMALL LETTER A WITH DIAERESIS > => [Wrong Answer] > > which pleads for extending `read-char-by-name' to not do that single > character hex thing. I see it the other way around - that pleads for fixing `read-char-from-minibuffer': ``` diff --git a/lisp/subr.el b/lisp/subr.el index 2ffc594997..71fb9f3875 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3327,7 +3327,6 @@ read-char-from-minibuffer-map (set-keymap-parent map minibuffer-local-map) (define-key map [remap self-insert-command] #'read-char-from-minibuffer-insert-char) - (define-key map [remap exit-minibuffer] #'read-char-from-minibuffer-insert-other) (define-key map [remap recenter-top-bottom] #'minibuffer-recenter-top-bottom) (define-key map [remap scroll-up-command] #'minibuffer-scroll-up-command) ``` Then (read-char-from-minibuffer "Character: ") RET C-x 8 RET LATIN SMALL LETTER A WITH DIAERESIS RET RET