Coder Social home page Coder Social logo

Comments (7)

redguardtoo avatar redguardtoo commented on June 1, 2024

What Emacs you are using? OS? What's output of etags in cli? What's output of ctags in cli?

from counsel-etags.

maobaoqi avatar maobaoqi commented on June 1, 2024

Thanks for reply! @redguardtoo

I use Win10 and ArchLinux.

For the first and second question, I solved by this setting on Win10 MSYS2. Not use pacman -S ctags on MSYS2, and copy another ctags.exe on Windows into MSYS2 bin folder.
Snipaste_2019-05-15_08-48-01

For the last question, Should the project root folder contains TAGS file? In some cases, I do not want to produce TAGS file under project source tree and want to keep the project folder clean.

Additional, if develop a new project using tags jump and complete, this project will use two extra libraries, for example, opencv and glib,
What is the best workflow to generate TAGS when programming C++ ? under one specify tag folder? I have no idea by spending one night to learn.

On archlinux, when open a github clone source code folder, it should be checked as project folder automatically, but it's not do that and always open home folder when call counsel-etags-scan-code command. However, for same github clone source code folder on Win10, it can identify this folder as project folder. (I use github ccv project for testing). I think it's better to open current folder after run counsel-etags-scan-code.

Thanks! Mr.Chen

from counsel-etags.

redguardtoo avatar redguardtoo commented on June 1, 2024

You have to create tags file in your own project root. Or else things could be unnecessary complicated. For example, if tags file is not in project root, you have to use absolute path for each tag, so tags file is not portable any more.

For 3rd party tags files, see https://github.com/redguardtoo/counsel-etags#specify-multiple-tags-files

Please note counsel-etags only read from 3rd party tags files. It won't create/update them. So you need manually create these tags files. It doesn't matter where they are placed.

from counsel-etags.

maobaoqi avatar maobaoqi commented on June 1, 2024

@redguardtoo OK, I have to create TAGS file under my project folder and I get into another trouble.;)

Create tags for 3rd party in a single folder and set its path for counsel-etags-extra-tags-files, then I also create tag file in project root folder. When open .cpp file, it can jump but can not complete 3rd party functions using company-etags. From minibuffer information, I find that company-etags just use the project root folder tag file. What's going wrong?

I'm sorry for asking many times and I'm getting more and more confused. Thanks!
Snipaste_2019-05-15_13-19-41
Snipaste_2019-05-15_13-30-59

from counsel-etags.

redguardtoo avatar redguardtoo commented on June 1, 2024

Check README, the tag in 3rd party tags file should use full path, not relative path.

besides, ctags use -e to create tags file for Emacs.

I created a step by step guide in README.

from counsel-etags.

russellfei avatar russellfei commented on June 1, 2024

@redguardtoo
The instructions in readme about ctags program customization

(setq counsel-etags-update-tags-backend (lambda () (shell-command "find . -type f -iname \"*.[ch]\" | etags -")))

should be changed to

(setq counsel-etags-update-tags-backend (lambda (x) (shell-command "find . -type f -iname \"*.[ch]\" | etags -")))

otherwise, you will got errors like Wrong number of input (lambda nil ...), 1

A few minutes to get this correct.

from counsel-etags.

redguardtoo avatar redguardtoo commented on June 1, 2024

d7fcec5 typo in README (Chen Bin)

from counsel-etags.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.