From unknown Sun Jun 22 07:52:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font Resent-From: Anders Lindgren Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Oct 2014 09:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 18789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 18789@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.141396862130627 (code B ref -1); Wed, 22 Oct 2014 09:04:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Oct 2014 09:03:41 +0000 Received: from localhost ([127.0.0.1]:59132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgrpU-0007xu-8v for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53091) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgrpQ-0007xg-N9 for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgrpJ-0004SS-Nq for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrpJ-0004SO-Ld for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrpH-0006Z2-Qz for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgrpF-0004Rc-VS for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:03:27 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:47876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrpF-0004RS-Jl for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:03:25 -0400 Received: by mail-wi0-f173.google.com with SMTP id fb4so733887wid.0 for ; Wed, 22 Oct 2014 02:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=yM46/1uBuNQ/Ny8i45rQdunQ309xk45M9nwQUoVBVRg=; b=DwLa0xwoQkbPowJjKwlTbsPx1b4eSCzY5r7RbKTOgkTgOmLDNwD/ujeKcTbhZ2qK7H 4mNT4HxyCUXpf68lw/ENdE2JGOpTDYXuM+i3vh0XgNaRjAMhmD6uXma4+7DXOtRCC5a+ OOHRKk3EnWgkIjP+spY78icLunH50XVJtRH2ejw5bbp6EeMF71S7tceeTXTAJev+u7M2 NoovXua8ADdataygq63hkxQZiQ/dJeCKLM+qKjlQa8BSHK1MIFC/AKADXt2bRe7SIArI kS51ibxxmpj2XtuorklgfqhgFSkUx9Kqymeu4d0Y6Sg6ttNHZi9k1gzZoi7vm/vzxg6z KB5A== MIME-Version: 1.0 X-Received: by 10.194.94.9 with SMTP id cy9mr1945490wjb.117.1413968603911; Wed, 22 Oct 2014 02:03:23 -0700 (PDT) Received: by 10.216.192.129 with HTTP; Wed, 22 Oct 2014 02:03:23 -0700 (PDT) Date: Wed, 22 Oct 2014 11:03:23 +0200 Message-ID: From: Anders Lindgren Content-Type: multipart/alternative; boundary=047d7bb047dc5c1ad30505ff3857 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --047d7bb047dc5c1ad30505ff3857 Content-Type: text/plain; charset=UTF-8 Hi! Under MS-Windows, it appears that the width of the frame only can be a multiple of the character width. Unfortunately, the width of the fringes and scrollbars used by side-by-side windows does not always add up to full characters -- if you use a font other than the default. The effect is that when using side-by-side windows, you could get a partial column. (Partial columns are not desirable, for example, they work differently when you place the cursor on the end of a full line.) Steps to repeat 1: emacs -q Switch to *scratch*: C-x b RET Evaluate: (set-default-font (create-fontset-from-ascii-font "-raster-Terminal-bold-r-normal-normal-8-60-96-96-c-*-ms-oemlatin")) Split the window using: C-x 3 Insert a long line: C-u 37 x Here, the cursor is at the end of the line in the left window, it is rendered in the right fringe. (OK) Go to the other window: C-x o Place the cursor at the end: C-x > Here, the cursor is visible in the partially visible column. (NOT OK) Steps to repeat 2: emacs -q Evaluate the following: (set-frame-width (selected-frame) 607 nil t) (frame-pixel-width) Here, 632 is returned. (set-frame-width (selected-frame) 608 nil t) (frame-pixel-width) Here, 640 is returned. Clearly, the width of the frame is always a multiple of the character width. See also my package https://github.com/Lindydancer/multicolumn -- I use it to set up six side-by-side windows. (Note: As this writing, it is not updated to work-around the above problems.) Sincerely, Anders Lindgren (Long time Emacs contributor) In GNU Emacs 24.4.1 (x86_64-w64-mingw32) of 2014-10-21 on KAEL Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=/z/emacs --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --with-wide-int --with-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2 --with-gnutls --with-xft --with-sound=yes --with-file-notification=yes --without-dbus --without-imagemagick 'CFLAGS=-Ofast -fomit-frame-pointer -funroll-loops -g0 -pipe' 'CPPFLAGS=-DNDEBUG -DDBUS_STATIC_BUILD' 'LDFLAGS=-static-libgcc -static-libstdc++ -static -s -Wl,-s'' Important settings: value of $LANG: SVE locale-coding-system: cp1252 Major mode: Fundamental Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32notify w32 multi-tty emacs) Memory information: ((conses 16 75502 7207) (symbols 56 17532 0) (miscs 48 78 127) (strings 32 11014 5137) (string-bytes 1 283940) (vectors 16 9121) (vector-slots 8 376122 15963) (floats 8 55 70) (intervals 56 298 0) (buffers 960 14)) --047d7bb047dc5c1ad30505ff3857 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

Under MS-Windows, it app= ears that the width of the frame only can be a multiple of the character wi= dth. Unfortunately, the width of the fringes and scrollbars used by side-by= -side windows does not always add up to full characters -- if you use a fon= t other than the default. The effect is that when using side-by-side window= s, you could get a partial column. (Partial columns are not desirable, for = example, they work differently when you place the cursor on the end of a fu= ll line.)

Steps to repeat 1:
=C2=A0 =C2= =A0 emacs -q

=C2=A0 =C2=A0 Switch to *scratch*: C-= x b RET

=C2=A0 =C2=A0 Evaluate:
=C2=A0 = =C2=A0 (set-default-font
=C2=A0 =C2=A0 =C2=A0 (create-fo= ntset-from-ascii-font
=C2=A0 =C2=A0 =C2=A0 =C2=A0"-raster-Te= rminal-bold-r-normal-normal-8-60-96-96-c-*-ms-oemlatin"))
<= div>
=C2=A0 =C2=A0 Split the window using: C-x 3
=C2=A0 =C2=A0 Insert a long line: C-u 37 x

=C2=A0 =C2=A0 Here, the cursor is at the end of the line in the left = window, it is rendered in the right fringe. (OK)

= =C2=A0 =C2=A0 Go to the other window: C-x o
=C2=A0
=C2= =A0 =C2=A0 Place the cursor at the end: C-x >

= =C2=A0 =C2=A0 Here, the cursor is visible in the partially visible column. = (NOT OK)

Steps to repeat 2:

=C2=A0 =C2=A0 emacs -q

=C2=A0 =C2=A0 =C2=A0= Evaluate the following:

=C2=A0 =C2=A0=C2=A0(set-fr= ame-width (selected-frame) 607 nil t)
=C2=A0 =C2=A0 (frame-p= ixel-width)

=C2=A0 =C2=A0 Here, 632 is returned.

=C2=A0 =C2=A0 (set-frame-width (selected= -frame) 608 nil t)
=C2=A0 =C2=A0 (frame-pixel-width)
<= div>
=C2=A0 =C2=A0 Here, 640 is returned. Clearly, the w= idth of the frame is always a multiple of the character width.
<= div>
See also my package=C2=A0https://github.com/Lindydancer/multicolumn -- I= use it to set up six side-by-side windows. (Note: As this writing, it is n= ot updated to work-around the above problems.)

Sin= cerely,
=C2=A0 =C2=A0 Anders Lindgren (Long time Emacs contributo= r)




In GNU Emacs 24.4.1 (x86_64-w64-mingw32)
=C2=A0of 2014-10-21 o= n KAEL
Windowing system distributor `Microsoft Corp.', versio= n 6.1.7601
Configured using:
=C2=A0`configure --prefix= =3D/z/emacs --host=3Dx86_64-w64-mingw32
=C2=A0--target=3Dx86_64-w= 64-mingw32 --build=3Dx86_64-w64-mingw32 --with-wide-int
=C2=A0--w= ith-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2
=C2=A0--with-gnutls --with-xft --with-sound=3Dyes --with-file-notificatio= n=3Dyes
=C2=A0--without-dbus --without-imagemagick 'CFLAGS=3D= -Ofast
=C2=A0-fomit-frame-pointer -funroll-loops -g0 -pipe' &= #39;CPPFLAGS=3D-DNDEBUG
=C2=A0-DDBUS_STATIC_BUILD' 'LDFLA= GS=3D-static-libgcc -static-libstdc++ -static
=C2=A0-s -Wl,-s'= ;'

Important settings:
=C2=A0 value = of $LANG: SVE
=C2=A0 locale-coding-system: cp1252

<= /div>
Major mode: Fundamental

Minor modes in e= ffect:
=C2=A0 tooltip-mode: t
=C2=A0 electric-indent-mo= de: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: = t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode:= t
=C2=A0 global-font-lock-mode: t
=C2=A0 blink-cursor-= mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-enc= ryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 = buffer-read-only: t
=C2=A0 line-number-mode: t
=C2=A0 t= ransient-mark-mode: t

Recent input:
<= escape> x r e p o <tab> r <tab> <return>
Recent messages:
For information about GNU Emacs and = the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug messag= e format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode ma= il-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047= rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-m= ode easymenu time-date tooltip
electric uniquify ediff-hook vc-ho= oks lisp-float-type mwheel dos-w32
ls-lisp w32-common-fns disp-ta= ble w32-win w32-vars tool-bar dnd fontset
image regexp-opt fringe= tabulated-list newcomment lisp-mode prog-mode
register page menu= -bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock= syntax facemenu font-core frame cham georgian
utf-8-lang misc-la= ng vietnamese tibetan thai tai-viet lao korean
japanese hebrew gr= eek romanian slovak czech european ethiopic indian
cyrillic chine= se case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffe= r nadvice loaddefs button faces cus-face macroexp files
text-prop= erties overlay sha1 md5 base64 format env code-pages mule
custom = widget hashtable-print-readable backquote make-network-process
w3= 2notify w32 multi-tty emacs)

Memory information:
((conses 16 75502 7207)
=C2=A0(symbols 56 17532 0)
=
=C2=A0(miscs 48 78 127)
=C2=A0(strings 32 11014 5137)
<= div>=C2=A0(string-bytes 1 283940)
=C2=A0(vectors 16 9121)
=C2=A0(vector-slots 8 376122 15963)
=C2=A0(floats 8 55 70)
=C2=A0(intervals 56 298 0)
=C2=A0(buffers 960 14))

--047d7bb047dc5c1ad30505ff3857-- From unknown Sun Jun 22 07:52:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Oct 2014 13:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Anders Lindgren , 18789@debbugs.gnu.org Received: via spool by 18789-submit@debbugs.gnu.org id=B18789.141398540030780 (code B ref 18789); Wed, 22 Oct 2014 13:44:02 +0000 Received: (at 18789) by debbugs.gnu.org; 22 Oct 2014 13:43:20 +0000 Received: from localhost ([127.0.0.1]:59282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgwC7-00080N-Jd for submit@debbugs.gnu.org; Wed, 22 Oct 2014 09:43:19 -0400 Received: from mout.gmx.net ([212.227.17.21]:59816) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgwC5-000808-CW for 18789@debbugs.gnu.org; Wed, 22 Oct 2014 09:43:18 -0400 Received: from [88.117.84.220] ([88.117.84.220]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MXEs5-1XbB0a2EU9-00WD5P; Wed, 22 Oct 2014 15:43:09 +0200 Message-ID: <5447B465.600@gmx.at> Date: Wed, 22 Oct 2014 15:43:01 +0200 From: martin rudalics MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:EQQfHrdVje/8Iwxv54qZeuN/ayz433X5wajoWIH3XUEtEHa6Z6O C5zve04W+ibd9wEW1XxkqRpvFitFPwdxUKT8QdT+xiQGbfIrXv3t6LV3Umvizn2zFhp4OWA 2FmBh3tzE7Wj2xraDvAeH67+h/9O2NuoWrNxDipu+f5sIDoLslFVMbPBrwgoTB65zbuS5Jv CU/OzQTpbgSSeTLkr8jqQ== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > Under MS-Windows, it appears that the width of the frame only can be a > multiple of the character width. Unfortunately, the width of the fringes > and scrollbars used by side-by-side windows does not always add up to full > characters -- if you use a font other than the default. The effect is that > when using side-by-side windows, you could get a partial column. (Partial > columns are not desirable, for example, they work differently when you > place the cursor on the end of a full line.) In order to obtain pixelwise resizing you have to set `frame-resize-pixelwise' to a non-nil-value. Please do that. > Steps to repeat 1: > emacs -q > > Switch to *scratch*: C-x b RET > > Evaluate: > (set-default-font > (create-fontset-from-ascii-font > "-raster-Terminal-bold-r-normal-normal-8-60-96-96-c-*-ms-oemlatin")) > > Split the window using: C-x 3 > > Insert a long line: C-u 37 x > > Here, the cursor is at the end of the line in the left window, it is > rendered in the right fringe. (OK) > > Go to the other window: C-x o > > Place the cursor at the end: C-x > > > Here, the cursor is visible in the partially visible column. (NOT OK) Sorry. Such problems can't be avoided, even without fringes and scroll bars, when the window size is not a multiple of the size of the default font. However, you can always calculate your "ideal" frame size based on the number of side-by-side windows and the widths of the font, the scroll bars and the fringes. Provided `frame-resize-pixelwise' is non-nil, `set-frame-width' should then make the frame fit this size. > Steps to repeat 2: > > emacs -q > > Evaluate the following: > > (set-frame-width (selected-frame) 607 nil t) > (frame-pixel-width) > > Here, 632 is returned. > > (set-frame-width (selected-frame) 608 nil t) > (frame-pixel-width) > > Here, 640 is returned. Clearly, the width of the frame is always a > multiple of the character width. Here on windows XP doing (setq frame-resize-pixelwise t) (set-frame-width (selected-frame) 607 nil t) (frame-text-width) yields 607 and (setq frame-resize-pixelwise t) (set-frame-width (selected-frame) 608 nil t) (frame-text-width) yields 608, as expected. martin From unknown Sun Jun 22 07:52:43 2025 X-Loop: help-debbugs@gnu.org Subject: bug#18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Oct 2014 15:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18789 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: martin rudalics Cc: 18789@debbugs.gnu.org, andlind@gmail.com Reply-To: Eli Zaretskii Received: via spool by 18789-submit@debbugs.gnu.org id=B18789.14139899876466 (code B ref 18789); Wed, 22 Oct 2014 15:00:03 +0000 Received: (at 18789) by debbugs.gnu.org; 22 Oct 2014 14:59:47 +0000 Received: from localhost ([127.0.0.1]:59932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgxO7-0001gD-6H for submit@debbugs.gnu.org; Wed, 22 Oct 2014 10:59:47 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:35139) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgxO4-0001fm-9p for 18789@debbugs.gnu.org; Wed, 22 Oct 2014 10:59:45 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NDU00E00PMX9900@a-mtaout20.012.net.il> for 18789@debbugs.gnu.org; Wed, 22 Oct 2014 17:59:37 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NDU00DB2PNDQRB0@a-mtaout20.012.net.il>; Wed, 22 Oct 2014 17:59:37 +0300 (IDT) Date: Wed, 22 Oct 2014 17:59:34 +0300 From: Eli Zaretskii In-reply-to: <5447B465.600@gmx.at> X-012-Sender: halo1@inter.net.il Message-id: <83vbnc8815.fsf@gnu.org> References: <5447B465.600@gmx.at> X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Wed, 22 Oct 2014 15:43:01 +0200 > From: martin rudalics > > > emacs -q > > > > Switch to *scratch*: C-x b RET > > > > Evaluate: > > (set-default-font > > (create-fontset-from-ascii-font > > "-raster-Terminal-bold-r-normal-normal-8-60-96-96-c-*-ms-oemlatin")) > > > > Split the window using: C-x 3 > > > > Insert a long line: C-u 37 x > > > > Here, the cursor is at the end of the line in the left window, it is > > rendered in the right fringe. (OK) > > > > Go to the other window: C-x o > > > > Place the cursor at the end: C-x > > > > > Here, the cursor is visible in the partially visible column. (NOT OK) > > Sorry. Such problems can't be avoided, even without fringes and scroll > bars, when the window size is not a multiple of the size of the default > font. Moreover, the frame size after evaluating the create-fontset-from-ascii-font form is odd, so "C-x 3" cannot possibly create 2 windows of the same width. And that is what you see: one window has one pixel more in its width, so we show the corresponding part of the cursor. I don't see anything wrong with that. From unknown Sun Jun 22 07:52:43 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Anders Lindgren Subject: bug#18789: closed (Re: bug#18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font) Message-ID: References: <54A9822D.7030901@gmx.at> X-Gnu-PR-Message: they-closed 18789 X-Gnu-PR-Package: emacs Reply-To: 18789@debbugs.gnu.org Date: Sun, 04 Jan 2015 18:11:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1420395063-15863-1" This is a multi-part message in MIME format... ------------=_1420395063-15863-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns = when using non-standard font which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 18789@debbugs.gnu.org. --=20 18789: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D18789 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1420395063-15863-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 18789-done) by debbugs.gnu.org; 4 Jan 2015 18:10:56 +0000 Received: from localhost ([127.0.0.1]:36575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7pdg-000475-3C for submit@debbugs.gnu.org; Sun, 04 Jan 2015 13:10:56 -0500 Received: from mout.gmx.net ([212.227.17.20]:50978) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y7pde-00046j-Gh for 18789-done@debbugs.gnu.org; Sun, 04 Jan 2015 13:10:54 -0500 Received: from [188.22.105.237] ([188.22.105.237]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MLA45-1Y7Yei47bF-000Opj; Sun, 04 Jan 2015 19:10:54 +0100 Message-ID: <54A9822D.7030901@gmx.at> Date: Sun, 04 Jan 2015 19:10:53 +0100 From: martin rudalics MIME-Version: 1.0 To: Anders Lindgren Subject: Re: bug#18789: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font References: <5447B465.600@gmx.at> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:DEwxKEcdYdX/lkIxFkCm+jOT33fifYS2A8KAL96Gg7whABvaiLh 9/MD1lR9HpbMVSaXYdaLqYL1w9goXZSLg9WVc4szcBJru8/fZnPPQWXWCfFFb+04wfF8PdG 3JD74F+W9EKpoHWmJpirZN/Jezksu/xkJrDiOTT49cYqSuy2IWNwWRPyEoktM5nHE1G1XF5 MnOYmIHp2GnQ+JGRD8anw== X-UI-Out-Filterresults: notjunk:1; X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 18789-done Cc: 18789-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) > In order to obtain pixelwise resizing you have to set >> `frame-resize-pixelwise' to a non-nil-value. Please do that. >> > > Thanks! That solved my problem! I've updated the docs for set-frame-size/-height-/width appropriately. Closing this bug. Thanks, martin ------------=_1420395063-15863-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Oct 2014 09:03:41 +0000 Received: from localhost ([127.0.0.1]:59132 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgrpU-0007xu-8v for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:41 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53091) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XgrpQ-0007xg-N9 for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgrpJ-0004SS-Nq for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:31 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrpJ-0004SO-Ld for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:03:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54808) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrpH-0006Z2-Qz for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgrpF-0004Rc-VS for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:03:27 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:47876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgrpF-0004RS-Jl for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:03:25 -0400 Received: by mail-wi0-f173.google.com with SMTP id fb4so733887wid.0 for ; Wed, 22 Oct 2014 02:03:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=yM46/1uBuNQ/Ny8i45rQdunQ309xk45M9nwQUoVBVRg=; b=DwLa0xwoQkbPowJjKwlTbsPx1b4eSCzY5r7RbKTOgkTgOmLDNwD/ujeKcTbhZ2qK7H 4mNT4HxyCUXpf68lw/ENdE2JGOpTDYXuM+i3vh0XgNaRjAMhmD6uXma4+7DXOtRCC5a+ OOHRKk3EnWgkIjP+spY78icLunH50XVJtRH2ejw5bbp6EeMF71S7tceeTXTAJev+u7M2 NoovXua8ADdataygq63hkxQZiQ/dJeCKLM+qKjlQa8BSHK1MIFC/AKADXt2bRe7SIArI kS51ibxxmpj2XtuorklgfqhgFSkUx9Kqymeu4d0Y6Sg6ttNHZi9k1gzZoi7vm/vzxg6z KB5A== MIME-Version: 1.0 X-Received: by 10.194.94.9 with SMTP id cy9mr1945490wjb.117.1413968603911; Wed, 22 Oct 2014 02:03:23 -0700 (PDT) Received: by 10.216.192.129 with HTTP; Wed, 22 Oct 2014 02:03:23 -0700 (PDT) Date: Wed, 22 Oct 2014 11:03:23 +0200 Message-ID: Subject: 24.4; Can't resize frame pixelwise on w32, causing partial columns when using non-standard font From: Anders Lindgren To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary=047d7bb047dc5c1ad30505ff3857 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --047d7bb047dc5c1ad30505ff3857 Content-Type: text/plain; charset=UTF-8 Hi! Under MS-Windows, it appears that the width of the frame only can be a multiple of the character width. Unfortunately, the width of the fringes and scrollbars used by side-by-side windows does not always add up to full characters -- if you use a font other than the default. The effect is that when using side-by-side windows, you could get a partial column. (Partial columns are not desirable, for example, they work differently when you place the cursor on the end of a full line.) Steps to repeat 1: emacs -q Switch to *scratch*: C-x b RET Evaluate: (set-default-font (create-fontset-from-ascii-font "-raster-Terminal-bold-r-normal-normal-8-60-96-96-c-*-ms-oemlatin")) Split the window using: C-x 3 Insert a long line: C-u 37 x Here, the cursor is at the end of the line in the left window, it is rendered in the right fringe. (OK) Go to the other window: C-x o Place the cursor at the end: C-x > Here, the cursor is visible in the partially visible column. (NOT OK) Steps to repeat 2: emacs -q Evaluate the following: (set-frame-width (selected-frame) 607 nil t) (frame-pixel-width) Here, 632 is returned. (set-frame-width (selected-frame) 608 nil t) (frame-pixel-width) Here, 640 is returned. Clearly, the width of the frame is always a multiple of the character width. See also my package https://github.com/Lindydancer/multicolumn -- I use it to set up six side-by-side windows. (Note: As this writing, it is not updated to work-around the above problems.) Sincerely, Anders Lindgren (Long time Emacs contributor) In GNU Emacs 24.4.1 (x86_64-w64-mingw32) of 2014-10-21 on KAEL Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=/z/emacs --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --with-wide-int --with-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2 --with-gnutls --with-xft --with-sound=yes --with-file-notification=yes --without-dbus --without-imagemagick 'CFLAGS=-Ofast -fomit-frame-pointer -funroll-loops -g0 -pipe' 'CPPFLAGS=-DNDEBUG -DDBUS_STATIC_BUILD' 'LDFLAGS=-static-libgcc -static-libstdc++ -static -s -Wl,-s'' Important settings: value of $LANG: SVE locale-coding-system: cp1252 Major mode: Fundamental Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils help-mode easymenu time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32notify w32 multi-tty emacs) Memory information: ((conses 16 75502 7207) (symbols 56 17532 0) (miscs 48 78 127) (strings 32 11014 5137) (string-bytes 1 283940) (vectors 16 9121) (vector-slots 8 376122 15963) (floats 8 55 70) (intervals 56 298 0) (buffers 960 14)) --047d7bb047dc5c1ad30505ff3857 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi!

Under MS-Windows, it app= ears that the width of the frame only can be a multiple of the character wi= dth. Unfortunately, the width of the fringes and scrollbars used by side-by= -side windows does not always add up to full characters -- if you use a fon= t other than the default. The effect is that when using side-by-side window= s, you could get a partial column. (Partial columns are not desirable, for = example, they work differently when you place the cursor on the end of a fu= ll line.)

Steps to repeat 1:
=C2=A0 =C2= =A0 emacs -q

=C2=A0 =C2=A0 Switch to *scratch*: C-= x b RET

=C2=A0 =C2=A0 Evaluate:
=C2=A0 = =C2=A0 (set-default-font
=C2=A0 =C2=A0 =C2=A0 (create-fo= ntset-from-ascii-font
=C2=A0 =C2=A0 =C2=A0 =C2=A0"-raster-Te= rminal-bold-r-normal-normal-8-60-96-96-c-*-ms-oemlatin"))
<= div>
=C2=A0 =C2=A0 Split the window using: C-x 3
=C2=A0 =C2=A0 Insert a long line: C-u 37 x

=C2=A0 =C2=A0 Here, the cursor is at the end of the line in the left = window, it is rendered in the right fringe. (OK)

= =C2=A0 =C2=A0 Go to the other window: C-x o
=C2=A0
=C2= =A0 =C2=A0 Place the cursor at the end: C-x >

= =C2=A0 =C2=A0 Here, the cursor is visible in the partially visible column. = (NOT OK)

Steps to repeat 2:

=C2=A0 =C2=A0 emacs -q

=C2=A0 =C2=A0 =C2=A0= Evaluate the following:

=C2=A0 =C2=A0=C2=A0(set-fr= ame-width (selected-frame) 607 nil t)
=C2=A0 =C2=A0 (frame-p= ixel-width)

=C2=A0 =C2=A0 Here, 632 is returned.

=C2=A0 =C2=A0 (set-frame-width (selected= -frame) 608 nil t)
=C2=A0 =C2=A0 (frame-pixel-width)
<= div>
=C2=A0 =C2=A0 Here, 640 is returned. Clearly, the w= idth of the frame is always a multiple of the character width.
<= div>
See also my package=C2=A0https://github.com/Lindydancer/multicolumn -- I= use it to set up six side-by-side windows. (Note: As this writing, it is n= ot updated to work-around the above problems.)

Sin= cerely,
=C2=A0 =C2=A0 Anders Lindgren (Long time Emacs contributo= r)




In GNU Emacs 24.4.1 (x86_64-w64-mingw32)
=C2=A0of 2014-10-21 o= n KAEL
Windowing system distributor `Microsoft Corp.', versio= n 6.1.7601
Configured using:
=C2=A0`configure --prefix= =3D/z/emacs --host=3Dx86_64-w64-mingw32
=C2=A0--target=3Dx86_64-w= 64-mingw32 --build=3Dx86_64-w64-mingw32 --with-wide-int
=C2=A0--w= ith-jpeg --with-xpm --with-png --with-tiff --with-rsvg --with-xml2
=C2=A0--with-gnutls --with-xft --with-sound=3Dyes --with-file-notificatio= n=3Dyes
=C2=A0--without-dbus --without-imagemagick 'CFLAGS=3D= -Ofast
=C2=A0-fomit-frame-pointer -funroll-loops -g0 -pipe' &= #39;CPPFLAGS=3D-DNDEBUG
=C2=A0-DDBUS_STATIC_BUILD' 'LDFLA= GS=3D-static-libgcc -static-libstdc++ -static
=C2=A0-s -Wl,-s'= ;'

Important settings:
=C2=A0 value = of $LANG: SVE
=C2=A0 locale-coding-system: cp1252

<= /div>
Major mode: Fundamental

Minor modes in e= ffect:
=C2=A0 tooltip-mode: t
=C2=A0 electric-indent-mo= de: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: = t
=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode:= t
=C2=A0 global-font-lock-mode: t
=C2=A0 blink-cursor-= mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 auto-enc= ryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 = buffer-read-only: t
=C2=A0 line-number-mode: t
=C2=A0 t= ransient-mark-mode: t

Recent input:
<= escape> x r e p o <tab> r <tab> <return>
Recent messages:
For information about GNU Emacs and = the GNU system, type C-h C-a.
Making completion list...

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug messag= e format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode ma= il-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047= rfc2045 ietf-drums mm-util
help-fns mail-prsvr mail-utils help-m= ode easymenu time-date tooltip
electric uniquify ediff-hook vc-ho= oks lisp-float-type mwheel dos-w32
ls-lisp w32-common-fns disp-ta= ble w32-win w32-vars tool-bar dnd fontset
image regexp-opt fringe= tabulated-list newcomment lisp-mode prog-mode
register page menu= -bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock= syntax facemenu font-core frame cham georgian
utf-8-lang misc-la= ng vietnamese tibetan thai tai-viet lao korean
japanese hebrew gr= eek romanian slovak czech european ethiopic indian
cyrillic chine= se case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffe= r nadvice loaddefs button faces cus-face macroexp files
text-prop= erties overlay sha1 md5 base64 format env code-pages mule
custom = widget hashtable-print-readable backquote make-network-process
w3= 2notify w32 multi-tty emacs)

Memory information:
((conses 16 75502 7207)
=C2=A0(symbols 56 17532 0)
=
=C2=A0(miscs 48 78 127)
=C2=A0(strings 32 11014 5137)
<= div>=C2=A0(string-bytes 1 283940)
=C2=A0(vectors 16 9121)
=C2=A0(vector-slots 8 376122 15963)
=C2=A0(floats 8 55 70)
=C2=A0(intervals 56 298 0)
=C2=A0(buffers 960 14))

--047d7bb047dc5c1ad30505ff3857-- ------------=_1420395063-15863-1--