From: Kritixi Lithos <kritixilithos@gmail.com>
To: 38775@debbugs.gnu.org
Subject: bug#38775: (kbd "C-x ( ... C-x )") gulps "C-x (" and "C-x )"
Date: Sat, 28 Dec 2019 17:12:40 +0200 [thread overview]
Message-ID: <783E4006-081B-404D-A606-30862A0BA1CF@gmail.com> (raw)
From `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=/usr/local/share/emacs/site-lisp
--infodir=/usr/local/Cellar/emacs/26.3/share/info/emacs
--prefix=/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))
next reply other threads:[~2019-12-28 15:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-28 15:12 Kritixi Lithos [this message]
2019-12-28 15:46 ` bug#38775: (kbd "C-x ( ... C-x )") gulps "C-x (" and "C-x )" Andreas Schwab
2019-12-28 17:24 ` Eli Zaretskii
2019-12-28 19:36 ` Kritixi Lithos
2021-08-30 2:24 ` Lars Ingebrigtsen
2022-05-03 14:21 ` Lars Ingebrigtsen
2022-05-03 14:39 ` Kritixi Lithos
[not found] <<783E4006-081B-404D-A606-30862A0BA1CF@gmail.com>
[not found] ` <<87woagzc4u.fsf@igel.home>
[not found] ` <<83mubcnz16.fsf@gnu.org>
2019-12-28 18:22 ` Drew Adams
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=783E4006-081B-404D-A606-30862A0BA1CF@gmail.com \
--to=kritixilithos@gmail.com \
--cc=38775@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.