~/f/gnugo/RPMS.2017 ~/f/gnugo ~/f/gnugo RPMS.2017/gnugo-3.9.1+git20130613.84a32e9-0.0.x86_64.rpm RPMS/gnugo-3.9.1+git20130613.84a32e9-0.0.x86_64.rpm differ: byte 225, line 1 Comparing gnugo-3.9.1+git20130613.84a32e9-0.0.x86_64.rpm to gnugo-3.9.1+git20130613.84a32e9-0.0.x86_64.rpm comparing the rpm tags of gnugo --- /tmp/tmp.XLHnylEyNe/tmp.A2x7dVk6Af 2019-08-18 03:57:12.064099476 +0000 +++ /tmp/tmp.XLHnylEyNe/tmp.mYuQ3ypXFY 2019-08-18 03:57:12.064099476 +0000 @@ -144,8 +144,8 @@ /usr/share/emacs/site-lisp/gnugo/gnugo-db.elc 57e0617e2fdecec42ca62f3406848888f5ff0c951bfb75bc0a6661c525b8231a 0 /usr/share/emacs/site-lisp/gnugo/gnugo-xpms.el 61bbb1910419c82ba5f68b1fffe5bf9fafd1787968378410e774ba66ba74b225 0 /usr/share/emacs/site-lisp/gnugo/gnugo-xpms.elc 003335c7dd86d1db1fa6eda92e5882d76aefa1e4107cc6bc53224a18c880987f 0 -/usr/share/emacs/site-lisp/gnugo/gnugo.el e7c270618c4dd3569d1098f6c00fa720650b0a00282f05528777ce55e719ac31 0 -/usr/share/emacs/site-lisp/gnugo/gnugo.elc 18c1aad4a20470fa355eeff5655a2fa265bc6a9dbb6226b0a4a3961b8f5104f6 0 +/usr/share/emacs/site-lisp/gnugo/gnugo.el 3bc5ed369c34e672f3dae9cc28ced8d9d2c87b6907e4d593f61f1a86ea6a3f1a 0 +/usr/share/emacs/site-lisp/gnugo/gnugo.elc 66ef301db77cfadb8d19250c49b5ba17f0fc7f4498a7d9aef3484a6c92f795fb 0 /usr/share/emacs/site-lisp/gnugo/make-xpms-file.el 2bdf954bb8ab3c475302ab50ebd7d1119c777670eae64f339ae58a6e7c9f0519 0 /usr/share/emacs/site-lisp/gnugo/make-xpms-file.elc 60ffa50ac02a41f2e9c30d03ba2f913d8da67ba1938b4853a3a478cdddf707f5 0 /usr/share/emacs/site-lisp/suse-start-gnugo.el 9f79e73099682e9e622dccf758c0ecd50b924a7e2224722af39d38f295b54088 0 @@ -159,15 +159,15 @@ /usr/share/xemacs/site-packages/lisp/gnugo 0 /usr/share/xemacs/site-packages/lisp/gnugo/auto-autoloads.el 2a70645201ca508c9d3686500ca759322acbf2c85a7d22338f8ee6f964f0d08f 0 /usr/share/xemacs/site-packages/lisp/gnugo/gnugo-big-xpms.el 4f42a8a199bac2c7850d970ba2d5249df9e8add423c1d9828ec8e2b805bdf739 0 -/usr/share/xemacs/site-packages/lisp/gnugo/gnugo-big-xpms.elc e17335717800f1b9f54a0106d2075437cdb651e9213d5fe7b929df86ca3baa78 0 +/usr/share/xemacs/site-packages/lisp/gnugo/gnugo-big-xpms.elc 8989ce26fa2614915b2cd7adabb293eb0a524e8832981780322df93389019b62 0 /usr/share/xemacs/site-packages/lisp/gnugo/gnugo-db.el 7d0cc0cbb1690de7dbd23de69c6df5589c49d8db776582bdbe1933ef99b2c733 0 -/usr/share/xemacs/site-packages/lisp/gnugo/gnugo-db.elc 59dfb91ed48095f67fe558e33bc943ec1ce49185d25b34461cfee8612fc6f7fa 0 +/usr/share/xemacs/site-packages/lisp/gnugo/gnugo-db.elc 7d8dc336de2996d6677e6dfe3dcf0e8a432aaf603ca0e89faf4fe3605acd2170 0 /usr/share/xemacs/site-packages/lisp/gnugo/gnugo-xpms.el 61bbb1910419c82ba5f68b1fffe5bf9fafd1787968378410e774ba66ba74b225 0 -/usr/share/xemacs/site-packages/lisp/gnugo/gnugo-xpms.elc 00e6f16a16d243c7a3a0707dff2388075845ae91ec969193a0cc159a7cfac781 0 -/usr/share/xemacs/site-packages/lisp/gnugo/gnugo.el e7c270618c4dd3569d1098f6c00fa720650b0a00282f05528777ce55e719ac31 0 -/usr/share/xemacs/site-packages/lisp/gnugo/gnugo.elc 54af8cf4d6433ee7884f57ac7a12f480de99e7d888867f8ed7b9311cabca7f0f 0 +/usr/share/xemacs/site-packages/lisp/gnugo/gnugo-xpms.elc ee2df5efe817c4294b4adfce8487c01a73223c4851b638f82ec97301f1c300ae 0 +/usr/share/xemacs/site-packages/lisp/gnugo/gnugo.el 3bc5ed369c34e672f3dae9cc28ced8d9d2c87b6907e4d593f61f1a86ea6a3f1a 0 +/usr/share/xemacs/site-packages/lisp/gnugo/gnugo.elc 362a1f340237a53d8d972148a6bead4e795b295b9881724621bc8f2b0cb69e35 0 /usr/share/xemacs/site-packages/lisp/gnugo/make-xpms-file.el 2bdf954bb8ab3c475302ab50ebd7d1119c777670eae64f339ae58a6e7c9f0519 0 -/usr/share/xemacs/site-packages/lisp/gnugo/make-xpms-file.elc 4065740f7663242cf4fa9d4a0e78db7835e72000eb1b19279efe3ee380665156 0 +/usr/share/xemacs/site-packages/lisp/gnugo/make-xpms-file.elc 62e51d23ac8771b0aae9a4182c380ca98673c659ade3d6004ff0f1a98879da86 0 ___QF_CHECKSUM___ comparing rpmtags comparing RELEASE comparing PROVIDES comparing scripts comparing filelist comparing file checksum creating rename script RPM file checksum differs. Extracting packages /usr/share/emacs/site-lisp/gnugo/gnugo.el differs (Lisp/Scheme program, ASCII text) --- old//usr/share/emacs/site-lisp/gnugo/gnugo.el 2015-08-23 12:00:00.000000000 +0000 +++ new//usr/share/emacs/site-lisp/gnugo/gnugo.el 2015-08-23 12:00:00.000000000 +0000 @@ -1,53 +1,223 @@ -;;; ID: $Id: gnugo.el,v 1.1.1.1 2008/12/21 18:47:58 bump Exp $ +;;; gnugo.el ;;; ;;; This is GNU Go, a Go program. Contact gnugo@gnu.org, or see ;;; http://www.gnu.org/software/gnugo/ for more information. ;;; -;;; Copyright 1999, 2000, 2001 by the Free Software Foundation. +;;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007 +;;; and 2008 by the Free Software Foundation. ;;; -;;; This program is free software; you can redistribute it and/ +;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License -;;; as published by the Free Software Foundation - version 3, +;;; as published by the Free Software Foundation - version 3 ;;; or (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be ;;; useful, but WITHOUT ANY WARRANTY; without even the implied ;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -;;; PURPOSE. See the GNU General Public License in file COPYIN +;;; PURPOSE. See the GNU General Public License in file COPYING ;;; for more details. ;;; -;;; You should have received a copy of the GNU General Public +;;; You should have received a copy of the GNU General Public ;;; License along with this program; if not, write to the Free ;;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;;; Boston, MA 02111, USA. - +;;; +;;; This Emacs mode for GNU Go may work with Emacs 20.x but +;;; the graphical display requires Emacs 21.x. +;;; +;;; Maintainer: Thien-Thi Nguyen +;;; +;;; Rel:standalone-gnugo-el-2-2-8 +;;; ;;; Description: Run GNU Go in a buffer. ;;; Commentary: -;; This is an interface to GNU Go using the Go Text Protocol. Interaction -;; with the gnugo subprocess is synchronous except for `gnugo-get-move'. This -;; means you can use Emacs to do other things while gnugo is thinking about -;; its move. (Actually, all interaction with the subprocess is inhibited -;; during thinking time -- really, trying to distract your opponent is poor -;; sportsmanship. :-) +;; Playing +;; ------- +;; +;; This file provides the command `gnugo' which allows you to play the game of +;; go against the external program "gnugo" (http://www.gnu.org/software/gnugo) +;; in a dedicated Emacs buffer, or to resume a game in progress. NOTE: In +;; this file, to avoid confusion w/ elisp vars and funcs, we use the term "GNU +;; Go" to refer to the process object created by running the external program. +;; +;; At the start of a new game, you can pass additional command-line arguments +;; to GNU Go to specify level, board size, color, komi, handicap, etc. By +;; default GNU Go plays at level 10, board size 19, color white, and zero for +;; both komi and handicap. +;; +;; To play a stone, move the cursor to the desired vertice and type `SPC' or +;; `RET'; to pass, `P' (note: uppercase); to quit, `q'; to undo one of your +;; moves (as well as a possibly intervening move by GNU Go), `u'. To undo +;; back through an arbitrary stone that you played, place the cursor on a +;; stone and type `U' (note: uppercase). Other keybindings are described in +;; the `gnugo-board-mode' documentation, which you may view with the command +;; `describe-mode' (normally `C-h m') in that buffer. The buffer name shows +;; the last move and who is currently to play. Capture counts and other info +;; are shown on the mode line immediately following the major mode name. +;; +;; While GNU Go is pondering its next move, certain commands that rely on its +;; assistence will result in a "still waiting" error. Do not be alarmed; that +;; is normal. When it is your turn again you may retry the command. In the +;; meantime, you can use Emacs for other tasks, or start an entirely new game +;; with `C-u M-x gnugo'. (NOTE: A new game will slow down all games. :-) +;; +;; If GNU Go should crash during a game the mode line will show "no process". +;; Please report the event to the GNU Go maintainers so that they can improve +;; the program. +;; +;; This code was tested with: +;; - GNU Emacs: 21.3 / 21.3.50 (from CVS) +;; - GNU Go: 3.3.15 / 3.4 / 3.6-pre3 +;; +;; +;; Meta-Playing (aka Customizing) +;; ------------------------------ +;; +;; Customization is presently limited to +;; vars: `gnugo-program' +;; `gnugo-animation-string' +;; `gnugo-mode-line' +;; `gnugo-xpms' +;; normal hooks: `gnugo-board-mode-hook' +;; `gnugo-post-move-hook' +;; and the keymap: `gnugo-board-mode-map' +;; +;; The variable `gnugo-xpms' is a special case. To set it you need to load +;; gnugo-xpms.el (http://www.emacswiki.org) or some other library w/ congruent +;; interface. +;; ;; -;; Customization is presently limited to `gnugo-animation-string', q.v. +;; Meta-Meta-Playing (aka Hacking) +;; ------------------------------- ;; -;; This code was tested with Emacs 20.7 on a monochrome 80x24 terminal. +;; You may wish to first fix the bugs: +;; - `gnugo-toggle-dead-group' only half-complete; see docstring for details +;; - probably sgf handling is not 100% to spec (excuse: written w/o spec!) +;; - subprocess should provide scoring details, gnugo.el not yet blissful +;; - no move history and sgf tree re-init in the case of mid-session loadsgf +;; +;; Otherwise (we can live w/ some bugs), here are some ideas: +;; - talk GTP over the network +;; - "assist minor mode" (see gnugo-extra.el for work in progress) +;; - using assist minor mode, gnugo-v-gnugo (ibid) +;; - extract GNU Go Board mode and sgf stuff into sgf.el; make gnugo.el use it +;; - make gnugo (the external program) support query (read-only) thread +;; so as to be able to lift "still waiting" restriction +;; - alternatively, extend GNU Go Board mode to manage another subprocess +;; dedicated to analysis (no genmove) +;; - command `C' to add a comment to the sgf tree +;; - command `C-u =' to label a position +;; - sgf tree display, traversal (belongs in sgf.el); review game history +;; in another buffer; branch subgame tree at arbitrary point +;; - subgame branch matriculation (maturity: child leaves the family) +;; - dribble the sgf tree +;; - "undo undo undoing"; integrate Emacs undo, GTP undo, subgame branching +;; - make buffer name format configurable (but enforce uniqueness) +;; - more tilde escapes for `gnugo-mode-line' +;; - make veneration configurable +;; - make animation more configurable; lift same-color-stones-only +;; restriction; allow sequencing rather than lock-step; include sound +;; - [your hacking ideas here] +;; +;; Some gnugo.el hackers update http://www.emacswiki.org -- check it out! +;; +;; +;; History +;; ------- +;; +;; Originally gnugo.el was written to interact w/ "gnugo --mode text" and then +;; "gnugo --mode emacs" as the subprocess. Those versions were released as +;; 1.x, w/ x < 14. In Novemeber 2002, gnugo.el was changed to interact w/ +;; "gnugo --mode gtp", but was released as 1.14 through 1.26, even though the +;; proper versions should be 2.0.x for "--mode gtp", and 2.1.x for XPM image +;; support. (Sorry about the confusion.) +;; +;; Thus we arrive at at the current version. The first gnugo.el to be +;; released w/ a `gnugo-version' variable is "2.2.0". The versioning scheme +;; is strictly monotonically increasing numbers and dots, no letters or other +;; suffixes (and none of this even/odd crap). Here we list, aside from the +;; bugfixes, some of the notable changes introduced in each released version: +;; +;; 2.2.x -- uncluttered, letters and numbers hidden, board centered +;; buffer name shows last move and current player +;; mode-line customization (var `gnugo-mode-line') +;; new commands: `=', `h', `s', `F', `R', `l', `U' +;; program option customization (var `gnugo-program') +;; new hooks (vars `gnugo-post-move-hook', `gnugo-board-mode-hook') +;; multiple independent buffers/games +;; XPM set can be changed on the fly (global and/or local) +;; font-locking for "X", "O", "[xo]" +;; undo by N moves, by "move pair", or by board position +;; +;; +;; History Predicted +;; ----------------- +;; +;; If you are an elisp programmer, this section might not apply to you; +;; the GPL allows you to define the future of the code you receive under +;; its terms, as long as you do not deny that freedom to subsequent users. +;; +;; For users who are not elisp programmers, you can look forward to gradual +;; refinement in 2.x, splitting into gnugo.el and sgf.el in 3.x, and then +;; eventual merging into GNU Emacs for 4.x (if RMS gives it the thumbs-up). +;; If it is not accepted into Emacs at that time, a new maintainer will be +;; sought. In any case, it will no longer be bundled w/ ttn-pers-elisp. ;;; Code: (require 'cl) ; use the source luke! +(ignore-errors (require 'time-date)) ; for `time-subtract' + + +;;; ========================================================================== + +; Modifications to gnugo.el-2.2.8: +; +; * Grid display implemented +; * SGF handling improved +; * Undo and Redo related enhancements +; * Primitive edit mode +; * Regression view mode /usr/share/emacs/site-lisp/gnugo/gnugo.elc differs at offset '405' (Emacs/XEmacs v23 byte-compiled Lisp data) --- /tmp/tmp.XLHnylEyNe/old.IIn 2019-08-18 03:57:12.412101776 +0000 +++ /tmp/tmp.XLHnylEyNe/new.OeH 2019-08-18 03:57:12.412101776 +0000 @@ -1,33 +1,33 @@ 00000180 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b 3b |;;;;;;;;;;;;;;;;| -00000190 0a 0a 0a 28 72 65 71 75 69 72 65 20 27 63 6c 29 |...(require 'cl)| -000001a0 0a 23 40 33 31 20 4b 65 79 6d 61 70 20 66 6f 72 |.#@31 Keymap for| -000001b0 20 47 4e 55 20 47 6f 20 42 6f 61 72 64 20 6d 6f | GNU Go Board mo| -000001c0 64 65 2e 1f 0a 28 64 65 66 76 61 72 20 67 6e 75 |de...(defvar gnu| -000001d0 67 6f 2d 62 6f 61 72 64 2d 6d 6f 64 65 2d 6d 61 |go-board-mode-ma| -000001e0 70 20 6e 69 6c 20 28 23 24 20 2e 20 34 32 32 29 |p nil (#$ . 422)| -000001f0 29 0a 23 40 35 32 20 48 69 73 74 6f 72 79 20 6f |).#@52 History o| -00000200 66 20 61 64 64 69 74 69 6f 6e 61 6c 20 47 4e 55 |f additional GNU| -00000210 20 47 6f 20 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65 | Go command-line| -00000220 20 6f 70 74 69 6f 6e 73 2e 1f 0a 28 64 65 66 76 | options...(defv| -00000230 61 72 20 67 6e 75 67 6f 2d 6f 70 74 69 6f 6e 2d |ar gnugo-option-| -00000240 68 69 73 74 6f 72 79 20 6e 69 6c 20 28 23 24 20 |history nil (#$ | -00000250 2e 20 35 30 33 29 29 0a 23 40 33 30 34 20 2a 53 |. 503)).#@304 *S| -00000260 74 72 69 6e 67 20 77 68 6f 73 65 20 69 6e 64 69 |tring whose indi| -00000270 76 69 64 75 61 6c 20 63 68 61 72 61 63 74 65 72 |vidual character| -00000280 73 20 61 72 65 20 75 73 65 64 20 66 6f 72 20 61 |s are used for a| -00000290 6e 69 6d 61 74 69 6f 6e 2e 0a 53 70 65 63 69 66 |nimation..Specif| -000002a0 69 63 61 6c 6c 79 2c 20 74 68 65 20 60 67 6e 75 |ically, the `gnu| -000002b0 67 6f 2d 77 6f 72 6d 2d 73 74 6f 6e 65 73 27 20 |go-worm-stones' | -000002c0 61 6e 64 20 60 67 6e 75 67 6f 2d 64 72 61 67 6f |and `gnugo-drago| -000002d0 6e 2d 73 74 6f 6e 65 73 27 20 63 6f 6d 6d 61 6e |n-stones' comman| -000002e0 64 73 0a 72 65 6e 64 65 72 20 74 68 65 20 73 74 |ds.render the st| -000002f0 6f 6e 65 73 20 69 6e 20 74 68 65 69 72 20 72 65 |ones in their re| -00000300 73 70 65 63 74 69 76 65 20 28 63 6f 6d 70 75 74 |spective (comput| -00000310 65 64 29 20 67 72 6f 75 70 73 20 61 73 20 74 68 |ed) groups as th| -00000320 65 20 66 69 72 73 74 0a 63 68 61 72 61 63 74 65 |e first.characte| -00000330 72 20 69 6e 20 74 68 65 20 73 74 72 69 6e 67 2c |r in the string,| -00000340 20 74 68 65 6e 20 74 68 65 20 6e 65 78 74 2c 20 | then the next, | -00000350 61 6e 64 20 73 6f 20 6f 6e 20 75 6e 74 69 6c 20 |and so on until | -00000360 74 68 65 20 73 74 72 69 6e 67 20 28 61 6e 64 2f |the string (and/| -00000370 6f 72 0a 74 68 65 20 76 69 65 77 65 72 29 20 69 |or.the viewer) i| +00000190 0a 0a 0a 28 62 79 74 65 2d 63 6f 64 65 20 22 5c |...(byte-code "\| +000001a0 33 30 30 5c 33 30 31 21 5c 32 31 30 5c 33 30 32 |300\301!\210\302| +000001b0 31 0d 00 5c 33 30 30 5c 33 30 33 21 30 5c 32 30 |1..\300\303!0\20| +000001c0 37 5c 32 31 30 5c 33 30 34 5c 32 30 37 22 20 5b |7\210\304\207" [| +000001d0 72 65 71 75 69 72 65 20 63 6c 20 28 65 72 72 6f |require cl (erro| +000001e0 72 29 20 74 69 6d 65 2d 64 61 74 65 20 6e 69 6c |r) time-date nil| +000001f0 5d 20 32 29 0a 23 40 33 31 30 20 56 65 72 73 69 |] 2).#@310 Versi| +00000200 6f 6e 20 6f 66 20 67 6e 75 67 6f 2e 65 6c 20 63 |on of gnugo.el c| +00000210 75 72 72 65 6e 74 6c 79 20 6c 6f 61 64 65 64 2e |urrently loaded.| +00000220 0a 4e 6f 74 65 20 74 68 61 74 20 6d 6f 72 65 20 |.Note that more | +00000230 74 68 61 6e 20 74 77 6f 20 64 6f 74 73 20 69 6e |than two dots in| +00000240 20 74 68 65 20 76 61 6c 75 65 20 69 6e 64 69 63 | the value indic| +00000250 61 74 65 73 20 22 70 72 65 2d 72 65 6c 65 61 73 |ates "pre-releas| +00000260 65 22 2c 0a 6f 72 20 22 61 6c 70 68 61 22 20 6f |e",.or "alpha" o| +00000270 72 20 22 68 61 63 6b 65 72 73 2d 69 6e 76 69 74 |r "hackers-invit| +00000280 65 64 2d 61 6c 6c 2d 65 6c 73 65 2d 62 65 77 61 |ed-all-else-bewa| +00000290 72 65 22 3b 20 75 73 65 20 61 74 20 79 6f 75 72 |re"; use at your| +000002a0 20 6f 77 6e 20 72 69 73 6b 21 0a 54 68 65 20 6d | own risk!.The m| +000002b0 6f 72 65 20 64 6f 74 73 20 74 68 65 20 6d 6f 72 |ore dots the mor| +000002c0 65 20 63 6f 75 72 61 67 65 2f 66 6f 6f 6c 69 73 |e courage/foolis| +000002d0 68 6e 65 73 73 20 79 6f 75 20 6d 75 73 74 20 66 |hness you must f| +000002e0 69 6e 64 20 74 6f 20 63 6f 6e 74 69 6e 75 65 2e |ind to continue.| +000002f0 0a 53 65 65 20 73 6f 75 72 63 65 20 63 6f 64 65 |.See source code| +00000300 20 66 6f 72 20 61 20 68 69 73 74 6f 72 79 20 6f | for a history o| +00000310 66 20 77 68 61 74 20 6d 65 61 6e 73 20 77 68 61 |f what means wha| +00000320 74 20 76 65 72 73 69 6f 6e 2d 77 69 73 65 2e 1f |t version-wise..| +00000330 0a 28 64 65 66 63 6f 6e 73 74 20 67 6e 75 67 6f |.(defconst gnugo| +00000340 2d 76 65 72 73 69 6f 6e 20 22 32 2e 32 2e 38 2e |-version "2.2.8.| +00000350 62 35 22 20 28 23 24 20 2e 20 35 30 37 29 29 0a |b5" (#$ . 507)).| +00000360 23 40 34 30 30 20 2a 43 6f 6d 6d 61 6e 64 20 74 |#@400 *Command t| +00000370 6f 20 73 74 61 72 74 20 61 6e 20 65 78 74 65 72 |o start an exter| 00000380 /usr/share/xemacs/site-packages/lisp/gnugo/gnugo.el differs (Lisp/Scheme program, ASCII text) --- old//usr/share/xemacs/site-packages/lisp/gnugo/gnugo.el 2015-08-23 12:00:00.000000000 +0000 +++ new//usr/share/xemacs/site-packages/lisp/gnugo/gnugo.el 2015-08-23 12:00:00.000000000 +0000 @@ -1,53 +1,223 @@ -;;; ID: $Id: gnugo.el,v 1.1.1.1 2008/12/21 18:47:58 bump Exp $ +;;; gnugo.el ;;; ;;; This is GNU Go, a Go program. Contact gnugo@gnu.org, or see ;;; http://www.gnu.org/software/gnugo/ for more information. ;;; -;;; Copyright 1999, 2000, 2001 by the Free Software Foundation. +;;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007 +;;; and 2008 by the Free Software Foundation. ;;; -;;; This program is free software; you can redistribute it and/ +;;; This program is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU General Public License -;;; as published by the Free Software Foundation - version 3, +;;; as published by the Free Software Foundation - version 3 ;;; or (at your option) any later version. ;;; ;;; This program is distributed in the hope that it will be ;;; useful, but WITHOUT ANY WARRANTY; without even the implied ;;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -;;; PURPOSE. See the GNU General Public License in file COPYIN +;;; PURPOSE. See the GNU General Public License in file COPYING ;;; for more details. ;;; -;;; You should have received a copy of the GNU General Public +;;; You should have received a copy of the GNU General Public ;;; License along with this program; if not, write to the Free ;;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;;; Boston, MA 02111, USA. - +;;; +;;; This Emacs mode for GNU Go may work with Emacs 20.x but +;;; the graphical display requires Emacs 21.x. +;;; +;;; Maintainer: Thien-Thi Nguyen +;;; +;;; Rel:standalone-gnugo-el-2-2-8 +;;; ;;; Description: Run GNU Go in a buffer. ;;; Commentary: -;; This is an interface to GNU Go using the Go Text Protocol. Interaction -;; with the gnugo subprocess is synchronous except for `gnugo-get-move'. This -;; means you can use Emacs to do other things while gnugo is thinking about -;; its move. (Actually, all interaction with the subprocess is inhibited -;; during thinking time -- really, trying to distract your opponent is poor -;; sportsmanship. :-) +;; Playing +;; ------- +;; +;; This file provides the command `gnugo' which allows you to play the game of +;; go against the external program "gnugo" (http://www.gnu.org/software/gnugo) +;; in a dedicated Emacs buffer, or to resume a game in progress. NOTE: In +;; this file, to avoid confusion w/ elisp vars and funcs, we use the term "GNU +;; Go" to refer to the process object created by running the external program. +;; +;; At the start of a new game, you can pass additional command-line arguments +;; to GNU Go to specify level, board size, color, komi, handicap, etc. By +;; default GNU Go plays at level 10, board size 19, color white, and zero for +;; both komi and handicap. +;; +;; To play a stone, move the cursor to the desired vertice and type `SPC' or +;; `RET'; to pass, `P' (note: uppercase); to quit, `q'; to undo one of your +;; moves (as well as a possibly intervening move by GNU Go), `u'. To undo +;; back through an arbitrary stone that you played, place the cursor on a +;; stone and type `U' (note: uppercase). Other keybindings are described in +;; the `gnugo-board-mode' documentation, which you may view with the command +;; `describe-mode' (normally `C-h m') in that buffer. The buffer name shows +;; the last move and who is currently to play. Capture counts and other info +;; are shown on the mode line immediately following the major mode name. +;; +;; While GNU Go is pondering its next move, certain commands that rely on its +;; assistence will result in a "still waiting" error. Do not be alarmed; that +;; is normal. When it is your turn again you may retry the command. In the +;; meantime, you can use Emacs for other tasks, or start an entirely new game +;; with `C-u M-x gnugo'. (NOTE: A new game will slow down all games. :-) +;; +;; If GNU Go should crash during a game the mode line will show "no process". +;; Please report the event to the GNU Go maintainers so that they can improve +;; the program. +;; +;; This code was tested with: +;; - GNU Emacs: 21.3 / 21.3.50 (from CVS) +;; - GNU Go: 3.3.15 / 3.4 / 3.6-pre3 +;; +;; +;; Meta-Playing (aka Customizing) +;; ------------------------------ +;; +;; Customization is presently limited to +;; vars: `gnugo-program' +;; `gnugo-animation-string' +;; `gnugo-mode-line' +;; `gnugo-xpms' +;; normal hooks: `gnugo-board-mode-hook' +;; `gnugo-post-move-hook' +;; and the keymap: `gnugo-board-mode-map' +;; +;; The variable `gnugo-xpms' is a special case. To set it you need to load +;; gnugo-xpms.el (http://www.emacswiki.org) or some other library w/ congruent +;; interface. +;; ;; -;; Customization is presently limited to `gnugo-animation-string', q.v. +;; Meta-Meta-Playing (aka Hacking) +;; ------------------------------- ;; -;; This code was tested with Emacs 20.7 on a monochrome 80x24 terminal. +;; You may wish to first fix the bugs: +;; - `gnugo-toggle-dead-group' only half-complete; see docstring for details +;; - probably sgf handling is not 100% to spec (excuse: written w/o spec!) +;; - subprocess should provide scoring details, gnugo.el not yet blissful +;; - no move history and sgf tree re-init in the case of mid-session loadsgf +;; +;; Otherwise (we can live w/ some bugs), here are some ideas: +;; - talk GTP over the network +;; - "assist minor mode" (see gnugo-extra.el for work in progress) +;; - using assist minor mode, gnugo-v-gnugo (ibid) +;; - extract GNU Go Board mode and sgf stuff into sgf.el; make gnugo.el use it +;; - make gnugo (the external program) support query (read-only) thread +;; so as to be able to lift "still waiting" restriction +;; - alternatively, extend GNU Go Board mode to manage another subprocess +;; dedicated to analysis (no genmove) +;; - command `C' to add a comment to the sgf tree +;; - command `C-u =' to label a position +;; - sgf tree display, traversal (belongs in sgf.el); review game history +;; in another buffer; branch subgame tree at arbitrary point +;; - subgame branch matriculation (maturity: child leaves the family) +;; - dribble the sgf tree +;; - "undo undo undoing"; integrate Emacs undo, GTP undo, subgame branching +;; - make buffer name format configurable (but enforce uniqueness) +;; - more tilde escapes for `gnugo-mode-line' +;; - make veneration configurable +;; - make animation more configurable; lift same-color-stones-only +;; restriction; allow sequencing rather than lock-step; include sound +;; - [your hacking ideas here] +;; +;; Some gnugo.el hackers update http://www.emacswiki.org -- check it out! +;; +;; +;; History +;; ------- +;; +;; Originally gnugo.el was written to interact w/ "gnugo --mode text" and then +;; "gnugo --mode emacs" as the subprocess. Those versions were released as +;; 1.x, w/ x < 14. In Novemeber 2002, gnugo.el was changed to interact w/ +;; "gnugo --mode gtp", but was released as 1.14 through 1.26, even though the +;; proper versions should be 2.0.x for "--mode gtp", and 2.1.x for XPM image +;; support. (Sorry about the confusion.) +;; +;; Thus we arrive at at the current version. The first gnugo.el to be +;; released w/ a `gnugo-version' variable is "2.2.0". The versioning scheme +;; is strictly monotonically increasing numbers and dots, no letters or other +;; suffixes (and none of this even/odd crap). Here we list, aside from the +;; bugfixes, some of the notable changes introduced in each released version: +;; +;; 2.2.x -- uncluttered, letters and numbers hidden, board centered +;; buffer name shows last move and current player +;; mode-line customization (var `gnugo-mode-line') +;; new commands: `=', `h', `s', `F', `R', `l', `U' +;; program option customization (var `gnugo-program') +;; new hooks (vars `gnugo-post-move-hook', `gnugo-board-mode-hook') +;; multiple independent buffers/games +;; XPM set can be changed on the fly (global and/or local) +;; font-locking for "X", "O", "[xo]" +;; undo by N moves, by "move pair", or by board position +;; +;; +;; History Predicted +;; ----------------- +;; +;; If you are an elisp programmer, this section might not apply to you; +;; the GPL allows you to define the future of the code you receive under +;; its terms, as long as you do not deny that freedom to subsequent users. +;; +;; For users who are not elisp programmers, you can look forward to gradual +;; refinement in 2.x, splitting into gnugo.el and sgf.el in 3.x, and then +;; eventual merging into GNU Emacs for 4.x (if RMS gives it the thumbs-up). +;; If it is not accepted into Emacs at that time, a new maintainer will be +;; sought. In any case, it will no longer be bundled w/ ttn-pers-elisp. ;;; Code: (require 'cl) ; use the source luke! +(ignore-errors (require 'time-date)) ; for `time-subtract' + + +;;; ========================================================================== + +; Modifications to gnugo.el-2.2.8: +; +; * Grid display implemented +; * SGF handling improved +; * Undo and Redo related enhancements +; * Primitive edit mode +; * Regression view mode /usr/share/xemacs/site-packages/lisp/gnugo/gnugo.elc differs at offset '458' (Emacs/XEmacs v20 byte-compiled Lisp data) --- /tmp/tmp.XLHnylEyNe/old.7SL 2019-08-18 03:57:12.452102040 +0000 +++ /tmp/tmp.XLHnylEyNe/new.4tl 2019-08-18 03:57:12.452102040 +0000 @@ -1,33 +1,33 @@ -000001c0 20 20 20 20 20 20 20 20 20 0a 28 72 65 71 75 69 | .(requi| -000001d0 72 65 20 27 63 6c 29 0a 23 40 33 31 20 4b 65 79 |re 'cl).#@31 Key| -000001e0 6d 61 70 20 66 6f 72 20 47 4e 55 20 47 6f 20 42 |map for GNU Go B| -000001f0 6f 61 72 64 20 6d 6f 64 65 2e 1f 0a 28 64 65 66 |oard mode...(def| -00000200 76 61 72 20 67 6e 75 67 6f 2d 62 6f 61 72 64 2d |var gnugo-board-| -00000210 6d 6f 64 65 2d 6d 61 70 20 6e 69 6c 20 28 23 24 |mode-map nil (#$| -00000220 20 2e 20 34 39 35 29 29 0a 23 40 35 32 20 48 69 | . 495)).#@52 Hi| -00000230 73 74 6f 72 79 20 6f 66 20 61 64 64 69 74 69 6f |story of additio| -00000240 6e 61 6c 20 47 4e 55 20 47 6f 20 63 6f 6d 6d 61 |nal GNU Go comma| -00000250 6e 64 2d 6c 69 6e 65 20 6f 70 74 69 6f 6e 73 2e |nd-line options.| -00000260 1f 0a 28 64 65 66 76 61 72 20 67 6e 75 67 6f 2d |..(defvar gnugo-| -00000270 6f 70 74 69 6f 6e 2d 68 69 73 74 6f 72 79 20 6e |option-history n| -00000280 69 6c 20 28 23 24 20 2e 20 35 37 36 29 29 0a 23 |il (#$ . 576)).#| -00000290 40 33 30 34 20 2a 53 74 72 69 6e 67 20 77 68 6f |@304 *String who| -000002a0 73 65 20 69 6e 64 69 76 69 64 75 61 6c 20 63 68 |se individual ch| -000002b0 61 72 61 63 74 65 72 73 20 61 72 65 20 75 73 65 |aracters are use| -000002c0 64 20 66 6f 72 20 61 6e 69 6d 61 74 69 6f 6e 2e |d for animation.| -000002d0 0a 53 70 65 63 69 66 69 63 61 6c 6c 79 2c 20 74 |.Specifically, t| -000002e0 68 65 20 60 67 6e 75 67 6f 2d 77 6f 72 6d 2d 73 |he `gnugo-worm-s| -000002f0 74 6f 6e 65 73 27 20 61 6e 64 20 60 67 6e 75 67 |tones' and `gnug| -00000300 6f 2d 64 72 61 67 6f 6e 2d 73 74 6f 6e 65 73 27 |o-dragon-stones'| -00000310 20 63 6f 6d 6d 61 6e 64 73 0a 72 65 6e 64 65 72 | commands.render| -00000320 20 74 68 65 20 73 74 6f 6e 65 73 20 69 6e 20 74 | the stones in t| -00000330 68 65 69 72 20 72 65 73 70 65 63 74 69 76 65 20 |heir respective | -00000340 28 63 6f 6d 70 75 74 65 64 29 20 67 72 6f 75 70 |(computed) group| -00000350 73 20 61 73 20 74 68 65 20 66 69 72 73 74 0a 63 |s as the first.c| -00000360 68 61 72 61 63 74 65 72 20 69 6e 20 74 68 65 20 |haracter in the | -00000370 73 74 72 69 6e 67 2c 20 74 68 65 6e 20 74 68 65 |string, then the| -00000380 20 6e 65 78 74 2c 20 61 6e 64 20 73 6f 20 6f 6e | next, and so on| -00000390 20 75 6e 74 69 6c 20 74 68 65 20 73 74 72 69 6e | until the strin| -000003a0 67 20 28 61 6e 64 2f 6f 72 0a 74 68 65 20 76 69 |g (and/or.the vi| -000003b0 65 77 65 72 29 20 69 73 20 65 78 68 61 75 73 74 |ewer) is exhaust| +000001c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | +000001d0 20 20 20 20 20 20 0a 28 62 79 74 65 2d 63 6f 64 | .(byte-cod| +000001e0 65 20 22 c0 c1 21 88 c2 c3 c4 8f 87 22 20 5b 72 |e "..!......" [r| +000001f0 65 71 75 69 72 65 20 63 6c 20 6e 69 6c 20 28 62 |equire cl nil (b| +00000200 79 74 65 2d 63 6f 64 65 20 22 c0 c1 21 87 22 20 |yte-code "..!." | +00000210 5b 72 65 71 75 69 72 65 20 74 69 6d 65 2d 64 61 |[require time-da| +00000220 74 65 5d 20 32 29 20 28 28 65 72 72 6f 72 29 29 |te] 2) ((error))| +00000230 5d 20 33 29 0a 23 40 33 31 30 20 56 65 72 73 69 |] 3).#@310 Versi| +00000240 6f 6e 20 6f 66 20 67 6e 75 67 6f 2e 65 6c 20 63 |on of gnugo.el c| +00000250 75 72 72 65 6e 74 6c 79 20 6c 6f 61 64 65 64 2e |urrently loaded.| +00000260 0a 4e 6f 74 65 20 74 68 61 74 20 6d 6f 72 65 20 |.Note that more | +00000270 74 68 61 6e 20 74 77 6f 20 64 6f 74 73 20 69 6e |than two dots in| +00000280 20 74 68 65 20 76 61 6c 75 65 20 69 6e 64 69 63 | the value indic| +00000290 61 74 65 73 20 22 70 72 65 2d 72 65 6c 65 61 73 |ates "pre-releas| +000002a0 65 22 2c 0a 6f 72 20 22 61 6c 70 68 61 22 20 6f |e",.or "alpha" o| +000002b0 72 20 22 68 61 63 6b 65 72 73 2d 69 6e 76 69 74 |r "hackers-invit| +000002c0 65 64 2d 61 6c 6c 2d 65 6c 73 65 2d 62 65 77 61 |ed-all-else-bewa| +000002d0 72 65 22 3b 20 75 73 65 20 61 74 20 79 6f 75 72 |re"; use at your| +000002e0 20 6f 77 6e 20 72 69 73 6b 21 0a 54 68 65 20 6d | own risk!.The m| +000002f0 6f 72 65 20 64 6f 74 73 20 74 68 65 20 6d 6f 72 |ore dots the mor| +00000300 65 20 63 6f 75 72 61 67 65 2f 66 6f 6f 6c 69 73 |e courage/foolis| +00000310 68 6e 65 73 73 20 79 6f 75 20 6d 75 73 74 20 66 |hness you must f| +00000320 69 6e 64 20 74 6f 20 63 6f 6e 74 69 6e 75 65 2e |ind to continue.| +00000330 0a 53 65 65 20 73 6f 75 72 63 65 20 63 6f 64 65 |.See source code| +00000340 20 66 6f 72 20 61 20 68 69 73 74 6f 72 79 20 6f | for a history o| +00000350 66 20 77 68 61 74 20 6d 65 61 6e 73 20 77 68 61 |f what means wha| +00000360 74 20 76 65 72 73 69 6f 6e 2d 77 69 73 65 2e 1f |t version-wise..| +00000370 0a 28 64 65 66 63 6f 6e 73 74 20 67 6e 75 67 6f |.(defconst gnugo| +00000380 2d 76 65 72 73 69 6f 6e 20 22 32 2e 32 2e 38 2e |-version "2.2.8.| +00000390 62 35 22 20 28 23 24 20 2e 20 35 37 36 29 29 0a |b5" (#$ . 576)).| +000003a0 23 40 34 30 30 20 2a 43 6f 6d 6d 61 6e 64 20 74 |#@400 *Command t| +000003b0 6f 20 73 74 61 72 74 20 61 6e 20 65 78 74 65 72 |o start an exter| 000003c0 overalldiffered=1 (not bit-by-bit identical) overall=1