From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: comint-insert-input on non-command lines: A trivial fix, a quibble, and a bug Date: Mon, 8 May 2006 16:18:26 +1200 Message-ID: <17502.50834.303952.808659@farnswood.snap.net.nz> References: <17501.373.791079.156322@rgrjr.dyndns.org> <17502.37204.411491.461843@farnswood.snap.net.nz> <200605080408.k4848t65027552@jane.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1147061969 1255 80.91.229.2 (8 May 2006 04:19:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 May 2006 04:19:29 +0000 (UTC) Cc: rogers-emacs@rgrjr.dyndns.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 08 06:19:27 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FcxDO-0002lH-Ij for ged-emacs-devel@m.gmane.org; Mon, 08 May 2006 06:19:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcxDO-0005GT-3K for ged-emacs-devel@m.gmane.org; Mon, 08 May 2006 00:19:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FcxDD-0005FH-UY for emacs-devel@gnu.org; Mon, 08 May 2006 00:19:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FcxDD-0005EV-8L for emacs-devel@gnu.org; Mon, 08 May 2006 00:19:11 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FcxDD-0005EP-4u for emacs-devel@gnu.org; Mon, 08 May 2006 00:19:11 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FcxDx-0005rk-LU for emacs-devel@gnu.org; Mon, 08 May 2006 00:19:58 -0400 Original-Received: from farnswood.snap.net.nz (p202-124-115-32.snap.net.nz [202.124.115.32]) by viper.snap.net.nz (Postfix) with ESMTP id CE12B756BF0; Mon, 8 May 2006 16:19:06 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 500) id 0EF3C627ED; Mon, 8 May 2006 05:18:26 +0100 (BST) Original-To: Luc Teirlinck In-Reply-To: <200605080408.k4848t65027552@jane.dms.auburn.edu> X-Mailer: VM 7.19 under Emacs 22.0.50.48 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54057 Archived-At: > I see now that comint-copy-old-input did indeed copy the whole line but > although the name would not suggest so. > > What it did depended on the value of comint-use-prompt-regexp. It > relied on the value of the variable comint-get-old-input, whose > default value was comint-get-old-input-default. Here is the > emacs-21.3 doc of the latter function: > > Default for `comint-get-old-input'. > If `comint-use-prompt-regexp-instead-of-fields' is nil, then either > return the current input field, if point is on an input field, or the > current line, if point is on an output field. > If `comint-use-prompt-regexp-instead-of-fields' is non-nil, then return > the current line with any initial string matching the regexp > `comint-prompt-regexp' removed. > > `comint-use-prompt-regexp-instead-of-fields' is now called > `comint-use-prompt-regexp'. There is also a comment by comint-use-prompt-regexp (also present in 21.3): ;; Note: If it is decided to purge comint-prompt-regexp from the source ;; entirely, searching for uses of this variable will help to identify ;; places that need attention. I presume use of comint-prompt-regexp preceded the use of fields. Perhaps this should be purged as there's no need to use two methods and this would reduce the maintenance overhead. -- Nick http://www.inet.net.nz/~nickrob