[elpa] branch externals/chess updated (ce0e128 -> cafc796)

2014-06-16 Thread Mario Lang
mlang pushed a change to branch externals/chess
in repository elpa.

  from  ce0e128   (chess-display-mode-map): Bind DEL to 
`chess-input-shortcut-delete
   new  cafc796   * chess-input.el (chess-input-display-moves): Highlight 
valid target squares if `chess-display-highlight-legal' is non-nil. 
(chess-input-shortcut): Redraw board to remove highlights if a ply was 
submitted and `chess-display-highlight-legal' is non-nil.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ChangeLog  |5 +
 chess-input.el |   22 ++
 2 files changed, 19 insertions(+), 8 deletions(-)



[elpa] 01/01: * chess-input.el (chess-input-display-moves): Highlight valid target squares if `chess-display-highlight-legal' is non-nil. (chess-input-shortcut): Redraw board to remove highlights if a

2014-06-16 Thread Mario Lang
mlang pushed a commit to branch externals/chess
in repository elpa.

commit cafc796e65de08c84583a53dfd9e4962e566f5cc
Author: Mario Lang 
Date:   Mon Jun 16 10:09:43 2014 +0200

* chess-input.el (chess-input-display-moves): Highlight valid target
squares if `chess-display-highlight-legal' is non-nil.
(chess-input-shortcut): Redraw board to remove highlights if a ply
was submitted and `chess-display-highlight-legal' is non-nil.
---
 ChangeLog  |5 +
 chess-input.el |   22 ++
 2 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cbb7a13..ec4d840 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-16  Mario Lang  
 
+   * chess-input.el (chess-input-display-moves): Highlight valid target
+   squares if `chess-display-highlight-legal' is non-nil.
+   (chess-input-shortcut): Redraw board to remove highlights if a ply
+   was submitted and `chess-display-highlight-legal' is non-nil.
+
* chess-display.el (chess-display-move): Fix repainting when playing
against the internal engine (AI) which runs off the `post-move' game
event by adding a `redisplay' call just before the `post-move' emision.
diff --git a/chess-input.el b/chess-input.el
index ce7b348..7d5c946 100644
--- a/chess-input.el
+++ b/chess-input.el
@@ -69,14 +69,18 @@
   (t (setq i (1+ i) x (1+ x)))
 ply))
 
-(defsubst chess-input-display-moves (&optional move-list)
-  (if (> (length chess-input-move-string) 0)
-  (message "[%s] %s" chess-input-move-string
-  (mapconcat #'chess-ply-to-algebraic
- (or move-list
- (delq nil (mapcar 'chess-input-test-move
-   (cdr chess-input-moves
- " "
+(defun chess-input-display-moves (&optional move-list)
+  (unless move-list
+(setq chess-input-test-move
+ (delq nil (mapcar #'chess-input-test-move (cdr chess-input-moves)
+  (when chess-display-highlight-legal
+(chess-display-redraw nil))
+  (when (> (length chess-input-move-string) 0)
+(when chess-display-highlight-legal
+  (apply #'chess-display-highlight
+nil (cl-delete-duplicates (mapcar #'chess-ply-target move-list
+(message "[%s] %s" chess-input-move-string
+(mapconcat #'chess-ply-to-algebraic move-list " "
 
 (defun chess-input-shortcut-delete ()
   (interactive)
@@ -144,6 +148,8 @@
(downcase (chess-ply-to-algebraic (cadr moves
   (setq moves (cdr moves
   (funcall chess-input-move-function nil (car moves))
+  (when chess-display-highlight-legal
+   (chess-display-redraw nil))
   (setq chess-input-move-string nil
chess-input-moves nil
chess-input-moves-pos nil))



[elpa] 01/01: [gnugo int] Use "%F" and "%T".

2014-06-16 Thread Thien-Thi Nguyen
ttn pushed a commit to branch master
in repository elpa.

commit 8a2d60fa192b13776177bbae17dc85135f2a62b0
Author: Thien-Thi Nguyen 
Date:   Mon Jun 16 14:19:24 2014 +0200

[gnugo int] Use "%F" and "%T".

* packages/gnugo/gnugo.el
(gnugo-display-final-score, gnugo) ...here,
in ‘format-time-string’ calls, instead of the
more verbose "%Y-%m-%d" and "%H:%M:%S", respectively.
---
 packages/gnugo/gnugo.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 1713356..71164e5 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1907,7 +1907,7 @@ to the last move, as a comment."
 (cl-flet
 ((yep (pretty moment)
   (push (format-time-string
- (concat pretty ": %Y-%m-%d %H:%M:%S %z\n")
+ (concat pretty ": %F %T %z\n")
  moment)
 blurb)))
   (yep "Game start" beg)
@@ -2279,7 +2279,7 @@ See `gnugo-board-mode' for a full list of commands."
   (when (and (zerop handicap) actually)
 (setq handicap (string-to-number (cadr actually)
 (r! :SZ board-size
-:DT (format-time-string "%Y-%m-%d")
+:DT (format-time-string "%F")
 :RU (if (member "--chinese-rules" args)
 "Chinese"
   "Japanese")



[elpa] branch master updated (69014aa -> 8a2d60f)

2014-06-16 Thread Thien-Thi Nguyen
ttn pushed a change to branch master
in repository elpa.

  from  69014aa   * company/company-capf.el: Don't ignore things like 
semantic-capf.
   new  8a2d60f   [gnugo int] Use "%F" and "%T".

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/gnugo/gnugo.el |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)



[elpa] 01/02: * chess-ply.el (chess-legal-plies): Make :file keyword usable if :color is specified.

2014-06-16 Thread Mario Lang
mlang pushed a commit to branch externals/chess
in repository elpa.

commit eecd6f4f1a3ff3e955b62871deb9701d656f6e3f
Author: Mario Lang 
Date:   Mon Jun 16 15:22:54 2014 +0200

* chess-ply.el (chess-legal-plies): Make :file keyword usable if :color
is specified.
---
 ChangeLog|3 +++
 chess-ply.el |4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ec4d840..c7c40c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-06-16  Mario Lang  
 
+   * chess-ply.el (chess-legal-plies): Make :file keyword usable if :color
+   is specified.
+
* chess-input.el (chess-input-display-moves): Highlight valid target
squares if `chess-display-highlight-legal' is non-nil.
(chess-input-shortcut): Redraw board to remove highlights if a ply
diff --git a/chess-ply.el b/chess-ply.el
index cf463cb..fd5dc21 100644
--- a/chess-ply.el
+++ b/chess-ply.el
@@ -305,7 +305,7 @@ KEYWORDS allowed are:
   :any   return t if any piece can move at all
   :color 
   :piece 
-  :file  [can only be used if :piece is present]
+  :file  [:piece or :color must be present]
   :index 
   :target 
   :candidates 
@@ -358,7 +358,7 @@ position object passed in."
 (let (candidates)
   (dotimes (rank 8)
 (setq pos (chess-rf-to-index rank file))
-(if (chess-pos-piece-p position pos piece)
+(if (chess-pos-piece-p position pos (or piece color))
 (push pos candidates)))
   candidates))
(t



[elpa] branch externals/chess updated (cafc796 -> 642abf9)

2014-06-16 Thread Mario Lang
mlang pushed a change to branch externals/chess
in repository elpa.

  from  cafc796   * chess-input.el (chess-input-display-moves): Highlight 
valid target squares if `chess-display-highlight-legal' is non-nil. 
(chess-input-shortcut): Redraw board to remove highlights if a ply was 
submitted and `chess-display-highlight-legal' is non-nil.
   new  eecd6f4   * chess-ply.el (chess-legal-plies): Make :file keyword 
usable if :color is specified.
   new  642abf9   * chess-input.el (chess-input-notation-type): New 
variable. (chess-input-test-move, chess-input-display-moves): Use it. 
(chess-input-shortcut): Generate initial ply list for numeric notation.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ChangeLog  |8 
 chess-input.el |   26 ++
 chess-ply.el   |4 ++--
 3 files changed, 32 insertions(+), 6 deletions(-)



[elpa] 02/02: * chess-input.el (chess-input-notation-type): New variable. (chess-input-test-move, chess-input-display-moves): Use it. (chess-input-shortcut): Generate initial ply list for numeric nota

2014-06-16 Thread Mario Lang
mlang pushed a commit to branch externals/chess
in repository elpa.

commit 642abf9348814ce7ec217fcba99df919ac16c9e7
Author: Mario Lang 
Date:   Mon Jun 16 15:50:46 2014 +0200

* chess-input.el (chess-input-notation-type): New variable.
(chess-input-test-move, chess-input-display-moves): Use it.
(chess-input-shortcut): Generate initial ply list for numeric
notation.
---
 ChangeLog  |5 +
 chess-input.el |   26 ++
 2 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c7c40c3..654731e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-16  Mario Lang  
 
+   * chess-input.el (chess-input-notation-type): New variable.
+   (chess-input-test-move, chess-input-display-moves): Use it.
+   (chess-input-shortcut): Generate initial ply list for numeric
+   notation.
+
* chess-ply.el (chess-legal-plies): Make :file keyword usable if :color
is specified.
 
diff --git a/chess-input.el b/chess-input.el
index 7d5c946..f3cc893 100644
--- a/chess-input.el
+++ b/chess-input.el
@@ -48,9 +48,14 @@
 (make-variable-buffer-local 'chess-input-position-function)
 (make-variable-buffer-local 'chess-input-move-function)
 
+(defcustom chess-input-notation-type :san
+  "Define the notation type to use for move input."
+  :type '(choice (const :tag "Standard (short) algebraic notation" :san)
+(const :tag "Numeric notation" :numeric)))
+
 (defun chess-input-test-move (ply)
   "Return the given PLY if it matches the user's current input."
-  (let* ((move (chess-ply-to-algebraic ply))
+  (let* ((move (chess-ply-to-algebraic ply chess-input-notation-type))
 (i 0) (x 0) (l (length move))
 (xl (length chess-input-move-string)))
 (unless (or (and (equal (downcase chess-input-move-string) "ok")
@@ -71,7 +76,7 @@
 
 (defun chess-input-display-moves (&optional move-list)
   (unless move-list
-(setq chess-input-test-move
+(setq move-list
  (delq nil (mapcar #'chess-input-test-move (cdr chess-input-moves)
   (when chess-display-highlight-legal
 (chess-display-redraw nil))
@@ -80,7 +85,9 @@
   (apply #'chess-display-highlight
 nil (cl-delete-duplicates (mapcar #'chess-ply-target move-list
 (message "[%s] %s" chess-input-move-string
-(mapconcat #'chess-ply-to-algebraic move-list " "
+(mapconcat (lambda (ply)
+ (chess-ply-to-algebraic ply 
chess-input-notation-type))
+   move-list " "
 
 (defun chess-input-shortcut-delete ()
   (interactive)
@@ -134,7 +141,18 @@
  (function
   (lambda (left right)
 (string-lessp (chess-ply-to-algebraic left)
-  (chess-ply-to-algebraic right))
+  (chess-ply-to-algebraic right)))
+   (if (and (>= char ?1) (<= char ?8))
+   (setq chess-input-moves-pos position
+ chess-input-moves
+ (cons
+  char
+  (sort
+   (chess-legal-plies position :color color :file (- char ?1))
+   (function
+(lambda (left right)
+  (string-lessp (chess-ply-to-algebraic left)
+(chess-ply-to-algebraic right)))
   (let ((moves (delq nil (mapcar 'chess-input-test-move
 (cdr chess-input-moves)
 (cond



[elpa] branch externals/chess updated (642abf9 -> 965e2be)

2014-06-16 Thread Mario Lang
mlang pushed a change to branch externals/chess
in repository elpa.

  from  642abf9   * chess-input.el (chess-input-notation-type): New 
variable. (chess-input-test-move, chess-input-display-moves): Use it. 
(chess-input-shortcut): Generate initial ply list for numeric notation.
   new  965e2be   Work on the manual.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 chess.info |  206 
 chess.texi |   54 +---
 2 files changed, 168 insertions(+), 92 deletions(-)



[elpa] 01/01: Work on the manual.

2014-06-16 Thread Mario Lang
mlang pushed a commit to branch externals/chess
in repository elpa.

commit 965e2be5838a5a8cfac3e63d9e6ff686d7cd0114
Author: Mario Lang 
Date:   Mon Jun 16 20:59:44 2014 +0200

Work on the manual.
---
 chess.info |  206 
 chess.texi |   54 +---
 2 files changed, 168 insertions(+), 92 deletions(-)

diff --git a/chess.info b/chess.info
index 7bd37ca..42814be 100644
--- a/chess.info
+++ b/chess.info
@@ -529,10 +529,28 @@ File: chess.info,  Node: Creating plies,  Next: Ply 
details,  Prev: Plies,  Up:
  Return a list of all legal plies in POSITION.  KEYWORDS allowed
  are:
 
- :any return t if any piece can move at all :color  :piece
-  :file  [can only be used if :piece
- is present] :index  :target  :candidates 
+ ‘:any’
+  Return ‘t’ if any piece can move at all.
+
+ ‘:color’
+  If ‘t’, return plies for white, if ‘nil’, return plies for
+  black.
+
+ ‘:piece’
+  Return plies for a specific piece (a character).
+
+ ‘:file’
+  Given a file number (0-7), return plies for any piece or color
+  present on that file.  ‘:piece’ or ‘:color’ must be present.
+
+ ‘:index’
+  Return plies for the piece at INDEX.
+
+ ‘:target’
+  Return plies that go to a specific coordinate.
+
+ ‘:candidates’
+  If provided, only consider these source coordinates.
 
  These will constrain the plies generated to those matching the
  above criteria.
@@ -1332,9 +1350,13 @@ File: chess.info,  Node: Basic operations,  Next: 
Selecting pieces with the keyb
  Resign the current game (‘chess-display-resign’).
 
 ‘M-w’
+‘C-u M-w’
  Copy the currently displayed position to the kill ring as a FEN
  string (‘chess-display-kill-board’).
 
+ With prefix argument, copy the current game in PGN to the kill
+ ring.
+
 ‘C-y’
  Set the current display position via a FEN string from the kill
  ring (‘chess-display-yank-board’).
@@ -1532,7 +1554,7 @@ File: chess.info,  Node: Engines,  Next: Chess Session,  
Prev: Chessboard displa
 4 Engines
 *
 
-Engines are the representation of an opponent in Chess.  THe main type
+Engines are the representation of an opponent in Chess.  The main type
 of engine interfaces with an external chess program.  However, there can
 be other uses for engine objects, such as providing networked engined
 for playing with opponent over different types of transports.
@@ -1540,6 +1562,7 @@ for playing with opponent over different types of 
transports.
 * Menu:
 
 * Common functions::
+* The Null Engine::
 * AI::
 * Crafty::
 * Fruit::
@@ -1550,7 +1573,7 @@ for playing with opponent over different types of 
transports.
 * Stockfish::
 
 
-File: chess.info,  Node: Common functions,  Next: AI,  Prev: Engines,  Up: 
Engines
+File: chess.info,  Node: Common functions,  Next: The Null Engine,  Prev: 
Engines,  Up: Engines
 
 4.1 Common functions
 
@@ -1577,9 +1600,25 @@ File: chess.info,  Node: Common functions,  Next: AI,  
Prev: Engines,  Up: Engin
  handler can take care of the data.
 
 
-File: chess.info,  Node: AI,  Next: Crafty,  Prev: Common functions,  Up: 
Engines
+File: chess.info,  Node: The Null Engine,  Next: AI,  Prev: Common functions,  
Up: Engines
+
+4.2 The Null Engine
+===
 
-4.2 AI
+The most basic engine module is ‘chess-none’, a stub module that does
+nothing.  This is useful for a game of chess against another human,
+where both use the same computer to enter moves and display the current
+chess position.
+
+   It can also be useful for creating FEN strings of specific positions.
+
+   To bring up a chessboard with no active engine attached, use ‘C-u M-x
+chess  none ’.
+
+
+File: chess.info,  Node: AI,  Next: Crafty,  Prev: The Null Engine,  Up: 
Engines
+
+4.3 AI
 ==
 
 The AI engine module defines a pure Emacs Lisp implementation of an
@@ -1607,7 +1646,7 @@ entry point.
 
 File: chess.info,  Node: Crafty,  Next: Fruit,  Prev: AI,  Up: Engines
 
-4.3 Crafty
+4.4 Crafty
 ==
 
 "Crafty" is a chess program written by Michael Byrne, UAB professor Dr.
@@ -1628,7 +1667,7 @@ play against Crafty by invoking ‘C-u M-x chess  
crafty ’.
 
 File: chess.info,  Node: Fruit,  Next: Glaurung,  Prev: Crafty,  Up: Engines
 
-4.4 Fruit
+4.5 Fruit
 =
 
 "Fruit" is a chess engine developed by Fabien Letouzey.  It was
@@ -1652,7 +1691,7 @@ play against Fruit by invoking ‘C-u M-x chess  fruit 
’.
 
 File: chess.info,  Node: Glaurung,  Next: GNU Chess,  Prev: Fruit,  Up: Engines
 
-4.5 Glaurung
+4.6 Glaurung
 
 
 "Glaurung" is another freely distributed strong computer chess engine.
@@ -1670,7 +1709,7 @@ play against Glaurung by invoking ‘C-u M-x chess  
glaurung ’.
 
 File: chess.info,  Node: GNU Chess,  Next: Phalanx,  Prev: Glaurung,  Up: 
Engines
 
-4.6 GNU Chess
+4.7 GNU Chess
 =
 
 "GNU Chess" (http://gnu.or

[elpa] branch externals/chess updated (965e2be -> 5b4adfc)

2014-06-16 Thread Mario Lang
mlang pushed a change to branch externals/chess
in repository elpa.

  from  965e2be   Work on the manual.
   new  5b4adfc   * chess.texi: Include FDL.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "adds" were already present in the repository and have only
been added to this reference.


Summary of changes:
 chess.info |  689 
 chess.texi |   54 +++--
 fdl.texi   |  505 
 3 files changed, 1135 insertions(+), 113 deletions(-)
 create mode 100644 fdl.texi