geiser-users
[Top][All Lists]
Advanced

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

[Geiser-users] Problem with prompt at history item


From: Hamish Ivey-Law
Subject: [Geiser-users] Problem with prompt at history item
Date: Tue, 30 Dec 2014 18:21:37 +0100

Hi,

First, thanks for Geiser, it's great! :)

I've hit a wall trying to debug a problem I'm having with the REPL
prompt.  Broadly speaking, when I select a previous history item with
M-p, I cannot then move forward with M-f, I have to move forward with
C-f, after which M-f works as usual *except* if I go back to the
beginning of the expression in which case I get stuck again.  Here's a
minimal set of steps to (usually) see this problem on my machine:

1. emacs -Q
2. evaluate

  (add-to-list 'load-path "~/.emacs.d/elpa/geiser-20141228.1746")
  (load "geiser")

3. M-x run-racket

  Welcome to Racket v6.1.1.
  racket@> ()   ; Causing an error often triggers the problem
  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@> |()   ; After M-p, '|' is cursor, here M-f does nothing

  The second "racket@>" prompt is after M-p, the pipe is the cursor
  location.  At this point, M-f does not move the cursor forward, but
  C-f does move it forward.  M-b moves the cursor back as usual, then I
  can do M-f as many times as necessary to get back to the above cursor
  position, but then it gets stuck again.  M-f works normally if I move
  the cursor forward with C-f first.

This behaviour occurs with both Racket and Guile, and while not
completely predictable, seems to be reliably triggered by making a
syntax error occur (such as above).  But often this same problem occurs
without an obvious trigger, and sometimes the error doesn't trigger the
problem and it's necessary to type another (valid) expression after the
error, evaluate it, then move back to it with M-p, such as

  [emacs -Q, load geiser, etc...]
  > ()
  Error
  > (+ 1 1)
  2
  > |(+ 1 1)  ; After M-p, M-f doesn't move cursor

On the other hand, sometimes the problem arises straight away

  [emacs -Q, load geiser, etc...]
  > (+ 1)
  1
  > |(+ 1)    ; After M-p, M-f doesn't move cursor

Note that once this behaviour starts, it never reverts to correct
behaviour again.

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!

Finally, the environment is:

Emacs 24.4 on ArchLinux (installed from Pacman)
Racket 6.1.1  ditto
Guile 2.0.11  ditto
Geiser from MELPA (20141228.1746)

The problem is not a recent occurrence; I first noticed it months ago,
but have only recently tried to debug it.

Cheers,
Hamish.



reply via email to

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