[Top][All Lists]

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

Re: What's wrong with this lisp code in my init file?!

From: Endless Story
Subject: Re: What's wrong with this lisp code in my init file?!
Date: 31 Dec 2006 11:57:08 -0800
User-agent: G2/1.0

Thanks - I've been thinking the problem was something like that.
However it doesn't work to print within Cygwin!

Why not? Well, for whatever reason, I find that the gsprint command
within Cygwin won't work unless I issue two commands in a row: first,
"setq ps-printer-name t", and then the gsprint.exe command. I have no
idea why that is, but issuing the printer name command prior to and
outside of the "if" clause doesn't get the job done. Boy, that doesn't
seem right to me, but there it is. So I've been trying to figure out
how to package the two commands together within the if clause.

Eric Hanchrow wrote:
> Try this instead:
> (setq printer-name "//BREATH-000/Randy's HP 1200")
> (setq ps-printer-name t)
> ;; must set printer name before issuing print command!
> (setq ps-lpr-command
>       (if (eq window-system 'w32)
>         "c:/Program Files/Ghostgum/gsview/gsprint.exe"
>         "/cygdrive/c/Program Files/Ghostgum/gsview/gsprint.exe"))
> If that works, as I expect it will, your problem was that you've got
> two clauses in your second "if" statement.  Clearly you're expecting
> them to both get evaluated when window-system is nil.  But because of
> the way "if" works, only the first gets evaluated; the second gets
> evaluated only when window-system is _not_ nil.
> If you had used Emacs' lisp indentation on your code, you might have
> noticed this yourself, since it will show the two clauses indented
> different amounts.
> -- 
>  ハ  ハ
> ミ^・^ミ
>  `~~~´

reply via email to

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