Emacs:标签完成的文件名附加一个额外的i:\cygwin [英] Emacs: Tab completion of file name appends an extra i:\cygwin

查看:242
本文介绍了Emacs:标签完成的文件名附加一个额外的i:\cygwin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在emacs中,我遇到一些奇怪的行为与文件名完成。 C-X C-F查找文件,打开迷你缓冲区与我:/ cygwin中的/ home / rrajagop / StockScreener / working_copy / master_repo / stock_screener /。击中一个TAB使它i:/ cygwini:/ cygwin / home / rrajagop / StockScreener / working_copy / master_repo / stock_screener /。一对夫妇有趣的事情,我注意到:

I am facing some strange behavior with file-name completion in emacs. C-x C-f to find file opens up the minibuffer with i:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. Hitting a TAB makes it i:/cygwini:/cygwin/home/rrajagop/StockScreener/working_copy/master_repo/stock_screener/. A couple of interesting things I've noticed:


  1. 当迷你缓冲区打开了,我:/ cygwin的是灰色和路径似乎从/ home开始。一个C-a(去行的开始)带我到/ home,而不是i:/ cygwin。所以它看起来像在emacs解析路径从/ home而不是从i:/ cygwin。

  2. 我检查TAB运行从minibuffer.el迷你缓冲区完成(做了一个TAB描述键),所以它看起来像迷你缓冲区完成做一些翻译Cygwin和追加extra i:/ cygwin。

我该如何解决这个问题?

How would I go about figuring this out/fixing it?

编辑:额外信息
我试着用-Q打开emacs,这个问题不会发生。所以这是我在我的.emacs中加载的东西。这是我在我的.emacs

Extra Information I tried opening up emacs with -Q and this problem doesn't happen. So this is something I'm loading in my .emacs. This is what I have in my .emacs

(require 'cl)

; Needed to see how fast Emacs loads. Loading time is printed at the 
; and of the execution of .emacs file.
(defvar *emacs-load-start* (current-time))

; I really like this font. I also tried Monaco which you can
; see on lot of Railscasts but I couldn't find the one which
; supports Serbian Cyrillic and Latin letters.
(set-default-font "-outline-Courier New-normal-r-normal-normal-19-142-96-96-c-*-iso8859-1")

;; Don't show that splash screen
(setq inhibit-startup-message t)

; This should allegedly speed up Emacs starting by preventing
; some requests from the window manager back to the Emacs. Frankly
; speaking I didn't notice some speed up but I still keep it:(
(modify-frame-parameters nil '((wait-for-wm . nil)))

;Allows syntax highlighting to work, among other things
(global-font-lock-mode 1)

; Sets initial window position
(set-frame-position (selected-frame) 0 0)

; Sets initial window size to 85 columns and 47 rows
(set-frame-size (selected-frame) 88 32)

; Makes last line ends in carriage return
(setq requre-final-newline t)

; Sets Ctrl-x / key combination for easy commenting
; out of selected lines.
(global-set-key "\C-x/" 'comment-or-uncomment-region)

; Allow resizing of the mini-buffer when necessary
(setq resize-minibuffer-mode t)

; Auto magically read compressed files
(auto-compression-mode 1)

; Set standard indent to 2 rather then 4
(setq standard-indent 2)

; This tells Emacs to create backup files.
(setq make-backup-files t)

; And this will enable versioning with default values.
(setq version-control t)

; Remove annoying message about deleting excess backup of .recentf
; which is list of recent files used 
(setq delete-old-versions t)

; Finally do not spread backups all over the disk.
; Just save all backup files in this directory.
(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))

;; Directory to put various el files.
(add-to-list 'load-path "~/.emacs.d/includes")

(require 'ascii-table)

;; Loading collection of generic modes for different languages
(require 'generic-x)

;; Recent files
(require 'recentf)
(recentf-mode 1)

;; Loads ruby mode when a ruby file is opened.
(autoload 'ruby-mode "ruby-mode" "Major mode for editing ruby scripts." t)
(setq auto-mode-alist (cons '(".rb$" . ruby-mode) auto-mode-alist))
(setq auto-mode-alist (cons '(".rhtml$" . html-mode) auto-mode-alist))
(setq auto-mode-alist (cons '(".html.erb$" . html-mode) auto-mode-alist))

;; Turn on ruby electric (auto completion of parenthesis, etc.)
(add-hook 'ruby-mode-hook
      (lambda()
        (add-hook 'local-write-file-hooks
              '(lambda()
             (save-excursion
               (untabify (point-min) (point-max))
               (delete-trailing-whitespace) )))
        (set (make-local-variable 'indent-tabs-mode) 'nil)
        (set (make-local-variable 'tab-width) 2)
        (imenu-add-to-menubar "IMENU")
        (define-key ruby-mode-map "\C-m" 'newline-and-indent)
        (require 'ruby-electric)
        (ruby-electric-mode t) ))

;; Ruby debugging.
(add-to-list 'load-path "~/.emacs.d/plugins/rdebug")
(autoload 'rdebug "rdebug" "Ruby debugging support." t)
(global-set-key [f9] 'gud-step)
(global-set-key [f10] 'gud-next)
(global-set-key [f11] 'gud-cont)
(global-set-key "\C-c\C-d" 'rdebug)


;; set compile command based on current major mode
(autoload 'mode-compile "mode-compile"
"Command to compile current buffer file based on the major mode" t)
(global-set-key "\C-cc" 'mode-compile)
(autoload 'mode-compile-kill "mode-compile"
"Command to kill a compilation launched by `mode-compile'" t)
(global-set-key "\C-ck" 'mode-compile-kill)

;; yasnippet - adding code snippet insertion
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet/snippets")

;; Use CYGWIN bash
(require 'setup-cygwin)

;; Subversion integration via psvn - not gonna use svn anymore
;; (require 'psvn)


;; add some elisp tutorials to the info directory
(let ((info-root (concat usb-drive-letter "cygwin/usr/local/bin/emacs/info/")))
  (setq Info-directory-list (list info-root 
                  (concat info-root "elisp-tutorial-2.04/") 
                  (concat info-root "emacs-lisp-intro-2.14")) ) 
)

;; Load time for .emacs - this should be the last line in .emacs for accurate load time
(message "ido and org-install took: %ds" 
     (destructuring-bind (hi lo ms) (current-time)
       (- (+ hi lo) (+ (first *emacs-load-start*) (second *emacs-load-start*)) )))


推荐答案

我认为将帮助你在这里。

I think my answer to your previous question on finding the package loading tramp will help you out here.

这篇关于Emacs:标签完成的文件名附加一个额外的i:\cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆