[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 38/51: [gnugo] Fix bug: Relax sync regexp.
From: |
Thien-Thi Nguyen |
Subject: |
[elpa] 38/51: [gnugo] Fix bug: Relax sync regexp. |
Date: |
Mon, 24 Feb 2014 12:30:24 +0000 |
ttn pushed a commit to branch master
in repository elpa.
commit 3788b9a74cc6224c8626c26d194a7246b66a6abd
Author: Thien-Thi Nguyen <address@hidden>
Date: Sun Feb 16 22:27:42 2014 +0100
[gnugo] Fix bug: Relax sync regexp.
* packages/gnugo/gnugo.el (gnugo-merge-showboard-results): ...here,
to handle certain increases in captured stones count.
---
packages/gnugo/gnugo.el | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index f3c3b4f..9e813b7 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -534,7 +534,23 @@ a format string applied to the rest of the args."
(defun gnugo-merge-showboard-results ()
(let ((aft (substring (cdr (gnugo-synchronous-send/return "showboard")) 3))
(adj 1) ; string to buffer position adjustment
- (sync "[0-9]+ stones$")
+
+ (sync "[0-9]* stones$")
+ ;; Note: `sync' used to start w/ "[0-9]+", but that is too
+ ;; restrictive a condition that fails in the case of:
+ ;;
+ ;; (before)
+ ;; ... WHITE has captured 1 stones
+ ;; ^
+ ;; (after)
+ ;; ... WHITE has captured 14 stones
+ ;; ^
+ ;;
+ ;; where the after count has more digits than the before count,
+ ;; but shares the same leading digits. In this case, the result
+ ;; of `compare-strings' points to the SPC following the before
+ ;; count (indicated by caret in this example).
+
(bef (buffer-substring-no-properties (point-min) (point-max)))
(bef-start 0) (bef-idx 0)
(aft-start 0) (aft-idx 0)
- [elpa] 25/51: [gnugo int] Use cl-{plus,minus}p more., (continued)
- [elpa] 25/51: [gnugo int] Use cl-{plus,minus}p more., Thien-Thi Nguyen, 2014/02/24
- [elpa] 27/51: [gnugo int] Hang the sync-return-stash on the process object., Thien-Thi Nguyen, 2014/02/24
- [elpa] 22/51: [gnugo maint] Add .dir-locals.el file, link in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 29/51: [gnugo] Indicate buffer not modified after load., Thien-Thi Nguyen, 2014/02/24
- [elpa] 30/51: [gnugo maint] Update NEWS file; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 34/51: [gnugo int] Use ‘set-p rocess-query-on-exit-flag’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 33/51: [gnugo int] Zonk unused local var., Thien-Thi Nguyen, 2014/02/24
- [elpa] 35/51: [gnugo int] Use ‘dolis t’ and ‘destructuring-bind’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 28/51: [gnugo int] Drop leading "*" in docstrings., Thien-Thi Nguyen, 2014/02/24
- [elpa] 26/51: [gnugo] Give names and docstr ings to ‘lambda’ commands., Thien-Thi Nguyen, 2014/02/24
- [elpa] 38/51: [gnugo] Fix bug: Relax sync regexp.,
Thien-Thi Nguyen <=
- [elpa] 39/51: [gnugo] Don't show underscore in group-animation message., Thien-Thi Nguyen, 2014/02/24
- [elpa] 36/51: [gnugo int] Revamp gnugo-{put, get} doc / indentation decl., Thien-Thi Nguyen, 2014/02/24
- [elpa] 37/51: [gnugo maint] Update "next" in HACKING; nfc., Thien-Thi Nguyen, 2014/02/24
- [elpa] 32/51: [gnugo] Use ‘user-erro r’., Thien-Thi Nguyen, 2014/02/24
- [elpa] 02/51: Import gnugo.el from ttn-pers-elisp 1.59., Thien-Thi Nguyen, 2014/02/24
- [elpa] 40/51: [gnugo] Use special constructs for keybindings in docstrings., Thien-Thi Nguyen, 2014/02/24
- [elpa] 21/51: [gnugo gtp int] Use :post-thunk instead of :post-hook., Thien-Thi Nguyen, 2014/02/24
- [elpa] 31/51: [gnugo int] Add abstraction: gnugo--unclose-game, Thien-Thi Nguyen, 2014/02/24
- [elpa] 45/51: [gnugo] New command: ‘ A’ (gnugo-switch-to-another), Thien-Thi Nguyen, 2014/02/24
- [elpa] 42/51: [gnugo int] Use internal macros more., Thien-Thi Nguyen, 2014/02/24