all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Endless Story" <usable.thought@gmail.com>
Subject: Re: What's wrong with this lisp code in my init file?!
Date: 31 Dec 2006 11:57:08 -0800	[thread overview]
Message-ID: <1167595028.481477.63360@42g2000cwt.googlegroups.com> (raw)
In-Reply-To: <mailman.2592.1167591202.2155.help-gnu-emacs@gnu.org>

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.
> 
> -- 
> 
>  ハ  ハ
> ミ^・^ミ
>  `~~~´

  parent reply	other threads:[~2006-12-31 19:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-31 16:15 What's wrong with this lisp code in my init file?! Endless Story
2006-12-31 18:48 ` Eric Hanchrow
     [not found] ` <mailman.2592.1167591202.2155.help-gnu-emacs@gnu.org>
2006-12-31 19:57   ` Endless Story [this message]
2006-12-31 21:51     ` Eric Hanchrow
2006-12-31 22:29       ` Drew Adams
     [not found]     ` <mailman.2595.1167601997.2155.help-gnu-emacs@gnu.org>
2006-12-31 22:16       ` Harald Hanche-Olsen
2006-12-31 22:50         ` Drew Adams
     [not found]         ` <mailman.2599.1167605423.2155.help-gnu-emacs@gnu.org>
2007-01-01  1:48           ` Endless Story

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

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

  git send-email \
    --in-reply-to=1167595028.481477.63360@42g2000cwt.googlegroups.com \
    --to=usable.thought@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.