Comments (7)
from xcscope.el.
Thank you for the fast reply. I've tried C-c s I and got the following:
Creating cscope index `cscope.out' in:
/home/misha/work/got/
===============================================================================
Creating list of files to index ...
find: -false: unknown option
Creating list of files to index ... done
Indexing files ...
cscope: no source files found
Indexing files ... done
===============================================================================
Indexing finished
It looks like -false
is not defined in POSIX and is GNU extension.
I tried following command:
find . -name *.c -o -name *.h > cscope.files
and then
cscope -b
in /home/misha/work/got
directory - after that everything started to work.
So, it looks like that the error was in not having cscope.files
file and not build cscope.out out from it.
If you want to make creating cscope.files more POSIX friendly - I'm ready to test the patch, if not, I think, the bug can be closed. (Probably worth mentioning this behavior in docs, though)
from xcscope.el.
from xcscope.el.
I removed -o -false
from the xcscope.el, cscope.files file is created, but it is empty, and building of cscope.out is failing because of it.
--- xcscope.el.orig Sun Mar 13 23:11:36 2022
+++ xcscope.el Mon Mar 14 14:43:55 2022
@@ -2734,16 +2734,14 @@
;; apply -prune to any directory we're supposed to ignore
"(" "-type" "d" "("
- ,@(apply 'append (mapcar (lambda (dir) (list "-name" dir "-o") )
+ ,@(apply 'append (mapcar (lambda (dir) (list "-name" dir) )
cscope-indexer-ignored-directories))
- "-false"
")" "-prune" ")" "-o"
;; accept only files that match the patterns we want
"("
- ,@(apply 'append (mapcar (lambda (suffix) (list "-iname" suffix "-o"))
+ ,@(apply 'append (mapcar (lambda (suffix) (list "-iname" suffix))
cscope-indexer-suffixes))
- "-false"
")"
;; accept files and symlinks
Can you prompt me - how to debug what arguments are passed to find to execute them in a shell, and find the problem? I tried adding (message ...) to the code, but it is first time I use or see lisp, so my approach has failed.
from xcscope.el.
I did a little bit more investigation, it looks like you're doing cycle to build find string like this:
-iname <suffix> -o
-iname <suffix> -o
[...]
-iname <suffix> -o
and after that appen -false
, so you don't leave last -o
without argument.
My lisp skills definitely don't allow me to fix this now. Maybe it's really should be just mentioned in docs, that cscope.files need to be presented in root dir of the project and that cscope -b
must be run manually to xcscope to work on non-GNU OSes.
from xcscope.el.
from xcscope.el.
I added printing of findargs
with following code:
(message "findcmds: %s" findargs)
and it gives the following:
findcmds: (. \( -type d \( -name CVS -o -name RCS -o -name SCCS -o -name .git -o -name .hg -o -name .bzr -o -name .cdv -o -name .pc -o -name .svn -o -name _MTN -o -name _darcs -o -name _sgbak -o -name debian -o -false \) -prune \) -o \( -iname \*.\[chly] -o -iname \*.\[ch\]xx -o -iname \*.\[ch\]pp -o -iname \*.cc -o -iname \*.hh -o -false \) \( -type f -o -type l \) -print)
if I manually remove first (
and last )
, and also remove two -o - false
snippets and pass this to OpenBSD's find
I successfully get expected results.
from xcscope.el.
Related Issues (20)
- xcscope.el and user-reserved keybindings collision HOT 3
- "display-buffer" fallbacks to "display-buffer-fallback-action" HOT 1
- cscope-index-files doesn't work with paths using whitespaces HOT 5
- MacOS: xcscope.el can't be run within emacs 22.1.1 HOT 2
- "Cscope" does not show in the menu bar of Emacs 26.1 or Emacs 25.3.1 HOT 3
- How to change the default bindings of xcscope HOT 2
- multiple "cscope: cannot find file ..." in *cscope* buffer HOT 1
- "<file> is not readable or exists" when using xcscope over TRAMP HOT 6
- Completion for input tag HOT 3
- Tramp support HOT 2
- Support for inline functions HOT 1
- How to change the behavior of quitting cscope display buffer HOT 5
- failed to parse filename HOT 14
- Add multiple databases to search list. HOT 2
- xcscope have problem on emacs-w32, on windows, compiled by MinGW. HOT 6
- Getting nonsense results HOT 11
- GNU Global support requires version 5.9 HOT 4
- does xcscope support symbolic link file ? HOT 1
- search bug in *cscope* buffer with multiple cscope databases 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 xcscope.el.