From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 14 20:16:35 2023 Received: (at submit) by debbugs.gnu.org; 15 Nov 2023 01:16:35 +0000 Received: from localhost ([127.0.0.1]:34374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r34WA-0006LV-Rm for submit@debbugs.gnu.org; Tue, 14 Nov 2023 20:16:35 -0500 Received: from lists.gnu.org ([2001:470:142::17]:39464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r34W8-0006LB-1k for submit@debbugs.gnu.org; Tue, 14 Nov 2023 20:16:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r34VL-0000JL-Tx for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 20:15:44 -0500 Received: from u1.atthost.pl ([185.255.40.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r34VG-0000mW-Gl for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2023 20:15:43 -0500 Received: from localhost (unknown [127.0.0.1]) by u1.atthost.pl (Postfix) with ESMTP id A8FC31248BC for ; Wed, 15 Nov 2023 01:05:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at atthost.pl Received: from u1.atthost.pl ([185.255.40.21]) by localhost (atthost.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SIKrlcFQoi6w for ; Wed, 15 Nov 2023 02:05:37 +0100 (CET) Received: from jcubic (unknown [178.218.193.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jcubic@jcubic.pl) by u1.atthost.pl (Postfix) with ESMTPSA id CFFFE123565 for ; Wed, 15 Nov 2023 02:05:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 u1.atthost.pl CFFFE123565 Date: Wed, 15 Nov 2023 02:05:35 +0100 From: "Jakub T. Jankiewicz" To: bug-gnu-emacs@gnu.org Subject: 29.1; read-kbd-macro always return a vector Message-ID: <20231115020535.7dd8b316@jcubic> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=185.255.40.21; envelope-from=SRS0=0ufY=G4=jcubic.pl=jcubic@attmail.pl; helo=u1.atthost.pl X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This is the code I was always using in Emacs to send raw keys to modes like ansi-term: (defun raw (str) (interactive "sSend Raw Key: ") (term-send-raw-string (read-kbd-macro str))) But this doesn't work anymore it throw an error [3] when calling: Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.9 SPF_FAIL SPF: sender does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=mfrom; id=srs0%3D0ufy%3Dg4%3Djcubic.pl%3Djcubic%40attmail.pl; ip=2001%3A470%3A142%3A%3A17; r=debbugs.gnu.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) This is the code I was always using in Emacs to send raw keys to modes like ansi-term: (defun raw (str) (interactive "sSend Raw Key: ") (term-send-raw-string (read-kbd-macro str))) But this doesn't work anymore it throw an error [3] when calling: (raw "C-c") According to documentation `C-h f read-kbd-macro` "The result will be a string if possible" but it seems that in new GNU Emacs it's always a vector. In GNU Emacs 29.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.38, cairo version 1.17.8) of 2023-09-24 built on e1d0f5fdfea948b9bb25e212c9c623e4 Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 39 (Xfce) Configured using: 'configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json --with-native-compilation=aot --with-tree-sitter --with-sqlite3 --with-webp --with-xinput2 build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig CXX=g++ 'CXXFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB Important settings: value of $LC_ALL: C value of $LANG: pl_PL.utf8 value of $XMODIFIERS: @im=none locale-coding-system: utf-8 Major mode: ELisp/d Minor modes in effect: windmove-mode: t shell-dirtrack-mode: t whitespace-mode: t delete-selection-mode: t highlight-symbol-mode: t display-time-mode: t erc-autojoin-mode: t erc-scrolltobottom-mode: t minibuffer-depth-indicate-mode: t global-auto-revert-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/kuba/projects/emacs-modes/multiple-cursors.el/multiple-cursors hides /home/kuba/projects/emacs-modes/multiple-cursors /home/kuba/projects/emacs-modes/polymode/modes/poly-markdown hides /home/kuba/projects/emacs-modes/poly-markdown /home/kuba/projects/emacs-modes/expand-region.el/expand-region hides /home/kuba/projects/emacs-modes/expand-region /home/kuba/projects/emacs-modes/highlight-symbol.el/highlight-symbol hides /home/kuba/projects/emacs-modes/highlight-symbol /home/kuba/projects/emacs-modes/mark-multiple.el/mark-multiple hides /home/kuba/projects/emacs-modes/mark-multiple /home/kuba/projects/emacs-modes/web-mode/web-mode hides /home/kuba/projects/emacs-modes/web-mode /home/kuba/projects/emacs-modes/php-mode/php-mode hides /home/kuba/projects/emacs-modes/php-mode /home/kuba/projects/emacs-modes/clojure-mode hides /home/kuba/.emacs.d/elpa/clojure-mode-20220418.2015/clojure-mode /home/kuba/projects/emacs-modes/markdown-mode hides /home/kuba/.emacs.d/elpa/markdown-mode-20181112.1529/markdown-mode /home/kuba/projects/emacs-modes/typescript-mode hides /home/kuba/.emacs.d/elpa/typescript-mode-20181018.553/typescript-mode /home/kuba/projects/emacs-modes/json hides /usr/share/emacs/29.1/lisp/json /home/kuba/projects/emacs-modes/csharp-mode hides /usr/share/emacs/29.1/lisp/progmodes/csharp-mode /home/kuba/projects/emacs-modes/linum hides /usr/share/emacs/29.1/lisp/obsolete/linum Features: (shadow sort mail-extr emacsbug message yank-media rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils sendmail rfc2047 rfc2045 ietf-drums windmove openai-chat shortdoc company-files company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-capf company-cmake company-xcode company-clang company-semantic company-eclim company-template company-css company-nxml company-bbdb make-mode tramp-cmds gambit cmuscheme scheme vc-hg vc-bzr tramp-cache time-stamp tramp-sh tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat parse-time misearch multi-isearch flyspell css-mode-expansions css-mode smie eww url-queue shr pixel-fill kinsoku url-file svg mm-url gnus nnheader gnus-util range wid-edit mm-util mail-prsvr color help-fns radix-tree cl-print debug backtrace term shell ehelp whitespace cl-indent vc-git diff-mode vc-dispatcher nodejs-repl tide tide-lv flycheck s typescript-mode delsel highlight-chars highlight-symbol highlight-current-line time multiple-cursors mc-hide-unmatched-lines-mode mc-separate-operations rectangular-region-mode mc-mark-pop mc-mark-more mc-cycle-cursors mc-edit-lines multiple-cursors-core rect bar-cursor repeat skeleton erc-join erc-match tls gnutls puny erc-goodies erc iso8601 erc-backend erc-networks erc-common erc-compat erc-loaddefs mb-depth ispell coverage highlight htmlize js-comint expand-region text-mode-expansions cc-mode-expansions the-org-mode-expansions js2-mode-expansions js-mode-expansions web-mode-expansions html-mode-expansions er-basic-expansions expand-region-core expand-region-custom mark-more-like-this inline-string-rectangle mark-multiple yaml-mode functions zencoding-mode notify whattf-dt html5-langs comp comp-cstr cl-extra help-mode emmet-mode chatgpt spinner ht lv openai tblui magit-popup dash tablist tablist-filter semantic/wisent/comp semantic/wisent semantic/wisent/wisent semantic/util-modes semantic/util semantic semantic/tag semantic/lex semantic/fw mode-local cedet dired dired-loaddefs request mailheader mail-utils let-alist markdown-mode cl autorevert filenotify web-mode disp-table company pcase edmacro kmacro finder-inf prisma-mode po-mode po php-mode advice speedbar ezimage dframe flymake-proc flymake compile warnings thingatpt add-log cc-langs rjsx-mode sgml-mode facemenu dom js2-mode etags fileloop xref project js c-ts-common treesit cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs imenu eaf derived eaf-interleave easy-mmode org-element org-persist xdg org-id org-refile avl-tree generator org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete pcomplete comint ansi-osc ansi-color ring org-list org-footnote org-faces org-entities time-date noutline outline icons ob-emacs-lisp ob-core ob-eval org-cycle org-table ol rx org-fold org-fold-core org-keys oc org-loaddefs find-func cal-menu calendar cal-loaddefs org-version org-compat org-macs format-spec eaf-mindmap bookmark text-property-search pp dbus xml chatgpt-autoloads ht-autoloads lv-autoloads openai-autoloads request-autoloads tblui-autoloads tablist-autoloads info magit-popup-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd 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 inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 874709 431017) (symbols 48 43878 1) (strings 32 161534 11291) (string-bytes 1 5158452) (vectors 16 68327) (vector-slots 8 1567256 115522) (floats 8 382 471) (intervals 56 20425 807) (buffers 984 35)) -- Jakub T. Jankiewicz, Senior Front-End Developer https://jcubic.pl/me https://koduj.org From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 10:50:38 2023 Received: (at 67182) by debbugs.gnu.org; 15 Nov 2023 15:50:38 +0000 Received: from localhost ([127.0.0.1]:52946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3IA1-0000xR-VC for submit@debbugs.gnu.org; Wed, 15 Nov 2023 10:50:38 -0500 Received: from u1.atthost.pl ([185.255.40.21]:53885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3I9z-0000xG-Ih for 67182@debbugs.gnu.org; Wed, 15 Nov 2023 10:50:36 -0500 Received: from localhost (unknown [127.0.0.1]) by u1.atthost.pl (Postfix) with ESMTP id 10FD3122B00; Wed, 15 Nov 2023 13:21:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at atthost.pl Received: from u1.atthost.pl ([185.255.40.21]) by localhost (atthost.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dsRXlrItq41F; Wed, 15 Nov 2023 14:20:56 +0100 (CET) Received: from jcubic (unknown [178.218.193.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jcubic@jcubic.pl) by u1.atthost.pl (Postfix) with ESMTPSA id 914EF122BC2; Wed, 15 Nov 2023 14:20:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 u1.atthost.pl 914EF122BC2 Date: Wed, 15 Nov 2023 14:20:55 +0100 From: "Jakub T. Jankiewicz" To: Stefan Monnier Subject: Re: bug#67182: 29.1; read-kbd-macro always return a vector Message-ID: <20231115142055.3ab964d9@jcubic> In-Reply-To: References: <20231115020535.7dd8b316@jcubic> <83fs17rz71.fsf@gnu.org> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 67182 Cc: Eli Zaretskii , 67182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Then maybe the documentation for the function should be updated and in changelog there is should a note about this breaking change. On Wed, 15 Nov 2023 07:45:16 -0500 Stefan Monnier wrote: > >> This is the code I was always using in Emacs to send raw keys > >> to modes like ansi-term: > >>=20 > >> (defun raw (str) > >> (interactive "sSend Raw Key: ") > >> (term-send-raw-string (read-kbd-macro str))) > >>=20 > >> But this doesn't work anymore it throw an error [3] when calling: > >>=20 > >> (raw "C-c") =20 >=20 > The above code already threw the same error when you call >=20 > (raw "C-") > or > (raw "M-a") > or > (raw "=C3=A9") >=20 > :-( >=20 > Maybe it should be something like >=20 > (defun raw (str) > (interactive "sSend Raw Key: ") > (let ((keys (kbd str)) > (string (condition-case err > (concat "" keys) > (wrong-type-argument > (let ((elem (nth 2 err))) > (error "%s is not a character" > (if (numberp elem) > (prin1-char elem) > elem))))))) > (term-send-raw-string string))) >=20 > ? >=20 > >> According to documentation `C-h f read-kbd-macro` > >> "The result will be a string if possible" but it seems that in new > >> GNU Emacs it's always a vector. =20 > > Stefan, this is due to your change in edmacro-parse-keys as part of > > commit 87789330, whose log message says nothing about > > edmacro-parse-keys. Did you really intend to make that > > backward-incompatible change? If so, why? =20 >=20 > Yes. I want to eliminate the use of strings that stand for a sequence > of events because it does nothing more than leave latent bugs and create > confusion (between the strings used as input to `read-kbd-macro` and the > strings that used to be output by `read-kbd-macro`), while increasing > the complexity of the rest of the code which has to handle both vectors > and strings. >=20 >=20 > Stefan >=20 -- Jakub T. Jankiewicz, Senior Front-End Developer https://jcubic.pl/me https://koduj.org From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 11:22:26 2023 Received: (at 67182) by debbugs.gnu.org; 15 Nov 2023 16:22:26 +0000 Received: from localhost ([127.0.0.1]:53098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3Ien-0001vV-Qp for submit@debbugs.gnu.org; Wed, 15 Nov 2023 11:22:26 -0500 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3Iek-0001vE-LU for 67182@debbugs.gnu.org; Wed, 15 Nov 2023 11:22:24 -0500 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4569A100068; Wed, 15 Nov 2023 07:45:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1700052316; bh=sSGLdpX5ZHS9j8DQB8FLiynLKtFZozwM3kaYwHqjG0A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=nO27AZ4FxehDWaATheIAwfLqNKey5YQ74pQuGnhGVV/QZrUsLI5apQ5+uwesfUy4F p8yxuk5UU+dmf1+YxDE+p6+tHNi+wqWFBj6H5rQk/rV5VqP32zhYc5eGmUDKv5g01Q zK2tGQT1Y6ewQdst/yiYa/W+/8LXnvyvkiwoFKjqrzGhOFKzlU3abElBIv+N8gZUHa 8liKHqdAmylhM1O1G5Y2EClNlyldbt5hJB3zhftYs5jGrQnS2NJOwfQ0nrfir0+02k kid1GR89yL9izzQa3YnYkD+ZOWPTpmwaW9j9sHzRsXnT2XlIu0axIthRVp9jMHT1v5 cNarPP/rz1Idw== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8DD6F100033; Wed, 15 Nov 2023 07:45:16 -0500 (EST) Received: from pastel (unknown [45.72.227.120]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 62C271202EA; Wed, 15 Nov 2023 07:45:16 -0500 (EST) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#67182: 29.1; read-kbd-macro always return a vector In-Reply-To: <83fs17rz71.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 15 Nov 2023 14:14:10 +0200") Message-ID: References: <20231115020535.7dd8b316@jcubic> <83fs17rz71.fsf@gnu.org> Date: Wed, 15 Nov 2023 07:45:16 -0500 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.133 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67182 Cc: "Jakub T. Jankiewicz" , 67182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> This is the code I was always using in Emacs to send raw keys >> to modes like ansi-term: >>=20 >> (defun raw (str) >> (interactive "sSend Raw Key: ") >> (term-send-raw-string (read-kbd-macro str))) >>=20 >> But this doesn't work anymore it throw an error [3] when calling: >>=20 >> (raw "C-c") The above code already threw the same error when you call (raw "C-") or (raw "M-a") or (raw "=E9") :-( Maybe it should be something like (defun raw (str) (interactive "sSend Raw Key: ") (let ((keys (kbd str)) (string (condition-case err (concat "" keys) (wrong-type-argument (let ((elem (nth 2 err))) (error "%s is not a character" (if (numberp elem) (prin1-char elem) elem))))))) (term-send-raw-string string))) ? >> According to documentation `C-h f read-kbd-macro` >> "The result will be a string if possible" but it seems that in new >> GNU Emacs it's always a vector. > Stefan, this is due to your change in edmacro-parse-keys as part of > commit 87789330, whose log message says nothing about > edmacro-parse-keys. Did you really intend to make that > backward-incompatible change? If so, why? Yes. I want to eliminate the use of strings that stand for a sequence of events because it does nothing more than leave latent bugs and create confusion (between the strings used as input to `read-kbd-macro` and the strings that used to be output by `read-kbd-macro`), while increasing the complexity of the rest of the code which has to handle both vectors and strings. Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 15 11:28:09 2023 Received: (at 67182) by debbugs.gnu.org; 15 Nov 2023 16:28:09 +0000 Received: from localhost ([127.0.0.1]:53124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3IkK-00028C-TB for submit@debbugs.gnu.org; Wed, 15 Nov 2023 11:28:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3IQi-0001QS-Tr for 67182@debbugs.gnu.org; Wed, 15 Nov 2023 11:07:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3Emj-00053y-HK; Wed, 15 Nov 2023 07:14:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=idKpNHaWbvpV/HcX6xcAyDwllgLIVCPDe9QkFJaCl5c=; b=UIVwfhEbOl13 0Xbd5VQtRPPzhPaG4x+zg3R4qVxL3YYyTkeu6xkwiXjbLAepbLUP5InmT9JenIl3d4FqGq2ONcSNa /V8T1hGGvzXHaLyIPKUXCpOC9hg3mo/VWyXlAMWux7lsfuAlYL2IkibPApAh6zVeI8FocbFSf8UHG guvW2KBAsfXxZAWjHXxSu7Qikpg3mrZg1p5+Of1Yov1pMXJNs/qza9pN9H3ncpr9NweiOXLrgpalx A07+wFCpMRtqHsTf5anM96YMJVfCXZwDmXuor6dofRbVmGV6iz0L5jSr7xFeDb2oY5ZvI9S8kYDeM kAiIW+De5sTvITUKDdP4/w==; Date: Wed, 15 Nov 2023 14:14:10 +0200 Message-Id: <83fs17rz71.fsf@gnu.org> From: Eli Zaretskii To: "Jakub T. Jankiewicz" , Stefan Monnier In-Reply-To: <20231115020535.7dd8b316@jcubic> Subject: Re: bug#67182: 29.1; read-kbd-macro always return a vector References: <20231115020535.7dd8b316@jcubic> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67182 Cc: 67182@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 15 Nov 2023 02:05:35 +0100 > From: "Jakub T. Jankiewicz" > > This is the code I was always using in Emacs to send raw keys > to modes like ansi-term: > > (defun raw (str) > (interactive "sSend Raw Key: ") > (term-send-raw-string (read-kbd-macro str))) > > But this doesn't work anymore it throw an error [3] when calling: > > (raw "C-c") > > According to documentation `C-h f read-kbd-macro` > "The result will be a string if possible" but it seems that in new > GNU Emacs it's always a vector. Thanks. Stefan, this is due to your change in edmacro-parse-keys as part of commit 87789330, whose log message says nothing about edmacro-parse-keys. Did you really intend to make that backward-incompatible change? If so, why? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 18 04:54:23 2023 Received: (at 67182-done) by debbugs.gnu.org; 18 Nov 2023 09:54:23 +0000 Received: from localhost ([127.0.0.1]:47823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4I1v-0008Oy-61 for submit@debbugs.gnu.org; Sat, 18 Nov 2023 04:54:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r4I1s-0008Ok-Dm for 67182-done@debbugs.gnu.org; Sat, 18 Nov 2023 04:54:21 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r4I1l-000162-9k; Sat, 18 Nov 2023 04:54:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=baDYxAM6kQF9Xr6LhKR0J6vd3UU4UZxOjQ0eQegC+h0=; b=ISnjRc5vezl9 wJQG4GR4JRYANmL9voeFwQbfPuxLmoaJRn+fyXR92tCXyG+M3RGMKmX7JTol5Qvu/VkvExuDWL0Yb 3sbQdjvdWs/PDvwFzlE3m5U5ISS4SR2o6LWn51qo/dD9s/BZR36fSXcPQDD+H0nDbO8RDwZyhIViL GomGBkS4y1q5I14MQFBe96DvWxGm39pIAT/SIWc25t+zbOQv4WgoAyvfteoO28epJWk+dGiITsL5h o8sD6Z5k0r2X2raZft6oHgJ8Td+0RipAJykvQHf3yZm+5mdhcCORfEd4iu2gXaWLLZKgUuKjN3fyk mhA1lv4jPPvQA44p77pbBg==; Date: Sat, 18 Nov 2023 11:54:10 +0200 Message-Id: <83sf53mlod.fsf@gnu.org> From: Eli Zaretskii To: "Jakub T. Jankiewicz" In-Reply-To: <20231115142055.3ab964d9@jcubic> Subject: Re: bug#67182: 29.1; read-kbd-macro always return a vector References: <20231115020535.7dd8b316@jcubic> <83fs17rz71.fsf@gnu.org> <20231115142055.3ab964d9@jcubic> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67182-done Cc: monnier@iro.umontreal.ca, 67182-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Wed, 15 Nov 2023 14:20:55 +0100 > From: "Jakub T. Jankiewicz" > Cc: Eli Zaretskii , 67182@debbugs.gnu.org > > Then maybe the documentation for the function should be updated and in > changelog there is should a note about this breaking change. Done on the emacs-29 branch, and closing the bug. From unknown Mon Jun 23 06:01:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 16 Dec 2023 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator