@item C-x p c
Run compilation in the current project's root directory
(@code{project-compile}).
+@item C-x p !
+Run shell command in the current project's root directory
+(@code{project-shell-command}).
+@item C-x p &
+Run shell command asynchronously in the current project's root
+directory (@code{project-async-shell-command}).
@end table
Emacs provides commands for handling project files conveniently.
The command @kbd{C-x p c} (@code{project-compile}) runs compilation
(@pxref{Compilation}) in the current project's root directory.
+@findex project-shell-command
+ The command @kbd{C-x p !} (@code{project-shell-command}) runs
+@code{shell-command} in the current project's root directory.
+
+@findex project-async-shell-command
+ The command @kbd{C-x p &} (@code{project-async-shell-command}) runs
+@code{async-shell-command} in the current project's root directory.
+
@node Project Buffer Commands
@subsection Project Commands That Operate on Buffers
This command lets you "switch" to another project and run a project
command chosen from a dispatch menu.
++++
+*** New commands 'project-shell-command' and 'project-async-shell-command'.
+These commands run 'shell-command' and 'async-shell-command' in a
+project's root directory, respectively.
+
+++
*** New user option 'project-list-file'.
;;;###autoload
(defvar project-prefix-map
(let ((map (make-sparse-keymap)))
+ (define-key map "!" 'project-shell-command)
+ (define-key map "&" 'project-async-shell-command)
(define-key map "f" 'project-find-file)
(define-key map "F" 'project-or-external-find-file)
(define-key map "b" 'project-switch-to-buffer)
(pop-to-buffer eshell-buffer)
(eshell t))))
+;;;###autoload
+(defun project-async-shell-command ()
+ "Run `async-shell-command' in the current project's root directory."
+ (interactive)
+ (let ((default-directory (project-root (project-current t))))
+ (call-interactively #'async-shell-command)))
+
+;;;###autoload
+(defun project-shell-command ()
+ "Run `shell-command' in the current project's root directory."
+ (interactive)
+ (let ((default-directory (project-root (project-current t))))
+ (call-interactively #'shell-command)))
+
(declare-function fileloop-continue "fileloop" ())
;;;###autoload