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: Sat, 17 Aug 2002 21:39:30 -0500 (CDT) Sender: emacs-devel-admin@gnu.org Message-ID: <200208180239.VAA02371@eel.dms.auburn.edu> References: <200207020035.TAA19789@eel.dms.auburn.edu> <200207021534.g62FYao17897@rum.cs.yale.edu> <200207021618.LAA20219@eel.dms.auburn.edu> <200207032057.g63KvX604721@aztec.santafe.edu> <200207032111.g63LBAv25925@rum.cs.yale.edu> <200207041824.g64IO8i06426@aztec.santafe.edu> <200208070116.UAA01281@eel.dms.auburn.edu> <200208072058.g77KwUo03670@wijiji.santafe.edu> NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1029638427 30185 127.0.0.1 (18 Aug 2002 02:40:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 18 Aug 2002 02:40:27 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu, miles@lsi.nec.co.jp, Kai.Grossjohann@CS.Uni-Dortmund.DE, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17gFzL-0007qd-00 for ; Sun, 18 Aug 2002 04:40:23 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17gGQ4-0004vv-00 for ; Sun, 18 Aug 2002 05:08:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gG0H-0007fh-00; Sat, 17 Aug 2002 22:41:21 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17gFz0-0007ep-00 for emacs-devel@gnu.org; Sat, 17 Aug 2002 22:40:02 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17gFyy-0007ea-00 for emacs-devel@gnu.org; Sat, 17 Aug 2002 22:40:02 -0400 Original-Received: from manatee.dms.auburn.edu ([131.204.53.104]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17gFyr-0007eC-00; Sat, 17 Aug 2002 22:39:53 -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 VAA03782; Sat, 17 Aug 2002 21:39:33 -0500 (CDT) Original-Received: (from teirllm@localhost) by eel.dms.auburn.edu (8.9.3+Sun/8.9.3) id VAA02371; Sat, 17 Aug 2002 21:39:30 -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: <200208072058.g77KwUo03670@wijiji.santafe.edu> (message from Richard Stallman on Wed, 7 Aug 2002 14:58:30 -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:6614 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6614 Richard Stallman wrote: This was written about a month ago and concerned problems caused by comint-carriage-motion for ielm. One thing was (and is) not completely clear to me: Would you like me to send diffs for comint.el and ielm.el implementing these changes? I could easily do so. I would like someone to do it, and that could be you. However, if they are nontrivial we would need to get new legal papers from you. This is because the papers you signed (at least according to our file) in Jan 2001 only covered your past changes. If someone else who has assigned future changes writes this, we won't need new papers from him. You should have received my signed papers by now. Below are change logs and diffs for comint.el and ielm.el. (For the latest CVS versions, 21.3.50) I will send some additional remarks in a separate message. Change logs: 2002-08-17 Luc Teirlinck * comint.el: (no-carriage-motion): New variable. (comint-carriage-motion, comint-output-filter-functions, comint-send-input, comint-output-filter): Remove comint-carriage-motion from comint-output-filter-functions and call it directly from comint-send-input an comint-output-filter. * ielm.el: (inferior-emacs-lisp-mode): Give no-carriage-motion a buffer local value of t. Diffs: ===File ~/comint-diff======================================= cd /usr/local/share/emacs/21.3.50/lisp/ diff -c /usr/local/share/emacs/21.3.50/lisp/comintold.el /usr/local/share/emacs/21.3.50/lisp/comint.el *** /usr/local/share/emacs/21.3.50/lisp/comintold.el Mon Jul 8 03:45:00 2002 --- /usr/local/share/emacs/21.3.50/lisp/comint.el Fri Aug 16 21:42:01 2002 *************** *** 421,426 **** --- 421,432 ---- "Non-nil if you are accumulating input lines to send as input together. The command \\[comint-accumulate] sets this.") + (defvar no-carriage-motion nil + "If nil, `comint-carriage-motion' modifies comint output. + See the documentation string of that function for details. + You can overwrite that feature in specific comint applications or + buffers by giving this variable a non-nil buffer local value.") + (put 'comint-replace-by-expanded-history 'menu-enable 'comint-input-autoexpand) (put 'comint-input-ring 'permanent-local t) (put 'comint-input-ring-index 'permanent-local t) *************** *** 1508,1513 **** --- 1514,1520 ---- ;; This used to call comint-output-filter-functions, ;; but that scrolled the buffer in undesirable ways. + (unless no-carriage-motion (comint-carriage-motion "")) (run-hook-with-args 'comint-output-filter-functions ""))))) (defvar comint-preoutput-filter-functions nil *************** *** 1545,1551 **** Make single carriage returns delete to the beginning of the line. Make backspaces delete the previous character. ! This function should be in the list `comint-output-filter-functions'." (save-match-data ;; We first check to see if STRING contains any magic characters, to ;; avoid overhead in the common case where it does not --- 1552,1560 ---- Make single carriage returns delete to the beginning of the line. Make backspaces delete the previous character. ! You can disable these features for specific comint applications or ! buffers by giving the variable `no-carriage-motion' a non-nil buffer ! local value." (save-match-data ;; We first check to see if STRING contains any magic characters, to ;; avoid overhead in the common case where it does not *************** *** 1575,1582 **** (while (search-forward "\b" pmark t) (delete-char -2))))))))) - (add-hook 'comint-output-filter-functions 'comint-carriage-motion) - ;; The purpose of using this filter for comint processes ;; is to keep comint-last-input-end from moving forward ;; when output is inserted. --- 1584,1589 ---- *************** *** 1660,1665 **** --- 1667,1673 ---- ;; Advance process-mark (set-marker (process-mark process) (point)) + (unless no-carriage-motion (comint-carriage-motion string)) (run-hook-with-args 'comint-output-filter-functions string) (goto-char (process-mark process)) ; in case a filter moved it Diff finished at Sat Aug 17 20:26:22 ============================================================ ===File ~/ielmdiff2========================================= cd /usr/local/share/emacs/21.3.50/lisp/ diff -c /usr/local/share/emacs/21.3.50/lisp/ielmold.el /usr/local/share/emacs/21.3.50/lisp/ielm.el *** /usr/local/share/emacs/21.3.50/lisp/ielmold.el Fri Aug 16 21:06:02 2002 --- /usr/local/share/emacs/21.3.50/lisp/ielm.el Fri Aug 16 21:14:49 2002 *************** *** 464,469 **** --- 464,471 ---- (comint-output-filter (ielm-process) ielm-prompt) (set-marker comint-last-input-start (ielm-pm)) (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)) + (make-local-variable 'no-carriage-motion) + (setq no-carriage-motion t) (run-hooks 'ielm-mode-hook)) (defun ielm-get-old-input nil Diff finished at Sat Aug 17 20:30:37 ============================================================