delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/04/06:44:04

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Authentication-Warning: gwa2.fe.bosch.de: uucp set sender to <andreas DOT ames AT tenovis DOT com> using -f
To: Cygwin Users <cygwin AT cygwin DOT com>
Cc: lpiano AT atomictangerine DOT com
Subject: Re: Command line parsing in Cygwin 1.3.1
References: <3AF15526 DOT 1793E005 AT yahoo DOT com>
From: Andreas Ames <andreas DOT ames AT tenovis DOT com>
In-Reply-To: <3AF15526.1793E005@yahoo.com> (Earnie Boyd's message of "Thu, 03 May 2001 08:55:02 -0400")
Date: 04 May 2001 12:31:27 +0200
Message-ID: <u4rv1v20w.fsf@tenovis.com>
Lines: 92
User-Agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/20.7
MIME-Version: 1.0

Hi,

Earnie Boyd <earnie_boyd AT yahoo DOT com> writes:

> 
> They will never have a clue.
> 

This is wrong; emacs wouldn't be what it is, if you were right.

if you want ntemacs to get (limited) awareness of cygwin mount
structure you need a file named cygwin32-mount.el.  sorry, i don't
have a link handy; a simple web search should find it.

furthermore i have the following in my .emacs (note that there are
some more things included, which i find useful with ntemacs+cygwin; if
you don't want these just read the comments and edit appropriately):

.emacs start ----------------------------
;; use bash
;; This assumes that Cygwin is installed in C:\cygwin (the
;; default) and that C:\cygwin\bin is not already in your
;; Windows Path (it generally should not be).
;;
(setq exec-path (cons "C:/cygwin/bin" exec-path))
(setenv "PATH" (concat (getenv "PATH") "C:\\cygwin\\bin;"))
;;
;; NT-emacs assumes a Windows command shell, which you change
;; here.
;;
(setq process-coding-system-alist '(("bash" . undecided-unix)))
(setq w32-quote-process-args ?\")
(setq shell-file-name "bash")
(setenv "SHELL" shell-file-name) 
(setq explicit-shell-file-name shell-file-name) 
;;
;; This removes unsightly ^M characters that would otherwise
;; appear in the output of java applications.
;;
(add-hook 'comint-output-filter-functions
          'comint-strip-ctrl-m)

;; set bash prompt
(setenv "PS1" "\\u@\\h:\\w\\$ ")

;; setup cygwin support
(require 'cl)
(defconst jj-win32-p
  (if (or (string-match "^i.86-[^-]*-nt" system-configuration)
          (string-match "^i.86-[^-]*-windows.*" system-configuration)) t nil)
  "true if emacs is running on an windows-based system, nil otherwise")
 (defvar jj-cygwin-dir ""
  "if running NTemacs, this variable should contain the root directory for
cygwin.  If not in NTemacs or if you don't have cygwin, then ignore this
variable.")
 ;; If you run emacs out of a cygwin shell, it will auto-detect that
;; and load a package that understands cygwin paths.  If you run emacs
;; from a DOS shell (or explorer or Run...), it won't load this
;; package.
(when (and jj-win32-p
           (string= "cygwin" (getenv "OSTYPE")))
  (message "adding cygwin extentions")
  (require 'cygwin32-mount)  ;; NB, requires cl
  (setq jj-cygwin-dir (cygwin32-convert-to-long-name "/"))
  (add-to-list 'Info-default-directory-list "c:/cygwin/usr/info/"))
; ;; make cygwin paths accessible
; (require 'cl)
; (require 'cygwin32-mount)

; make cygwin symlinks accessible
(defun follow-cygwin-symlink ()
  (save-excursion
    (goto-char 0)
    (if (looking-at "!<symlink>")
        (progn
          (re-search-forward "!<symlink>\\(.*\\)\0")
          (find-alternate-file (match-string 1)))
      )))
(add-hook 'find-file-hooks 'follow-cygwin-symlink)
.emacs end -------------------------------------------------

note that not all the features work, i think since i upgraded to
cygwin 1.3.1; nevertheless i find it very useful.  obviously you have
to start emacs from the cygwin commandline.

when you find the emacs-lisp file in the web you will also find
additional configuration options.  *nothing* of this is my work, i
found everything in the web.


cheers,
andreas


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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