all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Sam Steingold <sds@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: ^M in compilation buffers
Date: Tue, 17 Feb 2009 11:46:49 -0500	[thread overview]
Message-ID: <499AE9F9.9090404@gnu.org> (raw)
In-Reply-To: <499AE2EB.9040501@gnu.org>

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).





  reply	other threads:[~2009-02-17 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 16:16 ^M in compilation buffers Sam Steingold
2009-02-17 16:46 ` Sam Steingold [this message]
2009-02-17 18:33 ` Stefan Monnier
2009-02-17 19:49   ` Sam Steingold
2009-02-18  1:51     ` Stefan Monnier
2009-02-18  5:13     ` Glenn Morris
2009-02-18 15:39       ` Sam Steingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=499AE9F9.9090404@gnu.org \
    --to=sds@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.