tags:

views:

38

answers:

2

Hey guys,

is there any way to show a real print margin at a specific column (e.g. 80), such that the background gets another color for columns above "n" or a solid line is shown at this column?

I found ColumnMarker (see here), unfortunately, this addon only highlights text that is beyond the specified column.

What I've also tried is changing the window/frame size of emacs to (w/h) = (80/). Generally, this works pretty fine. Unfortunately, it doesn't under GNOME, if the emacs window/frame is maximized!

Any suggestions are welcome. Thanks in advance!

With kind regards, mefiX

+1  A: 

As far as I recall, there is no way to set a different background to the right of the end-of-line (which I think is what you are trying to do). You can set a background color for each frame, and override it only for normal displayed characters.

My information is a little dated, so it's possible that the impossibility is only in Emacs <=22 and Emacs 23 introduces a way.

Gilles
A: 

Add (font-lock-add-keywords nil '(("^[^\n]\\{80\\}\\(.*\\)$" 1 font-lock-warning-face t))) to your mode hook and it will change the font lock after the 80th column.

tbalazs
Thx, that's a nice idea, but that's exactly what ColumnMarker and its pendants do and not exactly what i meant.What I would like to have is a solid line _across_ all visible lines at column #80, just like every other valuable ide has it nowadays (e.g. eclipse, see here: http://img844.imageshack.us/i/printmargin.png/).
mefiX