This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Command line parsing in Cygwin 1.3.1


Hi,

Earnie Boyd <earnie_boyd@yahoo.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]