delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/04/30/13:43:34

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_40,LOCALPART_IN_SUBJECT,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,URIBL_GREY
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Eric Backus <eric_backus AT agilent DOT com>
Subject: Re: Moving Cygwin
Date: Thu, 30 Apr 2009 17:43:00 +0000 (UTC)
Lines: 72
Message-ID: <loom.20090430T172815-326@post.gmane.org>
References: <c115fd3c0904300527k79867d48k9b6444ef7a21acb1 AT mail DOT gmail DOT com> <49F99E8D DOT 5030109 AT sbcglobal DOT net> <c115fd3c0904300635g52ab718bh772b6a3db734d509 AT mail DOT gmail DOT com>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Tim Visher writes:

> > On 2009-04-30 12:27Z, Tim Visher wrote:
> >>
> >> I originally installed cygwin in the default `C:\cygwin` directory.
> >> I'd like to move it from there to `C:\`.  Is there any easy way to do
> >> this?
> 
> Maybe the context for my question would help.  I'm attempting to
> follow advice from [Steve Yegge's My .emacs File
> article](http://steve.yegge.googlepages.com/my-dot-emacs-file) in
> order to get useful cygwin bash interaction from within NT Emacs.  He
> seems to be of the opinion that the gentleman who responded in the
> comments about having the path interpolation code and installing
> cygwin in the default directory was mislead about what you need to get
> it to work.
> 
> Are there A) Practical responses to Yegge's way of using Cygwin and NT
> Emacs? or B) A proven way to do what I'm trying to do without messing
> with cygwin's install directory (I would prefer this as I would like
> to keep cygwin safely secluded).
> 
> Thanks in advance!

I have cygwin under C:/cygwin, and I run NT Emacs.  I'm very happy with this 
setup.  To help get them to work well together, I downloaded cygwin-mount.el 
from <http://www.emacswiki.org/cgi-bin/wiki/cygwin-mount.el>, and I include 
the following in my .emacs file:

(if (equal system-type 'windows-nt)
    (progn
      (if (require 'cygwin-mount nil t)
	  (progn
	    (setq cygwin-mount-cygwin-bin-directory "C:/cygwin/bin")
	    (cygwin-mount-activate)))
      ;; These don't work because of crlf issues?
      ;;(setq shell-file-name "bash")
      ;;(setenv "SHELL" shell-file-name)
      ;;(setq explicit-shell-file-name shell-file-name)
      (setenv "PATH" (concat "C:\\cygwin\\bin;" (getenv "PATH")))
      (setq exec-path (cons "c:/cygwin/bin" exec-path))))

This setup works quite well for me.  However, I never try to run a shell from 
within emacs, so I don't know if that will work correctly.  I seem to remember 
running into crlf issues (as mentioned in the above comments) that I didn't 
bother trying to track down and fix.

If you're using Emacs 21 or older, you might also try:

(setq archive-zip-use-pkzip nil)	; Even on windows, we use zip/unzip

Not sure if this will matter to you, but at least at one time I found this 
useful.  I think this is no longer necessary with NT Emacs 22.3.

And at one time I found the following useful for getting printing to work:

;; Some of this is specific to Agilent Everett Seaway site
(if (equal system-type 'windows-nt)
    (progn
      (setq lpr-command "C:/WINDOWS/system32/lpr.exe") ; Defaulted to dump to 
PRN:
      (setq printer-name "evt0005")		; Defaulted to PRN
      (setq server-name "evt0005")		; Not a system variable
      (setq lpr-switches (list "-S" server-name)) ; Defaulted to ""
      (setq lpr-headers-switches nil)))		; So we can use "pr"
;; This defaulted to 66 lines, didn't fit on page, but may be Everett-specific
(setq lpr-page-header-switches (quote ("-F" "-l59")))

Good luck...

Eric Backus



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019