Showing posts with label cygwin elisp emacs. Show all posts
Showing posts with label cygwin elisp emacs. Show all posts
Sunday, 29 July 2007
Disable XON/XOFF Under Cygwin
具体的现象是,Ctrl+s屏幕就锁住了。其实没锁住,只是没有输出。Ctrl+q恢复正常。初学者遇到这个问题,会吓一跳,还以为自己怎么了呢。而且这个键还和emacs的键绑定有冲突。C-s在emacs里默认是搜索,挺常用的,会带来一些不便。XON/XOFF基本上没啥用,除了吓人。因此可以去掉。在Cygwin下,需要检查CYGWIN变量,echo $CYGWIN,如果发现tty,就在cygwin.bat里去掉,比如set CYGWIN=...,把tty去掉。然后把stty -ixon放到/etc/profile里。重启cygwin就好了。好像第二步不是很必要,如果不是用rxvt做终端的话。
Tuesday, 13 March 2007
getclip and putclip in cygwin
(defun clip-get ()
"Get contents from clipboard and paste it to current buffer."
(interactive)
(message
"Paste from clipboard")
(call-process "getclip" nil t) )
(defun clip-put ()
"Put current buffer contents to clipboard."
(interactive)
(call-process-region (point-min) (point-max) "putclip" nil 0)
(message "Paste to clipboard"))
(defun clip-reform ()
"Reform contents in clipboard"
(interactive)
(shell-command "getclip|putclip")
(message "Reform Clipboard"))
(global-set-key "\C-cg" 'clip-get)
(global-set-key "\C-cp" 'clip-put)
(global-set-key "\C-cr" 'clip-reform)
"Get contents from clipboard and paste it to current buffer."
(interactive)
(message
"Paste from clipboard")
(call-process "getclip" nil t) )
(defun clip-put ()
"Put current buffer contents to clipboard."
(interactive)
(call-process-region (point-min) (point-max) "putclip" nil 0)
(message "Paste to clipboard"))
(defun clip-reform ()
"Reform contents in clipboard"
(interactive)
(shell-command "getclip|putclip")
(message "Reform Clipboard"))
(global-set-key "\C-cg" 'clip-get)
(global-set-key "\C-cp" 'clip-put)
(global-set-key "\C-cr" 'clip-reform)
Subscribe to:
Posts (Atom)