GNU bug report logs - #74750
clone-frame and make-frame pixelwise issues

Previous Next

Package: emacs;

Reported by: Ship Mints <shipmints <at> gmail.com>

Date: Mon, 9 Dec 2024 15:53:02 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ship Mints <shipmints <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rudalics <at> gmx.at, 74750 <at> debbugs.gnu.org
Subject: bug#74750: clone-frame and make-frame pixelwise issues
Date: Mon, 16 Dec 2024 12:51:14 -0500
[Message part 1 (text/plain, inline)]
Updated patch with docstring amendments.

The tty test you're asking about was already in place, I merely added the
missing frame argument that ensures the test is against the source frame
rather than the ambient selected-frame. As to its utility, I can go only by
the docstring sentence that reads "If the terminal is a text-only terminal
then also select the new frame." Seems to have originated with this
commit 2c662e6d66165db8ead2f4d19a61af521807b8ba in 2021 when clone-frame
was introduced.

On Mon, Dec 16, 2024 at 12:32 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Ship Mints <shipmints <at> gmail.com>
> > Date: Mon, 16 Dec 2024 11:39:02 -0500
> > Cc: Eli Zaretskii <eliz <at> gnu.org>, 74750 <at> 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?
>
[Message part 2 (text/html, inline)]
[0001-Support-pixelwise-frame-cloning-bug-74750.patch (application/octet-stream, attachment)]

This bug report was last modified 225 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.