emacs-devel
[Top][All Lists]
Advanced

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

Re: with-editor seems like a bug fix


From: Eli Zaretskii
Subject: Re: with-editor seems like a bug fix
Date: Thu, 27 Jun 2024 13:29:19 +0300

> From: Manuel Giraud <manuel@ledu-giraud.fr>
> Cc: rms@gnu.org,  emacs-devel@gnu.org
> Date: Thu, 27 Jun 2024 11:44:54 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Richard Stallman <rms@gnu.org>
> >> Date: Wed, 26 Jun 2024 23:07:14 -0400
> >> 
> >> What with-editor does seems like a bug fix to me, not like a feature.
> >> It really ought to be standardly enabled in Emacs whenever the Emacs
> >> client is.
> >
> > If someone can explain what is/are the bug(s) and show a recipe for
> > reproducing it/them, we will fix it, yes.
> 
> I said it in september 2023 and I don't know if it's a bug that needs a
> fix but here is recipe of what 'with-editor' does well and could be
> useful:
> 
>    - C-x C-f /ssh:remote-server|su::
>    - M-x eshell
>    - vipw  --> and here it works, opening an Emacs buffer through
>                emacsclient so I could edit and C-c C-c when done
> 
> Note that:
>    - EDITOR is set to "emacsclient" on the localhost
>    - Emacs/emacsclient is not installed on remote-server
> 
> It seems that 'with-editor' does that with the following shell hackery
> into $EDITOR on the remote server:
> 
> sh -c 'printf "\nWITH-EDITOR: $$ OPEN $0\037$1\037 IN $(pwd)\n"; sleep
> 604800 & sleep=$!; trap "kill $sleep; exit 0" USR1; trap "kill $sleep;
> exit 1" USR2; wait $sleep'

Ouch!

> So maybe that is what we need in Emacs if we want this feature.

I hope not.

Michael, can you please look into this and see what can we do in such
cases?



reply via email to

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