[Top][All Lists]

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

Re: [Geiser-users] issue with using quack with racket and geiser

From: Jose A. Ortega Ruiz
Subject: Re: [Geiser-users] issue with using quack with racket and geiser
Date: Sun, 02 Jan 2011 20:07:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

hi ali,

On Sat, Jan 01 2011, Ali Asad Lotia wrote:

> Version info:
> Geiser: cloned from git repo. Commit ID:
> 4826d33808c8c54bbe455639c942fc3f789383c0
> Racket: v5.0.2
> Quack: 0.40
> Relevant stuff from emacs init file:
> (setq racket-dist-dir "/Applications/Racket v5.0.2/")
> (load "geiser-load")
> (setq geiser-repl-history-filename (concat local-scratch-dir 
> "geiser-history"))
> (setq geiser-racket-binary (concat racket-dist-dir "bin/racket"))
> (setq geiser-active-implementations '(racket))
> (add-hook 'geiser-repl-mode-hook 'awesome-paredit-hook)
> (setq quack-global-menu-p nil)
> (require 'quack)
> I'm using geiser and racket to work through The Little Schemer (4th
> edition) and when I attempt to enter the following in a scheme buffer:
> (define lat?
>   (lambda (l)
>     (cond
>      ((null? l) #t)
>      ((atom? (car l)) (lat? (cdr l)))
>      (else #f))))
> I get an error when I type the "#" symbol before "f" in the final
> expression of the cond. A buffer titled "*spurious*" comes up with the
> following text:
> == Contents of *spurious* buffer ==
> stdin::6637: else: not allowed as an expression in: else
>  === context ===
> /Applications/Racket v5.0.2/collects/racket/private/misc.rkt:74:7
> racket@> stdin::6642: cond: bad syntax in: cond
>  === context ===
> /Applications/Racket v5.0.2
> == end contents of *spurious* buffer ==
> The value of the number after "stdin::" is different, but I get this
> error whenever I attempt to enter a second "#" symbol in a scheme
> buffer. I don't see the error if I don't have quack loaded.
> Please let me know if this has nothing to do with geiser and should be
> reported to the author of quack instead.

thanks for the detailed report. i've just pushed a patch that should fix
the issue (let me know if it doesn't). the cause of the problem seems to
be that quack is redefining or tweaking internal emacs functions (or
soemthing affecting their behaviour) to the effect that
(thing-at-point 'symbol) returns "#" when the cursor is on a stand-alone
hash, while the default (and, imho, correct) behaviour of emacs is
returning nil in that case (and that's why the problem doesn't arise
unless you load quack).

i've worked around this peculiarity in quack by modifying geiser.
whether this is a quack bug or not, well, i guess that's up to quack's
author judgement: imho, if he wants quack to interoperate with other
modes, he probably shouldn't change the default meanings of emacs
functions that those modes might be using. on the other hand, he might
have reasons i'm missing.

`Be what you would seem to be'---or, if you'd like it put more
simply---`Never imagine yourself not to be otherwise than what it
might appear to others that what you were or might have been was not
otherwise than what you had been would have appeared to them to be
otherwise.' (_Alice in Wonderland_, Chapter IX)

reply via email to

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