unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: martin rudalics <rudalics@gmx.at>, 30141@debbugs.gnu.org
Subject: bug#30141: (26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes)
Date: Wed, 17 Jan 2018 03:50:24 -0800	[thread overview]
Message-ID: <CAHyO48xx30wYKbfE4qz1aU+R7uOyqOtOS65p-DiVvvzsPB0w+Q@mail.gmail.com> (raw)
In-Reply-To: <5A5F1397.2050001@gmx.at>

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

From: martin rudalics (mailto:rudalics@gmx.at)
> Doesn't look wrong to me. But if we use it we'd have to change the
> comment below:

Updated patch attached.

I tried out a naive approach to filtering (filter out all frameset--
params when restoring) and it broke on the mini buffer restoring,
though I didn’t debug the exact issue.

Reading over the code makes me wonder if I put the text pixel
width/height saving code in the wrong place,
frameset--record-relationships, as it is named, seems to be more about
the relationships between frames. Tossing in pixel sizing in there is
a bit misplaced probably. Maybe it would be more appropriate to add a
custom width/height filter that would save the text pixel width/height
while filtering.

Either way, this patch fixes a bug so it is probably worth applying if
you’re good with it.

Thanks,

Aaron

[-- Attachment #2: patch2 --]
[-- Type: application/octet-stream, Size: 4111 bytes --]

diff --git a/lisp/frameset.el b/lisp/frameset.el
index 3fb6901e94..f9e3b689fb 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -230,11 +230,10 @@ frameset-prop
 ;; filtering functions) is copied to FILTERED as is.  Keyword values :save,
 ;; :restore and :never tell the function to copy CURRENT to FILTERED in the
 ;; respective situations, that is, when saving, restoring, or never at all.
-;; Values :save and :restore are not used in this package, because usually if
-;; you don't want to save a parameter, you don't want to restore it either.
-;; But they can be useful, for example, if you already have a saved frameset
-;; created with some intent, and want to reuse it for a different objective
-;; where the expected parameter list has different requirements.
+;; Values :save and :restore can be useful, for example, if you already
+;; have a saved frameset created with some intent, and want to reuse it for
+;; a different objective where the expected parameter list has different
+;; requirements.
 ;;
 ;; Finally, the value can also be a filtering function, or a filtering
 ;; function plus some arguments.  The function is called for each matching
@@ -442,32 +441,34 @@ frameset-session-filter-alist
 ;;;###autoload
 (defvar frameset-persistent-filter-alist
   (nconc
-   '((background-color   . frameset-filter-sanitize-color)
-     (buffer-list        . :never)
-     (buffer-predicate   . :never)
-     (buried-buffer-list . :never)
+   '((background-color            . frameset-filter-sanitize-color)
+     (buffer-list                 . :never)
+     (buffer-predicate            . :never)
+     (buried-buffer-list          . :never)
      ;; Don't save the 'client' parameter to avoid that a subsequent
      ;; `save-buffers-kill-terminal' in a non-client session barks at
      ;; the user (Bug#29067).
-     (client             . :never)
-     (delete-before      . :never)
-     (font               . frameset-filter-font-param)
-     (foreground-color   . frameset-filter-sanitize-color)
-     (fullscreen         . frameset-filter-shelve-param)
-     (GUI:font           . frameset-filter-unshelve-param)
-     (GUI:fullscreen     . frameset-filter-unshelve-param)
-     (GUI:height         . frameset-filter-unshelve-param)
-     (GUI:width          . frameset-filter-unshelve-param)
-     (height             . frameset-filter-shelve-param)
-     (outer-window-id    . :never)
-     (parent-frame       . :never)
-     (parent-id          . :never)
-     (mouse-wheel-frame  . :never)
-     (tty                . frameset-filter-tty-to-GUI)
-     (tty-type           . frameset-filter-tty-to-GUI)
-     (width              . frameset-filter-shelve-param)
-     (window-id          . :never)
-     (window-system      . :never))
+     (client                      . :never)
+     (delete-before               . :never)
+     (font                        . frameset-filter-font-param)
+     (foreground-color            . frameset-filter-sanitize-color)
+     (frameset--text-pixel-height . :save)
+     (frameset--text-pixel-width  . :save)
+     (fullscreen                  . frameset-filter-shelve-param)
+     (GUI:font                    . frameset-filter-unshelve-param)
+     (GUI:fullscreen              . frameset-filter-unshelve-param)
+     (GUI:height                  . frameset-filter-unshelve-param)
+     (GUI:width                   . frameset-filter-unshelve-param)
+     (height                      . frameset-filter-shelve-param)
+     (outer-window-id             . :never)
+     (parent-frame                . :never)
+     (parent-id                   . :never)
+     (mouse-wheel-frame           . :never)
+     (tty                         . frameset-filter-tty-to-GUI)
+     (tty-type                    . frameset-filter-tty-to-GUI)
+     (width                       . frameset-filter-shelve-param)
+     (window-id                   . :never)
+     (window-system               . :never))
    frameset-session-filter-alist)
   "Parameters to filter for persistent framesets.
 DO NOT MODIFY.  See `frameset-filter-alist' for a full description.")

  reply	other threads:[~2018-01-17 11:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17  1:24 bug#30141: 26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes Aaron Jensen
2018-01-17  5:43 ` bug#30141: (26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes) Aaron Jensen
2018-01-17  8:49   ` Robert Pluim
2018-01-17 11:45     ` Aaron Jensen
2018-01-17  9:12   ` martin rudalics
2018-01-17 11:50     ` Aaron Jensen [this message]
2018-01-17 11:59       ` Aaron Jensen
2018-01-19 18:55       ` martin rudalics
2018-01-19 19:00         ` Aaron Jensen
2018-01-20 10:35           ` martin rudalics
2018-01-20 10:50             ` Eli Zaretskii
2018-01-20 14:07               ` martin rudalics
2018-01-20 14:33                 ` Eli Zaretskii
2018-01-22  9:54                   ` martin rudalics
2018-02-13 10:23                     ` martin rudalics
2018-03-12 22:18           ` Aaron Jensen
2018-03-13  7:26             ` martin rudalics
2018-03-13 15:32               ` Aaron Jensen
2018-03-14  8:14                 ` martin rudalics
2018-03-14 14:59                   ` Aaron Jensen
2018-03-14 15:15                     ` Aaron Jensen
2018-03-14 20:05                       ` martin rudalics
2018-03-14 20:12                         ` Aaron Jensen
2018-03-15  8:20                           ` martin rudalics
2018-03-15 15:24                             ` Aaron Jensen
2018-03-17 10:05                               ` martin rudalics
2018-03-17 10:11                                 ` Noam Postavsky
2018-03-17 11:08                                   ` martin rudalics
2018-03-17 11:16                                     ` Eli Zaretskii
2018-03-17 11:28                                       ` martin rudalics
2018-03-17 16:32                                 ` Aaron Jensen
2018-01-17  9:12 ` bug#30141: 26.0.91; text-pixel dimensions not properly saved by desktop-save-mode sometimes martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHyO48xx30wYKbfE4qz1aU+R7uOyqOtOS65p-DiVvvzsPB0w+Q@mail.gmail.com \
    --to=aaronjensen@gmail.com \
    --cc=30141@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).