bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#62194: 30.0.50; Two Eglot-over-Tramp tests are failing on master, pa


From: Michael Albinus
Subject: bug#62194: 30.0.50; Two Eglot-over-Tramp tests are failing on master, passing on emacs-29
Date: Fri, 17 Mar 2023 11:44:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

João Távora <joaotavora@gmail.com> writes:

Hi João,

>> The example given by Thomas blocks, again. So we are back to the
>> beginning, aren't we?
>
> Doh! I gave you a wrong patch-0003.  It needs a tweak.
>
> You can either apply this one-line diff or re-aplply attached patchset
> of 4 over origin/master again.
>
> Then please try again, and sorry for the extra confusion.
>
> diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
> index 885b29f9471..a7406a9d80e 100644
> --- a/lisp/net/tramp.el
> +++ b/lisp/net/tramp.el
> @@ -5804,7 +5804,7 @@ tramp-accept-process-output
>            (v (process-get proc 'vector)))
>      (dolist (p (delq proc (process-list)))
>        (when (tramp-file-name-equal-p v (process-get p 'vector))
> -     (while (accept-process-output p 0 nil t)))))
> +     (while (accept-process-output p 0)))))
>    (with-current-buffer (process-buffer proc)
>      (let ((inhibit-read-only t)
>         last-coding-system-used
>
>
> I've tested Thomas's example 5 times in a row, moving around energically, in
> the Emacs -Q, exercising multiple Eglot features, etc.  0% failures.

I've applied the patch, but Thomas' recipe still blocks for me. Sorry to
tell you.

For comparison, here's the version of tramp-accept-process-output used
for this test:

--8<---------------cut here---------------start------------->8---
(defun tramp-accept-process-output (proc &optional timeout)
  "Like `accept-process-output' for Tramp processes.
This is needed in order to hide `last-coding-system-used', which is set
for process communication also.
If the user quits via `C-g', it is propagated up to `tramp-file-name-handler'."
  (when-let (((process-get proc 'shared-socket))
             (v (process-get proc 'vector)))
    (dolist (p (delq proc (process-list)))
      (when (tramp-file-name-equal-p v (process-get p 'vector))
        (while (accept-process-output p 0)))))
  (with-current-buffer (process-buffer proc)
    (let ((inhibit-read-only t)
          last-coding-system-used
          result)
      ;; This must be protected by the "locked" property.
      (with-tramp-locked-connection proc
        ;; JUST-THIS-ONE is set due to Bug#12145.  `with-local-quit'
        ;; returns t in order to report success.
        (if (with-local-quit
              (setq result (accept-process-output proc timeout nil t)) t)
            (tramp-message
             proc 10 "%s %s %s %s\n%s"
             proc timeout (process-status proc) result (buffer-string))
          ;; Propagate quit.
          (keyboard-quit)))
      result)))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.





reply via email to

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