Emacs.Cygwin History

Show minor edits - Show changes to output - Cancel

August 27, 2009, at 02:13 PM by OtherMichael - more links, some of my .emacs file relating to Cygwin
Added lines 5-55:


!! some from [@.emacs@]
(:source lang=Lisp:)
;; cygwin
;; http://www.khngai.com/emacs/cygwin.php
;; NOTE: PATH-concat REVERSED from source material
;; so that native (Perl) executes first
(setenv "PATH" (concat (getenv "PATH") "c:/bin;"))
(setq exec-path (cons "c:/bin/" exec-path))
(require 'cygwin-mount)

(add-hook 'shell-mode-hook 'n-shell-mode-hook)
(defun n-shell-mode-hook ()
  "12Jan2002 - sailor, shell mode customizations."
  (local-set-key '[up] 'comint-previous-input)
  (local-set-key '[down] 'comint-next-input)
  (local-set-key '[(shift tab)] 'comint-next-matching-input-from-input)
  (setq comint-input-sender 'n-shell-simple-send)

;; designed for Cygwin (see "man"), but clear works just fine normally.
(defun n-shell-simple-send (proc command)
  "17Jan02 - sailor. Various commands pre-processing before sending to shell."
  ;; Checking for clear command and execute it.
  ((string-match "^[ \t]*clear[ \t]*$" command)
    (comint-send-string proc "\n")
  ;; Checking for man command and execute it.
  ((string-match "^[ \t]*man[ \t]*" command)
    (comint-send-string proc "\n")
    (setq command (replace-regexp-in-string "^[ \t]*man[ \t]*" "" command))
    (setq command (replace-regexp-in-string "[ \t]+$" "" command))
    ;;(message (format "command %s command" command))
    (funcall 'man command)
  ;; Send other commands to the default handler.
  (t (comint-simple-send proc command))

NOTE: the execution problem wasn't from within a Cygwin shell -- it was the _normal_ shell; since the path has the cygwin bin first, the W32 shell would ignore native Perl, and run that, first. ouch.

February 04, 2008, at 04:21 PM by MichaelPaulukonis -
Added lines 4-5:
Don't forget to look at the menu-bar, there are customizations for Cygwin available... like the Cygwin shell
Added line 9:
Changed line 11 from:
[[!Emacs]] [[!CygWin]] [[!Shell]]
February 04, 2008, at 04:20 PM by MichaelPaulukonis -
Added lines 1-8:
!! General
[[http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/d15469711da8be49/92a5053b2f2bec51?#92a5053b2f2bec51|Emacs and CygWin]]

!! See Also

!! Tags