Standardized on one single output buffer for all the commands output.
All the commands output go to an *Android Output* buffer which
gets cleaned up before each command run.
Fixed a compilation bug, building from the top Makefile was not
generating a new image.
diff --git a/ide/emacs/android-common.el b/ide/emacs/android-common.el
index 8988598..7bf82a2 100644
--- a/ide/emacs/android-common.el
+++ b/ide/emacs/android-common.el
@@ -32,7 +32,9 @@
(defgroup android nil
"Support for android development in Emacs."
- :group 'tools)
+ :prefix "android-" ; Currently unused.
+ :tag "Android"
+ :group 'tools)
;;;###autoload
(defcustom android-compilation-jobs 2
@@ -51,6 +53,10 @@
(string :tag "Alias")))
:group 'android)
+(defconst android-output-buffer-name "*Android Output*"
+ "Name of the default buffer for the output of the commands.
+There is only one instance of such a buffer.")
+
(defun android-find-build-tree-root ()
"Ascend the current path until the root of the android build tree is found.
Similarly to the shell functions in envsetup.sh, for the root both ./Makefile
@@ -147,14 +153,20 @@
"Execute 'adb COMMAND'.
If the optional PRODUCT is not nil, -p (android-product-path) is used
when adb is invoked."
+ (when (get-buffer android-output-buffer-name)
+ (with-current-buffer android-output-buffer-name
+ (erase-buffer)))
(if product
(shell-command (concat (android-adb) " -p " (android-product-path)
- " " command))
- (shell-command (concat (android-adb) " " command))))
+ " " command)
+ android-output-buffer-name)
+ (shell-command (concat (android-adb) " " command)
+ android-output-buffer-name)))
(defun android-adb-shell-command (command)
"Execute 'adb shell COMMAND'."
- (android-adb-command (concat " shell " command)))
+ (android-adb-command (concat " shell " command)
+ android-output-buffer-name))
(provide 'android-common)