From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#62164: 29.0.60; ediff behaves poorly by default on tiling window managers Date: Mon, 03 Jul 2023 19:21:53 +0000 (UTC) Message-ID: <87edloreb3.fsf@catern.com> References: <87cz5c87xg.fsf@yahoo.com> <878rg087v5.fsf@yahoo.com> <87a60c3zuc.fsf@yahoo.com> <871ql3nj6y.fsf@catern.com> <871ql2su9q.fsf@yahoo.com> <87v8iemsbh.fsf@catern.com> <83ild19uzd.fsf@gnu.org> <83y1kw3k3d.fsf@gnu.org> <83leg3vlzf.fsf@gnu.org> <87jzvnd7rs.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15187"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: luangruo@yahoo.com, Spencer Baugh , Eli Zaretskii , 62164@debbugs.gnu.org To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 03 21:23:16 2023 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 1qGP8l-0003eU-GW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 Jul 2023 21:23:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGP8a-00081w-IF; Mon, 03 Jul 2023 15:23:04 -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 1qGP8Y-00081d-RF for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2023 15:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGP8Y-0003qN-8T for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2023 15:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qGP8Y-0002q6-4Z for bug-gnu-emacs@gnu.org; Mon, 03 Jul 2023 15:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Jul 2023 19:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62164 X-GNU-PR-Package: emacs Original-Received: via spool by 62164-submit@debbugs.gnu.org id=B62164.168841212410822 (code B ref 62164); Mon, 03 Jul 2023 19:23:02 +0000 Original-Received: (at 62164) by debbugs.gnu.org; 3 Jul 2023 19:22:04 +0000 Original-Received: from localhost ([127.0.0.1]:34528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGP7b-0002oU-Kd for submit@debbugs.gnu.org; Mon, 03 Jul 2023 15:22:04 -0400 Original-Received: from s.wrqvwxzv.outbound-mail.sendgrid.net ([149.72.154.232]:50060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qGP7X-0002nt-DA for 62164@debbugs.gnu.org; Mon, 03 Jul 2023 15:22:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: cc:content-type:from:subject:to; s=s1; bh=A/Fzw1bRhufoa1bNxiAKtIVQrlcVuj4Qcwlq54PppMc=; b=ybEAE7WKlpby2g//0qCaS14Fe/LQm56RgvgAryDCuQTarS4Vg7zNbUiD5wL5BnwR36S7 2ZXdJuTOS2Fpj4gqdobgk1/oKcsVrhqwrzejaBL6DSu/JurXbeiQTqp0wUukXuhq2uNJDN XAQ9U6zn9E2T4z8OpASb5OHabrZKU4ZTZKolLuQEbvOTM/oa8edKiSi9lr5asiL0FfEYey YjN3cNeB/TlHAsv8uL1Ul8NQT5pesWHi154WM4OMORkwDIjYCK08My6qi1lTSn2SjsnjbW sUdK8qnOvAFToI2sLbUSyh2Rr47FiXyaUzb2pJohvh/BZQJuojcPzeYfTUJuFQzQ== Original-Received: by filterdrecv-8684c58db7-w6bjw with SMTP id filterdrecv-8684c58db7-w6bjw-1-64A31FD1-4 2023-07-03 19:21:53.069533175 +0000 UTC m=+4650214.344217093 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-33 (SG) with ESMTP id Fe9JqF2TTq-kbjJXp-7B-Q Mon, 03 Jul 2023 19:21:52.843 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver=gmail.com Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 537296001E; Mon, 3 Jul 2023 15:21:52 -0400 (EDT) In-Reply-To: <87jzvnd7rs.fsf@gmail.com> (Robert Pluim's message of "Wed, 28 Jun 2023 15:40:55 +0200") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbKlsYSisgjYAPe49Rr+c6sWSkLC98BLGCW1MDdNys/Z8HjkfzzruxxF94JWliOv33vbuaPF+0AexXnq+RsxLz3AVQpdvmwlfbvrAuZXtkZrKERWMZMgy4d3k6ECdE8T5c+tBfYqXuhxjs3iSAokeg6M+9Tf4+U6jrKhIFxcVh+00w== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== 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:264549 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Robert Pluim writes: >>>>>> On Wed, 28 Jun 2023 08:55:13 -0400, Spencer Baugh said: > > Spencer> * lisp/vc/ediff-wind.el (ediff-floating-control-frame): Add > Spencer> defcustom. > Spencer> (ediff-frame-make-utility, ediff-setup-control-frame): Allow= setting > Spencer> the control frame up as a utility window under X. (bug#62164= ) > > Two spaces after full stop. And I think the convention is to > capitalize 'Bug', but we don=CA=BCt follow that very consistently. > > I think the new user option warrants an entry in etc/NEWS Added, patch at the end. > Spencer> --- > Spencer> lisp/vc/ediff-wind.el | 22 ++++++++++++++++++++++ > Spencer> 1 file changed, 22 insertions(+) > > Spencer> diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el > Spencer> index eb903f093f9..74e0e1f9b9f 100644 > Spencer> --- a/lisp/vc/ediff-wind.el > Spencer> +++ b/lisp/vc/ediff-wind.el > Spencer> @@ -69,6 +69,16 @@ ediff-window-setup-function > Spencer> (function :tag "Other function")) > Spencer> :version "24.3") > =20 > Spencer> +(defcustom ediff-floating-control-frame nil > Spencer> + "If not-nil, try making the control frame be floating rat= her than tiled. > Spencer> + > > Style: the description of the option should state the action that > follows from a non-nil value: > > "Whether to request a floating control frame rather than a tiled one." No, this is correct style, see (info "(elisp) Documentation Tips") =E2=80=A2 The documentation string for a variable that is a yes-or-no fl= ag should start with words such as =E2=80=9CNon-nil means=E2=80=9D, to ma= ke it clear that all non-=E2=80=98nil=E2=80=99 values are equivalent and indicate = explicitly what =E2=80=98nil=E2=80=99 and non-=E2=80=98nil=E2=80=99 mean. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Allow-floating-the-ediff-control-frame-under-X.patch >From 6b347e419898ade96f459ddec9f1fda8d7dfef84 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Fri, 7 Apr 2023 17:54:06 -0400 Subject: [PATCH] Allow floating the ediff control frame under X This is a step in the direction of making ediff behave better by default under tiling window managers and fixing Bug#62164. * lisp/vc/ediff-wind.el (ediff-floating-control-frame): Add defcustom. (ediff-frame-make-utility, ediff-setup-control-frame): Allow setting the control frame up as a utility window under X. (Bug#62164) --- etc/NEWS | 11 +++++++++++ lisp/vc/ediff-wind.el | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 9e6f0c16bcd..9c99cf6c725 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2314,6 +2314,17 @@ your mail user agent. The behavior of 'vc-prepare-patch' can be modified by the user options 'vc-prepare-patches-separately' and 'vc-default-patch-addressee'. +** Ediff + +--- +*** New user option 'ediff-floating-control-frame'. +If non-nil, try making the control frame be floating rather than tiled. + +Many X tiling window managers make the Ediff control frame a tiled +window equal in size to the main Emacs frame, which works poorly. +This option is useful to set if you use such a window manager, and +will be harmless (or helpful) on most other modern window managers. + ** Message --- diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el index eb903f093f9..3077c562d63 100644 --- a/lisp/vc/ediff-wind.el +++ b/lisp/vc/ediff-wind.el @@ -69,6 +69,16 @@ ediff-window-setup-function (function :tag "Other function")) :version "24.3") +(defcustom ediff-floating-control-frame nil + "If non-nil, try making the control frame be floating rather than tiled. + +If your X window manager makes the Ediff control frame a tiled one, +set this to a non-nil value, and Emacs will try to make it floating. +This only has effect on X displays." + :type '(choice (const :tag "Control frame floats" t) + (const :tag "Control frame has default WM behavior" nil)) + :version "30.1") + (ediff-defvar-local ediff-multiframe nil "Indicates if we are in a multiframe setup.") @@ -873,6 +883,16 @@ ediff-window-ok-for-display (not (ediff-frame-has-dedicated-windows (window-frame wind))) ))) +(defun ediff-frame-make-utility (frame) + (let ((x-fast-protocol-requests t)) + (x-change-window-property + "_NET_WM_WINDOW_TYPE" '("_NET_WM_WINDOW_TYPE_UTILITY") + frame "ATOM" 32 t) + (x-change-window-property + "WM_TRANSIENT_FOR" + (list (string-to-number (frame-parameter nil 'window-id))) + frame "WINDOW" 32 t))) + ;; Prepare or refresh control frame (defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame) (let ((window-min-height 1) @@ -948,6 +968,8 @@ ediff-setup-control-frame (goto-char (point-min)) (modify-frame-parameters ctl-frame adjusted-parameters) + (when (and ediff-floating-control-frame (eq (window-system ctl-frame) 'x)) + (ediff-frame-make-utility ctl-frame)) (make-frame-visible ctl-frame) ;; This works around a bug in 19.25 and earlier. There, if frame gets -- 2.41.0 --=-=-=--