From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Hori Newsgroups: gmane.emacs.bugs Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER Date: Sun, 17 Jan 2010 06:18:09 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e64be8e801b535047d5ce88e X-Trace: ger.gmane.org 1263742547 6154 80.91.229.12 (17 Jan 2010 15:35:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 Jan 2010 15:35:47 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org To: Scott Bell , 5330@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 17 16:35:39 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NWXAA-0008Al-KK for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jan 2010 16:35:39 +0100 Original-Received: from localhost ([127.0.0.1]:33517 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWXAB-0007h7-En for geb-bug-gnu-emacs@m.gmane.org; Sun, 17 Jan 2010 10:35:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWWHk-0008GX-Fz for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:24 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWWHf-0008DB-Un for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:24 -0500 Original-Received: from [199.232.76.173] (port=41736 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWWHf-0008D2-Gr for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:19 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44746) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWWHf-0003lm-2d for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:39:19 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1NWW2t-0000lg-0T; Sun, 17 Jan 2010 09:24:03 -0500 X-Loop: bug-gnu-emacs@gnu.org Resent-From: Ken Hori Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 17 Jan 2010 14:24:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5330 X-Emacs-PR-Package: emacs,ns X-Emacs-PR-Keywords: Original-Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.12637381932927 (code B ref 5330); Sun, 17 Jan 2010 14:24:02 +0000 Original-Received: (at 5330) by debbugs.gnu.org; 17 Jan 2010 14:23:13 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWW22-0000l7-Hy for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:23:10 -0500 Original-Received: from mail-pw0-f60.google.com ([209.85.160.60]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWVxH-0000i0-4j for 5330@debbugs.gnu.org; Sun, 17 Jan 2010 09:18:15 -0500 Original-Received: by pwj13 with SMTP id 13so1291680pwj.39 for <5330@debbugs.gnu.org>; Sun, 17 Jan 2010 06:18:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=qpaLSumksYoQaeZ6MDjmdCxTK7egfx2MOjZpvgpzWDg=; b=E8j0sIsti76ALN4t/U3BuTIqJmMxRsbbdO0v9+zl0y3AwVWQhSZu7nvB5AzaPMsz2M OJzG6Z6Q5B1G6k9UD9I0RKPw3UE0MDByxLLxOl7Zmb4ls6Q0pARG/y/hZ+IOp844elOm mbxW3dv5x3fep3bJARS7b7GzGZ5042V5DW3QY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=wOW/GU1Dult9fEwIIw5eRE72e1nxBH50HhQs2F6/nuEEmwuUl9BQAWmmoqCy1o3FBh 3KQLxgSwOXPszIHyFj7nCwYC6PcWHrg9CkjNAVZfvNZFet31bIPdX++NkJXehvEloVve sxZspg35ft2nhlSw15Oc7VCJ5LMmOxxRXT5YQ= Original-Received: by 10.115.134.25 with SMTP id l25mr3296268wan.196.1263737889731; Sun, 17 Jan 2010 06:18:09 -0800 (PST) In-Reply-To: X-Spam-Score: -2.6 (--) X-Mailman-Approved-At: Sun, 17 Jan 2010 09:23:09 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list X-Spam-Score: -2.9 (--) Resent-Date: Sun, 17 Jan 2010 09:24:03 -0500 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Sun, 17 Jan 2010 10:33:00 -0500 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:34418 Archived-At: --0016e64be8e801b535047d5ce88e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I identified the cause of this bug. It happens when PS1 environment variable contains certain \e escape code like '\[\e[01;32m\][\h:\w]\$\[\e[00m\] '. In such a case, term.el gets messed up somehow and becomes no longer able to handle meta (alt) keyboard input properly. On Sun, Jan 17, 2010 at 6:09 AM, Ken Hori wrote: > It happens on Linux as well > (For example, Emacs 23.1.91 bzr revision 99310) > > So M-d (delete-next-word) on term-mode does not work, even though term-mo= de > is supposed to be emulating a terminal as it is. > > I can confirm this bug has existed for at least 1 month. > Perhaps reporting it again with a more noticeable title might get more > attention that it deserves. This is a major bug that keeps me from using = M-x > term. > > On Wed, Jan 6, 2010 at 3:35 PM, Scott Bell wrote: > >> Under Mac OS X 10.6.2, Emacs 23.1.90.1, in an M-x term buffer >> running /bin/bash, I get the following undesired behavior in >> Cocoa emacs (Emacs.app/Contents/MacOS/Emacs -q) when typing >> `one two M-DEL' where meta is typed as the alt/option key: >> >> $ one two=FF >> >> This occurs even when ns-alternate-modifier is set to 'meta. >> Running Emacs in a terminal window (Emacs.app/Contents/MacOS/ >> Emacs -q -nw) works as I expect: >> >> $ one >> >> >> >> >> > --0016e64be8e801b535047d5ce88e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I identified the cause of this bug.

It happens when PS1 environment = variable contains certain \e escape code
like '\[\e[01;32m\][\h:\w]\= $\[\e[00m\] '.

In such a case, term.el gets messed up somehow an= d becomes
no longer able to handle meta (alt) keyboard input properly.


On Sun, Jan 17, 2010 at 6:09 AM, Ken Hori <fplemma@gmail.com>= wrote:
It happens on Linux as well
(For example, Emacs 23.1.91 bzr revision 99= 310)

So M-d (delete-next-word) on term-mode does not work, even= though term-mode is supposed to be emulating a terminal as it= is.

I can confirm this bug has existed for at least 1 month.
Perhaps reporting it again with a more noticeable title might get more attention that it deserves. This is a major bug that keeps me from using M-x term.

On Wed, Jan 6, 2010 at 3:35 PM, Scott Bell &l= t;sctb@me.com> wrote:
Under Mac OS X 10.6.2, Emacs 23.1.90.1, in an M-x term buffer
running /bin/bash, I get the following undesired behavior in
Cocoa emacs (Emacs.app/Contents/MacOS/Emacs -q) when typing
`one two M-DEL' where meta is typed as the alt/option key:

$ one two=FF

This occurs even when ns-alternate-modifier is set to 'meta.
Running Emacs in a terminal window (Emacs.app/Contents/MacOS/
Emacs -q -nw) works as I expect:

$ one






--0016e64be8e801b535047d5ce88e--