Bug 75763
Summary: | Postscript print buffer in emacs prints using screen colors | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Carlos Rodrigues <cefrodrigues> |
Component: | emacs | Assignee: | Jens Petersen <petersen> |
Status: | CLOSED UPSTREAM | QA Contact: | Jay Turner <jturner> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2 | CC: | mitr, srevivo |
Target Milestone: | --- | Keywords: | MoveUpstream |
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-09-29 08:36:31 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Carlos Rodrigues
2002-10-11 23:21:51 UTC
Sorry, I don't seem able to reproduce this. M-x set-background-color blue RET M-x set-forground-color white RET C-u Menu File <ps-print-buffer-faces> test.ps RET % gv test.ps shows white background in the postscript file. Can you tell me exactly how to reproduce this? Thanks. I have the colors set from Xresources but I guess it's the same. M-x set-background-color blue RET M-x set-foreground-color white RET M-x ps-print-buffer-with-faces RET The background in the resulting printed output (don't know how to redirect it to a file in emacs) is white (which is correct) but the text is of the exact same colors as on screen... red is printed as red, green is printed as green and white (normal text) is printed as white... In emacs 20 it used to print using the same face colors that are used on screen when the background is set to white which I think is the right thing as printers can't usually print white text... Ok, thanks, I can reproduce it now. [Print to a file is with C-u prefix, like in my 3rd command line above.] The ps-print.el author commented: Well, this is not a bug, since version 6.5.7 that ps-print get the default foreground and background color of Emacs session and use them as default to generate a PostScript. If this is not what you want, you can: 1. Or, start Emacs with other foreground/background color; (this was mentioned in bugzilla report by Carlos) 2. Or, set ps-default-bg and ps-default-fg variables to a suitable color, like: (setq ps-default-bg "white") ; default background (setq ps-default-fg "black") ; default foreground 3. Or, set ps-default-bg and ps-default-fg variables to nil to have default colors: (setq ps-default-bg nil) ; use default background (setq ps-default-fg nil) ; use default foreground Ideally, options 3 and 4 should be inserted in ~/.emacs file. Ok, here are the results after playing with options 2 and 3: With option 3 I still get white text (invisible) on paper when printing C code as well as a plain text buffer. It appears to ignore the foreground color but if I change the background color to something like blue it prints blue background (with the white text showing). With option 3 I still can't print C code (the same white text...) but plain text prints in black foreground like it is supposed to. Reproduced in python-mode too for example. XEmacs ps-print seems to be fine though. The problem still seems to be present in 6.5.9, Vinicius, afaict. To reproduce: % emacs -q M-x set-foreground-color RET white RET M-x set-background-color RET black RET M-x global-font-lock-mode RET C-x C-f /usr/include/stdio.h C-u M-x ps-print-buffer-with-faces RET ~/tmp/psprint.ps RET y C-x C-c % gv ~/tmp/psprint.ps and observe that the default font with white foreground is rendered white on white in the ps file. Setting (setq ps-default-fg "black" ps-default-bg "white") doesn't seem to help. Is this any better with 21.3? No. 21.3 on Fedora Core 1 behaves exactly the same way. It uses exactly the same colors to print as it does on screen (except for the background). AFAICT this is fixed in cvs emacs. :) Err, sorry no change: reporting this on emacs-devel. |