[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/arduino-mode 9b1bdb8 060/107: support show process info in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/arduino-mode 9b1bdb8 060/107: support show process info in mode-line |
Date: |
Sun, 29 Aug 2021 10:58:16 -0400 (EDT) |
branch: elpa/arduino-mode
commit 9b1bdb8d4bce86964ffe82fb53cd16640c943412
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
support show process info in mode-line
---
arduino-mode.el | 69 +++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 45 insertions(+), 24 deletions(-)
diff --git a/arduino-mode.el b/arduino-mode.el
index be5b392..2fe2c09 100644
--- a/arduino-mode.el
+++ b/arduino-mode.el
@@ -183,41 +183,62 @@ Each list item should be a regexp matching a single
identifier."
(easy-menu-add-item arduino-menu
nil ["Serial monitor" arduino-serial-monitor t])
+(defvar arduino-upload-process-buf nil)
+
(defun arduino-upload ()
"Build and upload the sketch to an Arduino board."
(interactive)
- (make-process
- :command (list "arduino" "--upload" (buffer-file-name))
- :name "arduino-upload"
- :buffer "*arduino-upload*"
- :sentinel (lambda (proc event)
- (when (string= event "finished\n")
- (message "Arduino upload succeed.")))
- ))
+ (setq arduino-upload-process-buf (buffer-name))
+ (let* ((proc-name "arduino-upload")
+ (proc-buffer "*arduino-upload*")
+ (proc (make-process
+ :command (list "arduino" "--upload" (buffer-file-name))
+ :name proc-name
+ :buffer proc-buffer
+ :sentinel (lambda (proc event)
+ (when (string= event "finished\n")
+ (with-current-buffer arduino-upload-process-buf
+ (setq mode-line-process nil))
+ (message "Arduino upload succeed."))))))
+ (setq mode-line-process proc-name)))
+
+(defvar arduino-verify-process-buf nil)
(defun arduino-verify ()
"Verify the sketch by building it."
(interactive)
- (make-process
- :command (list "arduino" "--verify" (buffer-file-name))
- :name "arduino-verify"
- :buffer "*arduino-verify*"
- :sentinel (lambda (proc event)
- (when (string= event "finished\n")
- (message "Arduino verify build succeed.")))
- ))
+ (setq arduino-verify-process-buf (buffer-name))
+ (let* ((proc-name "arduino-verify")
+ (proc-buffer "*arduino-verify*")
+ (proc (make-process
+ :command (list "arduino" "--verify" (buffer-file-name))
+ :name proc-name
+ :buffer proc-buffer
+ :sentinel (lambda (proc event)
+ (when (string= event "finished\n")
+ (with-current-buffer arduino-verify-process-buf
+ (setq mode-line-process nil))
+ (message "Arduino verify build succeed."))))))
+ (setq mode-line-process proc-name)))
+
+(defvar arduino-open-process-buf nil)
(defun arduino-open-with-arduino ()
"Open the sketch with the Arduino IDE."
(interactive)
- (make-process
- :command (list "arduino" (buffer-file-name))
- :name "arduino-open"
- :buffer "*arduino-open*"
- :sentinel (lambda (proc event)
- (when (string= event "finished\n")
- (message "Opened with Arduino succeed.")))
- ))
+ (setq arduino-open-process-buf (buffer-name))
+ (let* ((proc-name "arduino-open")
+ (proc-buffer "*arduino-open*")
+ (proc (make-process
+ :command (list "arduino" (buffer-file-name))
+ :name proc-name
+ :buffer proc-buffer
+ :sentinel (lambda (proc event)
+ (when (string= event "finished\n")
+ (with-current-buffer arduino-open-process-buf
+ (setq mode-line-process nil))
+ (message "Opened with Arduino succeed."))))))
+ (setq mode-line-process proc-name)))
(defun arduino-install-boards (board)
"Install `BOARD' support for Arduino."
- [nongnu] elpa/arduino-mode 3d8aa47 045/107: improve and add some commands for command-line arduino., (continued)
- [nongnu] elpa/arduino-mode 3d8aa47 045/107: improve and add some commands for command-line arduino., ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 3fc0851 046/107: use define-derived-mode for arduino-mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 0150970 050/107: support org-mode babel Arduino src block, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 139b154 051/107: add support for --board option with header argument :boarder, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 3f0b3a4 057/107: rename command arduino-build -> arduino-verify, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 7b94f5b 058/107: creating process with make-process to use process sentinel to get notification., ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 714e0f0 059/107: add missing menu entries, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 6b549c8 064/107: add a command to add include-path file for irony, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 8235a4a 065/107: fix mode-line-process not disappear after process failed, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 431c3ba 069/107: Merge branch 'develop', ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 9b1bdb8 060/107: support show process info in mode-line,
ELPA Syncer <=
- [nongnu] elpa/arduino-mode 1f154e4 063/107: add a command to create new Arduino sketch, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 8e82926 072/107: Use arduino-executable in commands instead, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode a4dbdfa 085/107: update arduino-mode-syntax-table to inherit from c-mode directly, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 9234c9d 087/107: Replace defmethod -> cl-defmethod, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 01cb165 096/107: plan to support "arduino-cli" command-line tools, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 1c9250d 097/107: Fix recursive ‘require’ for feature ‘flycheck-arduino’, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode f0053f5 061/107: raise process buffer if process failed, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode af1f18a 067/107: add flycheck support, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode 0e95bdf 084/107: auto setup flycheck-arduino on arduino-mode-hook, ELPA Syncer, 2021/08/29
- [nongnu] elpa/arduino-mode eac5031 090/107: fix function `flycheck-arduino-setup' unknown when compilation, ELPA Syncer, 2021/08/29