From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: with-editor seems like a bug fix Date: Thu, 27 Jun 2024 13:29:19 +0300 Message-ID: <8634oy65mo.fsf@gnu.org> References: <86frsz6i6v.fsf@gnu.org> <87o77miusp.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30949"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, emacs-devel@gnu.org To: Manuel Giraud , Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 27 12:30:16 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sMmON-0007nS-In for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Jun 2024 12:30:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMmNf-0004He-T1; Thu, 27 Jun 2024 06:29:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMmNe-0004HG-Iu for emacs-devel@gnu.org; Thu, 27 Jun 2024 06:29:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMmNe-0005mM-7y; Thu, 27 Jun 2024 06:29:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=0HhUa/lfoSCjLSvCuMgUca0kve3kmWzNUCGqEwLd/pA=; b=F/sDghr03l3U tG3wcEQPXGUfJB6Xe6pM9oPUohLEx/Aveal4NtCPzU1l6BSnvfwZ2xigjyv7yRAmI77S1eWfbD6Ud jEUleJgGUm4E5YJ978tBk4GLx2uA6vpcUEmTE4e58+78dqcOz8/cXwl1UrGtDrt8X2jS2iW9dlasx q8Mdv/HeiAJ/lpqZXnUraGhtuuRV/79qB6U7KVeNAdDBF49oVW60BWKjS/G269gG2PHqIPm8UbSKj rAxS3Li25rSri0hZOIwmxNC/7ndlCXmwStGLkHXoDWi+h4bsRHb/w1XWfynfu0uqDl47NFPRJCvR2 Oon9YuV3kxPaj5Tj/70cMw==; In-Reply-To: <87o77miusp.fsf@ledu-giraud.fr> (message from Manuel Giraud on Thu, 27 Jun 2024 11:44:54 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320760 Archived-At: > From: Manuel Giraud > Cc: rms@gnu.org, emacs-devel@gnu.org > Date: Thu, 27 Jun 2024 11:44:54 +0200 > > Eli Zaretskii writes: > > >> From: Richard Stallman > >> 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?