all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Modifying the Mode Line
@ 2005-03-10 22:09 John Laiosa
  2005-03-10 22:49 ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: John Laiosa @ 2005-03-10 22:09 UTC (permalink / raw)


I know this is probably an easy question for the person who knows how to do
this.  I want to modify the Mode Line as it appears in my Emac Session.  I
want to add these features to the ones that already appear (name, mode,
position, etc).  The two changes I would like to make to the Mode Line are:

1) Change the back ground and fore ground colors.  Right now I have a black
back ground for the windows so the Mode Line itself does not appear, but
just the characters on the line.

2.) I want to add the full path as it appears in the buffer list so I know
what directory the file came from.

I know this can be done because I use to do it in my old job but forgot to
take the .emacs file and supporting files with me.

Thanks for your time.
____________________________________________
John Laiosa                                         
Systems Engineering                           
The Charles Stark Draper Laboratory   
555 Technology Square, M.S. 98          
Cambridge, MA 02139-3563

Phone:  (617) 258-3656
Fax:     (617) 258-4903
Email:   jlaiosa@draper.com
Web:    http://www.draper.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Modifying the Mode Line
  2005-03-10 22:09 Modifying the Mode Line John Laiosa
@ 2005-03-10 22:49 ` Peter Dyballa
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2005-03-10 22:49 UTC (permalink / raw)
  Cc: help-gnu-emacs


Am 10.03.2005 um 23:09 schrieb John Laiosa:

> 1) Change the back ground and fore ground colors.  Right now I have a 
> black
> back ground for the windows so the Mode Line itself does not appear, 
> but
> just the characters on the line.

That's easy: M-x customize-face RET modeline RET and you'll see ...

--
Mit friedvollen Grüßen

   Pete

There are two major products that come out of Berkeley: LSD and UNIX. 
We don't believe this to be a coincidence. - Jeremy S. Anderson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Modifying the Mode Line
       [not found] <mailman.3365.1110493647.32256.help-gnu-emacs@gnu.org>
@ 2005-03-10 23:34 ` Pascal Bourguignon
  2005-03-11 17:58   ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Pascal Bourguignon @ 2005-03-10 23:34 UTC (permalink / raw)


John Laiosa <jlaiosa@draper.com> writes:
> 1) Change the back ground and fore ground colors.  Right now I have a black
> back ground for the windows so the Mode Line itself does not appear, but
> just the characters on the line.

See the face: mode-line-face

M-x customize-face RET mode-line RET
 

> 2.) I want to add the full path as it appears in the buffer list so I know
> what directory the file came from.

See the variable: default-mode-line-format 


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
The rule for today:
Touch my tail, I shred your hand.
New rule tomorrow.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Modifying the Mode Line
  2005-03-10 23:34 ` Pascal Bourguignon
@ 2005-03-11 17:58   ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-03-11 17:58 UTC (permalink / raw)


Pascal Bourguignon wrote:
 > John Laiosa <jlaiosa@draper.com> writes:
 >>2.) I want to add the full path as it appears in the buffer list so I 
know
 >>what directory the file came from.
 >
 > See the variable: default-mode-line-format

Which leads you to mode-line-format, which leads you to
mode-line-buffer-identification:

,----
| mode-line-buffer-identification's value is shown below.
|
| Documentation:
| Mode-line control for identifying the buffer being displayed.
| Its default value is ("%12b").
| Major modes that edit things other than ordinary files may change this
| (e.g. Info, Dired,...)
|
| Defined in `bindings'.
|
| Value:
| (#("%12b" 0 4
|    (face
|     (:weight bold)
|     help-echo "mouse-1: previous buffer, mouse-3: next buffer" local-map
|     (keymap
|      (header-line keymap
|                   (mouse-3 . mode-line-bury-buffer)
|                   (down-mouse-3 . ignore)
|                   (mouse-1 . mode-line-unbury-buffer)
|                   (down-mouse-1 . ignore))
|      (mode-line keymap
|                 (mouse-3 . mode-line-bury-buffer)
|                 (mouse-1 . mode-line-unbury-buffer)
|                 (down-mouse-1 . ignore))))))
`----

If you do the obvious thing

(setq mode-line-buffer-identification
       '(buffer-file-name "%12f" "%12b"))

I suspect you'll lose all those useful text properties (not to mention
it's a buffer-local variable, but not documented as such).  But
bindings.el shows how to do it right:

(setq-default mode-line-buffer-identification
	      (list 'buffer-file-name
		    (propertized-buffer-identification "%12f")
		    (propertized-buffer-identification "%12b")))

Another alternative is to change the way buffers are named, to include
enough parts of the directory to keep them distinct:

(require 'uniquify)
(setq uniquify-buffer-name-style 'forward)

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-03-11 17:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-10 22:09 Modifying the Mode Line John Laiosa
2005-03-10 22:49 ` Peter Dyballa
     [not found] <mailman.3365.1110493647.32256.help-gnu-emacs@gnu.org>
2005-03-10 23:34 ` Pascal Bourguignon
2005-03-11 17:58   ` Kevin Rodgers

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.