Category: Emacs

Another Emacs Project Library

I've posted a new project handling library to the Emacs Wiki: mk-project.el. A "project" in this sense is a directory of source files. You define a named project and provide settings for it: base directory, source file patterns, file patterns to ignore, the TAGS file, the compile command, etc.

Features:

  • Quickly switch between projects, optionally closing the files in the old project.
  • Use the new project's TAGS file -- and be able to rebuild the TAGS file based on project settings.
  • Run find-grep from the new project's base directory, ignoring certain files or directories based on project settings.
  • Run compile with the project's preferred compile command.
  • Open any file in the project quickly based on regex matches.
  • Quickly open dired on the project's base directory.
  • Define per-project startup and shutdown hooks -- useful for opening often-used files.

Perhaps the feature I'm happiest with is project-find-file. The library maintains a list of all the files under the project's base directory in a special buffer, *file-list*. Project-find-file ask for a regular expression representing part of a file's path or name and either 1) opens the file if there is only one match in *file-list*, or 2) allows selecting among the matching files with Emacs' built-in completion mechanism. Also, it sometimes comes in handy to search buffer *file-list* directly when you want an overview of the entire project. I often work with projects having thousands of files in deep folder hierarchies so project-find-file is very convenient.

After writing my library, I discovered a similar library, ProjMan by David Shilvock. The project operations we offer are similar - we even recommend similar keybindings! ProjMan is perhaps more complete, but I don't feel my time was wasted writing mk-project.el -- elisp is pleasure to code in.

Technorati tags for this post:

< Future 10 | Past 10 >