I'm pleased to announce the release of version 1.3 of
mk-project.
It offers several new features and a bug fix.
Feature: Custom Find Commands
Mk-project uses a "find" command in several scenarios: finding files
to pipe to etags (project-tags), finding files to pipe to
grep (project-grep) and finding files to index (project-index,
project-find-file). Until this release, the find commands used in
these situations where calculated using a combination of
the "basedir", "src-patterns", "ignore-patterns" and "vcs" project
settings. As nice and simple as this scheme was, there was no way to
customize these find commands for more complicated project
structures. For example, I'm currently working on a project with a
very large $basedir/thirdparty directory that I do not want to
include in TAGS, grep actions or the project index. With version 1.3,
I can specify custom find commands that will omit the thirdparty
directory:
(project-def "big-project"
`((basedir "~/big-project")
(src-patterns ("*.java"))
(ignore-patterns ("*.class"))
(src-find-cmd ,(concat "find ~/big-project \\( -path ~/big-project/thirdparty -prune \\) -o "
"\\( -type f -name \"*.java\" -o -print \\)"))
(grep-find-cmd "find . -type f | egrep -v thirdparty ")
(index-find-cmd (lambda (context)
(concat "find ~/big-project "
"\\( -path ~/big-project/thirdparty -prune \\) -o -print")))
...))
As you can see, there are 3 new "-find-cmd" project settings. The
values can be simple strings specifying a "find" command or a
function of 1 argument that returns the find command. The
argument will be 'src, 'grep or 'index as appropriate, which
allows you to write a single function to generate all 3 find
commands if you'd like.
Feature: Relative paths in TAGS files
If your tags-file is located in your basedir (directly in the basedir,
not a subdirectory of basedir), the generated TAGS file will now use
relative file names. This makes the TAGS file portable. For example,
if you copied the basedir to a new location, you could copy the TAGS
file to the new directory and it would work without modification.
Feature: Custom ack command name
You can customize the ack-command name for your system. It defaults
to "ack.pl" (or "ack" on Windows systems).
Bug Fix
Fixed issue #1: project-ack does not use the "confirmed" command.
...
mk-project.el 1.3 is available from
github or
the Emacs Wiki.
Technorati tags for this post:
mk-project
git
emacs