emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs-28 a866674b2a: Fix inaccuracies in "lax search" documentation


From: Juri Linkov
Subject: Re: emacs-28 a866674b2a: Fix inaccuracies in "lax search" documentation
Date: Wed, 31 Aug 2022 20:13:45 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)

>     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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]