[ESS] M-<enter> (ess-transcript-send-command-and-move) not working

Tyler Smith tyler.smith at mail.mcgill.ca
Sun Dec 30 19:06:34 CET 2007


Hi,

When I'm working with the R transcript, I can resend previous commands
using <return>, and I can paste previous commands to the current input
prompt for editing with C-c <return>. However, M-<return> does the
same thing as unmodified <return>. i.e., it takes the command around
point and enters it on the current input prompt, and leaves the cursor
at the newest prompt at the bottom of the buffer, rather than stepping
through to the subsequent prompt in the transcript. 

I checked to make sure that it is in fact bound to
ess-transcript-send-command-and-move. I also checked the function
itself, evaluating each argument individually using M-: 

  (ess-transcript-send-command)
  (goto-char ess-temp-point)
  (comint-next-prompt 1)

This works, passing the command around point to the interpreter and
moving the cursor to the next prompt! But when called as a function it
leaves the cursor at the bottom of the transcript. Further
experimenting revealed that redefining the function to include an
additional line between ess-transcript-send-command and goto-char
fixes the problem, but I have no idea why. For example, this works:

(defun my-test2 ()
  "Send the command on this line, and move point to the next command."
  (interactive)
  (ess-transcript-send-command)
  (read-from-minibuffer 
    (format "ess-temp-point: %s. point: %s" ess-temp-point (point)))
  (goto-char ess-temp-point)
  (comint-next-prompt 1))

Can anyone confirm that this happens for them too, or offer me any
suggestions on how to fix it?

Thanks,

Tyler

R 2.6.1 (from Debian testing repository)
ESS 5.3.6 (installed from source)
Emacs 22.1.1 (installed from source)
Debian Lenny




More information about the ESS-help mailing list