emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* saving pdf files from agenda: color mangling revisited
@ 2009-04-06  9:52 Alan E. Davis
  2009-04-06 11:48 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Alan E. Davis @ 2009-04-06  9:52 UTC (permalink / raw)
  To: org-mode


[-- Attachment #1.1: Type: text/plain, Size: 1563 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 1657 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: saving pdf files from agenda: color mangling revisited
  2009-04-06  9:52 saving pdf files from agenda: color mangling revisited Alan E. Davis
@ 2009-04-06 11:48 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-04-06 11:48 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-06 11:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06  9:52 saving pdf files from agenda: color mangling revisited Alan E. Davis
2009-04-06 11:48 ` Carsten Dominik

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).