From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#30141: (26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes) Date: Sat, 20 Jan 2018 11:35:09 +0100 Message-ID: <5A631B5D.2090604@gmx.at> References: <5A5F1397.2050001@gmx.at> <5A623F19.6080608@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1516444555 17273 195.159.176.226 (20 Jan 2018 10:35:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 Jan 2018 10:35:55 +0000 (UTC) To: Aaron Jensen , 30141@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jan 20 11:35:50 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecqUw-0003mD-IY for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jan 2018 11:35:43 +0100 Original-Received: from localhost ([::1]:58286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecqWw-0005W2-R8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 20 Jan 2018 05:37:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecqVJ-0004az-Po for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 05:36:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecqVG-0000dL-MP for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 05:36:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecqVG-0000dF-JK for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 05:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecqVG-0005Bo-BC for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2018 05:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jan 2018 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30141 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30141-submit@debbugs.gnu.org id=B30141.151644451819883 (code B ref 30141); Sat, 20 Jan 2018 10:36:02 +0000 Original-Received: (at 30141) by debbugs.gnu.org; 20 Jan 2018 10:35:18 +0000 Original-Received: from localhost ([127.0.0.1]:35574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecqUY-0005Ad-GV for submit@debbugs.gnu.org; Sat, 20 Jan 2018 05:35:18 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:63979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ecqUX-0005AQ-0Q for 30141@debbugs.gnu.org; Sat, 20 Jan 2018 05:35:17 -0500 Original-Received: from [192.168.1.100] ([213.162.73.109]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MWkZL-1eIIOz24tf-00XpSt; Sat, 20 Jan 2018 11:35:10 +0100 In-Reply-To: X-Provags-ID: V03:K0:nYQut5Z9nRY2oI6YBIqsHxLzydOEQjFBRioYKFVSSFpGuUYGKil 5eZHQJlBzbLCSp6a1MXfOvZIQ82qSo/H737pL1m3iVliuyDsWnuUBKKcFA4vXRni7/RyB8Z ae0CO5WiChAcLjPB+xJt7KNMyFvAXiMiGW6sCw6ZjpGBtvRKak4W+iHMljlEW9u49pGYtyd 7N1S6fD7Xazoa1q7YdDvg== X-UI-Out-Filterresults: notjunk:1;V01:K0:49vTrfMacno=:58+X1g0DVlbEvS0ambdEl4 Dv8zZ9M4Sr20yjeM4zPjgTR1l5NVsDDKoHmeEiT8cPO0nJ7mzE7ZfP3OejCUrSYvrRz7aoVy9 AqHS15teVWl0XQamj6A5Gi69TmAEE8LtBmitX/ZHiisaDowwe4CyNN1+oXnDM31sYwfR9yXOw gQuwd+/yij3ZUnd66Rjj2ttcU6dWm1k6oBAdMP50Z5/rLiL8tSCzFbGOIgjAEC0kWQNWzwBPL LHdhf0BN0wqbBkVHXJ6zrEzEv56tJQOB5OqGz8C4rkaz+Bmy3ie8MNExMDwm3bhbkrPenkQKj BlaLSvRrYOjP8QeDDLgEVzekgRbsLVXff3u15hEJQrKZ5yanC9RKSmV/lFd8n5gtRofXltSOR 1ePDsLVy8PHXhHscq8V9er0QH4x3lxlBkWLvYQgiWgI2DzQMKPZ8rC04mm4tqBiyFr8qTeGI0 4pcNflv6eArH45UmyBM13VVYXJxqT0Dz8O9g8wkJ2x/rVfLyy2arVmbhlhi247N3uom6ww9Pa P9kBmTM6bk6CKm4NJVEQmC1Nlwe6EOwxDETMlFspkaaVrNlqNxLwf0z96TeNYJJ0grVJGyqez zkQNE7VY+7Zmq2bohTJt4Pue4LuoFLViBnyTwyP03zZZdM5pyEpF01YbTSsOd8PE7mDQ8w53a 2bKkrsNt2M+TbG/C964YPmZ09tJN1GmJDnyJJ+2Gu24oXSqPGd1m+PKKo3dNt8TAh7MOEgWVf nxjSIyFf05E/zudUecjrIslRbj0pD0Uj7OomllzMcCUahZh36D6t+MRp6MzZrYF+u9vBlEcZ X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142314 Archived-At: > The issue is when you have the frame sized to be a > non-multiple of the font-width (pixel sized), save the desktop, then > restart emacs and restore the desktop. > > At this point you=E2=80=99ll have a pixel width in your frame paramete= rs. > > Then if you resize the frame to be a multiple of the font-width and > save the desktop, you end up writing the previous pixel widths because= > they were in frame parameters and we do not reset them unless you are > using a non-multiple of the font width. > > If that doesn=E2=80=99t make sense I can try and write up a repro when= I get a chance. Thanks, I understand now. I'm afraid it's the implementation that doesn't make sense but your patch does and should be applied. I'm not sure whether we still can do that on the release branch. Eli? Eventually, we should fix this in a more profound way, though I don't know yet how. When I wrote the code to allow pixelwise resizing of frames, one major aim was to not interfere with existing behavior. I decided to use a global variable (`frame-resize-pixelwise') which was intended for interfacing with the window manager: When nil, Emacs should continue to work as before, when non-nil, the new pixelwise behavior would be allowed to take over. Mixing the two was not intended (at that time frameset.el didn't exist yet). Neither were pixel values for the 'width' and 'height' frame parameters - 'text-pixels' was added later. Whether an individual frame would be resized pixelwise was decided by the PIXELWISE argument of functions like `set-frame-size'. And to make sure the latter would succeed, on some systems making `frame-resize-pixelwise' non-nil was a prerequisite. This idea breaks when pixelwise and non-pixelwise behavior are mixed in one and the same session either for one and the same frame or for different frames. It might be possible to fix that by adding a 'resize-pixelwise' frame parameter to override the global variable's value. But what's really needed are two different parameters for width and height: One for the value that has been asked for by the user (to be specified the way it is now now) and one for the value realized by the windowing system (a simple pixel value). Unfortunately, I have no good idea how to keep these two apart. Maybe we need three parameters - the old 'width' say, a 'requested-width' and a 'realized-width'. Which might be still insufficient - what would the 'realized-width' of a maximized or fullscreen frame be? martin