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: What's wrong with this lisp code in my init file?! Date: 31 Dec 2006 08:15:38 -0800 Organization: http://groups.google.com Message-ID: <1167581737.951769.216970@k21g2000cwa.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1167583302 10637 80.91.229.12 (31 Dec 2006 16:41:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2006 16:41:42 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Dec 31 17:41:41 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 1H13kb-0000fA-En for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Dec 2006 17:41:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H13ka-0004V3-U5 for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Dec 2006 11:41:32 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!k21g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: 162.84.224.81 Original-X-Trace: posting.google.com 1167581743 20579 127.0.0.1 (31 Dec 2006 16:15:43 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sun, 31 Dec 2006 16:15:43 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.02 (Windows NT 5.1; U; en),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: k21g2000cwa.googlegroups.com; posting-host=162.84.224.81; posting-account=JP8pbg0AAADYDr61n41ZYs45c0xuivey Original-Xref: shelby.stanford.edu gnu.emacs.help:144446 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:40049 Archived-At: On XP, I'm running both the Windows build of Emacs and the Cywgin console version of Emacs. I don't really need both, but I like having Emacs available in the Cygwin environment. I've installed Ghostview to be able to print to my non-postscript Printer. But now I'm running into a wierd problem. I have lisp code that should be restricting the correct printing commands based on the variable window-system - but when I run the Windows build of Emacs, it complains that it can't find /cygdrive/c/Program/Files/Ghostgum/gsview/gsprint.exe! If I comment out that line it goes ahead and prints using its own section of the code. So why is this problem occurring? On the console side, it doesn't care if the Windows code is in there. Here's the relevant code: (setq printer-name "//BREATH-000/Randy's HP 1200") (setq ps-printer-name t) (if (eq window-system 'w32) (setq ps-lpr-command "c:/Program Files/Ghostgum/gsview/gsprint.exe")) ;; note that for printing via console, the order of statements matters - ;; must set printer name before issuing print command! (if (eq window-system nil) (setq ps-printer-name t) (setq ps-lpr-command "/cygdrive/c/Program Files/Ghostgum/gsview/gsprint.exe"))