chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] readline history bug?


From: Christian Kellermann
Subject: Re: [Chicken-users] readline history bug?
Date: Thu, 11 Dec 2014 09:43:31 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi Alexej,

* Alexej Magura <address@hidden> [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:

address@hidden:~$ >.csi_history 
address@hidden:~$ rm .csi_history
address@hidden:~$ >.csi_history 
address@hidden:~$ 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> 
address@hidden:~$ cat .csi_history 
1
2
3
4
5
6
7
address@hidden:~$ 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> 
address@hidden:~$ 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]