all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Emacs chess.el help again to connect to FICS
@ 2009-07-25 22:38 rpd
  2009-07-26 14:40 ` rpd
  0 siblings, 1 reply; 7+ messages in thread
From: rpd @ 2009-07-25 22:38 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi 
I have been unsuccessfully trying to get my emacs chess module to connect to
FICS chess server.
I would be very grateful if someone could help me get the right .emacs code
to get this to work.
Presently with my .emacs code I get this error after I C-u M-x chess REt ics
RET:

Debugger entered--Lisp error: (error "Unknown host
\"irc.openprojects.net\"")
  make-network-process(:name "*chess-irc*" :buffer #<buffer  *chess-irc*<2>>
:host "irc.openprojects.net" :service 6667)
  open-network-stream("*chess-irc*" #<buffer  *chess-irc*<2>>
"irc.openprojects.net" 6667)
  (setq chess-irc-engine engine proc (open-network-stream "*chess-irc*"
(current-buffer) chess-irc-server chess-irc-port))
  (save-current-buffer (set-buffer (generate-new-buffer " *chess-irc*"))
(setq chess-irc-engine engine proc (open-network-stream "*chess-irc*" ...
chess-irc-server chess-irc-port)) (chess-message (quote irc-logging-in)
chess-irc-nick) (when (and proc ... ...) (process-send-string proc ...)
(process-send-string proc ...) (set-process-filter proc ...)
(set-process-buffer proc ...) (set-marker ... ...) (chess-message ...)))
  (with-current-buffer (generate-new-buffer " *chess-irc*") (setq
chess-irc-engine engine proc (open-network-stream "*chess-irc*" ...
chess-irc-server chess-irc-port)) (chess-message (quote irc-logging-in)
chess-irc-nick) (when (and proc ... ...) (process-send-string proc ...)
(process-send-string proc ...) (set-process-filter proc ...)
(set-process-buffer proc ...) (set-marker ... ...) (chess-message ...)))
  (let ((engine ...) proc) (with-current-buffer (generate-new-buffer "
*chess-irc*") (setq chess-irc-engine engine proc ...) (chess-message ...
chess-irc-nick) (when ... ... ... ... ... ... ...)) (setq chess-irc-process
proc))
  (cond ((eq event ...) (chess-message ... chess-irc-server chess-irc-port)
(let ... ... ...) t) ((eq event ...) (setq chess-irc-opponent ...)
(chess-network-handler ... chess-irc-opponent)) ((eq event ...)
(chess-engine-send nil "quit") (process-send-string chess-irc-process "QUIT
:Goodbye\n") (kill-buffer ...)) ((eq event ...) (process-send-string
chess-irc-process ...)) (t (apply ... game event args)))
  (if chess-engine-handling-event nil (cond (... ... ... t) (... ... ...)
(... ... ... ...) (... ...) (t ...)))

++++ a whole load more!

My .emacs chess.el code is a mess but it does let me play chess against
GNUchess or Crafty engines (& displays the board/pieces-see my earlier post
for help with this!). I also still need to get chess-puzzle mode working.
Here is my chess .emacs code:

;;;;=========
;;;Play CHESS with chess.el module-load directories & files:
(add-to-list 'load-path "C:\\Users\\Dad\\Emacs\\chess")
(add-to-list 'load-path "C:\\Users\\Dad\\Emacs")
(add-to-list 'load-path "C:\\Users\\Dad\\Emacs\\xboard .xpm pieces size
grouped\\xboard pieces size29 emacs")
(add-to-list 'load-path  "C:\\Users\\Dad\\Emacs\\xboard-4.2.7\\pixmaps")
(add-to-list 'load-path  "C:\\Users\\Dad\\Emacs\\1001bwtc.pgn")
(add-to-list 'load-path "C:\\Users\\Dad\\Emacs\\pieces small")
(autoload 'chess "C:\\Users\\Dad\\Emacs\\chess\\chess.el" "Play a game of
chess" t)
(autoload 'chess-puzzle "C:\\Users\\Dad\\Emacs\\chess\\chess-puzzle.el" 
"Pick a random puzzle from FILE, and solve it against the default engine."
t)
(autoload 'chess-ics "C:\\Users\\Dad\\Emacs\\chess\\chess-ics.el"  "Connect
to an Internet Chess Server." t)
(autoload 'chess-images "C:\\Users\\Dad\\Emacs\\chess"  "chess-images." t)

;;(require 'chess-puzzle)
;========

;;;;=========================================
;;; From EmacsWikiChess.el:
;;;The chess.el project also contains an unrelated implementation of ICS
communication, 
;;;called chess-ics.el. To startup chess.el against a ICS server, use C-u
M-x chess RET ics RET
;============================

;;;;============================
;;From Lennart Bergmann Nabble/Gnuforum reply to my help chess.el error
chess-create error in Emacs
;suggest M-:(require 'cl)- I try this in .emacs file & it works (it is
needed)!
(require 'cl)
;===============================================

;;;;==============================================
;;;Code to set chess engine & display parameters-this is needed!

 (setq
;;chess-images-default-size 40
;;chess-ics-server-list '(("freechess.org" 5000 "themoveR"))
chess-default-engine 'chess-gnuchess
;;chess-default-engine 'chess-Numpty_0.4pr
 chess-images-separate-frame nil)
;;chess-images-highlight-color "blue"
;;chess-display-highlight)
;; chess-display-popup nil)
 
;; chess-display-highlight-legal nil)
;===================

;;;;=====================================================
;;;Some code I tried but didn't work -but I have left here for some reason!
;;(setq
;;chess-default-display
;;)
;;(custom-set-variables
;;'(chess-images-directory
"C:\\Users\\Dad\\xboard-redmarble\\xboard\\alpha\\redmarble"))
;======================================

;;;;=================================
;;;;Code from somewhere that seems to work & is needed to display board &
pieces & use sounds!
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
'(chess-ics-server-list ("freechess.org" 5000 "themoveR"))
 '(chess-images-directory "C:\\Users\\Dad\\Emacs\\xboard .xpm pieces size
grouped\\xboard pieces size29 emacs")
'(chess-sound-directory "C:\\Users\\Dad\\Emacs\\sounds\\sounds"))

;;'chess-ics-server-list ("freechess.org" 5000 "themoveR")
;;'chess-puzzle-directory ("C:\\Users\\Dad\\Emacs\\chess\\1001bwtc.pgn")

;;;;======================
;;;From Ed O'Connor .emacs-I have not tried this code!
;;;(when (locate-library "chess-auto")
;;;(load-library "chess-auto"))
;=================

;;;;===============================
;;;Code from Mario Lang .emacs (I have tried this code but unsuccessfully):
;;(setq chess-sound-directory (concat chessdir "/sounds"))))
;;(setq
;;chess-ics-server-list '("freechess.org" 5000 "themoveR"))
;======================

I am most grateful if anyone can help me further with getting this emacs
chess.el module configured more fully. I look forward to some help, thanks

-- 
View this message in context: http://www.nabble.com/Emacs-chess.el-help-again-to-connect-to-FICS-tp24662344p24662344.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emacs chess.el help again to connect to FICS
  2009-07-25 22:38 Emacs chess.el help again to connect to FICS rpd
@ 2009-07-26 14:40 ` rpd
  2009-07-26 17:37   ` Emacs chess.el help again to use chess-puzzle mode rpd
       [not found]   ` <mailman.3172.1248629837.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: rpd @ 2009-07-26 14:40 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi
Well then-where are the 'emac chess players'? Again I have had no response
to my mail for help. 
Again I have solved it myself. I can now connect to FICS in emacs & play
chess- great!

Now I just have to fix the chess-puzzle mode & I will have a pretty good
functioning chess.el module in my Emacs.

Happy emaccing & chess playing to all!


-- 
View this message in context: http://www.nabble.com/Emacs-chess.el-help-again-to-connect-to-FICS-tp24662344p24667449.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emacs chess.el help again to use chess-puzzle mode
  2009-07-26 14:40 ` rpd
@ 2009-07-26 17:37   ` rpd
       [not found]   ` <mailman.3172.1248629837.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: rpd @ 2009-07-26 17:37 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi
When I M-x chess-puzzle RET  I get 'read from' ie  
Read chess puzzles from:
C:\Users\Dad\Downloads\emacs-22.3-bin-i386\emacs-22.3\bin/
& I have either a directory 1001bwtc.pgn (containing the pgn file
1001bwtc.pgn) or the pgn file 1001bwtc.pgn in this bin folder I just get
this error message:


Debugger entered--Lisp error: (void-function chess-session)
  (chess-session)
  (and database (chess-session))
  (let* ((database ...) (objects ...) (engine ...) (display ...)) (when
database (if engine ...) (with-current-buffer display ... ... ... ... ...
... ...)))
 
chess-puzzle("c:/Users/Dad/Downloads/emacs-22.3-bin-i386/emacs-22.3/bin/1001bwtc.pgn")
  call-interactively(chess-puzzle)
  execute-extended-command(nil)
  call-interactively(execute-extended-command)

Can anyone tell me what I need to do to solve this & get chess-puzzle mode
working please? Is there anyone reading this forum that uses this
chess-puzzle mode who can help (or just an experiened emac programmer who
knows what this means & how I can fix it?). Meanwhile I will try to fix it
myself but I do look forward to some helpful reply, thanks
-- 
View this message in context: http://www.nabble.com/Emacs-chess.el-help-again-to-connect-to-FICS-tp24662344p24668812.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emacs chess.el help again to use chess-puzzle mode
       [not found]   ` <mailman.3172.1248629837.2239.help-gnu-emacs@gnu.org>
@ 2009-07-26 20:19     ` Helmut Eller
  2009-07-26 21:01       ` rpd
       [not found]       ` <mailman.3194.1248642134.2239.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Helmut Eller @ 2009-07-26 20:19 UTC (permalink / raw)
  To: help-gnu-emacs

* rpd [2009-07-26 19:37+0200] writes:

> Can anyone tell me what I need to do to solve this & get chess-puzzle mode
> working please? 

The error message means that the function chess-session is not defined.
Probably because you didn't load the right files first.  I managed to
load it by doing:

(add-to-list 'load-path "/scratch/chess")
(require 'chess)
(require 'chess-puzzle)

If you don't know what this means, paste the code into your .emacs (I
assume that you know what the .emacs file is) and replace /scratch/chess
with the directory where you saved chess.el and the other files.  Then
restart Emacs and `M-x chess-puzzle' should work.

> Is there anyone reading this forum that uses this
> chess-puzzle mode who can help (or just an experiened emac programmer who
> knows what this means & how I can fix it?). Meanwhile I will try to fix it
> myself but I do look forward to some helpful reply, thanks

Mario Lang (delYsid on #emacs) seems to be the maintainer of the
package.  Try to contact him; he probably can answer all your questions.

Helmut


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emacs chess.el help again to use chess-puzzle mode
  2009-07-26 20:19     ` Helmut Eller
@ 2009-07-26 21:01       ` rpd
       [not found]       ` <mailman.3194.1248642134.2239.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: rpd @ 2009-07-26 21:01 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi Helmut
Thanks for your helpful reply.
I already had the load path to chess directory/folder & (require
'chess-puzzle) in my .emacs file.
When I added (require 'chess) I was able to load the pgn file to start
chess-puzzle.
However every time I make a move I get an error message saying illegal move:

Debugger entered--Lisp error: (error "Illegal move")
  signal(error ("Illegal move"))
  error("Illegal move")
  chess-error(illegal-move)
  (lambda nil (chess-error (quote illegal-move)))()
  funcall((lambda nil (chess-error (quote illegal-move))))
  (setq result (funcall (cdar triggers)))
  (and (re-search-forward (caar triggers) (line-end-position) t) (setq
result (funcall ...)))
  (if (and (re-search-forward ... ... t) (setq result ...)) (progn (when ...
...) (setq triggers nil)) (setq last-trigger triggers triggers (cdr
triggers)))
  (while triggers (if (and ... ...) (progn ... ...) (setq last-trigger
triggers triggers ...)))
  (let ((case-fold-search nil) (triggers chess-engine-regexp-alist)
last-trigger result) (while triggers (if ... ... ...)))
  (while (and (not ...) (not last-line-no-newline)) (let (... ...
last-trigger result) (while triggers ...)) (if (= ... ...) (setq
last-line-no-newline t) (forward-line)))
  (unwind-protect (while (and ... ...) (let ... ...) (if ... ... ...)) (setq
chess-engine-last-pos (point) chess-engine-working nil))
  (save-excursion (if chess-engine-last-pos (goto-char
chess-engine-last-pos) (goto-char ...)) (unwind-protect (while ... ... ...)
(setq chess-engine-last-pos ... chess-engine-working nil)))
  (if chess-engine-working nil (setq chess-engine-working t) (save-excursion
(if chess-engine-last-pos ... ...) (unwind-protect ... ...)))
  (unless chess-engine-working (setq chess-engine-working t) (save-excursion
(if chess-engine-last-pos ... ...) (unwind-protect ... ...)))
  (save-current-buffer (set-buffer buf) (if (stringp proc) (setq string
proc) (let ... ... ...)) (unless chess-engine-working (setq
chess-engine-working t) (save-excursion ... ...)))
  (with-current-buffer buf (if (stringp proc) (setq string proc) (let ...
... ...)) (unless chess-engine-working (setq chess-engine-working t)
(save-excursion ... ...)))
  (progn (with-current-buffer buf (if ... ... ...) (unless
chess-engine-working ... ...)))
  (if (buffer-live-p buf) (progn (with-current-buffer buf ... ...)))
  (when (buffer-live-p buf) (with-current-buffer buf (if ... ... ...)
(unless chess-engine-working ... ...)))
  (let ((buf ...) (inhibit-redisplay t) last-point last-line-no-newline)
(when (buffer-live-p buf) (with-current-buffer buf ... ...)))
  chess-engine-filter(#<process chess-gnuchess> "Illegal move: Qh5\nWhite
(1) : ")

Do you know what this error is? (I could try & contact the author of
chess.el for help....).
Anyway many thanks for your reply & if you can help somemore with this
problem I am very grateful, thanks
-- 
View this message in context: http://www.nabble.com/Emacs-chess.el-help-again-to-connect-to-FICS-tp24662344p24670437.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emacs chess.el help again to use chess-puzzle mode
       [not found]       ` <mailman.3194.1248642134.2239.help-gnu-emacs@gnu.org>
@ 2009-07-26 21:38         ` Helmut Eller
  2009-07-26 22:13           ` rpd
  0 siblings, 1 reply; 7+ messages in thread
From: Helmut Eller @ 2009-07-26 21:38 UTC (permalink / raw)
  To: help-gnu-emacs

* rpd [2009-07-26 23:01+0200] writes:

> Hi Helmut
> Thanks for your helpful reply.
> I already had the load path to chess directory/folder & (require
> 'chess-puzzle) in my .emacs file.
> When I added (require 'chess) I was able to load the pgn file to start
> chess-puzzle.
> However every time I make a move I get an error message saying illegal move:

I think you are not supposed to move anything.  Just solve the puzzle in
your head (if that's the right way to put it) and when you're done press
space to go to the next puzzle.  I almost overlooked that the modeline
displays who is to move.  There is a key binding for ? which supposedly
displays the solution but apparently the file doesn't contain the
solutions.  It seems a bit inconvenient to press space a hundred times
(or solve 100 puzzles in a row :-) to get to the later positions,
though.

Helmut


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Emacs chess.el help again to use chess-puzzle mode
  2009-07-26 21:38         ` Helmut Eller
@ 2009-07-26 22:13           ` rpd
  0 siblings, 0 replies; 7+ messages in thread
From: rpd @ 2009-07-26 22:13 UTC (permalink / raw)
  To: Help-gnu-emacs


Hi Helmut
Thanks for your reply. I thought you could 'solve' these puzzles playing
against the chess engine.
However maybe you are right & you have to solve them in your head & move on
as you advise.
I wonder if anyone else with experience of this can confirm what should
happen. Perhaps I ought to try contacting the author & asking him.

Many thanks for your reply & advice & best wishes to you, thanks

-- 
View this message in context: http://www.nabble.com/Emacs-chess.el-help-again-to-connect-to-FICS-tp24662344p24671042.html
Sent from the Emacs - Help mailing list archive at Nabble.com.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-07-26 22:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25 22:38 Emacs chess.el help again to connect to FICS rpd
2009-07-26 14:40 ` rpd
2009-07-26 17:37   ` Emacs chess.el help again to use chess-puzzle mode rpd
     [not found]   ` <mailman.3172.1248629837.2239.help-gnu-emacs@gnu.org>
2009-07-26 20:19     ` Helmut Eller
2009-07-26 21:01       ` rpd
     [not found]       ` <mailman.3194.1248642134.2239.help-gnu-emacs@gnu.org>
2009-07-26 21:38         ` Helmut Eller
2009-07-26 22:13           ` rpd

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.