views:

58

answers:

1
+1  Q: 

Printing in emacs

Hello everyone,

I'm trying to print a page with very long lines in emacs. Someone out there has never heard of the 80 columns rule, and now I'd like to print that file. I'm using the ps-print-buffer-with-faces command

When I launch this command, I get lines wrapped in the middle of words. Extremely uncomfortable. But if I use the longlines-mode for examples, I get nice wrapping, but wrong line numbers (lines which wrap get wrong numbers). This problem doesn't occur when I let ps-print do the wrapping in the middle of words.

So how can I tell ps-print to wrap at word boundaries and preserve line numbers?

Thanks!
CFP.

A: 

Before there's a better answer, here is what I'd do: use fill-region to hard-wrap and print the buffer, then undo to revert if necessary.

The key sequence: C-x hM-x fill-regionM-x ps-print-buffer-with-faceC-/.

huaiyuan
But this doesn't work: it breaks line numbers...
CFP