Hi Alexej, * Alexej Magura <[email protected]> [141211 01:37]: > Is the readline egg's history feature broken? It only seems to work the > first time I start _csi_ up after creating a new history file. Here's the > code that I'm using: > > (current-input-port (make-gnu-readline-port) > (gnu-history-install-file-manager > (string-append (or (get-environment-variable "HOME") ".") > "/.csi_history"))
With that (plus the missing parenthesis) I get the following: ckeen@necronomicon:~$ >.csi_history ckeen@necronomicon:~$ rm .csi_history ckeen@necronomicon:~$ >.csi_history ckeen@necronomicon:~$ csi CHICKEN (c) 2008-2014, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann Version 4.9.1 (rev 6a860ab) linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ] compiled 2014-09-30 on devpool08 (Linux) ; loading /home/ckellerm/.csirc ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/readline.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/chicken.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/foreign.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/ports.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/data-structures.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/posix.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/readline.so ... #;1> 1 1 #;2> 2 2 #;3> 3 3 #;4> 4 4 #;5> 5 5 #;6> 6 6 #;7> 7 7 #;8> ckeen@necronomicon:~$ cat .csi_history 1 2 3 4 5 6 7 ckeen@necronomicon:~$ csi CHICKEN (c) 2008-2014, The CHICKEN Team (c) 2000-2007, Felix L. Winkelmann Version 4.9.1 (rev 6a860ab) linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ] compiled 2014-09-30 on devpool08 (Linux) ; loading /home/ckellerm/.csirc ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/readline.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/chicken.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/foreign.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/ports.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/data-structures.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/posix.import.so ... ; loading /home/ckellerm/chickens/master/lib/chicken/7/readline.so ... #;1> a Error: unbound variable: a #;1> b Error: unbound variable: b #;1> c Error: unbound variable: c #;1> d Error: unbound variable: d #;1> ckeen@necronomicon:~$ cat .csi_history 1 2 3 4 5 6 7 a b c d So it looks to me, like it is working fine. Note that you indeed need to create the file first. The session history should be explicitly added to the file through the gnu-history-install-file-manager procedure but I don't understand the use of the hook procedure there. I think it's a typo and should be (exit-handler (hook (exit-handler))), same for implicit-exit-handler. What do you think? Nonetheless this works for me without modification, so I don't know what's going on. Need more coffee it seems. Does this help? Kind regards, Christian -- May you be peaceful, may you live in safety, may you be free from suffering, and may you live with ease. _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
