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.bugs Subject: bug#71971: 31.0.50; Add user option server-window-alist Date: Mon, 08 Jul 2024 20:56:47 +0300 Message-ID: <86y16bzs0w.fsf@gnu.org> References: <871q463hke.fsf@gmx.de> <86cynq4vfa.fsf@gnu.org> <87msmuvc5m.fsf@bernoul.li> <86wmly37c6.fsf@gnu.org> <871q43vl1f.fsf@bernoul.li> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15270"; mail-complaints-to="usenet@ciao.gmane.io" Cc: michael.albinus@gmx.de, 71971@debbugs.gnu.org To: Jonas Bernoulli Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 08 19:58:13 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sQsct-0003lY-99 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Jul 2024 19:58:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQscg-0007ip-Qc; Mon, 08 Jul 2024 13:57:58 -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 1sQscf-0007i3-5X for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2024 13:57:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQsce-0003W8-T0 for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2024 13:57:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sQscj-0003Vz-Rg for bug-gnu-emacs@gnu.org; Mon, 08 Jul 2024 13:58:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Jul 2024 17:58:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71971 X-GNU-PR-Package: emacs Original-Received: via spool by 71971-submit@debbugs.gnu.org id=B71971.172046142513442 (code B ref 71971); Mon, 08 Jul 2024 17:58:01 +0000 Original-Received: (at 71971) by debbugs.gnu.org; 8 Jul 2024 17:57:05 +0000 Original-Received: from localhost ([127.0.0.1]:51471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQsbp-0003Uk-Be for submit@debbugs.gnu.org; Mon, 08 Jul 2024 13:57:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQsbm-0003UF-OE for 71971@debbugs.gnu.org; Mon, 08 Jul 2024 13:57:03 -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 1sQsbb-0003MW-5W; Mon, 08 Jul 2024 13:56:51 -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=styk+fisHiG2kdjBtS7atJg3s6re7CIiIsN8ZjqkeWo=; b=qeWg7Q8GY97A xr2ugzbtM+5LdSEAtpdmX4L9BVkmZSL6gDdqg+a0EQE4gClqENVF9Slr0cMaFVW7quqnAgKUSJnMi Vf+iG/Nw02r3GWlQM3dGCmBpII1KkFACaHRtr2W/ASQB64KNTIXmXcm+eYMKRoUk0bmf1ZRrm9EpT VYnZAjk8uvGlMIT0tyHHW3qrYM2s6GSerianKFdevZmBF6q+AiU+gWy/QipLPKw/F2wT5PH4KM7ns igiOC10amUHnap3YM1RHtVQ+e8bIE5okyVXWkOQb0byz0ML1OGPxriF80C3phiAyW2r/qt80WkqDL /+rRTcrI6v/OLS2I5UwA/Q==; In-Reply-To: <871q43vl1f.fsf@bernoul.li> (message from Jonas Bernoulli on Mon, 08 Jul 2024 19:41:16 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288606 Archived-At: > From: Jonas Bernoulli > Cc: michael.albinus@gmx.de, 71971@debbugs.gnu.org > Date: Mon, 08 Jul 2024 19:41:16 +0200 > > Eli Zaretskii writes: > > >> From: Jonas Bernoulli > >> Cc: 71971@debbugs.gnu.org > >> Date: Sat, 06 Jul 2024 16:16:21 +0200 > >> > >> So in summary, it is possible for the same person to want the behavior > >> to be different in different situations. The fact that "committing from > >> Emacs using Magit" involves the use of emacsclient, just like "quickly > >> edit a file from the terminal" does, is an implementation detail, and > >> should not make it necessary for the user to decide which use-case > >> should be optimized to their liking, at the cost of undesirable behavior > >> in the other case. > > > > That sounds to me like the value of $EDITOR should be "emacsclient -c" > > whereas the value of $GIT_EDITOR should be just "emacsclient"? > > Who would set those variables to those values? The user, of course. But see below. > Where? In the system's or shell's init files, depending on the system and the user's needs. > I am beginning to think that at least for Magit's needs the new > --create-frame is sufficient. It could just call > > EDITOR="emacsclient -c" git commit > > Unfortunately that's a fairly new argument "New"? AFAICT, it exists since Emacs 23.1, i.e. for the last 15 years. > so with-editor will have to keep providing an alternative. But when > it comes to the question of whether server-window-alist should be > added to future Emacs releases, that isn't a concern. > > I understand your hesitancy to add such a variable. I am not sure it > is necessary anymore either. Agreed. > That being said, maybe adding switch-to-buffer-new-frame wouldn't be > such a bad idea. I'm quite sure you can have that already by using a suitable display-buffer-alist. All you want is to force switch-to-buffer-other-frame always create a new frame. > > And what will > > they use for the REGEXP part? are they supposed to know by heart the > > names of temporary files Git and other VCSes use for editing commit > > messages? > > Well no, Magit takes care of that, and so could VC. Takes care how? what do you use for REGEXP? > > One possibility would be to add a new protocol command telling > > server.el how to create/reuse frames, and then tell users to set > > $EDITOR and similar variables to invoke that command via the > > emacsclient command-line arguments. Other ideas are welcome. > > I'm not sure what you mean by "protocol". More arguments? No, the protocol between emacsclient and the server. So that the client could tell the server how to create/reuse frames in a more flexible manner than what we have now. > You mention environment variables. If I remember correctly, I did > experiment with that, but ran into the problem that while it was > possible to pass along additional environment variables when using > "emacsclient --tty", the same was not possible when using "emacsclient > --create-frame". I meant to use environment variables only if the preference to reuse an existing frame when editing commit log messages for Git is a globally fixed preference for the user. In any other case, environment variables are not a good means, because they have global effect and are by default inherited by child processes.