Comments (16)
69e31f7 detect cli program on window (Chen Bin)
from counsel-etags.
Thanks for your quick response, as always:)
But why not use executable-find
to detect it directly? does it has any side effects?
from counsel-etags.
There is already one built in find.exe
on Windows.
from counsel-etags.
ok, thanks.
from counsel-etags.
After updating, it still complain the below error when M-x counsel-etags-grep
/usr/bin/bash: f:\\cygwin64\\bin\\grep.exe: command not found
It works fine after I changing the path style to:
((file-executable-p (setq rlt (concat "f:/cygwin64/bin/" name ".exe"))))
My emacs version is 25.3.1 on Windows 7.
from counsel-etags.
Can you test YOUR solution on Emacs 24.4?
from counsel-etags.
Native windows Emacs will start a DOS shell which only recognize the path like "f:\cygwin64\bin\grep.exe".
Cygwin Emacs run the commands in BASH shell which only recognized path like "/user/bin/grep".
Why your windows native Emacs start a bash shell?
I tested on Window, counsel-etags
works out of the box.
from counsel-etags.
According to simple.el of emacs, the shell-file-name
is the shell to run, and unfortunately it's bash within my emacs, and there is no such setting in my .emacs.d, still don't know where it's set.
And if I run plain emacs with runemacs -Q
, it's a path to cmdproxy.exe
, which i think is the expected behavior.
UPDATE:
There are some packages in .emacs.d do touch shell-file-name
actually, I will try to spot the culprit if I have more time.
from counsel-etags.
Just find a workaround, SHELL env is set by emacs I believe:
(when (eq system-type 'windows-nt)
(setq shell-file-name (getenv "SHELL")))
from counsel-etags.
Output of M-x emacs-version
? and what's (getenv "SHELL")
?
from counsel-etags.
version: GNU Emacs 25.3.1 (x86_64-w64-mingw32) of 2017-09-27
env: "D:/tools/emacs-25.3_1-x86_64/libexec/emacs/25.3/x86_64-w64-mingw32/cmdproxy.exe"
, and runemacs.exe is located at D:\tools\emacs-25.3_1-x86_64\bin\runemacs.exe
.
There is no SHELL
in Windows' environment variables.
from counsel-etags.
Oh, just found I've set it up within my .custom.el:
(setq shell-file-name "bash")
(setq explicit-shell-file-name shell-file-name)
sorry about that.
from counsel-etags.
I don't suggest changing Emacs's default shell. Use variable default-diretory
and feed the cli program the relative path instead:
(let* ((default-directory "C:\\\\What-ever-directory\\\\proj1"))
(shell-command "ls -l .")
Then add ivy
, see abo-abo/swiper#591 , it's extremly powerful technique.
from counsel-etags.
I copied these from somewhere regarding Windows settings, and I've forgot it:(
Thanks for your help and the tip.
from counsel-etags.
No worries. To be honest, I have read most Windows settings articles. Most of them are no better than my setup.
from counsel-etags.
I copied these from 10 Tips for Powerful Emacs on Windows – Gregory Grubbs - gregorygrubbs.com a few months ago, but I only managed to use native Windows emacs recently:( so I forgot about it totally.
Thank you for your emacs.d, it helped me get started with emacs and I learned a lot from it.
from counsel-etags.
Related Issues (20)
- counsel-etags-grep cant' follow parameters? HOT 6
- Issue with creating a TAGS file when in Tramp mode HOT 2
- counsel-etags did not auto update TAG file. HOT 11
- need CI and tdd HOT 1
- How to color candidate/selection when 'counsel-etags-grep' like swiper does? HOT 8
- could add function name in when looking up tags
- how to do case insensitive grep? HOT 4
- When calling "counsel-etags-find-tag-at-point", rg report separator is error HOT 6
- Unable to use counsel-etags-grep under the windows version of emacs (spacemacs) HOT 3
- Ctags Will Scan Code When Jump Next Tag HOT 12
- How to go back to previous position after I executed counsel-etags-find-tag-at-point ? HOT 2
- 如何指定tag的输出路径 HOT 4
- about ctags cache HOT 4
- counsel-etags-find-tag-at-point-other-window
- How can I append external tags? HOT 4
- Please don't provide a feature in my-byte-compile HOT 2
- "No tag is found." although TAGS file contains this tag HOT 6
- Counsel-etags-grep can only find results in some files HOT 6
- 当tag搜索不到想要的内容时回退到使用ripgrep HOT 4
- 调用 counsel-etags-grep 时可以忽略tag文件 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from counsel-etags.