From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: with-editor seems like a bug fix Date: Thu, 27 Jun 2024 11:44:54 +0200 Message-ID: <87o77miusp.fsf@ledu-giraud.fr> References: <86frsz6i6v.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18746"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 27 11:46:06 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 1sMlhd-0004Zx-OH for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Jun 2024 11:46:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMlgl-0007qz-9z; Thu, 27 Jun 2024 05:45:11 -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 1sMlgj-0007nv-AZ for emacs-devel@gnu.org; Thu, 27 Jun 2024 05:45:09 -0400 Original-Received: from ledu-giraud.fr ([51.159.28.247]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sMlgg-0003Y8-1S; Thu, 27 Jun 2024 05:45:07 -0400 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=ZJNKgtsE pxfe3MchFh0RmtQznQim63cSqErRQr0U+dc=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=RZimIsxlviUQEORMOP6sIfGl1qZ4qN p9lZCmQ2z30Xtzsxi/MgMwmAC8qOL2u1cqa086elcCzf8ZRccn0EkeAw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=ZJNKgtsEpxfe3Mch Fh0RmtQznQim63cSqErRQr0U+dc=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=P4mIwJY5VLJbDtBpIEa0uptmafU9F4M8nRwMUb yeO2FgusBzXru13mryWiDvmujvQ7arZGXn68HFQ4GpFIP0eAivI4t1bUZWvx5LrpDp29rc IFDC4bSAuC39WSrLqEFzpaCxBBunwecwqlfDApcye5A08MJ53y5Fi74/uuL0MGrWvCrVm0 +tOBJDfgRnSv3PNqR7dfW6wpkKxoIcWdyYW70DCby5nJtMt4rFwoX0p3lYypIoE7qK43WT rMNqcsSiL25anmvKK0ZxuQROnUpuoBTuKo20RahaF2iQoxliT1QwHxhb7BdA12GKkL7q/I C4VjUBpLFIGXu0o3qc11iOCw== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id fc75472a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 27 Jun 2024 11:44:56 +0200 (CEST) In-Reply-To: <86frsz6i6v.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 27 Jun 2024 08:58:00 +0300") Received-SPF: pass client-ip=51.159.28.247; envelope-from=manuel@ledu-giraud.fr; helo=ledu-giraud.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:320757 Archived-At: 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' So maybe that is what we need in Emacs if we want this feature. -- Manuel Giraud