From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: M-x compile should tell its status (a little bit better)..
Date: Fri, 23 Apr 2004 12:01:55 -0600 [thread overview]
Message-ID: <40895A13.4020300@yahoo.com> (raw)
In-Reply-To: E1BGiBR-00089V-Ab@fencepost.gnu.org
Richard Stallman wrote:
> Right know when starting compile it shows "Compiling" in the mode line.
> When i started several compilations in parallel i found it confusing that
> i could not find out if one of them has already finished. Execpt by
> switching to that buffer and looking at its mode line...
> So how about to change compile to reflect that info in its mode name so
>
> Could you say more precisely what change you have in mind
> in the mode line contents?
I think the idea is not to change the mode line, but to change the mode name
so that the status is apparent from `M-x list-buffers'. I think the following
provides the desired effect, but it's just for illustration:
(defvar compilation-mode-name nil)
;; change `after' to `before', to avoid stomping on compilation-handle-exit:
(defadvice compilation-sentinel (after mode-name activate)
"Set `mode-name' instead of `mode-line-process' to reflect the PROCess status."
(let ((buffer (process-buffer (ad-get-arg 0)))
(status (process-status (ad-get-arg 0))))
(when (buffer-live-p buffer)
(save-excursion
(set-buffer buffer)
;; save the original mode name:
(unless compilation-mode-name
(set (make-local-variable 'compilation-mode-name) mode-name))
;; construct a mode name from the original plus the status:
(setq mode-name
(format "%s:%s)" compilation-mode-name status))
;; remove redundant status from the mode line:
(setq mode-line-process nil)))))
(defadvice compile-internal (after compilation-sentinel activate)
"Call `compilation-sentinel' to set `mode-name'."
(compilation-sentinel (get-buffer-process compilation-last-buffer)
"started"))
--
Kevin Rodgers
next prev parent reply other threads:[~2004-04-23 18:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-21 6:15 M-x compile should tell its status (a little bit better) Stephan Stahl
2004-04-22 17:40 ` Richard Stallman
2004-04-22 18:54 ` Stephan Stahl
2004-04-24 14:27 ` Richard Stallman
2004-04-23 18:01 ` Kevin Rodgers [this message]
2004-04-23 21:48 ` Stephan Stahl
2004-04-27 16:43 ` Kevin Rodgers
2004-04-29 18:13 ` Stephan Stahl
2004-04-29 19:44 ` Stefan Monnier
2004-07-11 1:43 ` Stephan Stahl
[not found] ` <E1Bjnft-0008Qk-JH@fencepost.gnu.org>
[not found] ` <61133.217.194.34.123.1089623439. squirrel@wwws.franken.de>
[not found] ` <61133.217.194.34.123.1089623439.squirrel@wwws.franken.de>
2004-07-12 16:16 ` Stephan Stahl
2004-07-12 17:20 ` Stefan Monnier
2004-07-14 0:18 ` Richard Stallman
2004-07-14 0:32 ` David Kastrup
2004-07-14 6:55 ` Stephan Stahl
2004-07-14 8:44 ` David Kastrup
2004-07-14 9:38 ` Stephan Stahl
2004-07-14 13:23 ` Kim F. Storm
2004-07-15 13:17 ` Richard Stallman
2004-07-14 14:08 ` Stefan
2004-07-15 13:17 ` Richard Stallman
2004-04-25 18:09 ` Richard Stallman
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=40895A13.4020300@yahoo.com \
--to=ihs_4664@yahoo.com \
/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.