emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: ps-print-buffer-with-faces doesn't use selected frame's background (


From: Leo
Subject: Re: ps-print-buffer-with-faces doesn't use selected frame's background (was: ps-print-buffer-with-faces in dark background)
Date: Tue, 09 Jan 2007 23:20:25 +0000
User-agent: Gnus v5.11, Emacs/23.0.0.1 (2007-01-01), Fedora 6 gnu/linux

Hi Vinicius,

* Vinicius Jose Latorre (2007-01-08 23:21 -0200) said:
  ^^^^^^^^^^^^^^^^^^^^^
> Hi Eli,
> Hi Leo,
>
>
> Eli Zaretskii wrote:
>>> From: Leo <address@hidden>
>>> Date: Sat, 06 Jan 2007 17:29:34 +0000
>>>
>>> * Eli Zaretskii (2007-01-06 12:59 +0200) said:
>>>   ^^^^^^^^^^^^^
>>>     
>>>>> `ps-print-buffer-with-faces' will print a dark background buffer
>>>>> into a .ps file with white background. This makes the text
>>>>> difficult to read.
>>>>>         
>>>> This is a feature.  See the variable ps-use-face-background for how
>>>> to override it.
>>>>       
>>> I play with it. I put the buffer I want to print in another frame and
>>> swap its foreground and background by modifying frame parameters so
>>> that the change only happens in that frame.
>>>
>>> But then printing still uses the global frame parameter's foreground
>>> and background colors instead of the selected frame's. Is this a bug?
>>>     
>>
>> I don't know.  Vinicius, could you please look into this?  Thanks.
>>   
>
>
> ps-print does not get color frame parameters; it only deals with faces.
>
> The variables ps-default-fg, ps-default-bg and ps-use-face-background
> are only relative to faces.
>
> So, to get the frame parameters to print you could use some function like:
>
> (defun my-ps-print-buffer-with-faces (&optional filename)
>  (interactive (list (ps-print-preprint current-prefix-arg)))
>  (let ((ps-default-bg (frame-parameter nil 'background-color))
>        (ps-default-fg (frame-parameter nil 'foreground-color))
>        (ps-use-face-background t))
>    (ps-print-buffer-with-faces filename)))
>
>
> Regards,

Thank you for the answer.

However output from ps-print does not look good generally in a dark
background? Is this a known problem?

Attachment: exampel.ps.bz2
Description: exampel.ps.bz2

>
> Vinicius
>
> PS: See also:
>
>    How Ps-Print Deals With Faces
>    http://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage#PsPrintPackage21
>
>    How Ps-Print Deals With Color
>    http://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage#PsPrintPackage22

regards,
-- 
Leo <sdl.web AT gmail.com>                         (GPG Key: 9283AA3F)

reply via email to

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