geiser-users
[Top][All Lists]
Advanced

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

Re: [Geiser-users] Problem with prompt at history item


From: Jose A. Ortega Ruiz
Subject: Re: [Geiser-users] Problem with prompt at history item
Date: Wed, 31 Dec 2014 04:44:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Hi Hamish,

On Tue, Dec 30 2014, Hamish Ivey-Law wrote:

[...]

> A few more details: Usually FORWARD-WORD shouldn't get stuck like this
> unless it's at a field boundary.  I don't really understand how this
> mechanism works, but, in case it's useful, FIELD-STRING at the cursor
> position in the first example is
>
> #("
> stdin::43: #%app: missing procedure expression;
>  probably originally (), which is an illegal empty application
>   in: (#%app)
>   context...:
>    /usr/share/racket/collects/racket/private/misc.rkt:87:7
> racket@> " 0 1 (fontified t) 1 6 (fontified t face 
> font-lock-function-name-face) 6 47 (fontified t) 47 48 (fontified t face 
> font-lock-comment-delimiter-face) 48 49 (fontified t face 
> font-lock-comment-face) 49 198 (fontified t) 198 199 (fontified t read-only 
> fence) 199 208 (fontified t read-only t front-sticky (read-only) 
> rear-nonsticky t font-lock-face comint-highlight-prompt))
>
> and at any other location on the last Racket line (i.e. in or after the
> parens) is
>
> #("()" 0 2 (fontified t field t))
>
> Given that extensive web searching has turned up nothing so far, I can
> only suppose this problem doesn't effect anyone else, which means my
> environment must be broken somehow.  So, any ideas as to what I could
> look into to resolve this issue would be most welcome.  If there's any
> other data I can provide that might help diagnose what's going on, let
> me know!

The problem is not only yours: i can easily reproduce it here.  For some
reason i have yet to understand (and fix), entries in the comint history
ring get decorated with the "field" text property, and that's confusing
FORWARD-WORD.

Although that command is a bit flaky in general for navigating sexps
(i'd suggest to use FORWARD-SEXP instead, bound by default to C-M-f),
you have the right to expect it to not get stuck like this :) As a
temporary workaround, you can try to set the variable
inhibit-field-text-motion to t locally in REPL buffers.  Something like

  (add-hook 'geiser-repl-mode-hook 
            (lambda () (set (make-local-variable 'inhibit-field-text-motion) 
t)))

should do the job while a find a better fix.

HTH,
jao
-- 
"Light thinks it travels faster than anything but it is wrong. No matter
 how fast light travels it finds the darkness has always got there first,
 and is waiting for it."
  -Terry Pratchett, Reaper Man



reply via email to

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