unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juanma Barranquero <lekktu@gmail.com>
To: martin rudalics <rudalics@gmx.at>
Cc: 17589@debbugs.gnu.org, Arash Cue <eg5cue@gmail.com>
Subject: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 00:34:49 +0200	[thread overview]
Message-ID: <CAAeL0SRMeV67ZLyAXxyhcnYGPswyY4dmd_bBF-dTAxFN7ioirw@mail.gmail.com> (raw)
In-Reply-To: <5384C7FE.9010005@gmx.at>

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

On Tue, May 27, 2014 at 7:14 PM, martin rudalics <rudalics@gmx.at> wrote:

> Probably `frameset-save' could use a WRITABLE argument too (passing it
> on to `window-state-get') and `frameset-to-register' would call
> `frameset-save' with WRITABLE nil.

Yep, that's the only way I see to solve this. That, or some horrible
hack in frameset-to-register which I don't even want to start thinking
about.

Arash, could you please try with Martin's proposed change to window.el
plus the attached patch to frameset.el?

TIA,

    J

[-- Attachment #2: 17589.diff --]
[-- Type: text/plain, Size: 2075 bytes --]

=== modified file 'lisp/frameset.el'
--- lisp/frameset.el	2014-03-27 01:01:36 +0000
+++ lisp/frameset.el	2014-05-27 22:31:49 +0000
@@ -748,7 +748,8 @@
 ;;;###autoload
 (cl-defun frameset-save (frame-list
 			 &key app name description
-			      filters predicate properties)
+			      filters predicate properties
+			      in-session)
   "Return a frameset for FRAME-LIST, a list of frames.
 Dead frames and non-frame objects are silently removed from the list.
 If nil, FRAME-LIST defaults to the output of `frame-list' (all live frames).
@@ -758,13 +759,16 @@
 `frameset-filter-alist' is used instead.
 PREDICATE is a predicate function, which must return non-nil for frames that
 should be saved; if PREDICATE is nil, all frames from FRAME-LIST are saved.
-PROPERTIES is a user-defined property list to add to the frameset."
+PROPERTIES is a user-defined property list to add to the frameset.
+IN-SESSION, if non-nil, means that the resulting frameset is meant to be
+used in the current Emacs session and not serialized to an external store."
   (let* ((list (or (copy-sequence frame-list) (frame-list)))
 	 (frameset--target-display nil)
 	 (frames (cl-delete-if-not #'frame-live-p
 				   (if predicate
 				       (cl-delete-if-not predicate list)
 				     list)))
+	 (writable (not in-session))
 	 fs)
     (frameset--record-minibuffer-relationships frames)
     (setq fs (frameset--make
@@ -779,7 +783,7 @@
 						  (or filters
 						      frameset-filter-alist)
 						  t)
-			  (window-state-get (frame-root-window frame) t)))
+			  (window-state-get (frame-root-window frame) writable)))
 		       frames)))
     (cl-assert (frameset-valid-p fs))
     fs))
@@ -1277,7 +1281,8 @@
 		(registerv-make
 		 (vector (frameset-save nil
 					:app 'register
-					:filters frameset-session-filter-alist)
+					:filters frameset-session-filter-alist
+					:in-session t)
 			 ;; frameset-save does not include the value of point
 			 ;; in the current buffer, so record that separately.
 			 (frameset-frame-id nil)


  reply	other threads:[~2014-05-27 22:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25 20:49 bug#17589: 24.3.91; lisp/frameset.el eg5cue
2014-05-26 17:18 ` Juanma Barranquero
2014-05-26 17:49   ` Arash Cue
2014-05-26 19:04     ` Juanma Barranquero
2014-05-26 20:32       ` Stefan Monnier
2014-05-26 20:42         ` Juanma Barranquero
2014-05-27  7:34           ` martin rudalics
2014-05-27  8:32             ` Juanma Barranquero
2014-05-27  9:13               ` martin rudalics
2014-05-27  9:40                 ` Juanma Barranquero
2014-05-27 10:08                   ` martin rudalics
2014-05-27 10:53                     ` Juanma Barranquero
2014-05-27 13:09                       ` martin rudalics
2014-05-27 13:11                         ` Juanma Barranquero
2014-05-27 13:30                           ` Stefan Monnier
2014-05-27 16:45                         ` Arash Cue
2014-05-27 17:14                           ` martin rudalics
2014-05-27 22:34                             ` Juanma Barranquero [this message]
2014-05-28  0:16                               ` Arash Cue
2014-05-28  4:50                                 ` Juanma Barranquero
2014-05-28  5:26                                   ` Juanma Barranquero
2014-05-28 11:35                                   ` Arash Cue
2014-05-30  2:10                                     ` Juanma Barranquero
2014-05-28  0:22                               ` Stefan Monnier
2014-05-28  4:55                                 ` Juanma Barranquero
2014-05-28  5:28                                 ` Juanma Barranquero
2014-05-28 13:05                                   ` Stefan Monnier
2014-05-30  2:17                                     ` Juanma Barranquero
2020-09-09 12:06                               ` Lars Ingebrigtsen
2021-10-10 22:46                                 ` Stefan Kangas
2021-10-11  7:55                                   ` Lars Ingebrigtsen
2021-10-11 11:41                                     ` Stefan Kangas

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=CAAeL0SRMeV67ZLyAXxyhcnYGPswyY4dmd_bBF-dTAxFN7ioirw@mail.gmail.com \
    --to=lekktu@gmail.com \
    --cc=17589@debbugs.gnu.org \
    --cc=eg5cue@gmail.com \
    --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).