From: Dan Nicolaescu <dann@ics.uci.edu>
To: emacs-devel@gnu.org
Subject: use faces on the mode-line for compile.el
Date: Sat, 23 Feb 2008 15:59:14 -0800 [thread overview]
Message-ID: <200802232359.m1NNxFpa025055@sallyv1.ics.uci.edu> (raw)
I posted this 2 years ago, but that was during the pretest, so let's
look at this again.
If the mode-line for the compilation buffer would be a bit more
visible it would be easier to see if a compilation is still running
(which is handy if you have compilations that take a long time and
don't want to spend too much time checking if it's done).
Also if the compilation fails it's nice to be able to see it faster.
It can be seen with just the peripheral vision, or from farther away
from the screen.
A simple patch can accomplish the above. It uses
font-lock-warning-face which is designed to be highly visible.
IMO this is a very nice feature to have, and simple to implement...
Thoughts?
*** compile.el 04 Apr 2006 09:50:37 -0700 1.394
--- compile.el 19 Apr 2006 22:54:58 -0700
***************
*** 1060,1066 ****
(start-process-shell-command (downcase mode-name)
outbuf command))))
;; Make the buffer's mode line show process state.
! (setq mode-line-process '(":%s"))
(set-process-sentinel proc 'compilation-sentinel)
(set-process-filter proc 'compilation-filter)
(set-marker (process-mark proc) (point) outbuf)
--- 1060,1066 ----
(start-process-shell-command (downcase mode-name)
outbuf command))))
;; Make the buffer's mode line show process state.
! (setq mode-line-process (list (propertize ":%s" 'face 'font-lock-warning-face)))
(set-process-sentinel proc 'compilation-sentinel)
(set-process-filter proc 'compilation-filter)
(set-marker (process-mark proc) (point) outbuf)
***************
*** 1074,1080 ****
;; No asynchronous processes available.
(message "Executing `%s'..." command)
;; Fake modeline display as if `start-process' were run.
! (setq mode-line-process ":run")
(force-mode-line-update)
(sit-for 0) ; Force redisplay
(let* ((buffer-read-only nil) ; call-process needs to modify outbuf
--- 1074,1080 ----
;; No asynchronous processes available.
(message "Executing `%s'..." command)
;; Fake modeline display as if `start-process' were run.
! (setq mode-line-process (propertize ":run" 'face 'font-lock-warning-face))
(force-mode-line-update)
(sit-for 0) ; Force redisplay
(let* ((buffer-read-only nil) ; call-process needs to modify outbuf
***************
*** 1403,1409 ****
;; Prevent that message from being recognized as a compilation error.
(add-text-properties omax (point)
(append '(compilation-handle-exit t) nil))
! (setq mode-line-process (format ":%s [%s]" process-status (cdr status)))
;; Force mode line redisplay soon.
(force-mode-line-update)
(if (and opoint (< opoint omax))
--- 1403,1415 ----
;; Prevent that message from being recognized as a compilation error.
(add-text-properties omax (point)
(append '(compilation-handle-exit t) nil))
! (setq mode-line-process
! (concat (format ":%s " process-status)
! (format (if (> exit-status 0)
! (propertize "[%s]" 'face 'font-lock-warning-face)
! "[%s]")
! (cdr status))))
! (message (format "exit status: %s %s" exit-status (> 0 exit-status)))
;; Force mode line redisplay soon.
(force-mode-line-update)
(if (and opoint (< opoint omax))
next reply other threads:[~2008-02-23 23:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-23 23:59 Dan Nicolaescu [this message]
2008-02-24 13:42 ` use faces on the mode-line for compile.el Stefan Monnier
2008-02-24 20:48 ` Dan Nicolaescu
2008-02-24 17:40 ` Juri Linkov
2008-02-24 20:53 ` Dan Nicolaescu
2008-02-24 23:23 ` Juri Linkov
2008-02-26 2:00 ` Xavier Maillard
-- strict thread matches above, loose matches on Subject: below --
2006-04-20 6:20 Dan Nicolaescu
2006-04-20 7:34 ` Nick Roberts
2006-04-20 18:27 ` Dan Nicolaescu
2006-04-21 13:07 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200802232359.m1NNxFpa025055@sallyv1.ics.uci.edu \
--to=dann@ics.uci.edu \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).