From unknown Sat Aug 16 21:02:24 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#6920 <6920@debbugs.gnu.org> To: bug#6920 <6920@debbugs.gnu.org> Subject: Status: 23.2; ESC passed out of order to post-read-conversion Reply-To: bug#6920 <6920@debbugs.gnu.org> Date: Sun, 17 Aug 2025 04:02:24 +0000 retitle 6920 23.2; ESC passed out of order to post-read-conversion reassign 6920 emacs submitter 6920 Ryan Johnson severity 6920 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 26 09:01:19 2010 Received: (at submit) by debbugs.gnu.org; 26 Aug 2010 13:01:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ooc50-0001q5-Fn for submit@debbugs.gnu.org; Thu, 26 Aug 2010 09:01:19 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoYAj-0007pA-9C for submit@debbugs.gnu.org; Thu, 26 Aug 2010 04:50:57 -0400 Received: from lists.gnu.org ([199.232.76.165]:48870) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OoYC5-0000zV-Vy for submit@debbugs.gnu.org; Thu, 26 Aug 2010 04:52:22 -0400 Received: from [140.186.70.92] (port=58459 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoYC4-0003VG-5w for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 04:52:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoYC2-0007q0-HR for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 04:52:19 -0400 Received: from bache.ece.cmu.edu ([128.2.129.23]:46811) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoYC2-0007ph-EY for bug-gnu-emacs@gnu.org; Thu, 26 Aug 2010 04:52:18 -0400 Received: from [192.168.0.2] (164-31.76-83.cust.bluewin.ch [83.76.31.164]) by bache.ece.cmu.edu (Postfix) with ESMTP id 63396A0 for ; Thu, 26 Aug 2010 04:28:06 -0400 (EDT) Message-ID: <4C762592.6080309@ece.cmu.edu> Date: Thu, 26 Aug 2010 10:28:02 +0200 From: Ryan Johnson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 23.2; ESC passed out of order to post-read-conversion Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 26 Aug 2010 09:01:16 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) This problem shows up running in terminal mode on a cygwin xterm, apparently because it sends terminal escape sequences one character at a time (where linux usually sends the whole thing at once). To reproduce, run the following three elisp commands: (define-coding-system 'utf-8-echo "Echoes all input to the message area" :coding-type 'utf-8 :mnemonic ?U :ascii-compatible-p t :charset-list '(unicode) :post-read-conversion 'echo-conversion) (defun echo-conversion (len) (let* ((p (point)) (e (+ p len)) (str (buffer-substring p e))) (message "%s" str) len)) (set-keyboard-coding-system 'utf-8-echo) Then start using the left arrow key to navigate. The escape sequence is '^[OD' and every few arrow presses garbled bits of the "OD" portion will appear in the buffer and the point doesn't move properly. A representative sample of the message buffer looks like this: ^[ O D ^[ O D O D ^[ [2 times] O D The lossage buffer (below) shows how emacs becomes very confused as a result, reporting 'ESC O D O D D O D D ESC' at one point. Defining a similar coding system based on iso-8859-1 instead of utf-8 causes emacs to crash. Unfortunately, cygwin-gdb doesn't trap the signal so I can't produce a stack trace, but sometimes it gets stuck in an endless loop inside malloc, which suggests some sort of memory corruption is the culprit. As far as I know, 'ESC O D' is valid in both coding systems so that shouldn't be the problem. System info follows... In GNU Emacs 23.2.1 (i686-pc-cygwin) of 2010-08-12 on host configured using `configure '--prefix=/home/Ryan/apps/emacs-23.2' '--without-xpm' '--without-png' '--without-gif'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: C.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: tooltip-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 auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: ESC [ > 0 ; 2 6 2 ; 0 c ESC ] 1 1 ; r g b : 0 0 0 0 / 0 0 0 0 / 0 0 0 0 ESC \ ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC O B ESC C-x ESC [ 1 ; 5 B ESC C-x ESC x s e t - k e y TAB RET u t f - 8 - e c h o RET O D D ESC O D ESC O D ESC O D ESC O D O D D ESC O D ESC O D ESC O D ESC O D ESC O D O D D O D D ESC O D ESC O D ESC x r e p o r t - e m TAB RET Recent messages: t - e m ^M E S C ^M Load-path shadows: None found. Features: (shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit mailheader canlock sha1 hex-util hashcash mail-utils emacsbug tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face files text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 10:15:12 2019 Received: (at 6920) by debbugs.gnu.org; 11 Oct 2019 14:15:12 +0000 Received: from localhost ([127.0.0.1]:60067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIvhH-0003U3-PG for submit@debbugs.gnu.org; Fri, 11 Oct 2019 10:15:12 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:38755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIvhE-0003Td-FM for 6920@debbugs.gnu.org; Fri, 11 Oct 2019 10:15:10 -0400 Received: by mail-pg1-f179.google.com with SMTP id x10so5880966pgi.5 for <6920@debbugs.gnu.org>; Fri, 11 Oct 2019 07:15:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=1fARn3ttu8uP0cDa/50Sw18zZjagmJYX+mnI20Cp1YY=; b=dlH+ibkkt0gYTPauPt48SQ0VbsfztsZPspy4QVXuy2DoA05vn6ZL+5ZDridzxi8hS5 rp9S9g2aesjhqljOlBG+mUn8ypakSXbjOiOC/BLnq51w4vRiCUD0t+A7FwTEZpNNMvQs LQSo1twqmU6wOpNqR3+GliktXbzq70TugA0jQzhrCU4QZghQeciaMOy+RI3oIJAiAZR/ mssiF8YHjF3LVEJQG2CwUfsrzPK3O7jzJmTcKTN4twS+yoNvULvoF3AOFXgkNRy7kJhQ 8S8GH2H6AAEjf+niJ7MQy5Y3CAMYoT2XzZeN7y3gMIMFKNF3rDwn76DBbXQxGBkkrxfg 2j5Q== X-Gm-Message-State: APjAAAV5CKYDJ2ZsjAlsOfDCltsZOXodU7qrJpIcMOx361ZXKm09JLWT 4EA7ZjcDMUbfVCBsM7RmvLiXtaZuTeiqhct8rss= X-Google-Smtp-Source: APXvYqymCI+1LnFwZC1VC0/aD55X37x3HqeaviELAKTH/3PSxxnrVt5PgxFpsobamrlGHK9s0UGBBgSwQwQIKzhtCzo= X-Received: by 2002:a63:1c03:: with SMTP id c3mr16487016pgc.198.1570803302524; Fri, 11 Oct 2019 07:15:02 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Fri, 11 Oct 2019 16:14:51 +0200 Message-ID: Subject: Re: bug#6920: 23.2; ESC passed out of order to post-read-conversion To: Ryan Johnson Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 6920 Cc: 6920@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.7 (/) Ryan Johnson writes: > This problem shows up running in terminal mode on a cygwin xterm, > apparently because it sends terminal escape sequences one character at a > time (where linux usually sends the whole thing at once). To reproduce, > run the following three elisp commands: > > (define-coding-system 'utf-8-echo > "Echoes all input to the message area" > :coding-type 'utf-8 > :mnemonic ?U > :ascii-compatible-p t > :charset-list '(unicode) > :post-read-conversion 'echo-conversion) > (defun echo-conversion (len) > (let* ((p (point)) > (e (+ p len)) > (str (buffer-substring p e))) > (message "%s" str) > len)) > (set-keyboard-coding-system 'utf-8-echo) > > Then start using the left arrow key to navigate. The escape sequence is > '^[OD' and every few arrow presses garbled bits of the "OD" portion will > appear in the buffer and the point doesn't move properly. A > representative sample of the message buffer looks like this: > > ^[ > O > D > ^[ > O > D > O > D > ^[ [2 times] > O > D > > The lossage buffer (below) shows how emacs becomes very confused as a > result, reporting 'ESC O D O D D O D D ESC' at one point. Defining a > similar coding system based on iso-8859-1 instead of utf-8 causes emacs > to crash. Unfortunately, cygwin-gdb doesn't trap the signal so I can't > produce a stack trace, but sometimes it gets stuck in an endless loop > inside malloc, which suggests some sort of memory corruption is the > culprit. As far as I know, 'ESC O D' is valid in both coding systems > so that shouldn't be the problem. > > System info follows... > > In GNU Emacs 23.2.1 (i686-pc-cygwin) > of 2010-08-12 on host > configured using `configure '--prefix=/home/Ryan/apps/emacs-23.2' > '--without-xpm' '--without-png' '--without-gif'' This was reported 9 years ago but unfortunately never got a reply at the time. Can you still reproduce it on a modern version of Emacs, for example the latest version 26.3? Best regards, Stefan Kangas From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 11 10:17:15 2019 Received: (at 6920-done) by debbugs.gnu.org; 11 Oct 2019 14:17:15 +0000 Received: from localhost ([127.0.0.1]:60071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIvjH-0003Ym-90 for submit@debbugs.gnu.org; Fri, 11 Oct 2019 10:17:15 -0400 Received: from mail-pg1-f178.google.com ([209.85.215.178]:45128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iIvjD-0003YV-F6 for 6920-done@debbugs.gnu.org; Fri, 11 Oct 2019 10:17:13 -0400 Received: by mail-pg1-f178.google.com with SMTP id r1so4689988pgj.12 for <6920-done@debbugs.gnu.org>; Fri, 11 Oct 2019 07:17:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=xHWYI+z2jiB2SNjfMXMM6bAU73/BaW+ZLb9cciAMoTU=; b=i11ncXMSvt/jPYZHoJbXqRNxcIa3ewcaivZLNQFTfUtj0Gg4dBCYyWNy5qTHHp0e+t FflrrF97IHmPZlOtkzPjvJTHmYKyOE9OehXSRxKG7W9DJO/7Ccg03wwOmZDcPdhS4qiE aR0krQ81EK/wYqvcogHOvoTOJSUX2/avYyt5uw7+3zgmYJ4L5fg0jtm10nKiT4vhd8a0 wV4kti6+bj71g+Z6mLIBzaxaQkYsgpRsZFAMFLIe8ZRIvtH+wMzUqUpNVJ0+aB8P20rU +id6tmVhUIDrpPbFR6p5cQJe/A+jua/53fzPj09G9mP0C7aVOZDquY9B/mx9n0yYMXw4 pmRA== X-Gm-Message-State: APjAAAXQJbZ9NAqSCRYN0MpElsZrWTlhxnXmTsBQWpdwxBZ9n7XDqCCb 1QVT4XR3NuzokzUXYSm43YzIRrWL+9xA0XV8mcwpixom X-Google-Smtp-Source: APXvYqyjW2Xxc5wMnVvlyLpDJ96NFwc0Seheytsh83D2c6ChseSoP/ik7PNYIaxyz8VlTZ3W4YUrkqthGhbS225fb1Y= X-Received: by 2002:aa7:80c6:: with SMTP id a6mr16340543pfn.107.1570803425495; Fri, 11 Oct 2019 07:17:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Stefan Kangas Date: Fri, 11 Oct 2019 16:16:54 +0200 Message-ID: Subject: Re: bug#6920: 23.2; ESC passed out of order to post-read-conversion Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.8 (++) 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: Stefan Kangas writes: > This was reported 9 years ago but unfortunately never got a reply at the > time. Can you still reproduce it on a modern version of Emacs, for > example the [...] Content analysis details: (2.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.2 MISSING_HEADERS Missing To: header 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.215.178 listed in list.dnswl.org] 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: marxist.se] 1.4 MALFORMED_FREEMAIL Bad headers on message from free email service 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-Debbugs-Envelope-To: 6920-done Cc: 6920-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: 1.8 (+) 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: Stefan Kangas writes: > This was reported 9 years ago but unfortunately never got a reply at the > time. Can you still reproduce it on a modern version of Emacs, for > example the [...] Content analysis details: (1.8 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: marxist.se] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.215.178 listed in list.dnswl.org] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.2 MISSING_HEADERS Missing To: header 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 1.4 MALFORMED_FREEMAIL Bad headers on message from free email service 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Stefan Kangas writes: > This was reported 9 years ago but unfortunately never got a reply at the > time. Can you still reproduce it on a modern version of Emacs, for > example the latest version 26.3? The email bounced, so I think it's unlikely that we'll make any progress here and I'm closing this. If anyone can still reproduce the original issue, please reopen the bug report. Best regards, Stefan Kangas From unknown Sat Aug 16 21:02:24 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, 09 Nov 2019 12:24:05 +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