From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.devel Subject: Re: ^M in compilation buffers Date: Tue, 17 Feb 2009 11:46:49 -0500 Message-ID: <499AE9F9.9090404@gnu.org> References: <499AE2EB.9040501@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1234889230 26531 80.91.229.12 (17 Feb 2009 16:47:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2009 16:47:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 17 17:48:25 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LZT7R-0004m6-EC for ged-emacs-devel@m.gmane.org; Tue, 17 Feb 2009 17:48:25 +0100 Original-Received: from localhost ([127.0.0.1]:58743 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZT67-0003SI-Cj for ged-emacs-devel@m.gmane.org; Tue, 17 Feb 2009 11:47:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZT60-0003RL-0q for emacs-devel@gnu.org; Tue, 17 Feb 2009 11:46:56 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZT5v-0003Pm-Mh for emacs-devel@gnu.org; Tue, 17 Feb 2009 11:46:54 -0500 Original-Received: from [199.232.76.173] (port=58468 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZT5v-0003Pg-HO for emacs-devel@gnu.org; Tue, 17 Feb 2009 11:46:51 -0500 Original-Received: from mx1.janestcapital.com ([38.105.200.101]:40031) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LZT5u-0002oi-W6 for emacs-devel@gnu.org; Tue, 17 Feb 2009 11:46:51 -0500 Original-Received: from nyc-qsv-mail1.delacy.com ([172.25.22.57]) by mx1.janestcapital.com with esmtp (Exim 4.69) (envelope-from ) id 1LZT5u-00040z-3V for emacs-devel@gnu.org; Tue, 17 Feb 2009 11:46:50 -0500 Original-Received: from nyc-qws-005.delacy.com ([172.25.131.105]) by nyc-qsv-mail1.DELACY.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1LZT5u-00085l-2E; Tue, 17 Feb 2009 11:46:50 -0500 User-Agent: Thunderbird 2.0.0.14 (X11/20080506) In-Reply-To: <499AE2EB.9040501@gnu.org> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:109133 Archived-At: Sam Steingold wrote: > omake prints progress bar using the usual ^M terminal trick. > last week it was parsed nicely by emacs, i.e., the progress bar was > updated in-place and, eventually, overwritten (by the last omake message). > today, the freshly compiled cvs head emacs does not do that: the ^M > character is inserted into the *compilation* buffer as is (instead of > being interpreted as C-a C-k): > [=== ] 01358 / 11812^M [====== ] 02995 > / 11837^M [====== ] 03039 / 11837^M > [====== ] 03244 / 11849^M [====== ] 03337 > / 11849^M [====== ] 03428 / 11849^M > [====== ] 03502 / 11849^M [======= ] 03598 / 11849^M > [======= ] 03659 / 11849^M [======= ] 03692 / .... this patch fixes *compilation*: --- compile.el.~1.485.~ 2009-01-05 16:47:34.000000000 -0500 +++ compile.el 2009-02-17 11:31:48.001949000 -0500 @@ -1739,6 +1739,8 @@ Just inserts the text, and runs `compila ;; point at `process-mark' scroll along with the output, but we ;; now use window-point-insertion-type instead. (insert string) + (unless comint-inhibit-carriage-motion + (comint-carriage-motion (process-mark proc) (point))) (set-marker (process-mark proc) (point)) (run-hooks 'compilation-filter-hook)) (goto-char pos)))))) alas, this cannot be done from within compilation-filter-hook because (process-mark proc) is overwritten before compilation-filter-hook is called. (also, comint.el calls comint-carriage-motion from comint-output-filter, not a hook).