[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] saving pdf files from agenda: color mangling revisited

From: Carsten Dominik
Subject: Re: [Orgmode] saving pdf files from agenda: color mangling revisited
Date: Mon, 6 Apr 2009 13:48:24 +0200

You can use org-agenda-before-write-hook.  This hook is run,
just before the agenda is written.  For example, you could use it to
remove all face infomation

(add-hook 'org-agenda-before-write-hook
   (lambda ()
     (remove-text-properties (point-min) (point-max)
        '(face nil))))

or to change it to black before export:

(add-hook 'org-agenda-before-write-hook
   (lambda ()
     (add-text-properties (point-min) (point-max)
        '(face (:foreground "black")))))

Another option would be to disable ps-print from using faces ever,
for example

(require 'ps-print)
(fset 'ps-print-buffer-with-faces 'ps-print-buffer)

I am not sure what the problem is, but one possibility is that ps- print might pick up foreground colors but noch background colors. And if your frame has a dark background, it will pick up the bright versions of all faces, which are invisible in front of a white background on pdf.

Also, ps-print has quite some information about color printing in its header.


- Carsten

On Apr 6, 2009, at 11:52 AM, Alan E. Davis wrote:

Some time ago I posted a query about a problem I have been having with agenda: that when I save pdf files using the amazing new facility to just save using (C-u) C-x C-w and naming the file *.pdf . Noone else seemed to have the exact same problem, so I trashed almost all of the color and face customizations in my .emacs etc.

The basic problem was that the main text was not visible either in the display or when printed. When I removed all of the painstaking customizations of color, and don't use color-theme-select, I can get a printable pdf. The tags and todos faces seem ok, and print in colors that work. But as soon as I try to mess around with colors again, these pdfs are unworkable again.

My work style involves the use of several emacs frames, often with various projects open in different frames, or for some complicated projects, various parts open in different frames. I was able to get a kludge working almost perfectly, some years ago, to use a different background color of each newly opened frame. That's now out the window, so I'd like to explore the reasons I cannot seem to just get a black on white text, for example for the text parts of todos (except TODO keywords and tags.)

I don't expect much, and I'll keep experimenting. But perhaps I can ask once again whether anyone has any insight into why this ought to be the case. It seems persistent. I have had to get very basic with any colors. Not that I really need to use a gaudy color scheme, but easy differentiation of frames is crucial.

Thank you for any ideas.


Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]