Projectile搜索结果行尾有换行符^M


#1

我是windows平台,Projectile设置了index method为alien,搜索.emacs.d目录时,能够正常打开文件,但是搜索我本地的chromium项目时,所有搜索结果行尾都有换行符,文件名加了换行符,导致文件无法打开

projectile设置如下:

(projectile-mode +1)
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(setq project-enable-caching t)
(setq projectile-completion-system 'ivy)
(setq projectile-indexing-method 'alien)

#2

用虚拟机 或是 docker


#3

虚拟机或者docker编译chromium内核太慢了


#4

那就买个高配的笔记本


#5

Some notes of my previous config(Not sure whether it will work fine for you)

** text-mode
   Remove ~^M~ in text-mode
   Do not show ^M in files containing mixed UNIX and DOS line endings. I edit subtitles(.srt) with emacs and text-mode.
   use-package tip: If you need to conditionalize a use-package form so that the condition occurs before even the ~:preface~ is executed. More: https://github.com/jwiegley/use-package/issues/267
   #+BEGIN_SRC emacs-lisp :tangle yes
     (defun remove-dos-eol ()
       (interactive)
       (setq buffer-display-table (make-display-table))
       (aset buffer-display-table ?\^M []))
     (use-package text-mode
       :preface (provide 'text-mode)
       :mode "\\.srt\\'"
       :config
       (add-hook 'text-mode-hook 'remove-dos-eol))
     (add-hook 'srt-mode-hook 'remove-dos-eol)
   #+END_SRC


#6

我的锅,我忽略了重点

重点是我是在开发windows平台的项目


#7

Thanks a lot. I will try it in a moment.


#8

It doesn’t work.


#9

不代表 删除了


#10

也许和我的情况类似:

如果是git项目,配置下 projectile-git-command


#11

真的非常感谢