Hot answers tagged

37 votes
Accepted

What is the easiest way to search all useful files inside a single project?

Project based searching within Emacs can be done using projectile. It allows for per-project configuration of ignore files (in a <projectroot>\.projectile file), or specify subdirectories to ...
user avatar
24 votes

Can emacs support go to declaration of function in an entire project?

I ran into a similar issue with emacs, so I made Dumb Jump. I tried many of the solutions mentioned in the accepted answer, but I always ran into one or more of the following issues: Solution only ...
user avatar
  • 720
16 votes
Accepted

Can emacs support go to declaration of function in an entire project?

You can jump to any definition/reference of entire project as large as Linux kernel source tree (more than 36k) in an instant. See my C/C++ guide for details. For C/C++, I suggest using GNU Global ...
user avatar
  • 6,682
14 votes

What is the easiest way to search all useful files inside a single project?

The project-wide search of only relevant files can be done using ag aka the_silver_searcher. Why ag? It ignores file patterns from your .gitignore, .hgignore, svn:ignore. You can choose for your ...
user avatar
  • 24.3k
14 votes
Accepted

Using DeskTop for basic project management

I needed to manage the desktop files just like you; have a separate desktop file for each project and save buffers, Emacs variables, etc independently for each. I was able to achieve that using a ...
user avatar
  • 24.3k
7 votes

What is the easiest way to search all useful files inside a single project?

If your project uses Git, you only need counsel https://github.com/abo-abo/swiper counsel-git to find file counsel-git-grep to grep The only dependency is git Text grepping is faster than the ...
user avatar
  • 4,631
6 votes

Set author per repository

you can do this with one-time git configuration. you can use it for email and so on, but also for using a different ssh key: in ~/.gitconfig: [includeIf "gitdir:~/work/"] path = .gitconfig_work in ~...
user avatar
6 votes

Set author per repository

One way to do this is to set the author configuration in .git/config in each repository, in the same format as in ~/.gitconfig, i.e.: [user] name = My Name email = me@example.com
user avatar
  • 5,864
6 votes

Simple project management---org-mode, or another tool?

Here is one piece of an approach to organizing. No doubt it can be used together with other organizing approaches. Put libraries Bookmark+ and Dired+ in your load-path (i.e., "install" them), and ...
user avatar
  • 70.3k
6 votes
Accepted

Projectile not showing all files under my Git project

The quick answer is to invalidate the projectile cache. When using projectile-find-file if you use C-u to send the universal argument before running the function, it will invalidate the cache before ...
user avatar
  • 4,004
5 votes

Projectile with caching doesn't like new files

Use the prefix argument, ie C-u C-c p f to quickly invalidate and find files in project. The suggestion in the comment about using projectile-cache-current-file is technically correct, but there is a ...
user avatar
  • 4,004
5 votes

Can emacs support go to declaration of function in an entire project?

The primary solution for this in emacs is using TAGS files, which are created by programs such as etags or gtags. I myself use (and recommend) exuberant ctags, and etags-select.el to help you narrow ...
user avatar
  • 1,279
4 votes
Accepted

Change C indent style for specific project?

A .dir-locals.el file would certainly do the trick! I like to use the function (add-dir-local-variable MODE VARIABLE VALUE) rather editing .dir-locals.el manually. For those two values eval (let ((...
user avatar
  • 6,864
3 votes

Projectile buffer names with project relative filenames

Actually, not quite as difficult as it seemed, added this to my init.el and it seems to work: (defun my-proj-relative-buf-name () (rename-buffer (file-relative-name buffer-file-name (projectile-...
user avatar
  • 151
3 votes

Projectile with caching doesn't like new files

This does not speed up the file caching but it saves the manual step of having to invalidate the stale cache (which does not contain the new file). Projectile automatically invalidates the cache if ...
user avatar
  • 24.3k
3 votes

Emacs "context" plugin for switching between different tasks in one project without loosing concentration

Dunno exactly what constitutes a "project" in your context, but have a look at desktop bookmarks, with Bookmark+. An Emacs desktop records (and subsequently restores) the kinds of thing you mention: ...
user avatar
  • 70.3k
3 votes

Projectile switch between opened projects

What I would want is a function or a package that could display all opened projectile projects with ivy or helm and let me choose a candidate. When the candidate would be selected, the last buffer ...
user avatar
  • 11.4k
2 votes

Simple project management---org-mode, or another tool?

If you want a list of files in a project, projectile is a currently a popular project manager in Emacs. If you use a version control system (i.e. Git), Projectile automatically recognizes it as a ...
user avatar
  • 6,682
2 votes

Set author per repository

Anoter useful option is the git-identity package. From its README: This Emacs package lets you manage local Git identities, i.e. user.name and user.email options in .git/config, inside Emacs. It ...
user avatar
2 votes

Projectile switch between opened projects

As @Swedgin said in comments projectile-switch-open-project will work without doing nothing more. Given that you want to switch to an open project buffer, you should also customize projectile-switch-...
user avatar
  • 2,366
2 votes
Accepted

project.el: override project root with dir-local var?

I ran into this, too, and published the project-find-functions hook I use on https://michael.stapelberg.ch/posts/2021-04-02-emacs-project-override/: ;; Returns the parent directory containing a ....
user avatar
  • 136
2 votes

project.el: override project root with dir-local var?

No buffer-local vars available as an option, but you can add your own element to project-find-functions which would call project-current in some parent directory.
user avatar
  • 3,278
2 votes
Accepted

How change name of file "projects" and set it in init.el?

You can customize the variable project-list-file. For example, try (setq project-list-file "~/.emacs.d/projects-laptop"). The variable docstring says "File in which to save the list of ...
user avatar
1 vote

How to use xref-find-references on Elisp files without "No references found for" errors

Note: This is a very complicated solution. See How to use xref-find-references on Elisp files without "No references found for" errors for when I came to my senses and simplified things. ...
user avatar
  • 269
1 vote

How to use xref-find-references on Elisp files without "No references found for" errors

xref provides UI for code navigation. The actual functionalities are provided by the backend. In you case, the backend is etags. If you open TAGS file, its format is very simple. It has only the ...
user avatar
  • 4,631
1 vote

Setup find-file-at-point to treat tilde as project root

Use https://github.com/technomancy/find-file-in-project (ffip). What ~ means does not matter. ffip will try to find file in project root using the file name under cursor. Example, https://emacs....
user avatar
  • 4,631
1 vote

Setup find-file-at-point to treat tilde as project root

This custom function finds the file as described by looking for the src directory of the file currently being visited and assumes that the directory one above is the cwd. As a consequence it only ...
user avatar
  • 1,453
1 vote
Accepted

How to open a folder as project in emacs?

Emacs packages will automatically find the project root, company-gtags (for code completion) from https://github.com/company-mode/company-mode counsel-git-grep (for grepping) and counsel-git (for ...
user avatar
  • 4,631
1 vote
Accepted

Why are my dir-locals always malformed

For the original question (repeating my comment): As others have pointed out, that value needs to be a string: "/usr/bin/php". You need to manually type the quotes because add-dir-local-variable has ...
user avatar
  • 43.9k
1 vote

C Source code browsing similar to eclipse

For C developers, I suggest ctags. The problem of GNU Gloal is that it treats the function declaration as reference. That's awkward if you want to check the declaration of function ONLY. C++ code ...
user avatar
  • 4,631

Only top scored, non community-wiki answers of a minimum length are eligible