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)
diff --git a/ide/emacs/android-compile.el b/ide/emacs/android-compile.el
index aa56be6..d0a2b7b 100644
--- a/ide/emacs/android-compile.el
+++ b/ide/emacs/android-compile.el
@@ -94,7 +94,7 @@
(set (make-local-variable 'compile-command)
(if (cadr makefile)
;; The root Makefile is not invoked using ONE_SHOT_MAKEFILE.
- (concat "make -C " topdir options " files ")
+ (concat "make -C " topdir options) ; Build the whole image.
(concat "ONE_SHOT_MAKEFILE=" (car makefile)
" make -C " topdir options " files ")))
(if (interactive-p)
diff --git a/ide/emacs/android-host.el b/ide/emacs/android-host.el
index 9b9fe9d..d310e3a 100644
--- a/ide/emacs/android-host.el
+++ b/ide/emacs/android-host.el
@@ -37,7 +37,7 @@
;; C-x a f android-fastboot-flashall
;;
;; android-fastboot-flashall is still work in progress, check the
-;; associated buffer (*Fastboot*) for errors when you use it.
+;; associated buffer (*Android Output*) for errors when you use it.
;;; Code:
@@ -99,14 +99,18 @@
With no ARG, don't wipe the user data.
With ARG, wipe the user data."
(interactive "P")
- (when (get-buffer "*Fastboot*")
- (with-current-buffer "*Fastboot*" (erase-buffer)))
+ (when (get-buffer android-output-buffer-name)
+ (with-current-buffer android-output-buffer-name
+ (erase-buffer)))
(let ((proc
(if arg
(start-process-shell-command
- "fastboot" "*Fastboot*" (concat (android-fastboot) " flashall -w"))
+ "fastboot"
+ android-output-buffer-name
+ (concat (android-fastboot) " flashall -w"))
(start-process-shell-command
- "fastboot" "*Fastboot*" (concat (android-fastboot) " flashall")))))
+ "fastboot" android-output-buffer-name
+ (concat (android-fastboot) " flashall")))))
(set-process-sentinel proc 'android-fastboot-sentinel)))