From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Kritixi Lithos Newsgroups: gmane.emacs.bugs Subject: bug#38775: (kbd "C-x ( ... C-x )") gulps "C-x (" and "C-x )" Date: Sat, 28 Dec 2019 17:12:40 +0200 Message-ID: <783E4006-081B-404D-A606-30862A0BA1CF@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="220561"; mail-complaints-to="usenet@blaine.gmane.org" To: 38775@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 28 16:20:11 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ilDsx-000vD7-6w for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Dec 2019 16:20:11 +0100 Original-Received: from localhost ([::1]:44012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilDsw-0001F7-3P for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Dec 2019 10:20:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54018) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilDsp-0001F1-Q8 for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 10:20:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilDso-0000Wc-89 for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 10:20:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52811) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilDso-0000Vx-4R for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 10:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ilDso-0002nc-09 for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 10:20:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Kritixi Lithos Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 28 Dec 2019 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 38775 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157754639910746 (code B ref -1); Sat, 28 Dec 2019 15:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Dec 2019 15:19:59 +0000 Original-Received: from localhost ([127.0.0.1]:58784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilDsl-0002nG-C5 for submit@debbugs.gnu.org; Sat, 28 Dec 2019 10:19:59 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:35238) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ilDlo-0002cM-KT for submit@debbugs.gnu.org; Sat, 28 Dec 2019 10:12:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47964) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilDln-0000cC-3u for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 10:12:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilDll-0004Wa-JB for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 10:12:46 -0500 Original-Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]:41682) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilDll-0004Mj-7i for bug-gnu-emacs@gnu.org; Sat, 28 Dec 2019 10:12:45 -0500 Original-Received: by mail-lf1-x12c.google.com with SMTP id m30so22588256lfp.8 for ; Sat, 28 Dec 2019 07:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=36bKTax6eCGFw+xBsn1N1wR7Bd2DYX3pG00NfBUUVQo=; b=ITrtOV5vug2XbtTfsXvtRxhdjh0lvnR1tVjX8lnxWv5ZyIMy5PezQKB+5KUThuhk41 Xsb1uXvJqnv2LluubLQqAmQza8kxN74lINlCc0a4/YhHiw1Tkh/ZY2f98II+Am+Usoqv dLMxCaRyxYV1obfC8I3VpnjhU1XnDwFNp7xWZlx+ePQDENtcvqlXwwH+hT3/2IOHeEUA y49Lq8j7z4VlfCoJ05+SEm8yyEdAYGO+po+VaJ+5NyHkFLMFB9Qt1BO2pTSs0chNJxNZ x07huAL4Ewz9C8q9rCeAWKC6gNhQuGY76t+0pequ4e5Wa1kBc29z6wt98q12bwGjp9rn hPPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=36bKTax6eCGFw+xBsn1N1wR7Bd2DYX3pG00NfBUUVQo=; b=YVo5Ld4I+AGAgu5zGYIKocDXWatDN+5/VSgUanfkrfvFHiB8cYPrZnfNdrSURVeQiu V37eSAbKytEXLM53ld0dW45Qh/rD58vjtXD/8DLVi9CooXQZCZS9AOvn3x1qjmGaP40D 703l5ZAJr62XFboCCoDKWj6Rw4wyIIL3oF9nXq6xbZMYchz9+kl3qMt9WCoyj/4MhtWo qOa5dtZS+ayc5wX1j3n0BU+LMPkZH1GJvmK6USwSGeUpMYHmeTw+B9TAtGoosmFXNg7s BXpVXhEkjGbmtqXKjkoe+OHofUs3SrFAhdCCmCNUG5UycCTLzIHgfB1i1fLYd+P7fxm2 Q/5Q== X-Gm-Message-State: APjAAAU9V3mUjrf8sig0MvHCFC8sset76MxuXbADnhwN8/noKm4IGwlz UTPHuRpOVEFxJyOxNDQTtOhO47Q9 X-Google-Smtp-Source: APXvYqxUX5CwgUXuNRdR9/9ob9ALxZ+IAYFwQ/BQHDpgvJxlWr9Q2oJCGN6+OZOWmQEs/YqnZJtl9Q== X-Received: by 2002:ac2:44d9:: with SMTP id d25mr33730039lfm.15.1577545962521; Sat, 28 Dec 2019 07:12:42 -0800 (PST) Original-Received: from kritixi.lan (dsl-tkubng21-58c015-236.dhcp.inet.fi. [88.192.21.236]) by smtp.gmail.com with ESMTPSA id b22sm4812717lji.99.2019.12.28.07.12.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 28 Dec 2019 07:12:42 -0800 (PST) X-Mailer: Apple Mail (2.3608.40.2.2.4) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Mailman-Approved-At: Sat, 28 Dec 2019 10:19:58 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173849 Archived-At: =46rom `emacs -Q`, I write `(kbd "C-x ( C-d C-x )")` in the buffer, then evaluate it using `C-M-x`, which gives "^D" instead of the expected "^X(^D^X)". This can be seen more clearly by calling `key-description` with the result from `kbd`, resulting in "C-d" instead of the expected original string "C-x ( C-d C-x )". (Thanks to thblt from #emacs for this minimal example). The original problem was found when trying to call emacs keystrokes on an input file (with the goal of achieving something like vim with the `-c` flag) like so, `emacs -Q --insert input.txt --eval '(command-execute(kbd"C-x ( C-d M-0 C-x )"))'` Running this removes only 1 character from the input file instead of every character being deleted as expected. Another instance of this bug is https://emacs.stackexchange.com/q/33395 (thanks again to thblt for finding this). These results were as tested on GNU Emacs 26.3. In GNU Emacs 26.3 (build 1, x86_64-apple-darwin19.0.0) of 2019-10-01 built on Catalina.local Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... [2 times] Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=3D/usr/local/share/emacs/site-lisp --infodir=3D/usr/local/Cellar/emacs/26.3/share/info/emacs --prefix=3D/usr/local/Cellar/emacs/26.3 --with-gnutls --without-x --with-xml2 --without-dbus --with-modules --without-ns --without-imagemagick' Configured features: NOTIFY ACL GNUTLS LIBXML2 ZLIB MODULES THREADS Important settings: value of $LC_ALL: en_US.UTF-8 value of $LC_CTYPE: UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail tool-bar rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail regexp-opt rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils term/screen term/xterm xterm time-date elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue multi-tty make-network-process emacs) Memory information: ((conses 16 93401 5763) (symbols 48 19401 1) (miscs 40 35 71) (strings 32 27575 976) (string-bytes 1 742301) (vectors 16 11803) (vector-slots 8 448648 7552) (floats 8 49 254) (intervals 56 209 13) (buffers 992 12))