GNU bug report logs - #22785
24.5; comint/shell modes should be merged with term mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Per Bothner <per@HIDDEN>; dated Tue, 23 Feb 2016 20:35:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 22785 <at> debbugs.gnu.org:


Received: (at 22785) by debbugs.gnu.org; 24 Feb 2016 22:24:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 24 17:24:03 2016
Received: from localhost ([127.0.0.1]:44312 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aYhqk-0005hV-UL
	for submit <at> debbugs.gnu.org; Wed, 24 Feb 2016 17:24:03 -0500
Received: from aibo.runbox.com ([91.220.196.211]:46595)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <per@HIDDEN>) id 1aYhqj-0005h1-0m
 for 22785 <at> debbugs.gnu.org; Wed, 24 Feb 2016 17:24:01 -0500
Received: from [10.9.9.212] (helo=mailfront12.runbox.com)
 by bars.runbox.com with esmtp (Exim 4.71)
 (envelope-from <per@HIDDEN>)
 id 1aYhqh-0007us-I0; Wed, 24 Feb 2016 23:23:59 +0100
Received: from 70-36-239-75.dsl.dynamic.fusionbroadband.com ([70.36.239.75]
 helo=toshie.bothner.com)
 by mailfront12.runbox.com with esmtpsa (uid:757155 )
 (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82)
 id 1aYhqU-0002v3-Fv; Wed, 24 Feb 2016 23:23:46 +0100
Subject: Re: bug#22785: 24.5; comint/shell modes should be merged with term
 mode
To: John Wiegley <johnw@HIDDEN>
References: <56CCC20A.4090804@HIDDEN> <87si0ji1dd.fsf@HIDDEN>
 <56CCCE13.9010702@HIDDEN> <m2k2luq8b5.fsf@HIDDEN>
From: Per Bothner <per@HIDDEN>
Message-ID: <56CE2D6E.2030800@HIDDEN>
Date: Wed, 24 Feb 2016 14:23:42 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <m2k2luq8b5.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22785
Cc: 22785 <at> debbugs.gnu.org, Ingo Lohmar <i.lohmar@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)



On 02/24/2016 10:20 AM, John Wiegley wrote:
>>>>>> Per Bothner <per@HIDDEN> writes:
>
>> To clarify: The goal is to essentially merge term.el and comint.el.
>> Comint.el might still exist, but only as a think veneer on term.el. shell
>> might or might not existing as a separate mode, but it would at most be a
>> thin veneer on top of term mode.
>
> I'm not sure what to think about this. Term is a bit of a complex beast, it is
> true, and it has far fewer users than comint. What is the motivation exactly?
> Would any mode other than shell interaction benefit from this merge?

While term is a bit of a complex beast, so is shell+comint mode.
Throw in ansi-color and it's more complex than term.

The existence of ansi-color shows there is a demand for at least handling
ansi escape sequences for colors and highlighting.  And if you're going to
handle those you might as well also support cursor movement and finish
the job.

Some inferior-process modes might prefer to make use of the inferior's readline,
at least as an option.

Sometimes a repl may want to do more than read/write times.  It may
want to switch colors, "print" pictures (as supported by Racket/Geiser),
ask for a password or a single-letter key.  Of course all of this can be done
with comint, but it's easier if one can use the same logic and protocols
whether in a comint mode, in term mode, or in a non-emacs terminal emulator.

Right now there is a lot of code duplication in Emacs.  term.el duplicates much
of comint.el.  ansi-color.el duplicates term.el. Etc.  It would be better to
clean this up.
-- 
	--Per Bothner
per@HIDDEN   http://per.bothner.com/




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22785; Package emacs. Full text available.

Message received at 22785 <at> debbugs.gnu.org:


Received: (at 22785) by debbugs.gnu.org; 24 Feb 2016 18:21:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Feb 24 13:21:52 2016
Received: from localhost ([127.0.0.1]:44144 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aYe4N-0002qz-WB
	for submit <at> debbugs.gnu.org; Wed, 24 Feb 2016 13:21:52 -0500
Received: from mail-pf0-f179.google.com ([209.85.192.179]:36744)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <jwiegley@HIDDEN>) id 1aYe4M-0002ql-3y
 for 22785 <at> debbugs.gnu.org; Wed, 24 Feb 2016 13:21:50 -0500
Received: by mail-pf0-f179.google.com with SMTP id e127so17114809pfe.3
 for <22785 <at> debbugs.gnu.org>; Wed, 24 Feb 2016 10:21:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:cc:subject:in-reply-to:date:message-id:references
 :user-agent:reply-to:mime-version:content-type;
 bh=V0CYbOFFw3e2ZIHpZKtpCOr4OQhvAvOgSio5M2HnWRU=;
 b=eqilSuNCQFsDm4cLuStESD01iv2Y3DMx5hJSOgGAatDiMtAJqlXCPgXCtu1byuWste
 Q9VgWoQ0BTlMXepUgf2jpbB32fiKMl7KiYYk0z1/GA0t8bp7Tc0B5Oi2htJIDXwWzjtJ
 4cROZZpK+DYaDMtsAFwnZyk/vAOsW7vuBOrEATpg1Yk/Ny8HRX2eO6fKjRth4FTKZzKf
 MhaqdC/YHtt9ollqJlJmbDczfz32F1GfurBg/gV2mJDXdyB80OtcMO7l11sexFzhqARl
 ZRx9JogOk5TQysBul4Y/qxWwvg1TRl6z09GyfObhsY2lRiVdE55YBK92PtUtpTVOYLnH
 9qPg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id
 :references:user-agent:reply-to:mime-version:content-type;
 bh=V0CYbOFFw3e2ZIHpZKtpCOr4OQhvAvOgSio5M2HnWRU=;
 b=PS5zbbIZzOvnUzBkr7IEJBWC1wSSHXZBDXzorvoI8KetFHWwmqN9BLhDcM61ENtVQG
 ihfVt/pBNVYPqkwgIYwqKr76fjepVlxWOtkbmlezPI5tiHBXtg7uuHRumMt7lUsWTJPr
 Lq1MK+982WQGN/vW98dnpGvHnNnV+CUf7fuo+6TEieDmilq/zLyeoq93cbJdujTp6dnR
 jc8HadUAuGst5GNSbZp7+J+j/8TapkIE5QvRB7ikmpQiyIF93tL8VSVMSIyDOjFhPi+j
 bU6iRdACsjuKpJiYBencQkNUNxvf3aVc2Ic6ktMGjZAmv1OAG0T5Q7tGTF15ieyiNtVm
 blDw==
X-Gm-Message-State: AG10YOSLvFwQ64B11gxlVpLrVYqaXYSmc5izD2Y8Sh817HXzLptOFtObI61sqWftz7mG/A==
X-Received: by 10.98.80.91 with SMTP id e88mr56320521pfb.62.1456338104501;
 Wed, 24 Feb 2016 10:21:44 -0800 (PST)
Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net.
 [76.234.68.79])
 by smtp.gmail.com with ESMTPSA id w9sm6626374pfa.21.2016.02.24.10.21.43
 (version=TLS1 cipher=AES128-SHA bits=128/128);
 Wed, 24 Feb 2016 10:21:43 -0800 (PST)
From: John Wiegley <jwiegley@HIDDEN>
X-Google-Original-From: "John Wiegley" <johnw@HIDDEN>
Received: by Vulcan.local (Postfix, from userid 501)
 id C3D9513173783; Wed, 24 Feb 2016 10:21:42 -0800 (PST)
To: Per Bothner <per@HIDDEN>
Subject: Re: bug#22785: 24.5;
 comint/shell modes should be merged with term mode
In-Reply-To: <56CCCE13.9010702@HIDDEN> (Per Bothner's message of "Tue, 23
 Feb 2016 13:24:35 -0800")
Date: Wed, 24 Feb 2016 10:20:30 -0800
Message-ID: <m2k2luq8b5.fsf@HIDDEN>
References: <56CCC20A.4090804@HIDDEN> <87si0ji1dd.fsf@HIDDEN>
 <56CCCE13.9010702@HIDDEN>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.5 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22785
Cc: 22785 <at> debbugs.gnu.org, Ingo Lohmar <i.lohmar@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: John Wiegley <johnw@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

>>>>> Per Bothner <per@HIDDEN> writes:

> To clarify: The goal is to essentially merge term.el and comint.el.
> Comint.el might still exist, but only as a think veneer on term.el. shell
> might or might not existing as a separate mode, but it would at most be a
> thin veneer on top of term mode.

I'm not sure what to think about this. Term is a bit of a complex beast, it is
true, and it has far fewer users than comint. What is the motivation exactly?
Would any mode other than shell interaction benefit from this merge?

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22785; Package emacs. Full text available.

Message received at 22785 <at> debbugs.gnu.org:


Received: (at 22785) by debbugs.gnu.org; 23 Feb 2016 21:24:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 23 16:24:58 2016
Received: from localhost ([127.0.0.1]:41719 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aYKS2-0002Iy-Ai
	for submit <at> debbugs.gnu.org; Tue, 23 Feb 2016 16:24:58 -0500
Received: from aibo.runbox.com ([91.220.196.211]:41480)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <per@HIDDEN>) id 1aYKS0-0002Ip-7R
 for 22785 <at> debbugs.gnu.org; Tue, 23 Feb 2016 16:24:56 -0500
Received: from [10.9.9.213] (helo=mailfront13.runbox.com)
 by bars.runbox.com with esmtp (Exim 4.71)
 (envelope-from <per@HIDDEN>)
 id 1aYKRy-000134-Sb; Tue, 23 Feb 2016 22:24:54 +0100
Received: from 70-36-239-75.dsl.dynamic.fusionbroadband.com ([70.36.239.75]
 helo=toshie.bothner.com)
 by mailfront13.runbox.com with esmtpsa (uid:757155 )
 (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82)
 id 1aYKRi-0007Hm-7N; Tue, 23 Feb 2016 22:24:38 +0100
Subject: Re: bug#22785: 24.5; comint/shell modes should be merged with term
 mode
To: Ingo Lohmar <i.lohmar@HIDDEN>, 22785 <at> debbugs.gnu.org
References: <56CCC20A.4090804@HIDDEN> <87si0ji1dd.fsf@HIDDEN>
From: Per Bothner <per@HIDDEN>
Message-ID: <56CCCE13.9010702@HIDDEN>
Date: Tue, 23 Feb 2016 13:24:35 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
In-Reply-To: <87si0ji1dd.fsf@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22785
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)



On 02/23/2016 01:05 PM, Ingo Lohmar wrote:
> To me, that seems to be a bad idea.  They are two different modes
> precisely *because* they are quite different.  If you want to run
> console applications, why would you use shell-mode at all?

Why not?  There are also hybrid applications, such as ones that
use readline.  You can't use readline in shell mode, but you can
in term mode.

> I dumped any use of term.el because I could not control its
> complexities, no matter what overrides, patches and advices I used.

Well, there have been some kludges (as well as some improvements) to term
since I worked on it.  It was on the whole probably seen less maintenance
than comint mode, since more modes extend the latter.

> Term is *significantly* more complex than shell (175k vs 54k),

That is the wrong comparison.  You need to compare the size of term mode
with that of comint mode (162k).  Shell mode is just a relatively modest
extension of comint mode.

To clarify: The goal is to essentially merge term.el and comint.el.
Comint.el might still exist, but only as a think veneer on term.el.
shell might or might not existing as a separate mode, but it would
at most be a thin veneer on top of term mode.

Maybe it would make more sense to merge term-mode terminal-handling
into comint.  shell mode could still extend comint mode.
In that case M-x term would more-or-less be the same as starting
up shell mode and switching to the char submode.
-- 
	--Per Bothner
per@HIDDEN   http://per.bothner.com/




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22785; Package emacs. Full text available.

Message received at 22785 <at> debbugs.gnu.org:


Received: (at 22785) by debbugs.gnu.org; 23 Feb 2016 21:05:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 23 16:05:27 2016
Received: from localhost ([127.0.0.1]:41715 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aYK99-0001qm-L4
	for submit <at> debbugs.gnu.org; Tue, 23 Feb 2016 16:05:27 -0500
Received: from mail-wm0-f53.google.com ([74.125.82.53]:35726)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <i.lohmar@HIDDEN>) id 1aYK98-0001qX-ID
 for 22785 <at> debbugs.gnu.org; Tue, 23 Feb 2016 16:05:26 -0500
Received: by mail-wm0-f53.google.com with SMTP id c200so240619910wme.0
 for <22785 <at> debbugs.gnu.org>; Tue, 23 Feb 2016 13:05:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
 :mime-version:content-type;
 bh=9wZl+dhdVIqD+762hR7fM/fVg0rXFrWF7ehloJtLlsY=;
 b=l2+isT3jxbSfL+vp12iXbr8bdasoXyoJA4uOMd+dcLWA4SnnjvUDb00hI58nmhaJB1
 XAs9SM+dEjogcwZ714vfA3B5d7QOJf1KkEe6xhZgJk8A7RmcwH3lRUNOuu9k7RM4nJnG
 jGdgjJX95Zl1J+4cJFLHM0GRHS+GtPOIwSK7J1QtG+RJHNGXpiIAIBSJNVtHgLR1sHff
 qZ0IYg7kRJrHPLAfgLLM4Skp0mZAFJ4G07tApyDhwq/HwNP31DAw4GmlDOAbO3WQhISv
 ydK0RmYlY+69HwCXIKPzrzMk7KnL4nXvtRRGxadCb/vBbsYlxD7GjTVqgiJQKyHwqTuA
 pTwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:from:to:subject:in-reply-to:references
 :user-agent:date:message-id:mime-version:content-type;
 bh=9wZl+dhdVIqD+762hR7fM/fVg0rXFrWF7ehloJtLlsY=;
 b=INEJXmfWrI4iHpwsZHAoN6qvqn02L+W5LkpwpzWjuzjLmHRko9Hv/W5itABbHHz3s6
 Z/yILAqFFmz04qO4EHgKce3XrJSJ3ME+QsPpenOT3Yvk6Zi6APXSV5p2G/FB/l0x5ADa
 1J92wUKTPg35gKh5PT6rRu7ZdBuQ+3MTqO8b/W8kqSAMD86lm/awZvxJolRbnseuyXry
 t2iILLHvu5BglUnkZO6jumegbJAThq32Aq5iEGbWVokoqZDw7EkdSmuArB/khyNtJnxz
 HPsD6Sa+/nlGm2DX/KwHIKuRQGsWap5pkgiQa27AKKURXc2o244qw66Sfw0LeLOqsUjT
 Cu9g==
X-Gm-Message-State: AG10YOQWwIZ6nEQg912x92zmol8+3W5r0jMF2cYVW7/bFzO/LpAd4kQGnKrdHzO0jHgBhQ==
X-Received: by 10.194.113.38 with SMTP id iv6mr35552635wjb.126.1456261520751; 
 Tue, 23 Feb 2016 13:05:20 -0800 (PST)
Received: from localhost (xdsl-87-79-227-228.netcologne.de. [87.79.227.228])
 by smtp.gmail.com with ESMTPSA id w66sm188215wmd.2.2016.02.23.13.05.19
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 23 Feb 2016 13:05:19 -0800 (PST)
From: Ingo Lohmar <i.lohmar@HIDDEN>
To: Per Bothner <per@HIDDEN>, 22785 <at> debbugs.gnu.org
Subject: Re: bug#22785: 24.5;
 comint/shell modes should be merged with term mode
In-Reply-To: <56CCC20A.4090804@HIDDEN>
References: <56CCC20A.4090804@HIDDEN>
User-Agent: Notmuch/0.20.2+113~g6332e6e (http://notmuchmail.org)
 Emacs/25.0.90.1 (x86_64-pc-linux-gnu)
Date: Tue, 23 Feb 2016 22:05:18 +0100
Message-ID: <87si0ji1dd.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22785
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

On Tue, Feb 23 2016 12:33 (-0800), Per Bothner wrote:

> The "line" submode of term mode duplicates much of the functionality
> of comint mode.  When I wrote term mode, my hope was that it would
> subsume comint mode, or that comint mode would be built on top of
> term mode.  That never happened - so far.
>
> 'shell mode' should basically be the same as 'term' mode, except
> that shell mode starts of in line-editing mode, while term mode
> starts up in character mode.
>
> There are obvious advantages to merging these modes. One is
> we have ansi escape sequence handling in a single place.
> Another is that you can run console applications from shell mode.



To me, that seems to be a bad idea.  They are two different modes
precisely *because* they are quite different.  If you want to run
console applications, why would you use shell-mode at all?

I dumped any use of term.el because I could not control its
complexities, no matter what overrides, patches and advices I used.  I
have not looked back after using shell-mode where it's useful instead,
and not running console applications anymore.

Term is *significantly* more complex than shell (175k vs 54k), and does
a lot more things (for better or worse).  Maybe factoring out the ANSI
sequence parsing is what you really want?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22785; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Feb 2016 20:34:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Feb 23 15:34:06 2016
Received: from localhost ([127.0.0.1]:41694 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aYJeo-00014H-2z
	for submit <at> debbugs.gnu.org; Tue, 23 Feb 2016 15:34:06 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50523)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <per@HIDDEN>) id 1aYJem-00013n-5g
 for submit <at> debbugs.gnu.org; Tue, 23 Feb 2016 15:34:04 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <per@HIDDEN>) id 1aYJef-000067-Hq
 for submit <at> debbugs.gnu.org; Tue, 23 Feb 2016 15:33:59 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38936)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <per@HIDDEN>) id 1aYJef-000061-Fb
 for submit <at> debbugs.gnu.org; Tue, 23 Feb 2016 15:33:57 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41489)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <per@HIDDEN>) id 1aYJee-0000Jh-3g
 for bug-gnu-emacs@HIDDEN; Tue, 23 Feb 2016 15:33:57 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <per@HIDDEN>) id 1aYJeZ-0008Vy-S9
 for bug-gnu-emacs@HIDDEN; Tue, 23 Feb 2016 15:33:56 -0500
Received: from aibo.runbox.com ([91.220.196.211]:53941)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <per@HIDDEN>) id 1aYJeZ-0008Vs-Hm
 for bug-gnu-emacs@HIDDEN; Tue, 23 Feb 2016 15:33:51 -0500
Received: from [10.9.9.213] (helo=mailfront13.runbox.com)
 by bars.runbox.com with esmtp (Exim 4.71)
 (envelope-from <per@HIDDEN>) id 1aYJeX-0006hk-Bc
 for bug-gnu-emacs@HIDDEN; Tue, 23 Feb 2016 21:33:49 +0100
Received: from 70-36-239-75.dsl.dynamic.fusionbroadband.com ([70.36.239.75]
 helo=toshie.bothner.com)
 by mailfront13.runbox.com with esmtpsa (uid:757155 )
 (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1aYJe5-0001Bb-SX
 for bug-gnu-emacs@HIDDEN; Tue, 23 Feb 2016 21:33:22 +0100
To: bug-gnu-emacs@HIDDEN
Subject: 24.5; comint/shell modes should be merged with term mode
From: Per Bothner <per@HIDDEN>
Message-ID: <56CCC20A.4090804@HIDDEN>
Date: Tue, 23 Feb 2016 12:33:14 -0800
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

The "line" submode of term mode duplicates much of the functionality
of comint mode.  When I wrote term mode, my hope was that it would
subsume comint mode, or that comint mode would be built on top of
term mode.  That never happened - so far.

'shell mode' should basically be the same as 'term' mode, except
that shell mode starts of in line-editing mode, while term mode
starts up in character mode.

There are obvious advantages to merging these modes. One is
we have ansi escape sequence handling in a single place.
Another is that you can run console applications from shell mode.

In GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.18.7)
  of 2016-02-02 on buildhw-05.phx2.fedoraproject.org
Windowing system distributor `Fedora Project', version 11.0.11800000
System Description:	Fedora release 23 (Twenty Three)

Configured using:
  `configure --build=x86_64-redhat-linux-gnu
  --host=x86_64-redhat-linux-gnu --program-prefix=
  --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
  --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
  --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
  --libexecdir=/usr/libexec --localstatedir=/var
  --sharedstatedir=/var/lib --mandir=/usr/share/man
  --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
  --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
  --with-gpm=no build_alias=x86_64-redhat-linux-gnu
  host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
  -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
  -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
  -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
  -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'

Important settings:
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: @im=ibus
   locale-coding-system: utf-8-unix

Major mode: Shell-script

Minor modes in effect:
   sh-electric-here-document-mode: t
   diff-auto-refine-mode: t
   xterm-mouse-mode: t
   tooltip-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
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: (only . t)

Recent messages:
Wrote /home/bothner/DomTerm/bin/domterm
Mark set
Saving file /home/bothner/DomTerm/bin/domterm...
Wrote /home/bothner/DomTerm/bin/domterm
Mark set
Saving file /home/bothner/DomTerm/bin/domterm...
Wrote /home/bothner/DomTerm/bin/domterm
Mark set
Saving file /home/bothner/DomTerm/bin/domterm...
Wrote /home/bothner/DomTerm/bin/domterm

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message idna format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils info css-mode ispell view mule-util
parse-time sgml-mode sh-script smie executable etags ring texinfo
smerge-mode diff-mode easy-mmode scheme nxml-uchnm rng-xsd xsd-regexp
rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse
rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln
nxml-rap nxml-util nxml-glyph nxml-enc xmltok add-log conf-mode
help-mode autoconf autoconf-mode make-mode vc-dispatcher vc-svn cc-langs
misearch multi-isearch vc-git js advice help-fns byte-opt bytecomp
byte-compile cl-extra cl-loaddefs cl-lib cconv json imenu thingatpt
cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs vc-cvs server time-date xt-mouse tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment
lisp-mode prog-mode register page menu-bar rfn-eshadow timer select
scroll-bar 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 minibuffer 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 make-network-process
dbusbind gfilenotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)

Memory information:
((conses 16 515998 51413)
  (symbols 48 29080 0)
  (miscs 40 1048 8712)
  (strings 32 53861 12727)
  (string-bytes 1 1792324)
  (vectors 16 27981)
  (vector-slots 8 1509840 153066)
  (floats 8 176 561)
  (intervals 56 77667 486)
  (buffers 960 103)
  (heap 1024 74981 4504))

-- 
	--Per Bothner
per@HIDDEN   http://per.bothner.com/

-- 
	--Per Bothner
per@HIDDEN   http://per.bothner.com/




Acknowledgement sent to Per Bothner <per@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#22785; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.