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#74750: clone-frame and make-frame pixelwise issues Date: Mon, 16 Dec 2024 19:32:22 +0200 Message-ID: <86msgvpm8p.fsf@gnu.org> References: <861pyfd8pe.fsf@gnu.org> <4d057282-8ec2-4ddb-ac0f-23e65af6e5a1@gmx.at> <7404039b-e71e-44e5-a446-70fa07889528@gmx.at> <1ed054fc-4b82-47cf-8d89-4768b56b88a7@gmx.at> <544d13ee-54f0-4786-8c5b-b1c87570f36c@gmx.at> <391ac457-09d0-4541-bc65-cddde4d23929@gmx.at> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26347"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rudalics@gmx.at, 74750@debbugs.gnu.org To: Ship Mints Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 16 18:33:23 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 1tNEyB-0006jZ-9G for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Dec 2024 18:33:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNEy8-0003tm-Np; Mon, 16 Dec 2024 12:33:20 -0500 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 1tNExt-0003kn-Pv for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:33:08 -0500 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 1tNExs-0002ve-Fj for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:33:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=7DLhI5jwxsnEqUbdi+W7cOQiPr+hlE+hUdK/LCpBSNE=; b=uQfN0MN3YcO0yklz1YBIgFpVxHM6UVQHo9TBe97wPbLXtbDAQpVejxIoJ/L1ZjGbRK9F8EHygOKAc9YHARjqeXScZFIfNPD4D84BSHmwYjo0lOkEHk5+d2whtWf7OFsuhOrPXsExT3qU3sk2IewOp6VSlQkLHaiLdoQccICT73133ouplXivT395VAtldNcTW3ukgu8HTvIgfU4WxrbcMYRLWHVSRwZDV1845wa/XHVqA5W53M5T8ZjpjSd2M59W6oz+BXTVVbuYKKvr6sz76taDZMZpFPS7NrONqPaoVeU2+CZteulQiMnASHOAF5tR7GXqC21S0lznLBJMnIRZ7A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tNExr-0006en-3t for bug-gnu-emacs@gnu.org; Mon, 16 Dec 2024 12:33:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Dec 2024 17:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74750 X-GNU-PR-Package: emacs Original-Received: via spool by 74750-submit@debbugs.gnu.org id=B74750.173437036825554 (code B ref 74750); Mon, 16 Dec 2024 17:33:02 +0000 Original-Received: (at 74750) by debbugs.gnu.org; 16 Dec 2024 17:32:48 +0000 Original-Received: from localhost ([127.0.0.1]:55926 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNExb-0006e0-7m for submit@debbugs.gnu.org; Mon, 16 Dec 2024 12:32:47 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:54416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tNExW-0006dY-6q for 74750@debbugs.gnu.org; Mon, 16 Dec 2024 12:32:45 -0500 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 1tNExM-0002rr-I8; Mon, 16 Dec 2024 12:32:33 -0500 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=7DLhI5jwxsnEqUbdi+W7cOQiPr+hlE+hUdK/LCpBSNE=; b=mSgSwjg6P++c QRI3aKic6EJAdrTUdOY8K3gnk+xXhBPAGvQYggSEdvBLYXFdW1X+1cD6J9zynRf7Ry4ymu37Bp2/z eHFlT4eJvYpKGGcEV921Iwmn6hennfwR2Uv24a/6+ratnabMdcHVLsq6h9fU5TaUIMwdLVVsDXDv5 OKb/6pOKlRiV+moUo/0nVHqfcEvzBBpB0+bJn+Nd2HzdCrqYpwvtpi21rFxcwSDwJSr5Kr5v+Nman iM/YJ4AYe8g6HDm3KSJba1bjygKaIgf6O6KgR3CpBULkCDv33rkaX2iUKs4fvIRofLYsO+O9GHFsT rM74DDdIMASFARR+AMJ8Lg==; In-Reply-To: (message from Ship Mints on Mon, 16 Dec 2024 11:39:02 -0500) 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:297198 Archived-At: > From: Ship Mints > Date: Mon, 16 Dec 2024 11:39:02 -0500 > Cc: Eli Zaretskii , 74750@debbugs.gnu.org > > Patch attached. Thanks. > (defun clone-frame (&optional frame no-windows) > "Make a new frame with the same parameters and windows as FRAME. > With a prefix arg NO-WINDOWS, don't clone the window configuration. > +When the user option `frame-resize-pixelwise' is non-nil, and FRAME is Please avoid using "when" as a conditional; use "if" instead. "When" can be interpreted as time-related condition, which is not what you want. > +not text-only, clone the originating frame's pixel size. Otherwise, use > +the number of FRAME's columns and lines for the clone. This uses double negation, which makes the documentation harder to understand. Suggest to rephrase: By default, clone the pixel-size of the original frame, but if `frame-resize-pixelwise' is nil or FRAME is a text-only frame, use the FRAME's number of lines and columns for the clone. > - (unless (display-graphic-p) > + (unless (display-graphic-p frame) > (select-frame new-frame)) Why do you need this condition?