Re: help me with sawfish-client bug.



On Thursday 22 October 2009 11:02:35 Teika Kazura wrote:
> Hi. Recently, I changed sawfish-client so that you can exit from the
> client session with ",quit". (Previously, it killed Sawfish WM.)
> But no, it failed. 

Today I tried again, and it worked. This may indicate a queer bug
in librep that we can't confirm. (sigh) Last time I tried at least
twice, so I'm sure that it's not my mistake.

On Sun, 25 Oct 2009 20:20:01 +0300, Timo Korvola wrote:
> Works for me as long as one types ",quit" exactly, not any of the 
> normally valid alternatives such as ", quit" or ",quit ".
> [...]
> An alternative approach would be to modify the behaviour of ",quit" in 
> Sawfish; see the attached patch.  Then no special input handling is 
> needed in sawfish-client.  Unfortunately there is no way to redefine an 
> interpreter command locally, hence the patch redefines ,quit globally.

I see, so yours is better. Thanks, I'll push it.
Redefinition must be harmless in practice. The bare /usr/bin/rep
interactive session can be quitted by ",quit", so it must be the
natural one.
# For those who're worried: (quit) continues to kill Sawfish WM. Only
# ",quit" is affected.

> A more exotic failure case is this:
> (let ((quit 'lose))
>   `(this should not
> ,quit
> ))

First time I saw it I thought it was an extremal case, but no. So
it's good that your patch prevent it, too.

> Why did you use exception handling for something this trivial?  It would 
> have been simpler to do this:
> (when (equal ",quit\n" input)
>   (setq input nil))
> and let normal control flow handle it from there as if ^D had been 
> typed.

It's trivial; I don't know lisp well. Forgive me ;) It's quite a task
for me to understand what's done in sawfish-client.jl. I didn't know
what "let loop" is when I did it. It is documented seperately from
the usual 'let' in librep.info. (I'll send some librep doc patch 
*after* 1.6 news rewritement is done.)

Thanks a lot, Timo and Chris,
Teika (Teika kazura)



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