GNU bug report logs - #17589
24.3.91; lisp/frameset.el

Previous Next

Package: emacs;

Reported by: eg5cue <at> gmail.com

Date: Sun, 25 May 2014 19:47:02 UTC

Severity: normal

Tags: patch

Done: Stefan Kangas <stefan <at> marxist.se>

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 17589 in the body.
You can then email your comments to 17589 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#17589; Package emacs. (Sun, 25 May 2014 19:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to eg5cue <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org.

Your message had a Version: pseudo-header with an invalid package version:

git 24.3.91.1 (branch emacs-24)

please either use found or fixed to the control server with a correct version, or reply to this report indicating the correct version so the maintainer (or someone else) can correct it for you.

(Sun, 25 May 2014 19:47:03 GMT) Full text and rfc822 format available.


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

From: eg5cue <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.91; lisp/frameset.el
Date: Sun, 25 May 2014 20:49:10 +0000
cmdline: emacs -Q
version: git 24.3.91.1 (branch emacs-24)

frame 'a': (C-x r f a)
changing buffers and windows ...
frame 'b': (C-x r f b)
when i want to go back to 'a' (C-x r j a) emacs can't remember the frame and
open random buffer instead. (no error)
i tried both GUI and terminal versions. 









In GNU Emacs 24.3.91.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8)
 of 2014-05-25 on XX
Windowing system distributor `The X.Org Foundation', version 11.0.11500000
System Description:	Gentoo Base System release 2.2

Configured using:
 `configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --libdir=/usr/lib64 --disable-silent-rules
 --disable-dependency-tracking --program-suffix=-emacs-24-git
 --infodir=/usr/share/info/emacs-24-git --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --with-gameuser=games --without-compress-install
 --with-file-notification=inotify --enable-acl --with-dbus --with-gnutls
 --with-gpm --without-hesiod --without-kerberos --without-kerberos5
 --with-xml2 --without-selinux --with-wide-int --with-zlib
 --with-sound=alsa --with-x --without-ns --without-gconf
 --without-gsettings --without-toolkit-scroll-bars --without-gif
 --without-jpeg --without-png --without-rsvg --without-tiff --with-xpm
 --without-imagemagick --with-xft --without-libotf --without-m17n-flt
 --with-x-toolkit=gtk3 GENTOO_PACKAGE=app-editors/emacs-git-24.4.9999
 'CFLAGS=-O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed''

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

Memory information:
((conses 16 185981 8887)
 (symbols 48 30733 0)
 (miscs 40 73 106)
 (strings 32 47584 5705)
 (string-bytes 1 1463860)
 (vectors 16 22398)
 (vector-slots 8 506557 4327)
 (floats 8 125 71)
 (intervals 56 301 0)
 (buffers 960 15)
 (heap 1024 41524 1001))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Mon, 26 May 2014 17:19:01 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: eg5cue <at> gmail.com
Cc: 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Mon, 26 May 2014 19:18:02 +0200
> when i want to go back to 'a' (C-x r j a) emacs can't remember the frame and
> open random buffer instead. (no error)

Could you please give a step-by-step recipe starting from emacs -Q and
describing the buffers that you do see at each step?

TIA,

   Juanma




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Mon, 26 May 2014 17:50:03 GMT) Full text and rfc822 format available.

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

From: Arash Cue <eg5cue <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Mon, 26 May 2014 17:49:51 +0000
[Message part 1 (text/plain, inline)]
sry, now i noticed it only happens when different files with the same name
opened in each frame... , here's what i did:

emacs -Q
opening file a/util.c and a/util.h side by side, save window configuration
in register (C-x r f a)
then file b/util.c and b/util.h, (C-x r f b)

when i want to restore register 'a' (C-x r j a) emacs opens random buffers
instead, but register 'b' works.

i tried last commit of branch 'emacs-24' today and it still happens, but
emacs-24.3 works fine.


On Mon, May 26, 2014 at 5:18 PM, Juanma Barranquero <lekktu <at> gmail.com>wrote:

> > when i want to go back to 'a' (C-x r j a) emacs can't remember the frame
> and
> > open random buffer instead. (no error)
>
> Could you please give a step-by-step recipe starting from emacs -Q and
> describing the buffers that you do see at each step?
>
> TIA,
>
>    Juanma
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Mon, 26 May 2014 19:05:01 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Arash Cue <eg5cue <at> gmail.com>
Cc: 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Mon, 26 May 2014 21:04:07 +0200
On Mon, May 26, 2014 at 7:49 PM, Arash Cue <eg5cue <at> gmail.com> wrote:

> sry, now i noticed it only happens when different files with the same name
> opened in each frame...

Interesting.

Saving a frame configuration to a register really does a very
low-level saving of the frame, so I suppose it keeps pointers to the
buffers even if they are renamed.

Framesets (or, really, window states) on the other hand, save the
buffer *names*. So if you rename a buffer, as it happens when you
visit another file with the same name, the frameset's window state
loses the reference to the original buffer.

As framesets used in frameset-to-register (C-x r f R) are intended for
in-session use only, I suppose I could hook into uniquify or some
other hook and dynamically alter the in-memory frameset(s), but it
seems quite hackish. I'll have to think about it.

    J




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Mon, 26 May 2014 20:33:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Arash Cue <eg5cue <at> gmail.com>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Mon, 26 May 2014 16:32:41 -0400
> Framesets (or, really, window states) on the other hand, save the
> buffer *names*. So if you rename a buffer, as it happens when you
> visit another file with the same name, the frameset's window state
> loses the reference to the original buffer.

Saving buffer names is indeed a problem.  I think we should try and
remember the actual buffer whenever possible (i.e. until we want to
print the object), and when printing, we should try and print
a description of the buffer, e.g. its file-name if it's visiting a file
(I guess the data used in bookmarks would be a good starting point).


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Mon, 26 May 2014 20:44:03 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: martin rudalics <rudalics <at> gmx.at>, Arash Cue <eg5cue <at> gmail.com>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Mon, 26 May 2014 22:42:48 +0200
On Mon, May 26, 2014 at 10:32 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:

> Saving buffer names is indeed a problem.  I think we should try and
> remember the actual buffer whenever possible (i.e. until we want to
> print the object) and when printing, we should try and print
> a description of the buffer, e.g. its file-name if it's visiting a file

Framesets treat window states (from window-state-get) as opaque
objects. I'm not sure what kind of changes would be required (in the
window state's API, I mean, not framesets) to implement what you
suggest.

Martin?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 07:35:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Juanma Barranquero <lekktu <at> gmail.com>, 
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Arash Cue <eg5cue <at> gmail.com>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 09:34:16 +0200
>> Saving buffer names is indeed a problem.  I think we should try and
>> remember the actual buffer whenever possible (i.e. until we want to
>> print the object)

Indeed.  This would help when buffers get renamed in between.

> and when printing, we should try and print
>> a description of the buffer, e.g. its file-name if it's visiting a file
>
> Framesets treat window states (from window-state-get) as opaque
> objects. I'm not sure what kind of changes would be required (in the
> window state's API, I mean, not framesets) to implement what you
> suggest.

Currently `window-state-put' relies on buffer files names restored to
their pre-`window-state-put' values.  We probably want a more general
solution in desktop.el to restore the connection between files visited
and the names of the respective buffers in some unified manner.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 08:33:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 10:32:37 +0200
[Message part 1 (text/plain, inline)]
On May 27, 2014 9:34 AM, "martin rudalics" <rudalics <at> gmx.at> wrote:

>  We probably want a more general
> solution in desktop.el to restore the connection between files visited
> and the names of the respective buffers in some unified manner.

That won't help in this particular case, where buffers are live in the same
session, just renamed since the call to window-state-get, and desktop.el
isn't involved at all.

I think we'd need an optional arg to w-s-g to use in live sessions, where
it would store refs to live buffers instead of their names (and code in
w-s-p to deal with it, of course).
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 09:15:03 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 11:13:45 +0200
>>   We probably want a more general
>> solution in desktop.el to restore the connection between files visited
>> and the names of the respective buffers in some unified manner.
>
> That won't help in this particular case, where buffers are live in the same
> session, just renamed since the call to window-state-get, and desktop.el
> isn't involved at all.

Yes.  I meant that in the line before.

> I think we'd need an optional arg to w-s-g to use in live sessions

WRITABLE?

> , where
> it would store refs to live buffers instead of their names (and code in
> w-s-p to deal with it, of course).

Wouldn't `get-buffer' in `window-state-put-2' handle that already?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 09:41:01 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 11:40:32 +0200
[Message part 1 (text/plain, inline)]
On May 27, 2014 11:14 AM, "martin rudalics" <rudalics <at> gmx.at> wrote:

> Yes.  I meant that in the line before.

OK

> WRITABLE?

Not sure what you mean here.

> Wouldn't `get-buffer' in `window-state-put-2' handle that already?

Likely, yes.

    J
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 10:10:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 12:08:46 +0200
>> WRITABLE?
>
> Not sure what you mean here.

If the WRITABLE argument of `window-state-get' is non-nil use the
buffer name and the buffer object otherwise.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 10:54:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 12:53:35 +0200
[Message part 1 (text/plain, inline)]
On May 27, 2014 12:09 PM, "martin rudalics" <rudalics <at> gmx.at> wrote:

> If the WRITABLE argument of `window-state-get' is non-nil use the
> buffer name and the buffer object otherwise.

Oh, I see. Yes, that makes sense.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 13:10:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 15:09:26 +0200
>> If the WRITABLE argument of `window-state-get' is non-nil use the
>> buffer name and the buffer object otherwise.
>
> Oh, I see. Yes, that makes sense.

Could you test it?


--- lisp/window.el	2014-05-25 10:06:35 +0000
+++ lisp/window.el	2014-05-27 12:57:50 +0000
@@ -4875,7 +4875,7 @@
 		(let ((point (window-point window))
 		      (start (window-start window)))
 		  `((buffer
-		     ,(buffer-name buffer)
+		     ,(if writable (buffer-name buffer) buffer)
 		     (selected . ,selected)
 		     (hscroll . ,(window-hscroll window))
 		     (fringes . ,(window-fringes window))


martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 13:12:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 15:11:45 +0200
[Message part 1 (text/plain, inline)]
On May 27, 2014 3:09 PM, "martin rudalics" <rudalics <at> gmx.at> wrote:

> Could you test it?

Yes, tonight. I don't have access to Emacs right now.

    J
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 13:32:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, Arash Cue <eg5cue <at> gmail.com>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 09:30:58 -0400
> I don't have access to Emacs right now.

Call 911!


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 16:46:02 GMT) Full text and rfc822 format available.

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

From: Arash Cue <eg5cue <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Juanma Barranquero <lekktu <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 16:45:14 +0000
[Message part 1 (text/plain, inline)]
i changed this line
(if writable (buffer-name buffer) buffer)
to
(if writable buffer (buffer-name buffer))
and it get fixed. ^_^


On Tue, May 27, 2014 at 1:09 PM, martin rudalics <rudalics <at> gmx.at> wrote:

> >> If the WRITABLE argument of `window-state-get' is non-nil use the
> >> buffer name and the buffer object otherwise.
> >
> > Oh, I see. Yes, that makes sense.
>
> Could you test it?
>
>
> --- lisp/window.el      2014-05-25 10:06:35 +0000
> +++ lisp/window.el      2014-05-27 12:57:50 +0000
> @@ -4875,7 +4875,7 @@
>                 (let ((point (window-point window))
>                       (start (window-start window)))
>                   `((buffer
> -                    ,(buffer-name buffer)
> +                    ,(if writable (buffer-name buffer) buffer)
>                      (selected . ,selected)
>                      (hscroll . ,(window-hscroll window))
>                      (fringes . ,(window-fringes window))
>
>
> martin
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 17:15:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Arash Cue <eg5cue <at> gmail.com>
Cc: Juanma Barranquero <lekktu <at> gmail.com>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 19:14:38 +0200
> (if writable (buffer-name buffer) buffer)
> to
> (if writable buffer (buffer-name buffer))
> and it get fixed. ^_^

Because `frameset-save' calls `window-state-get' with WRITABLE t.
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.  IIUC this should fix your bug but
not the problem of restoring framesets from printed representations.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Tue, 27 May 2014 22:36:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 00:34:49 +0200
[Message part 1 (text/plain, inline)]
On Tue, May 27, 2014 at 7:14 PM, martin rudalics <rudalics <at> 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
[17589.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 00:17:02 GMT) Full text and rfc822 format available.

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

From: Arash Cue <eg5cue <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 00:16:12 +0000
[Message part 1 (text/plain, inline)]
i applied these changes and it somehow fixed the issue but now i can't
restore my frame configurations after saving and reading the session
`desktop-save', `desktop-read'.



On Tue, May 27, 2014 at 10:34 PM, Juanma Barranquero <lekktu <at> gmail.com>wrote:

> On Tue, May 27, 2014 at 7:14 PM, martin rudalics <rudalics <at> 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
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 00:23:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, Arash Cue <eg5cue <at> gmail.com>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Tue, 27 May 2014 20:22:13 -0400
> 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.

Or to always save window-state in a "non-writable" form, and then
provide a separate function to turn this into a writable form.  If we
can always know right from the start if we'll write the window-state,
then we don't need that, but if we may sometimes need a window-state
which we may or may not later write to a file, then a separate function
would be needed.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 04:52:01 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Arash Cue <eg5cue <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 06:50:51 +0200
On Wed, May 28, 2014 at 2:16 AM, Arash Cue <eg5cue <at> gmail.com> wrote:

> i applied these changes and it somehow fixed the issue but now i can't
> restore my frame configurations after saving and reading the session
> `desktop-save', `desktop-read'.

That's weird, because these changes do not affect deskop saving at all.

Did you apply Martin's change, or your reversed (and erroneous)
version of Martin's change?

    J




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 04:56:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: martin rudalics <rudalics <at> gmx.at>, Arash Cue <eg5cue <at> gmail.com>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 06:55:02 +0200
On Wed, May 28, 2014 at 2:22 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:

> Or to always save window-state in a "non-writable" form, and then
> provide a separate function to turn this into a writable form.  If we
> can always know right from the start if we'll write the window-state,
> then we don't need that, but if we may sometimes need a window-state
> which we may or may not later write to a file, then a separate function
> would be needed.

I thought of it, but then that "carries over" to framesets, and
suddenly you need a function to make a frameset writable, as they
would by default be non-writable (because, as this bug shows, you do
not know beforehand if you will want to write a frameset or not). Very
ugly, IMO.

    J




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 05:28:01 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Arash Cue <eg5cue <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 07:26:41 +0200
On Wed, May 28, 2014 at 6:50 AM, Juanma Barranquero <lekktu <at> gmail.com> wrote:

> That's weird, because these changes do not affect deskop saving at all.

Though there's still bug#17090: unusable frameset data is saved to the
desktop as part of register-alist. But it shouldn't (and doesn't, in
my tests) affect saving and restoring the desktop; it just breaks M-x
list-registers.

    J




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 05:30:03 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: martin rudalics <rudalics <at> gmx.at>, Arash Cue <eg5cue <at> gmail.com>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 07:28:23 +0200
On Wed, May 28, 2014 at 2:22 AM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:

> Or to always save window-state in a "non-writable" form, and then
> provide a separate function to turn this into a writable form.  If we
> can always know right from the start if we'll write the window-state,
> then we don't need that, but if we may sometimes need a window-state
> which we may or may not later write to a file, then a separate function
> would be needed.

I thought of that, but it doesn't really change the need to have a
:in-session arg in frameset-save, unless you also want that
frameset-save returns non-writable framesets and add a
frameset-writable function, which is very ugly.

    J




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 11:36:02 GMT) Full text and rfc822 format available.

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

From: Arash Cue <eg5cue <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 11:35:27 +0000
[Message part 1 (text/plain, inline)]
no, i applied Martin's change and your's.


On Wed, May 28, 2014 at 4:50 AM, Juanma Barranquero <lekktu <at> gmail.com>wrote:

> On Wed, May 28, 2014 at 2:16 AM, Arash Cue <eg5cue <at> gmail.com> wrote:
>
> > i applied these changes and it somehow fixed the issue but now i can't
> > restore my frame configurations after saving and reading the session
> > `desktop-save', `desktop-read'.
>
> That's weird, because these changes do not affect deskop saving at all.
>
> Did you apply Martin's change, or your reversed (and erroneous)
> version of Martin's change?
>
>     J
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 28 May 2014 13:07:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, Arash Cue <eg5cue <at> gmail.com>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 28 May 2014 09:05:54 -0400
> :in-session arg in frameset-save, unless you also want that
> frameset-save returns non-writable framesets and add a
> frameset-writable function,

Right, that would be the idea.

> which is very ugly.

One way to make it less ugly is to fold the "make it writable" thingy
directly into the print code.  We've already had some discussions about
that in the past.  For example, we could provide
a `print-non-readable-function' which the C printing routines would
call when bumping into a non-readable object and which could return
either a string to print instead.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Fri, 30 May 2014 02:12:02 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Arash Cue <eg5cue <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Fri, 30 May 2014 04:10:54 +0200
> no, i applied Martin's change and your's.

Then please send a recipe to reproduce it, because I can't just with
these patches.

TIA,

    Juanma




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Fri, 30 May 2014 02:19:01 GMT) Full text and rfc822 format available.

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

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: martin rudalics <rudalics <at> gmx.at>, Arash Cue <eg5cue <at> gmail.com>,
 17589 <at> debbugs.gnu.org
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Fri, 30 May 2014 04:17:44 +0200
On Wed, May 28, 2014 at 3:05 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:

> Right, that would be the idea.

I think the current interfaces (window-state-get|put and
frameset-save|restore, with an optional WRITABLE or IN-SESSION arg)
are way preferable. Seems messy to introduce frameset-writable (or
whatever) when the framesets are intended to be writable and the
in-memory-only case is just an exception.

> One way to make it less ugly is to fold the "make it writable" thingy
> directly into the print code.

The difference between a "writable frameset" and a non-writable one is
not a matter of how to print some values, in the sense that you can
decide how to write it just by looking at the value. Some you have to
save in specific ways to be able to restore them.

     J




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Wed, 09 Sep 2020 12:07:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: martin rudalics <rudalics <at> gmx.at>, 17589 <at> debbugs.gnu.org,
 Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Wed, 09 Sep 2020 14:06:13 +0200
Juanma Barranquero <lekktu <at> gmail.com> writes:

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

[...]

> -			      filters predicate properties)
> +			      filters predicate properties
> +			      in-session)

[...]

> +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."

(This was six years ago.)

Martin's patch was applied, but Juanma's wasn't.  Arash said that it
fixed the observed bug, but there were other issues?  The thread isn't
quite clear here...

Is this still something that should be fixed, or has the bug gone away
in the years since this?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Sun, 10 Oct 2021 22:47:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, 17589 <at> debbugs.gnu.org,
 Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 martin rudalics <rudalics <at> gmx.at>
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Sun, 10 Oct 2021 15:46:11 -0700
tags 17589 + patch
thanks

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

> Juanma Barranquero <lekktu <at> gmail.com> writes:
>
>> Arash, could you please try with Martin's proposed change to window.el
>> plus the attached patch to frameset.el?
>
> [...]
>
>> -			      filters predicate properties)
>> +			      filters predicate properties
>> +			      in-session)
>
> [...]
>
>> +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."
>
> (This was six years ago.)
>
> Martin's patch was applied, but Juanma's wasn't.  Arash said that it
> fixed the observed bug, but there were other issues?  The thread isn't
> quite clear here...
>
> Is this still something that should be fixed, or has the bug gone away
> in the years since this?

More information was requested, but none was given within 12 months.

I guess if Juanma's patch fixes an issue it should be installed though?




Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 10 Oct 2021 22:47:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17589; Package emacs. (Mon, 11 Oct 2021 07:56:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, 17589 <at> debbugs.gnu.org,
 Arash Cue <eg5cue <at> gmail.com>, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 martin rudalics <rudalics <at> gmx.at>
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Mon, 11 Oct 2021 09:55:17 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

>> Martin's patch was applied, but Juanma's wasn't.  Arash said that it
>> fixed the observed bug, but there were other issues?  The thread isn't
>> quite clear here...
>>
>> Is this still something that should be fixed, or has the bug gone away
>> in the years since this?
>
> More information was requested, but none was given within 12 months.
>
> I guess if Juanma's patch fixes an issue it should be installed though?

Not if it leads to other regressions.  :-)  Re-skimming this thread, I'm
not sure what the conclusion was...

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




Reply sent to Stefan Kangas <stefan <at> marxist.se>:
You have taken responsibility. (Mon, 11 Oct 2021 11:42:03 GMT) Full text and rfc822 format available.

Notification sent to eg5cue <at> gmail.com:
bug acknowledged by developer. (Mon, 11 Oct 2021 11:42:03 GMT) Full text and rfc822 format available.

Message #102 received at 17589-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, Arash Cue <eg5cue <at> gmail.com>,
 17589-done <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>,
 martin rudalics <rudalics <at> gmx.at>
Subject: Re: bug#17589: 24.3.91; lisp/frameset.el
Date: Mon, 11 Oct 2021 04:41:29 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

>> I guess if Juanma's patch fixes an issue it should be installed though?
>
> Not if it leads to other regressions.  :-)  Re-skimming this thread, I'm
> not sure what the conclusion was...

Given that it's been years, perhaps we should just close this.  No one
replied back within 12 months.

If any of this is still important, it'll come back up.

I'm therefore closing this bug report.

If this conclusion is incorrect and this is still an issue, please reply
to this email (use "Reply to all" in your email client) and we can
reopen the bug report.




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

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

Previous Next


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