From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Live System User Newsgroups: gmane.emacs.bugs Subject: bug#28687: 25.2; Error using term-handle-ansi-terminal-messages Date: Tue, 03 Oct 2017 11:19:38 -0400 Message-ID: <87mv58b6np.fsf@aol.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1507044032 30690 195.159.176.226 (3 Oct 2017 15:20:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2017 15:20:32 +0000 (UTC) To: 28687@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 03 17:20:26 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzOzS-0006Mp-Nx for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 17:20:10 +0200 Original-Received: from localhost ([::1]:59099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzOzZ-0001nP-MI for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 11:20:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzOzO-0001gH-Dk for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 11:20:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzOzJ-0007Go-Sc for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 11:20:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37844) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzOzJ-0007Gi-Og for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 11:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzOzJ-0006FX-Iz for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 11:20:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Live System User Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Oct 2017 15:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28687 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.150704400024011 (code B ref -1); Tue, 03 Oct 2017 15:20:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 3 Oct 2017 15:20:00 +0000 Original-Received: from localhost ([127.0.0.1]:46525 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzOzH-0006FB-2u for submit@debbugs.gnu.org; Tue, 03 Oct 2017 11:20:00 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzOzE-0006Et-UT for submit@debbugs.gnu.org; Tue, 03 Oct 2017 11:19:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzOz8-00076Y-B7 for submit@debbugs.gnu.org; Tue, 03 Oct 2017 11:19:51 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44210) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dzOz8-00076T-7Q for submit@debbugs.gnu.org; Tue, 03 Oct 2017 11:19:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzOz3-0001am-IF for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 11:19:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzOz0-00070y-8r for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 11:19:45 -0400 Original-Received: from omr-m017e.mx.aol.com ([204.29.186.19]:53174) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dzOz0-00070j-2S for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 11:19:42 -0400 Original-Received: from mtaout-mad01.mx.aol.com (mtaout-mad01.mx.aol.com [172.26.221.205]) by omr-m017e.mx.aol.com (Outbound Mail Relay) with ESMTP id 0D91138001F1 for ; Tue, 3 Oct 2017 11:19:41 -0400 (EDT) Original-Received: from localhost.localdomain (c-73-16-70-190.hsd1.ma.comcast.net [73.16.70.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mtaout-mad01.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id 6B71B38000091 for ; Tue, 3 Oct 2017 11:19:40 -0400 (EDT) x-aol-global-disposition: G DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mx.aol.com; s=20150623; t=1507043981; bh=0k/LYVd1UNoVnO+S1J60MfLp5bg3RDa3O0S3aHFwaX4=; h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type; b=4Wpfk3Rgw9BgjzZbV9tNpKV3rMhT2/HsVd7zzygjnFhr2qfbDqgdVjZqPoE4YODF/ HETRz7sAZbRC2en4absWF4VyWs/JKrGeDM9knJVQh48tTy/8uODfGQQmp7BUJ7Uw+J LROt4avfhqErvOaC3BiKXxEdUCPxqoRpXoLL8u/E= x-aol-sid: 3039ac1addcd59d3aa8c1aa7 X-AOL-IP: 73.16.70.190 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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: 208.118.235.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:137834 Archived-At: Hi, When trying to use `term-handle-ansi-terminal-messages` as a template, a new command code is defined: ((=3D command-code ?e) (save-excursion (find-file-other-window argument)) It gets invoked when string "\033AnSiTe" is sent, similar to this: echo -e "\033AnSiTe" test as well as with an alias defined for the process via `term-send-raw-string`: (term-send-raw-string (format " alias e=3D\'echo -e \"\\033AnSiTe\"\' ") and invoked as: e test Most of the time thi works. =20=20=20=20=20=20=20=20 When it doesn't work as expected, one of the followig 3 errors sometimes occurs: 1. I get the error: if: Symbol=E2=80=99s value as variable is void: term-pending-delete-marker Debugger entered--Lisp error: (void-variable term-pending-delete-marker) term-emulate-terminal(# "\nAnSiTe test\nAnSiTu liveuser\nAn= SiTc /home/liveuser\nAnSiTh localhost.localdomain\n") 2. The trailing "^M" of the argument gets swallowed up (omitted) before being passed to `term-handle-ansi-terminal-messages`, presumably by the function `term-send-raw-string`. =20=20=20=20=20=20=20=20=20=20=20 3. I get the error: term-send-raw-string: Not enough arguments for format string Thanks. In GNU Emacs 25.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.20.10) of 2017-05-02 built on buildvm-17.phx2.fedoraproject.org Windowing system distributor 'Fedora Project', version 11.0.11803000 Configured using: 'configure --build=3Dx86_64-redhat-linux-gnu --host=3Dx86_64-redhat-linux-gnu --program-prefix=3D --disable-dependency-tracking --prefix=3D/usr --exec-prefix=3D/usr --bindir=3D/usr/bin --sbindir=3D/usr/sbin --sysconfdir=3D/etc --datadir=3D/usr/share --includedir=3D/usr/include --libdir=3D/usr/lib64 --libexecdir=3D/usr/libexec --localstatedir=3D/var --sharedstatedir=3D/var/lib --mandir=3D/usr/share/man --infodir=3D/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=3Dgtk3 --with-gpm=3Dno --with-xwidgets --with-modules build_alias=3Dx86_64-redhat-linux-gnu host_alias=3Dx86_64-redhat-linux-gnu 'CFLAGS=3D-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Werror=3Dformat-security -Wp,-D_FORTIFY_SOURCE=3D2 -fexceptions -fstack-protector-strong --param=3Dssp-buffer-size=3D4 -grecord-gcc-switches -specs=3D/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=3Dgeneric' LDFLAGS=3D-Wl,-z,relro PKG_CONFIG_PATH=3D:/usr/lib64/pkgconfig:/usr/share/pkgconfig' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES XWIDGETS Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Buffer Menu Minor modes in effect: tooltip-mode: t global-eldoc-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 auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: is undefined delete-backward-char: Text is read-only [2 times] Quit [2 times] Are you sure you want to quit reading news? (y or n) y Saving /home/liveuser/.newsrc...done Saving /home/liveuser/.newsrc.eld... Saving file /home/liveuser/.newsrc.eld... Wrote /home/liveuser/.newsrc.eld Saving /home/liveuser/.newsrc.eld...done Making completion list... [2 times] Load-path shadows: None found. Features: (shadow emacsbug sendmail shr-color color shr dom subr-x browse-url debug nnagent nnml pp gnus-dup sort gnus-cite smiley ansi-color mail-extr qp gnus-async gnus-bcklg gnus-ml disp-table cursor-sensor nndraft nnmh nndoc mm-archive jka-compr timezone url-http url-gw url-cache url-auth url-handlers utf-7 rfc2104 nnfolder network-stream nsm starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache epa-file epa derived nnreddit mm-url url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util url-parse auth-source cl-seq eieio eieio-core cl-macs url-vars json map seq byte-opt bytecomp byte-compile cl-extra cconv gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap cl gv sieve sieve-mode sieve-manage nnir gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc parse-time gnus-spec gnus-int gnus-range message dired format-spec rfc822 mml mml-sec password-cache epg epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems wid-edit nnoo nnheader gnus-util mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core 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 charscript case-table epa-hook jka-cmpr-hook help simple abbrev 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 dbusbind inotify dynamic-setting system-font-setting font-render-setting xwidget-internal move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 236083 122162) (symbols 48 63122 319) (miscs 40 182 536) (strings 32 90731 96695) (string-bytes 1 2749359) (vectors 16 27592) (vector-slots 8 878323 106766) (floats 8 585 1448) (intervals 56 4719 696) (buffers 976 77) (heap 1024 61833 580652))