Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential Syntax Issue in ess-inf.el #1198

Closed
ctrlxctrlc opened this issue May 6, 2022 · 3 comments
Closed

Potential Syntax Issue in ess-inf.el #1198

ctrlxctrlc opened this issue May 6, 2022 · 3 comments

Comments

@ctrlxctrlc
Copy link

See here for my original stack overflow question.

I have since determined that the cause of this issue is related to the function ess--command-make-restore-function. In particular, when the process property pending-output gets set in inferior-ess-ordinary-filter, it triggers the latter half of the function which resets the process property and sends the output to the old process filter. The problem is that the process property which gets overwritten is pending rather than pending-output. This means that the pending output never goes away and keeps getting sent to the command buffer. I believe that line should be changed:

(defun ess--command-make-restore-function (proc)
  (let ((old-pf (process-filter proc)))
    (lambda ()
      (set-process-filter proc old-pf)
      (process-put proc 'cmd-output-delimiter nil)
      (process-put proc 'cmd-buffer nil)
      (when-let ((pending (process-get proc 'pending-output)))
        (process-put proc 'pending nil) ;; This should be (process-put proc 'pending-output nil)
        (funcall old-pf proc pending)))))

Someone please correct me if I am wrong about the process property pending being incorrect.

@mmaechler
Copy link
Member

mmaechler commented May 9, 2022

As I answered there as well, I think you've hit the nail perfectly. Indeed I've also suffered from such extraneous prompts in the console, and now hope they have gone... and maybe even more bugous behavior I had observed the last couple of months -- that would be phantastic!
I've committed the change already in my version of ESS, and will push it in a day or so if nothing surfaces.

@mmaechler
Copy link
Member

Can you update and confirm the problem is solved? ... and then close the issue?

@ctrlxctrlc
Copy link
Author

I have updated locally and can confirm that the problem has not resurfaced.

Thanks for and closing this and merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants