From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Endless Story" Newsgroups: gmane.emacs.help Subject: Re: What's wrong with this lisp code in my init file?! Date: 31 Dec 2006 11:57:08 -0800 Organization: http://groups.google.com Message-ID: <1167595028.481477.63360@42g2000cwt.googlegroups.com> References: <1167581737.951769.216970@k21g2000cwa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1167597665 20159 80.91.229.12 (31 Dec 2006 20:41:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2006 20:41:05 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 31 21:41:05 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H17UO-0005LB-Tj for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Dec 2006 21:41:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H17UO-0007ZI-FO for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Dec 2006 15:41:04 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!42g2000cwt.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 162.84.224.81 Original-X-Trace: posting.google.com 1167595033 6802 127.0.0.1 (31 Dec 2006 19:57:13 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 31 Dec 2006 19:57:13 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 42g2000cwt.googlegroups.com; posting-host=162.84.224.81; posting-account=JP8pbg0AAADYDr61n41ZYs45c0xuivey Original-Xref: shelby.stanford.edu gnu.emacs.help:144450 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40053 Archived-At: 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. >=20 > --=20 >=20 > =E3=83=8F =E3=83=8F > =E3=83=9F=EF=BC=BE=EF=BD=A5=EF=BC=BE=EF=BE=90 > =EF=BD=80~~~=C2=B4