GNU bug report logs - #38146
26.1; set-frame-width sometimes does not work on OSX

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sat, 9 Nov 2019 09:22:01 UTC

Severity: normal

Found in version 26.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 38146 in the body.
You can then email your comments to 38146 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#38146; Package emacs. (Sat, 09 Nov 2019 09:22:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Markus Triska <triska <at> metalevel.at>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 09 Nov 2019 09:22:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Markus Triska <triska <at> metalevel.at>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; set-frame-width sometimes does not work on OSX
Date: Sat, 09 Nov 2019 10:21:13 +0100
When I do:

    $ emacs -Q -l frame.el

where frame.el consists of the forms:

    (defface item-frame
      '((((class color))
         (:family "DejaVu Sans Mono"
          :height 151)))
      "Face for frame to demonstrate the issue.")

    (progn
      (set-frame-font (face-font 'item-frame))
      (set-frame-width nil 102)
      (set-frame-position nil
                          (/ (- (display-pixel-width) (frame-pixel-width)) 2)
                          (cdr (frame-position))))

and then, in the resulting Emacs instance, do:

    M-: (frame-width) RET

I get: 80.

However, the expected result is 102, because the form
(set-frame-width nil 102) above sets the frame width to 102.

I get the expected value of 102 if I remove the call to
set-frame-position. This is unexpected, because whether
set-frame-position is called should not influence the frame width.

When I evaluate the form (set-frame-width nil 102) in the resulting
Emacs instance, the frame width is set to 102 as expected.

Thank you for looking into this!

All the best,
Markus


In GNU Emacs 26.1 (build 1, x86_64-apple-darwin15.3.0, X toolkit, Xaw scroll bars)
 of 2018-09-22 built on mt-mb
Windowing system distributor 'The X.Org Foundation', version 11.0.11502000

Configured using:
 'configure --prefix=/opt/local --without-ns --without-dbus
 --without-gconf --without-libotf --without-m17n-flt --without-gpm
 --with-gnutls --with-xml2 --with-modules --infodir
 /opt/local/share/info/emacs --with-x-toolkit=lucid --without-xaw3d
 --without-imagemagick --with-xpm --with-jpeg --with-tiff --with-gif
 --with-png --with-lcms2 --without-rsvg --with-xft 'CFLAGS=-pipe -Os
 -arch x86_64' CPPFLAGS=-I/opt/local/include 'LDFLAGS=-L/opt/local/lib
 -Wl,-headerpad_max_install_names -lfreetype -lfontconfig -Wl,-no_pie
 -arch x86_64''

Configured features:
XPM JPEG TIFF GIF PNG GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 MODULES THREADS LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38146; Package emacs. (Sun, 10 Nov 2019 10:02:01 GMT) Full text and rfc822 format available.

Message #8 received at 38146 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Markus Triska <triska <at> metalevel.at>, 38146 <at> debbugs.gnu.org
Subject: Re: bug#38146: 26.1; set-frame-width sometimes does not work on OSX
Date: Sun, 10 Nov 2019 11:01:26 +0100
> When I do:
>
>      $ emacs -Q -l frame.el
>
> where frame.el consists of the forms:
>
>      (defface item-frame
>        '((((class color))
>           (:family "DejaVu Sans Mono"
>            :height 151)))
>        "Face for frame to demonstrate the issue.")
>
>      (progn
>        (set-frame-font (face-font 'item-frame))
>        (set-frame-width nil 102)
>        (set-frame-position nil
>                            (/ (- (display-pixel-width) (frame-pixel-width)) 2)
>                            (cdr (frame-position))))
>
> and then, in the resulting Emacs instance, do:
>
>      M-: (frame-width) RET
>
> I get: 80.
>
> However, the expected result is 102, because the form
> (set-frame-width nil 102) above sets the frame width to 102.
>
> I get the expected value of 102 if I remove the call to
> set-frame-position. This is unexpected, because whether
> set-frame-position is called should not influence the frame width.
>
> When I evaluate the form (set-frame-width nil 102) in the resulting
> Emacs instance, the frame width is set to 102 as expected.

Here I get 102, for example with a GNUstep build on Debian.  The
behavior you see is OS and window manager dependent.  Sometimes
setting all desired values in one 'modify-frame-parameters' call
helps.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#38146; Package emacs. (Sat, 30 Jan 2021 07:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 38146 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Markus Triska <triska <at> metalevel.at>, 38146 <at> debbugs.gnu.org
Subject: Re: bug#38146: 26.1; set-frame-width sometimes does not work on OSX
Date: Sat, 30 Jan 2021 08:03:52 +0100
martin rudalics <rudalics <at> gmx.at> writes:

> Here I get 102, for example with a GNUstep build on Debian.  The
> behavior you see is OS and window manager dependent.  Sometimes
> setting all desired values in one 'modify-frame-parameters' call
> helps.

I guess there's nothing to fix here?  So I'm closing this bug report.
If there's something here that needs work, please respond to the debbugs
address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 38146 <at> debbugs.gnu.org and Markus Triska <triska <at> metalevel.at> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 30 Jan 2021 07:05:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 27 Feb 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 57 days ago.

Previous Next


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