all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Iurie Marian <marian.iurie@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: 71709@debbugs.gnu.org
Subject: bug#71709: Fix recent change in tramp-sh-handle-make-process
Date: Sat, 22 Jun 2024 11:18:16 +0200	[thread overview]
Message-ID: <CAP+jDP6oUA=rU=D5Jkp6zw7b+8CouA_wSHzTR+nPyTOHfzUujA@mail.gmail.com> (raw)
In-Reply-To: <CAP+jDP7SV4x1N6CqRX4LeyYLYLcnoYpLty=KVufKxyMT4tWL4w@mail.gmail.com>

Might it be related to the ~:connection-type 'pipe~?
If I remove it I get the expected results.

Many thanks
Iurie

On Sat, 22 Jun 2024 at 11:10, Iurie Marian <marian.iurie@gmail.com> wrote:
>
> Hello Michael,
>
> Could you please try the below snippet?
> Evaluate it in a local and _remote_ buffer.
> ```
> ;; -*- lexical-binding: t; -*-
>
> (let ((.test-buffer (get-buffer-create "*test buffer*"))
>       (.remote? (file-remote-p default-directory)))
>   (with-current-buffer .test-buffer
>     (goto-char (max-char))
>     (insert "====================\n")
>     (insert (if .remote? "Remote:\n" "Local :\n")))
>
>   (make-process :file-handler t
>                 :connection-type 'pipe
>                 :name "test proc"
>                 :stderr .test-buffer
>                 :noquery t
>                 :command (list "echo" "Hello!")
>                 :filter (lambda (proc str)
>                           (with-current-buffer .test-buffer
>                             (goto-char (max-char))
>                             (insert "test proc output: " str)))))
> ```
>
> I get the below output:
> ```
> ====================
> Local :
>
> Process test proc stderr finished
> test proc output: Hello!
> ====================
> Remote:
> /usr/bin/cat: /tmp/tramp.J0RZDc: No such file or directory
> ```
>
> I would expect "Hello!" output from _remote_ as well. Isn't it?
> It seems that the process is not executed and the output
> "/usr/bin/cat: /tmp/tramp.J0RZDc: No such file or directory" is from
> stderr.
>
> Kind Regards,
> Iurie
>
>
> On Sat, 22 Jun 2024 at 09:31, Michael Albinus <michael.albinus@gmx.de> wrote:
> >
> > Iurie Marian <marian.iurie@gmail.com> writes:
> >
> > > Hello Michael,
> >
> > Hi Iurie,
> >
> > > After updating emacs today I got strange errors while running
> > > consult-find in a remote container, for example:
> > > ```
> > > /usr/bin/cat: /tmp/tramp.gBbQP1: No such file or directory
> > > /usr/bin/cat: /tmp/tramp.SWKx2Y: No such file or directory
> > > ```
> > >
> > > I checked the consult-find (which also points out to a "tramp bug"),
> > > then I checked the tramp's latest changes and applied that one-line
> > > from the patch, which fixed my issue.
> > > (In fact that line `(stderr (plist-get args :stderr))' actually
> > > nullifies the `stderr', so probably that's why it worked and I had a
> > > feeling that it is a solution)
> > >
> > > Please see below:
> > > * consult-find: https://github.com/minad/consult/blob/main/consult.el#L4965
> > > * consult--async-process:
> > > https://github.com/minad/consult/blob/main/consult.el#L2287C1-L2296C69
> >
> > Sorry, I don't use consult, and I don't know its code. If we want to
> > hunt a Tramp bug, we should run a use case with vanilla Emacs, invoking
> > Tramp's remote make-process.
> >
> > > I guess, to reproduce the issue, it's enough to invoke `make-process'
> > > on a remote location and with a non-nil `:stderr' argument (a buffer
> > > in `consult-find''s case).
> >
> > Tramp has a very comprehensive test library, see .../test/lisp/net/tramp-tests.el
> > The test case tramp-test30-make-process runs extensive tests over
> > make-process, including a non-empty stderr. And of course, I always run
> > the whole testsuite before I commit serious Tramp changes.
> >
> > So pls show a recipe how to reproduce the problem, starting with 'emacs
> > -Q'. And pls contact the consult author(s); they might report a Tramp
> > problem when they detect such.
> >
> > > Kind Regards,
> > > Iurie
> >
> > Best regards, Michael.





  reply	other threads:[~2024-06-22  9:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-21 18:12 bug#71709: Fix recent change in tramp-sh-handle-make-process Iurie Marian
2024-06-21 19:21 ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-21 21:09   ` Iurie Marian
2024-06-22  7:31     ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-22  9:10       ` Iurie Marian
2024-06-22  9:18         ` Iurie Marian [this message]
2024-06-22  9:23           ` Iurie Marian
2024-06-22 11:18         ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-22 12:02           ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-22 16:52             ` Iurie Marian
2024-06-22 17:05               ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-22 17:27                 ` Iurie Marian
2024-06-22 17:54                   ` Michael Albinus via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP+jDP6oUA=rU=D5Jkp6zw7b+8CouA_wSHzTR+nPyTOHfzUujA@mail.gmail.com' \
    --to=marian.iurie@gmail.com \
    --cc=71709@debbugs.gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.