2

I modified my mode-line to appear cleaner. Sadly this prevents compilation buffers from displaying their exit status.

Normaly a failed compilation would display something like: (Compilation:exit [1])

Through my modifications the the compilation status "exit [1]" is lost.

I defined major and minor modes as following:

(setq my-modeline-major-mode
  ;; major modes
  (list
    '(:eval (propertize "%m" 'face 'font-lock-string-face
                       'help-echo buffer-file-coding-system))))

(setq my-modeline-minor-modes
  ;; list of minor modes
  (list
    minor-mode-alist))

The modeline itself is structured as followed:

(setq-default mode-line-format
          (list
           "  ["
           my-modeline-major-mode
           "]["
           my-modeline-minor-modes
           "]"
           " %-" ;; fill with '-'
           ))

M-x customize-group compilation didn't provide any help.

Drew
  • 29,895
  • 7
  • 74
  • 104
edt_devel
  • 523
  • 1
  • 8
  • 16
  • 1
    Besides the mode-line-process, you should also add `global-mode-string`, which some modes use to display notifications. http://bruce-connor.github.io/emacs-online-documentation/Var/global-mode-string – Malabarba Oct 08 '13 at 20:17
  • And I'll take the chance to suggest you try out smart-mode-line. It has a cleaner look and let's you customize the mode-line with variables (instead of manually editing it), which should keep you from butchering useful information. :-) http://www.emacswiki.org/emacs/SmartModeLine – Malabarba Oct 08 '13 at 20:21

1 Answers1

4

You need to include the value of mode-line-process in your custom mode line. This seems to work:

(setq my-modeline-major-mode 
  ;; major modes
  (list
    '(:eval (propertize "%m" 'face 'font-lock-string-face
                       'help-echo buffer-file-coding-system))
    '("" mode-line-process)))
legoscia
  • 39,593
  • 22
  • 116
  • 167