From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER Reply-To: Scott Bell , 5330@debbugs.gnu.org Mail-Followup-To: Scott Bell , 5330@debbugs.gnu.org Resent-From: Scott Bell Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jan 2010 23:57:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: report 5330 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@debbugs.gnu.org id=B.126282221926619 (code B ref -1); Wed, 06 Jan 2010 23:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jan 2010 23:56:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSfkI-0006vG-Fa for submit@debbugs.gnu.org; Wed, 06 Jan 2010 18:56:58 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSfPb-0006Un-D6 for submit@debbugs.gnu.org; Wed, 06 Jan 2010 18:35:35 -0500 Received: from mx10.gnu.org ([199.232.76.166]:45651) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSfPX-0005Yn-KZ for submit@debbugs.gnu.org; Wed, 06 Jan 2010 18:35:31 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NSfPW-0001zL-Ff for submit@debbugs.gnu.org; Wed, 06 Jan 2010 18:35:31 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:33975) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NSfPW-0001z7-9U for submit@debbugs.gnu.org; Wed, 06 Jan 2010 18:35:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSfPV-0001HS-U8 for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2010 18:35:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSfPR-0001Ex-D0 for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2010 18:35:29 -0500 Received: from [199.232.76.173] (port=54946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSfPR-0001Et-5Z for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2010 18:35:25 -0500 Received: from asmtpout030.mac.com ([17.148.16.105]:36802) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSfPQ-0001xl-Re for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2010 18:35:25 -0500 MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Received: from [192.168.1.101] ([70.72.209.234]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KVU00HFTMUXBX80@asmtp030.mac.com> for bug-gnu-emacs@gnu.org; Wed, 06 Jan 2010 15:35:22 -0800 (PST) From: Scott Bell Content-transfer-encoding: quoted-printable Date: Wed, 06 Jan 2010 16:35:20 -0700 Message-id: To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.1077) X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (1203?) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -6.0 (------) X-Mailman-Approved-At: Wed, 06 Jan 2010 18:56:56 -0500 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.0 (------) 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=20 `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=20= From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 16:46:24 2010 Received: (at control) by debbugs.gnu.org; 7 Jan 2010 21:46:24 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT0BU-0002Kc-9Z for submit@debbugs.gnu.org; Thu, 07 Jan 2010 16:46:24 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NT0BR-0002KT-Fx for control@debbugs.gnu.org; Thu, 07 Jan 2010 16:46:22 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1NT0BN-0007Nk-Fp; Thu, 07 Jan 2010 16:46:17 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19270.22057.471140.62769@fencepost.gnu.org> Date: Thu, 7 Jan 2010 16:46:17 -0500 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: black X-Ran: 6FkqiEb_n:'MzWdv:@VuHO?)|TFAlr]M(}~|1S[^}^5eyTDOm)C5S%DhvfG/'xcuv@&m>g X-Debbugs-No-Ack: yes X-Spam-Score: -4.9 (----) X-Debbugs-Envelope-To: control 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: -4.9 (----) tags 5272 moreinfo tags 5279 patch severity 5282 minor reassign 5284 emacs,gnus severity 5304 minor tags 5304 wontfix notabug tags 5310 patch severity 5327 minor reassign 5330 emacs,ns reassign 5331 emacs,ns reassign 5333 emacs,ns From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER 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 07:39: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: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.126371392114280 (code B ref 5330); Sun, 17 Jan 2010 07:39:02 +0000 Received: (at 5330) by debbugs.gnu.org; 17 Jan 2010 07:38:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWPia-0003iH-Ju for submit@debbugs.gnu.org; Sun, 17 Jan 2010 02:38:41 -0500 Received: from mail-pw0-f60.google.com ([209.85.160.60]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWOyw-00039m-8M for 5330@debbugs.gnu.org; Sun, 17 Jan 2010 01:51:30 -0500 Received: by pwj13 with SMTP id 13so1192734pwj.39 for <5330@debbugs.gnu.org>; Sat, 16 Jan 2010 22:51:25 -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:content-type; bh=IrCXKAf6n2Tys3dGK7eCOngwsh/KBsqJCljJmJUEIW8=; b=qONEYM12PQ6Lc8TwxJsemXeOJN8S5HvwRapoLTAZohL2Pd53/lu90zGGDYVz1QpCYQ W0dBGlIMH6pkJHkPbyfD/YIONVoy+7bDa6PghwqnQYhhG7rapiuM4tfUUV1VIN9jT5xH icjZfXlJ6iWLud18pvdOdB/O3Wypn2WEqRD0c= 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 :content-type; b=lYG1AAzRrPioYNxjgJrviVrl3Jj8Rarf+f+VWtLoQEAfNvs4ttuvDkWK3cwOXGnddg 0HKfZzfDx8XrHJQBHNOalSFiv60l6vfd87O+XZ7DgqVkTBbnSRb5KiWHVm5isga7J7lx qhBGkqzJ6U9weSA4BNtDGnY+e54O9UpI9u7hE= MIME-Version: 1.0 Received: by 10.114.99.12 with SMTP id w12mr176765wab.72.1263711085719; Sat, 16 Jan 2010 22:51:25 -0800 (PST) In-Reply-To: References: Date: Sat, 16 Jan 2010 22:51:25 -0800 Message-ID: From: Ken Hori To: Scott Bell , 5330@debbugs.gnu.org Content-Type: multipart/alternative; boundary=001636e0b5a35cf0fa047d56aa71 X-Spam-Score: -2.6 (--) X-Mailman-Approved-At: Sun, 17 Jan 2010 02:38:39 -0500 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: -2.6 (--) --001636e0b5a35cf0fa047d56aa71 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-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 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 > > > > > --001636e0b5a35cf0fa047d56aa71 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It happens on Linux as well
(For example, Emacs 23.1.91 bzr revision 993= 10)

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

I can c= onfirm this bug has existed for at least 1 month.
Perhaps reporting it again with a more noticeable title might get more atte= ntion that it deserves. This is a major bug that keeps me from using M-x te= rm.



--001636e0b5a35cf0fa047d56aa71-- From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER 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:01 +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: Received: via spool by submit@debbugs.gnu.org id=B.12637381932931 (code B ref -1); Sun, 17 Jan 2010 14:24:01 +0000 Received: (at submit) by debbugs.gnu.org; 17 Jan 2010 14:23:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWW23-0000lB-SZ for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:23:12 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWW09-0000jx-HV for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:21:13 -0500 Received: from mail.gnu.org ([199.232.76.166]:54943 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWW04-00024I-N8 for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:21:08 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NWVxJ-0002Sy-Bd for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:18:19 -0500 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on monty-python X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,HTML_30_40, HTML_MESSAGE,UNPARSEABLE_RELAY autolearn=ham version=3.1.0 Received: from lists.gnu.org ([199.232.76.165]:49608) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NWVxJ-0002Sg-2V for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:18:17 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NWVxI-00084D-JW for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:18:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NWVxD-000841-2w for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:18:15 -0500 Received: from [199.232.76.173] (port=42922 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NWVxC-00083y-U4 for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:18:10 -0500 Received: from mail-pw0-f47.google.com ([209.85.160.47]:48530) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NWVxC-0002Qo-IK for bug-gnu-emacs@gnu.org; Sun, 17 Jan 2010 09:18:10 -0500 Received: by pwj10 with SMTP id 10so1382242pwj.26 for ; 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= MIME-Version: 1.0 Received: by 10.115.134.25 with SMTP id l25mr3296268wan.196.1263737889731; Sun, 17 Jan 2010 06:18:09 -0800 (PST) In-Reply-To: References: Date: Sun, 17 Jan 2010 06:18:09 -0800 Message-ID: From: Ken Hori To: Scott Bell , 5330@debbugs.gnu.org Content-Type: multipart/alternative; boundary=0016e64be8e801b535047d5ce88e X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -4.3 (----) X-Mailman-Approved-At: Sun, 17 Jan 2010 09:23:09 -0500 Cc: bug-gnu-emacs@gnu.org 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: -4.5 (----) --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-- From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER 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: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.12637381932922 (code B ref 5330); Sun, 17 Jan 2010 14:24:02 +0000 Received: (at 5330) by debbugs.gnu.org; 17 Jan 2010 14:23:13 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWW22-0000l4-4c for submit@debbugs.gnu.org; Sun, 17 Jan 2010 09:23:10 -0500 Received: from mail-px0-f202.google.com ([209.85.216.202]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWVow-0000cf-JY for 5330@debbugs.gnu.org; Sun, 17 Jan 2010 09:09:39 -0500 Received: by pxi40 with SMTP id 40so1575418pxi.21 for <5330@debbugs.gnu.org>; Sun, 17 Jan 2010 06:09:33 -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=5emwMcLGibQlvNm0dGsLkE8wiVP2giEI2qI1YP+Bfwg=; b=uzwm4KEtcmdvDKLGtXruVbROk2i/72E+aP/X2uMGCB80FIv8Yy1wIinn6VFwyPAFEQ vrA+6x++imp12V2PNEe7oTrvlXIuZkcK64iywd0kAiT/Sq7FhKN1PX4zpFejRG7aelY2 jXhx3i48bxYbLHDs6QpF0bUiLvzLJcl2+hU+U= 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=WHWWivNWpmPynvJGXJS9BZfsKcj8dgXs6oMpQxrW7bcFNPB5zc227EU3xykntydfud kHS/G96IKANAREj0D4P8y8r0FhkIlw4vsnk0jZb6VioQWtn2KOoltNMOKdpI6+9zseEj L6mb+V2sAe0ug7/X+hB1Y4OBTKWn1BiZj+cGE= MIME-Version: 1.0 Received: by 10.114.139.14 with SMTP id m14mr3318704wad.216.1263737373184; Sun, 17 Jan 2010 06:09:33 -0800 (PST) In-Reply-To: References: Date: Sun, 17 Jan 2010 06:09:33 -0800 Message-ID: From: Ken Hori To: Scott Bell , 5330@debbugs.gnu.org Content-Type: multipart/alternative; boundary=00504502e2d537d1bf047d5cc987 X-Spam-Score: -2.6 (--) X-Mailman-Approved-At: Sun, 17 Jan 2010 09:23:09 -0500 Cc: bug-gnu-emacs@gnu.org 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: -2.9 (--) --00504502e2d537d1bf047d5cc987 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-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 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 > > > > > --00504502e2d537d1bf047d5cc987 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It happens on Linux as well
(For example, Emacs 23.1.91 bzr revision 993= 10)

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 <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





--00504502e2d537d1bf047d5cc987-- From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER Resent-From: Scott Bell 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 23:47: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: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.126377199229556 (code B ref 5330); Sun, 17 Jan 2010 23:47:02 +0000 Received: (at 5330) by debbugs.gnu.org; 17 Jan 2010 23:46:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWepE-0007gf-DE for submit@debbugs.gnu.org; Sun, 17 Jan 2010 18:46:32 -0500 Received: from asmtpout023.mac.com ([17.148.16.98]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWepC-0007gW-Kr for 5330@debbugs.gnu.org; Sun, 17 Jan 2010 18:46:31 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from [10.0.1.4] ([68.144.36.63]) by asmtp023.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KWF00I8D0PBHQ40@asmtp023.mac.com> for 5330@debbugs.gnu.org; Sun, 17 Jan 2010 15:46:25 -0800 (PST) From: Scott Bell In-reply-to: Date: Sun, 17 Jan 2010 16:46:23 -0700 Message-id: <2929859D-1E95-44E5-8316-F4AB47C33D77@me.com> References: To: 5330@debbugs.gnu.org X-Mailer: Apple Mail (2.1077) X-Spam-Score: -3.6 (---) 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: -3.6 (---) On 2010-01-17, at 7:18 AM, Ken Hori wrote: > 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\] '. I can't reproduce this -- I still encounter the problem when PS1='> ' (no escape codes). From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER 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: Mon, 18 Jan 2010 21:28: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: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.126385005024129 (code B ref 5330); Mon, 18 Jan 2010 21:28:02 +0000 Received: (at 5330) by debbugs.gnu.org; 18 Jan 2010 21:27:30 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWz8D-0006H8-Ie for submit@debbugs.gnu.org; Mon, 18 Jan 2010 16:27:29 -0500 Received: from mail-pw0-f60.google.com ([209.85.160.60]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWyyb-00069J-0T for 5330@debbugs.gnu.org; Mon, 18 Jan 2010 16:17:46 -0500 Received: by pwj17 with SMTP id 17so371948pwj.39 for <5330@debbugs.gnu.org>; Mon, 18 Jan 2010 13:17:28 -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=JyFrX9IJUebTvJ609mqNLIIRYbhTkM7qJic8npnQSKs=; b=XJMN8/b8CXeh9jRF4yEqSOMVKEWuPpSAYVfQouXK2lvLQWk1pwYIMEu5PwtcF0wIor BEqaVdZD7FnR/sDWCoKdcHYswD4zMr1lpHvi0O+Y50uSppzZBZkFFDIxpLzXp1/H52xl YBctjOQDxrf8iT8UzzuVC38LBxWFnSM4zdntE= 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=sSY/QWj3McwILZKryKYiSJPCnHs6cgjkTsCIAOWW39JkFfFiNXjLHGq1rFDj/XjLMh OwnL1+dQXFgcNSsH2nka1x84P0YRuGqCImYT5kXvTo7bytZAoS7YgXEaCAWn4aqrpgm4 v8TL5dmmB/etPvxpA10LzzS69pRNLfFUbFBEk= MIME-Version: 1.0 Received: by 10.114.187.16 with SMTP id k16mr3865886waf.112.1263849448319; Mon, 18 Jan 2010 13:17:28 -0800 (PST) In-Reply-To: <2929859D-1E95-44E5-8316-F4AB47C33D77@me.com> References: <2929859D-1E95-44E5-8316-F4AB47C33D77@me.com> Date: Mon, 18 Jan 2010 13:17:28 -0800 Message-ID: From: Ken Hori To: Scott Bell Content-Type: multipart/alternative; boundary=0016e64b924e6aac8a047d76e1b0 X-Spam-Score: -3.3 (---) X-Mailman-Approved-At: Mon, 18 Jan 2010 16:27:29 -0500 Cc: 5330@debbugs.gnu.org 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: -3.2 (---) --0016e64b924e6aac8a047d76e1b0 Content-Type: text/plain; charset=ISO-8859-1 Please ignore my last post. You can instead apply the following patch for a quick fix: +++ term.el 2010-01-18 09:27:33.085376730 -0800 @@ -1208,8 +1208,17 @@ (defun term-send-raw-meta () (interactive) - (let* ((keys (this-command-keys)) - (char (aref keys (1- (length keys))))) + (let ((char last-input-event)) + (when (symbolp last-input-event) + ;; Convert `return' to C-m, etc. + (let ((tmp (get char 'event-symbol-elements))) + (when tmp + (setq char (car tmp))) + (when (symbolp char) + (setq tmp (get char 'ascii-character)) + (when tmp + (setq char tmp))))) + (setq char (event-basic-type char)) (term-send-raw-string (if (and (numberp char) (> char 127) (< char 256)) Or, just replace your term-send-raw-meta with: (defun term-send-raw-meta () (interactive) (let ((char last-input-event)) (when (symbolp last-input-event) ;; Convert `return' to C-m, etc. (let ((tmp (get char 'event-symbol-elements))) (when tmp (setq char (car tmp))) (when (symbolp char) (setq tmp (get char 'ascii-character)) (when tmp (setq char tmp))))) (setq char (event-basic-type char)) (term-send-raw-string (if (and (numberp char) (> char 127) (< char 256)) (make-string 1 char) (format "\e%c" char))))) Let me know if it succeeds or not. On Sun, Jan 17, 2010 at 3:46 PM, Scott Bell wrote: > On 2010-01-17, at 7:18 AM, Ken Hori wrote: > > > 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\] '. > > I can't reproduce this -- I still encounter the problem > when PS1='> ' (no escape codes). > > > > > > --0016e64b924e6aac8a047d76e1b0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Please ignore my last post.

You can instead apply the following patc= h for a quick fix:

+++ term.el=A0=A0=A0 2010-01-18 09:27:33.08537673= 0 -0800
@@ -1208,8 +1208,17 @@
=A0
=A0(defun term-send-raw-meta ()=
=A0=A0 (interactive)
-=A0 (let* ((keys (this-command-keys))
-=A0=A0=A0=A0=A0=A0=A0=A0 (char (= aref keys (1- (length keys)))))
+=A0 (let ((char last-input-event))
+= =A0=A0=A0 (when (symbolp last-input-event)
+=A0=A0=A0=A0=A0 ;; Convert `= return' to C-m, etc.
+=A0=A0=A0=A0=A0 (let ((tmp (get char 'even= t-symbol-elements)))
+=A0=A0=A0 (when tmp
+=A0=A0=A0 =A0 (setq char (car tmp)))
+=A0=A0=A0= (when (symbolp char)
+=A0=A0=A0 =A0 (setq tmp (get char 'ascii-char= acter))
+=A0=A0=A0 =A0 (when tmp
+=A0=A0=A0 =A0=A0=A0 (setq char tmp)= ))))
+=A0=A0=A0 (setq char (event-basic-type char))
=A0=A0=A0=A0 (term-send-raw-string (if (and (numberp char)
=A0=A0=A0=A0 = =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0 (> char 127)
=A0=A0=A0=A0 =A0=A0= =A0 =A0=A0=A0 =A0=A0=A0 =A0=A0 (< char 256))

Or, just replace you= r term-send-raw-meta with:

(defun term-send-raw-meta ()
=A0 (interactive)
=A0 (let ((char last-input-event))
=A0=A0=A0 (when = (symbolp last-input-event)
=A0=A0=A0=A0=A0 ;; Convert `return' to C-= m, etc.
=A0=A0=A0=A0=A0 (let ((tmp (get char 'event-symbol-elements)= ))
=A0=A0=A0 (when tmp
=A0=A0=A0 =A0 (setq char (car tmp)))
=A0=A0=A0 (when (symbolp char)
=A0=A0=A0 =A0 (setq tmp (get char 'as= cii-character))
=A0=A0=A0 =A0 (when tmp
=A0=A0=A0 =A0=A0=A0 (setq cha= r tmp)))))
=A0=A0=A0 (setq char (event-basic-type char))
=A0=A0=A0 (t= erm-send-raw-string (if (and (numberp char)
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0 (> char 127)
=A0=A0=A0= =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0 (< char 256))
=A0=A0=A0 =A0=A0= =A0 =A0=A0=A0 =A0=A0=A0=A0=A0 (make-string 1 char)
=A0=A0=A0 =A0=A0=A0 = =A0=A0=A0 =A0=A0=A0 (format "\e%c" char)))))

Let me know i= f it succeeds or not.

On Sun, Jan 17, 2010 at 3:46 PM, Scott Bell <sctb@me.com> wrote:
On 2010-01-17, at 7:18 AM, Ken Hori wrote:

> I identified the cause of this bug.
>
> It happens when PS1 environment variable contains certain \e escape co= de
> like '\[\e[01;32m\][\h:\w]\$\[\e[00m\] '.

I can't reproduce this -- I still encounter the problem
when PS1=3D'> ' (no escape codes).






--0016e64b924e6aac8a047d76e1b0-- From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER Resent-From: Scott Bell Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2010 22:01:01 +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: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.126385203127434 (code B ref 5330); Mon, 18 Jan 2010 22:01:01 +0000 Received: (at 5330) by debbugs.gnu.org; 18 Jan 2010 22:00:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWzeB-00078R-7L for submit@debbugs.gnu.org; Mon, 18 Jan 2010 17:00:31 -0500 Received: from asmtpout028.mac.com ([17.148.16.103]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NWze8-00078K-Dp for 5330@debbugs.gnu.org; Mon, 18 Jan 2010 17:00:30 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from [192.168.1.101] ([70.72.209.234]) by asmtp028.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KWG005R1QGHMO20@asmtp028.mac.com> for 5330@debbugs.gnu.org; Mon, 18 Jan 2010 14:00:19 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-1001180205 From: Scott Bell In-reply-to: Date: Mon, 18 Jan 2010 15:00:17 -0700 Message-id: References: <2929859D-1E95-44E5-8316-F4AB47C33D77@me.com> To: Ken Hori X-Mailer: Apple Mail (2.1077) X-Spam-Score: -4.0 (----) Cc: 5330@debbugs.gnu.org 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: -4.0 (----) On 2010-01-18, at 2:17 PM, Ken Hori wrote: > Please ignore my last post. > > You can instead apply the following patch for a quick fix: > > +++ term.el 2010-01-18 09:27:33.085376730 -0800 > @@ -1208,8 +1208,17 @@ > > (defun term-send-raw-meta () > (interactive) > - (let* ((keys (this-command-keys)) > - (char (aref keys (1- (length keys))))) > + (let ((char last-input-event)) > + (when (symbolp last-input-event) > + ;; Convert `return' to C-m, etc. > + (let ((tmp (get char 'event-symbol-elements))) > + (when tmp > + (setq char (car tmp))) > + (when (symbolp char) > + (setq tmp (get char 'ascii-character)) > + (when tmp > + (setq char tmp))))) > + (setq char (event-basic-type char)) > (term-send-raw-string (if (and (numberp char) > (> char 127) > (< char 256)) > > Or, just replace your term-send-raw-meta with: > > (defun term-send-raw-meta () > (interactive) > (let ((char last-input-event)) > (when (symbolp last-input-event) > ;; Convert `return' to C-m, etc. > (let ((tmp (get char 'event-symbol-elements))) > (when tmp > (setq char (car tmp))) > (when (symbolp char) > (setq tmp (get char 'ascii-character)) > (when tmp > (setq char tmp))))) > (setq char (event-basic-type char)) > (term-send-raw-string (if (and (numberp char) > (> char 127) > (< char 256)) > (make-string 1 char) > (format "\e%c" char))))) > > Let me know if it succeeds or not. This works, at least in my common use cases (M-d, M-RET, etc.) - Scott From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: M-d broken in term.el [Was: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER] References: In-Reply-To: Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2010 22:41: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: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.126385445329030 (code B ref 5330); Mon, 18 Jan 2010 22:41:02 +0000 Received: (at 5330) by debbugs.gnu.org; 18 Jan 2010 22:40:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NX0HE-0007YA-BZ for submit@debbugs.gnu.org; Mon, 18 Jan 2010 17:40:52 -0500 Received: from pantheon-po43.its.yale.edu ([130.132.50.104]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NX0HC-0007Xk-1X for 5330@debbugs.gnu.org; Mon, 18 Jan 2010 17:40:50 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0IMejNT026286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 18 Jan 2010 17:40:45 -0500 Received: by furry (Postfix, from userid 1000) id E07D9C05D; Mon, 18 Jan 2010 15:40:45 -0700 (MST) From: Chong Yidong To: Stefan Monnier Date: Mon, 18 Jan 2010 17:40:45 -0500 Message-ID: <873a232g0i.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.8 (--) Cc: 5330@debbugs.gnu.org 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: -2.8 (--) > 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-mode > is supposed to be emulating a terminal as it is. Hi Stefan, This bug started with your 2009-11-13 change to term.el: 2009-11-13 Stefan Monnier * term.el (make-term, term-exec, term-sentinel, term-read-input-ring) (term-write-input-ring, term-check-source, term-start-output-log): (term-display-buffer-line, term-dynamic-list-completions): (term-ansi-make-term, serial-term): ... Use with-current-buffer. Could you please fix it? I'm not sure Ken Hori's patch is right, because it affects for another part of term.el. Better to find out how your change broke term.el first. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 17:41:50 2010 Received: (at control) by debbugs.gnu.org; 18 Jan 2010 22:41:51 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NX0IA-0007Yy-Hy for submit@debbugs.gnu.org; Mon, 18 Jan 2010 17:41:50 -0500 Received: from pantheon-po19.its.yale.edu ([130.132.50.75]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NX0I8-0007Yt-M0 for control@debbugs.gnu.org; Mon, 18 Jan 2010 17:41:48 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po19.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0IMfi8A030905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 18 Jan 2010 17:41:44 -0500 Received: by furry (Postfix, from userid 1000) id E6109C05D; Mon, 18 Jan 2010 15:41:44 -0700 (MST) From: Chong Yidong To: control@debbugs.gnu.org Subject: severity 5330 Date: Mon, 18 Jan 2010 17:41:44 -0500 Message-ID: <87iqazdoif.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: control 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: -4.8 (----) severity 5330 serious reassign 5330 emacs thanks From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER References: In-Reply-To: Resent-From: Chong Yidong Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jan 2010 17:19:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5330 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.12640079053858 (code B ref 5330); Wed, 20 Jan 2010 17:19:02 +0000 Received: (at 5330) by debbugs.gnu.org; 20 Jan 2010 17:18:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXeCH-00010B-DG for submit@debbugs.gnu.org; Wed, 20 Jan 2010 12:18:25 -0500 Received: from pantheon-po43.its.yale.edu ([130.132.50.104]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXeCF-000106-V5 for 5330@debbugs.gnu.org; Wed, 20 Jan 2010 12:18:24 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po43.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0KHIEkB008275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 20 Jan 2010 12:18:16 -0500 Received: by furry (Postfix, from userid 1000) id 0C832C05D; Wed, 20 Jan 2010 10:18:14 -0700 (MST) From: Chong Yidong To: Stefan Monnier Date: Wed, 20 Jan 2010 12:18:14 -0500 Message-ID: <87ocko1yqx.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.9 (--) Cc: Scott Bell , 5330@debbugs.gnu.org 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: -2.9 (--) I narrowed the problem down to this specific change: 2009-12-04 Stefan Monnier Minor cleanup. * term.el (term-send-raw, term-send-raw-meta): Use read-key-sequence's key decoding rather than do it manually via last-input-event + ascii-character. I'm not sure if the change to term-send-raw breaks anything, but the the change to term-send-raw-meta definitely prevents the process from getting M-d correctly. I've reverted it in the repository for now (change attached), but you might want to double-check the entire change. *** lisp/term.el 2010-01-13 08:35:10 +0000 --- lisp/term.el 2010-01-20 17:12:01 +0000 *************** *** 1208,1215 **** (defun term-send-raw-meta () (interactive) ! (let* ((keys (this-command-keys)) ! (char (aref keys (1- (length keys))))) (term-send-raw-string (if (and (numberp char) (> char 127) (< char 256)) --- 1208,1224 ---- (defun term-send-raw-meta () (interactive) ! (let ((char last-input-event)) ! (when (symbolp last-input-event) ! ;; Convert `return' to C-m, etc. ! (let ((tmp (get char 'event-symbol-elements))) ! (when tmp ! (setq char (car tmp))) ! (when (symbolp char) ! (setq tmp (get char 'ascii-character)) ! (when tmp ! (setq char tmp))))) ! (setq char (event-basic-type char)) (term-send-raw-string (if (and (numberp char) (> char 127) (< char 256)) From unknown Sat Jun 14 03:58:02 2025 X-Loop: bug-gnu-emacs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER Resent-From: Scott Bell Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Jan 2010 19:05:02 +0000 Resent-Message-ID: Resent-Sender: bug-gnu-emacs@gnu.org X-Emacs-PR-Message: followup 5330 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.12640142937746 (code B ref 5330); Wed, 20 Jan 2010 19:05:02 +0000 Received: (at 5330) by debbugs.gnu.org; 20 Jan 2010 19:04:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXfrI-00020t-1N for submit@debbugs.gnu.org; Wed, 20 Jan 2010 14:04:52 -0500 Received: from asmtpout025.mac.com ([17.148.16.100]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NXfrG-00020d-HT for 5330@debbugs.gnu.org; Wed, 20 Jan 2010 14:04:51 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from [192.168.1.101] ([70.72.209.234]) by asmtp025.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KWK004XM7N3D910@asmtp025.mac.com> for 5330@debbugs.gnu.org; Wed, 20 Jan 2010 11:04:27 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-1001200153 From: Scott Bell In-reply-to: <87ocko1yqx.fsf@stupidchicken.com> Date: Wed, 20 Jan 2010 12:04:15 -0700 Message-id: <519A9EBC-CB25-4EB4-8A1C-CA784FA31EED@me.com> References: <87ocko1yqx.fsf@stupidchicken.com> To: Chong Yidong X-Mailer: Apple Mail (2.1077) X-Spam-Score: -3.9 (---) Cc: 5330@debbugs.gnu.org, Stefan Monnier 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: -3.9 (---) On 2010-01-20, at 10:18 AM, Chong Yidong wrote: > I narrowed the problem down to this specific change: > > 2009-12-04 Stefan Monnier > > Minor cleanup. > * term.el (term-send-raw, term-send-raw-meta): Use read-key-sequence's > key decoding rather than do it manually via last-input-event + > ascii-character. > > I'm not sure if the change to term-send-raw breaks anything, but the the > change to term-send-raw-meta definitely prevents the process from > getting M-d correctly. I've reverted it in the repository for now > (change attached), but you might want to double-check the entire change. The latest repository seems to work for me with this change, thanks! - Scott From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 22 11:18:05 2010 Received: (at control) by debbugs.gnu.org; 22 Jan 2010 16:18:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NYMCy-00088G-SK for submit@debbugs.gnu.org; Fri, 22 Jan 2010 11:18:05 -0500 Received: from pantheon-po33.its.yale.edu ([130.132.50.94]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NYMCx-00087s-Sx for control@debbugs.gnu.org; Fri, 22 Jan 2010 11:18:04 -0500 Received: from furry (dhcp128036014123.central.yale.edu [128.36.14.123]) (authenticated bits=0) by pantheon-po33.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id o0MGHx4a006002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Fri, 22 Jan 2010 11:17:59 -0500 Received: by furry (Postfix, from userid 1000) id 0A425C05D; Fri, 22 Jan 2010 09:17:59 -0700 (MST) From: Chong Yidong To: control@debbugs.gnu.org Subject: merge 5449 5330 Date: Fri, 22 Jan 2010 11:17:58 -0500 Message-ID: <87my062jwp.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) X-Spam-Score: -2.9 (--) X-Debbugs-Envelope-To: control 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: -2.9 (--) severity 5330 normal merge 5449 5330 thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 07:57:10 2011 Received: (at control) by debbugs.gnu.org; 18 Sep 2011 11:57:10 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Fzh-0005bo-T2 for submit@debbugs.gnu.org; Sun, 18 Sep 2011 07:57:10 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Fzg-0005bg-0H for control@debbugs.gnu.org; Sun, 18 Sep 2011 07:57:08 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5Fuo-00027V-Pq for control@debbugs.gnu.org; Sun, 18 Sep 2011 13:52:06 +0200 Date: Sun, 18 Sep 2011 13:48:46 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #5449 X-MailScanner-ID: 1R5Fuo-00027V-Pq X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316951526.90281@36TGoYqjPak+Oz3ZClpgFA X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control 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: -2.6 (--) tags 5449 fixed close 5449 24.1 From unknown Sat Jun 14 03:58:02 2025 X-Loop: help-debbugs@gnu.org Subject: bug#5330: Term mode in Cocoa does not respect NS-ALTERNATE-MODIFIER Resent-From: Lars Magne Ingebrigtsen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Sep 2011 12:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5330 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed To: Scott Bell Cc: 5449@debbugs.gnu.org, Chong Yidong , 5330@debbugs.gnu.org, Stefan Monnier Received: via spool by 5330-submit@debbugs.gnu.org id=B5330.131634793225882 (code B ref 5330); Sun, 18 Sep 2011 12:13:01 +0000 Received: (at 5330) by debbugs.gnu.org; 18 Sep 2011 12:12:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5GEE-0006jM-Ue for submit@debbugs.gnu.org; Sun, 18 Sep 2011 08:12:12 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5GEB-0006j0-Od; Sun, 18 Sep 2011 08:12:08 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5G98-0002QK-BX; Sun, 18 Sep 2011 14:06:54 +0200 From: Lars Magne Ingebrigtsen In-Reply-To: <519A9EBC-CB25-4EB4-8A1C-CA784FA31EED@me.com> (Scott Bell's message of "Wed, 20 Jan 2010 12:04:15 -0700") Date: Sun, 18 Sep 2011 13:48:42 +0200 Message-ID: References: <87ocko1yqx.fsf@stupidchicken.com> <519A9EBC-CB25-4EB4-8A1C-CA784FA31EED@me.com> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Jane Siberry's _Jane Siberry_: "In The Blue Light" MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1R5G98-0002QK-BX X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316952414.50538@EqnG228yHJJXH3we9rCyrA X-Spam-Status: No X-Spam-Score: -2.7 (--) 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: -2.7 (--) Scott Bell writes: >> I'm not sure if the change to term-send-raw breaks anything, but the the >> change to term-send-raw-meta definitely prevents the process from >> getting M-d correctly. I've reverted it in the repository for now >> (change attached), but you might want to double-check the entire change. > > The latest repository seems to work for me with > this change, thanks! Reading the thread, it seems like the bug was fixed, so I'm closing this report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/