From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: saving pdf files from agenda: color mangling revisited Date: Mon, 6 Apr 2009 13:48:24 +0200 Message-ID: <817D275E-E024-4258-8C9E-A75138FE2C15@gmail.com> References: <7bef1f890904060252r4edbe35coba6710ca13cbc7cb@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LqnJY-0004ix-F9 for emacs-orgmode@gnu.org; Mon, 06 Apr 2009 07:48:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LqnJS-0004iJ-W3 for emacs-orgmode@gnu.org; Mon, 06 Apr 2009 07:48:31 -0400 Received: from [199.232.76.173] (port=34157 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqnJS-0004iF-St for emacs-orgmode@gnu.org; Mon, 06 Apr 2009 07:48:26 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:57221) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LqnJS-0000zp-AH for emacs-orgmode@gnu.org; Mon, 06 Apr 2009 07:48:26 -0400 Received: by ewy4 with SMTP id 4so2177448ewy.42 for ; Mon, 06 Apr 2009 04:48:25 -0700 (PDT) In-Reply-To: <7bef1f890904060252r4edbe35coba6710ca13cbc7cb@mail.gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Alan E. Davis" Cc: org-mode 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. HTH - 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. > > Alan > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode