From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: comint-carriage-motion causes severe problems. Date: Tue, 2 Jul 2002 20:51:00 -0500 (CDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200207030151.UAA20915@eel.dms.auburn.edu> References: <200207020035.TAA19789@eel.dms.auburn.edu> <200207021945.g62Jj8F01898@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1025661048 21005 127.0.0.1 (3 Jul 2002 01:50:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 3 Jul 2002 01:50:48 +0000 (UTC) Cc: miles@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17PZI7-0005Sg-00 for ; Wed, 03 Jul 2002 03:50:47 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17PZNP-000307-00 for ; Wed, 03 Jul 2002 03:56:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17PZIQ-0001No-00; Tue, 02 Jul 2002 21:51:06 -0400 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17PZHU-0001Lq-00; Tue, 02 Jul 2002 21:50:08 -0400 Original-Received: from eel.dms.auburn.edu (eel.dms.auburn.edu [131.204.53.108]) by manatee.dms.auburn.edu (8.9.1a/8.9.1) with ESMTP id UAA17221; Tue, 2 Jul 2002 20:50:07 -0500 (CDT) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id UAA20915; Tue, 2 Jul 2002 20:51:00 -0500 (CDT) X-Authentication-Warning: eel.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-Reply-To: <200207021945.g62Jj8F01898@aztec.santafe.edu> (message from Richard Stallman on Tue, 2 Jul 2002 13:45:08 -0600 (MDT)) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5383 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5383 Richard Stallman wrote: Luc, could you please give some examples of programs where comint-carriage-motion makes things worse, and show what the output looks like both with and without comint-carriage-motion? As mentioned in my earlier message, I now agree with Miles that comint-carriage-motion should be in the global value of comint-output-filter-functions, but not in the local ielm value. Miles says that the function is necessary for the correct functioning of interactive Unix programs. The program I was referring to, where comint-carriage-motion makes a bad situation even substantially worse, is the mathematical software package magma. I could send you examples of runs if this is still relevant or of interest to you or Miles. However, the correct running of Unix programs in M-x shell is more important than the correct running of specialized software packages that could only be made to run correctly by writing a specialized mode especially for them. (They would require their own highly specialized and complex syntax-table and syntactic rules, among other things.) I was actually less concerned with making mathematical software packages run correctly (which would require tons of work) than with the same type of problems that occur in ielm. But in other applications of comint control characters meant to be printed as such occur very infrequently, whereas in ielm they are routine. What happens is that I (just every now and then) have C programs or Common Lisp programs yielding control characters that need to be printed out as such. I can not run these programs from a shell in an Xterm (unless I redirect their output to a file) because the shell itself mutilates their output just like comint-carriage-motion does. Thus I run them from M-x shell or M-x run lisp (obviously with comint-carriage-motion disabled) to see the correct output interactively, without having to look it up in a separate file. We are in effect talking here about using M-x shell and M-x run-lisp to improve shell behavior rather than to just imitate it. But these improvements are actually necessary to enable Emacs to understand the syntax correctly which is absolutely essential, certainly in M-x run-lisp, for proper functioning of font-lock, show-paren, and several motion and other commands relying on syntax. (For exactly the same reasons as in ielm.) However, I fully agree that the above is highly specialized and a-typical usage. Hence I agree with Miles. Maybe one little detail: Would it not be somewhat better and more logical to put, in comint.el, comint-carriage-motion in the defvar of comint-output-filter-functions, rather than using a separate add-hook for it? This would have two advantages: 1. It would make the comint.el code easier to understand. 2. As noted above, while I agree that comint-carriage-motion belongs in the global default value of comint-output-filter-functions, there are, for the reasons outlined above, definitely situations where one, at least temporarily, wants to remove it. In the event that, in some way or another, comint.el gets loaded again, the defvar will not re-add comint-carriage-motion secretly behind the user's back, but the add-hook will. Essentially, we are talking about the same difference as the one between defvar and setq. However, if this change would cause any problems, then it is not that important. Require and provide make a reloading of comint unlikely, assuming all comint using code uses them rigidly. Sincerely, Luc Teirlinck.