emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: "Alan E. Davis" <lngndvs@gmail.com>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: saving pdf files from agenda: color mangling revisited
Date: Mon, 6 Apr 2009 13:48:24 +0200	[thread overview]
Message-ID: <817D275E-E024-4258-8C9E-A75138FE2C15@gmail.com> (raw)
In-Reply-To: <7bef1f890904060252r4edbe35coba6710ca13cbc7cb@mail.gmail.com>

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

      reply	other threads:[~2009-04-06 11:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06  9:52 saving pdf files from agenda: color mangling revisited Alan E. Davis
2009-04-06 11:48 ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=817D275E-E024-4258-8C9E-A75138FE2C15@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=lngndvs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).