From: Paul Nelson <ultrono@gmail.com>
To: 68995@debbugs.gnu.org
Subject: bug#68995: [PATCH] 30.0.50; electric-pair-mode and read-char-from-minibuffer
Date: Thu, 8 Feb 2024 23:52:50 +0100 [thread overview]
Message-ID: <CAOA-32NRezRDDCH7kY-rxd=f-NwLp+jfPYtv6cOy5QwZ7Gd5Hw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 3867 bytes --]
Steps to reproduce:
1. Emacs -Q
2. M-x electric-pair-mode
3. M-: (read-char-from-minibuffer "test: ")
4. Hit "(".
The minibuffer then reads "()"; to get "(" accepted, we need to backspace.
If we instead hit ")", then we get the error "No matching parenthesis found".
I noticed this bug because it complicates using zap-to-char with
electric-pair-mode.
The bug was introduced in 68dd520e39eccb1be9366add1e3298318e5010de, in
response to https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65805. In
that commit, the line that remaps self-insert-command was commented.
Uncommenting that line fixes the issue.
In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.2.0, NS
appkit-2487.30 Version 14.2.1 (Build 23C71)) of 2024-01-24 built on
d51735
Repository revision: 87cf30fba37346a179c6307a29d5d39b39311cef
Repository branch: HEAD
Windowing system distributor 'Apple', version 10.3.2487
System Description: macOS 14.2.1
Configured using:
'configure --with-ns --with-native-compilation --with-tree-sitter
--with-gif --with-png --with-jpeg --with-rsvg --with-tiff
--with-imagemagick --with-x-toolkit=gtk3 --with-xwidgets'
Configured features:
ACL DBUS GLIB GNUTLS IMAGEMAGICK JSON LCMS2 LIBXML2 MODULES NATIVE_COMP
NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS
TREE_SITTER WEBP XIM XWIDGETS ZLIB
Important settings:
value of $LC_CTYPE: UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
electric-pair-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
minibuffer-regexp-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr cl-extra pp cl-print byte-opt gv thingatpt
help-fns radix-tree help-mode compile comint ansi-osc ansi-color ring
comp-run bytecomp byte-compile comp-common rx emacsbug message mailcap
yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache
epa derived epg rfc6068 epg-config gnus-util text-property-search
time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils cus-start cus-load
elec-pair rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal dbusbind
kqueue cocoa ns lcms2 multi-tty make-network-process native-compile
emacs)
Memory information:
((conses 16 87854 21088) (symbols 48 7973 0) (strings 32 22998 2949)
(string-bytes 1 674716) (vectors 16 12730)
(vector-slots 8 172844 9781) (floats 8 27 14) (intervals 56 293 0)
(buffers 984 13))
[-- Attachment #2: 0001-Revert-remap-self-insert-command-in-read-char-from-m.patch --]
[-- Type: application/octet-stream, Size: 947 bytes --]
From b0403e90765d52a6b859ac92e16b018fcfd9778c Mon Sep 17 00:00:00 2001
From: Paul Nelson <ultrono@gmail.com>
Date: Sun, 4 Feb 2024 06:22:55 -0800
Subject: [PATCH] Revert "remap self-insert-command" in
read-char-from-minibuffer-map
---
lisp/subr.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 33de100870e..5b377bb4ea7 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3629,7 +3629,7 @@ read-char-from-minibuffer-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
- ;; (define-key map [remap self-insert-command] #'read-char-from-minibuffer-insert-char)
+ (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)
--
2.39.3 (Apple Git-145)
next reply other threads:[~2024-02-08 22:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 22:52 Paul Nelson [this message]
2024-02-09 6:47 ` bug#68995: [PATCH] 30.0.50; electric-pair-mode and read-char-from-minibuffer Eli Zaretskii
2024-02-09 19:10 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-02-09 19:49 ` Paul Nelson
2024-02-09 20:13 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOA-32NRezRDDCH7kY-rxd=f-NwLp+jfPYtv6cOy5QwZ7Gd5Hw@mail.gmail.com' \
--to=ultrono@gmail.com \
--cc=68995@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.