all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 22.1.1; Frame title no more updated after calling `set-frame-configuration'
@ 2007-08-30 17:41 Sébastien Rocca Serra
  2007-08-31 11:36 ` martin rudalics
  0 siblings, 1 reply; 15+ messages in thread
From: Sébastien Rocca Serra @ 2007-08-30 17:41 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 974 bytes --]

Hi,
I have a problem with Emacs 22: I display the current buffer's name in the
frame title, but as soon as I call `set-frame-configuration', my frame title
no longer updates when I switch buffer.

Context
-------

1. I start "emacs -Q" with version "GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
of 2007-06-02 on RELEASE"

2. I display the current buffer's name in the frame title by running (setq
frame-title-format "%b") in the scratch

3. I save the frame configuration by executing (setq my-frameconfig
(current-frame-configuration)) in the scratch buffer

4. If I switch buffers, the title frame updates fine

5. I restore the frame config by calling (set-frame-configuration
my-frameconfig)

Problem
-------

After calling `set-frame-configuration' (step 5), the title frame is frozen,
it no longer updates when I switch buffer.

Notes
-----

This also happens in EmacsW32 "GNU Emacs 22.0.990.1 (i386-mingw-nt5.1.2600)
of 2007-05-23 on LENNART-69DE564 (patched)".

Thanks!

[-- Attachment #1.2: Type: text/html, Size: 1116 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-08-30 17:41 22.1.1; Frame title no more updated after calling `set-frame-configuration' Sébastien Rocca Serra
@ 2007-08-31 11:36 ` martin rudalics
  2007-08-31 12:09   ` Sébastien Rocca Serra
  2007-09-07  3:53   ` Glenn Morris
  0 siblings, 2 replies; 15+ messages in thread
From: martin rudalics @ 2007-08-31 11:36 UTC (permalink / raw)
  To: Sébastien Rocca Serra; +Cc: emacs-devel

 > I have a problem with Emacs 22: I display the current buffer's name in the
 > frame title, but as soon as I call `set-frame-configuration', my frame title
 > no longer updates when I switch buffer.

Thanks for reporting this.

 > 2. I display the current buffer's name in the frame title by running (setq
 > frame-title-format "%b") in the scratch
 >
 > 3. I save the frame configuration by executing (setq my-frameconfig
 > (current-frame-configuration)) in the scratch buffer
 >
 > 4. If I switch buffers, the title frame updates fine
 >
 > 5. I restore the frame config by calling (set-frame-configuration
 > my-frameconfig)
 >
 > Problem
 > -------
 >
 > After calling `set-frame-configuration' (step 5), the title frame is frozen,
 > it no longer updates when I switch buffer.

It's not necessary to explicitly set `frame-title-format' to produce a
bug here.  Doing `set-frame-configuration' with multiple frames, any
frames that get their name assigned explicitly from the saved
configuration parameters won't get their titles updated.

Could you try the patch below (against EMACS_22_BASE)?


--------------------------------------------------------
*** frame.c.~1.340.2.1.~	Wed Jul 25 07:15:52 2007
--- frame.c	Fri Aug 31 13:23:02 2007
***************
*** 99,105 ****
   Lisp_Object Qouter_window_id;
   #endif
   Lisp_Object Qparent_id;
! Lisp_Object Qtitle, Qname;
   Lisp_Object Qunsplittable;
   Lisp_Object Qmenu_bar_lines, Qtool_bar_lines;
   Lisp_Object Qleft_fringe, Qright_fringe;
--- 99,105 ----
   Lisp_Object Qouter_window_id;
   #endif
   Lisp_Object Qparent_id;
! Lisp_Object Qtitle, Qname, Qexplicit_name;
   Lisp_Object Qunsplittable;
   Lisp_Object Qmenu_bar_lines, Qtool_bar_lines;
   Lisp_Object Qleft_fringe, Qright_fringe;
***************
*** 2143,2148 ****
--- 2143,2149 ----
   				    :"tty"));
       }
     store_in_alist (&alist, Qname, f->name);
+   store_in_alist (&alist, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
     height = (f->new_text_lines ? f->new_text_lines : FRAME_LINES (f));
     store_in_alist (&alist, Qheight, make_number (height));
     width = (f->new_text_cols ? f->new_text_cols : FRAME_COLS (f));
***************
*** 2580,2585 ****
--- 2581,2587 ----
     {"right-fringe",		&Qright_fringe},
     {"wait-for-wm",		&Qwait_for_wm},
     {"fullscreen",                &Qfullscreen},
+   {"explicit-name",             &Qexplicit_name},
   };

   #ifdef HAVE_WINDOW_SYSTEM




--------------------------------------------------------
*** frame.el.~1.243.2.2.~	Wed Aug  8 23:12:04 2007
--- frame.el	Fri Aug 31 13:26:24 2007
***************
*** 818,825 ****
   			;; Since we can't set a frame's minibuffer status,
   			;; we might as well omit the parameter altogether.
   			(let* ((parms (nth 1 parameters))
! 			       (mini (assq 'minibuffer parms)))
! 			  (if mini (setq parms (delq mini parms)))
   			  parms))
   		       (set-window-configuration (nth 2 parameters)))
   		   (setq frames-to-delete (cons frame frames-to-delete))))))
--- 818,829 ----
   			;; Since we can't set a frame's minibuffer status,
   			;; we might as well omit the parameter altogether.
   			(let* ((parms (nth 1 parameters))
! 			       (mini (assq 'minibuffer parms))
! 			       (name (assq 'name parms))
! 			       (explicit-name (cdr (assq 'explicit-name parms))))
! 			  (when mini (setq parms (delq mini parms)))
! 			  (when (and name (not explicit-name))
! 			    (setq parms (delq name parms)))
   			  parms))
   		       (set-window-configuration (nth 2 parameters)))
   		   (setq frames-to-delete (cons frame frames-to-delete))))))

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-08-31 11:36 ` martin rudalics
@ 2007-08-31 12:09   ` Sébastien Rocca Serra
  2007-09-04  8:06     ` Sébastien Rocca Serra
  2007-09-07  3:53   ` Glenn Morris
  1 sibling, 1 reply; 15+ messages in thread
From: Sébastien Rocca Serra @ 2007-08-31 12:09 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 101 bytes --]

Great, thanks!
The problem is that I have nothing ready to build Emacs... Sorry about that.

Cheers!

[-- Attachment #1.2: Type: text/html, Size: 118 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-08-31 12:09   ` Sébastien Rocca Serra
@ 2007-09-04  8:06     ` Sébastien Rocca Serra
  0 siblings, 0 replies; 15+ messages in thread
From: Sébastien Rocca Serra @ 2007-09-04  8:06 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 108 bytes --]

Small update: this bug also happens in "GNU Emacs 23.0.0.1 (
i386-mingw-nt5.1.2600) of 2007-08-18 on TPAD".

[-- Attachment #1.2: Type: text/html, Size: 147 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-08-31 11:36 ` martin rudalics
  2007-08-31 12:09   ` Sébastien Rocca Serra
@ 2007-09-07  3:53   ` Glenn Morris
  2007-09-07 22:52     ` Glenn Morris
  2007-10-08  9:31     ` martin rudalics
  1 sibling, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2007-09-07  3:53 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics wrote:

> Could you try the patch below (against EMACS_22_BASE)?

After applying this,

emacs -Q --eval '(set-frame-configuration (current-frame-configuration))'

segfaults in x_set_frame_parameters.


#0  0x000000000041fa76 in x_set_frame_parameters (f=0x1e13c970, alist=11127185)
    at frame.c:2792
        param_index = 232
        old_value = 11127185
        prop = 11434337
        val = 11127185
        tail = 11127185
        width = 80
        height = 34
        left = 11127233
        top = 11127233
        icon_left = 11127233
        icon_top = 11127233
        parms = (Lisp_Object *) 0x7fff648cb610
        values = (Lisp_Object *) 0x7fff648cb4b0
        i = 13
        p = 42
        left_no_change = 0
        top_no_change = 0
        icon_left_no_change = 0
        icon_top_no_change = 0
        fullscreen_is_being_set = 0
        gcpro1 = {
  next = 0x7fff648cba20, 
  var = 0x7fff648cba28, 
  nvars = 42
}
#1  0x000000000041e899 in Fmodify_frame_parameters (frame=504613236, 
    alist=505523237) at frame.c:2281
        f = (FRAME_PTR) 0x1e13c970
        tail = 505524293
        prop = 140734880332296
        val = 11127185

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-07  3:53   ` Glenn Morris
@ 2007-09-07 22:52     ` Glenn Morris
  2007-09-08  8:45       ` martin rudalics
  2007-10-08  9:31     ` martin rudalics
  1 sibling, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2007-09-07 22:52 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

Glenn Morris wrote:

> martin rudalics wrote:
>
>> Could you try the patch below (against EMACS_22_BASE)?
>
> After applying this,
>
> emacs -Q --eval '(set-frame-configuration (current-frame-configuration))'
>
> segfaults in x_set_frame_parameters.


Seems (?) to work ok with the following extra change:


*** frame.c   25 Jul 2007 05:15:52 -0000  1.340.2.1
--- frame.c   7 Sep 2007 22:51:56 -0000
*** 2768,2773 ****
--- 2770,2778 ----
    icon_top = val;
        else if (EQ (prop, Qicon_left))
        icon_left = val;
+       else if (EQ (prop, Qexplicit_name))
+       /* Handled elsewhere. */
+       continue;
        else if (EQ (prop, Qforeground_color)
               || EQ (prop, Qbackground_color)
                      || EQ (prop, Qfont)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-07 22:52     ` Glenn Morris
@ 2007-09-08  8:45       ` martin rudalics
  2007-09-12  7:32         ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: martin rudalics @ 2007-09-08  8:45 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

 >>emacs -Q --eval '(set-frame-configuration (current-frame-configuration))'
 >>
 >>segfaults in x_set_frame_parameters.
 >
 >
 >
 > Seems (?) to work ok with the following extra change:
 >
 >
 > *** frame.c   25 Jul 2007 05:15:52 -0000  1.340.2.1
 > --- frame.c   7 Sep 2007 22:51:56 -0000
 > *** 2768,2773 ****
 > --- 2770,2778 ----
 >     icon_top = val;
 >         else if (EQ (prop, Qicon_left))
 >         icon_left = val;
 > +       else if (EQ (prop, Qexplicit_name))
 > +       /* Handled elsewhere. */
 > +       continue;
 >         else if (EQ (prop, Qforeground_color)
 >                || EQ (prop, Qbackground_color)
 >                       || EQ (prop, Qfont)
 >

This would be needed in any case because "explicit-name" should never
get assigned to by `modify-frame-parameters'.  I'm not entirely sure
though whether every possible setting of "name" gets correctly reflected
in "explicit-name", but such a bug would have existed before.  At least
I'm tempted to move the

   f->explicit_name = ! NILP (name);

in set_term_frame_name as

   f->explicit_name = Qt;

to the end of the else branch below to catch the cases where there's no
change either because the strings are equal or there's a name clash, but
that's probably only a minor issue.

I wouldn't care if anyone came up with a completely different solution ;-)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-08  8:45       ` martin rudalics
@ 2007-09-12  7:32         ` Glenn Morris
  2007-09-28  3:53           ` Glenn Morris
  0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2007-09-12  7:32 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics wrote:

> I wouldn't care if anyone came up with a completely different solution ;-)

You could install your fix in the trunk only if unsure about it. The
original issue does not seem serious enough to potentially mess up the
release branch anyway.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-12  7:32         ` Glenn Morris
@ 2007-09-28  3:53           ` Glenn Morris
  2007-09-28  5:44             ` martin rudalics
  2007-09-28 19:04             ` Richard Stallman
  0 siblings, 2 replies; 15+ messages in thread
From: Glenn Morris @ 2007-09-28  3:53 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

Glenn Morris wrote:

> martin rudalics wrote:
>
>> I wouldn't care if anyone came up with a completely different solution ;-)
>
> You could install your fix in the trunk only if unsure about it. The
> original issue does not seem serious enough to potentially mess up
> the release branch anyway.

Nobody came up with another solution. How about installing yours in
the trunk, and deleting this from FOR-RELEASE? It's not a very
important bug, and if the fix is uncertain that seems like the best
policy to me.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-28  3:53           ` Glenn Morris
@ 2007-09-28  5:44             ` martin rudalics
  2007-09-28  7:10               ` Glenn Morris
  2007-09-28 19:04             ` Richard Stallman
  1 sibling, 1 reply; 15+ messages in thread
From: martin rudalics @ 2007-09-28  5:44 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> Nobody came up with another solution. How about installing yours in
> the trunk, and deleting this from FOR-RELEASE? It's not a very
> important bug, and if the fix is uncertain that seems like the best
> policy to me.
> 

I did not yet manage to understand that fully.  At least I have to
handle this in the various incarnations of frame_parm_handler too.
I removed it from Emacs 22 FOR-RELEASE because I'll hardly come up
with a solution that won't break more important components.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-28  5:44             ` martin rudalics
@ 2007-09-28  7:10               ` Glenn Morris
  0 siblings, 0 replies; 15+ messages in thread
From: Glenn Morris @ 2007-09-28  7:10 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics wrote:

> I did not yet manage to understand that fully.  At least I have to
> handle this in the various incarnations of frame_parm_handler too.
> I removed it from Emacs 22 FOR-RELEASE because I'll hardly come up
> with a solution that won't break more important components.

OK. I put it in trunk F-R for the sake of it.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-28  3:53           ` Glenn Morris
  2007-09-28  5:44             ` martin rudalics
@ 2007-09-28 19:04             ` Richard Stallman
  1 sibling, 0 replies; 15+ messages in thread
From: Richard Stallman @ 2007-09-28 19:04 UTC (permalink / raw)
  To: Glenn Morris; +Cc: rudalics, emacs-devel

If the fix appears to work, please install it in Emacs 22.  It seems
simple and localized; even if it isn't 100% right, it is unlikely to
cause worse problems than the one it fixes.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-09-07  3:53   ` Glenn Morris
  2007-09-07 22:52     ` Glenn Morris
@ 2007-10-08  9:31     ` martin rudalics
  2007-10-08 19:05       ` Glenn Morris
  1 sibling, 1 reply; 15+ messages in thread
From: martin rudalics @ 2007-10-08  9:31 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

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

>>Could you try the patch below (against EMACS_22_BASE)?
> 
> 
> After applying this,
> 
> emacs -Q --eval '(set-frame-configuration (current-frame-configuration))'
> 
> segfaults in x_set_frame_parameters.

Glenn.  Could you try again with the attached Emacs_22_BASE patch?


[-- Attachment #2: frame-frame.patch --]
[-- Type: text/plain, Size: 2040 bytes --]

*** frame.c.~1.340.2.2.~	Sat Oct  6 11:46:22 2007
--- frame.c	Mon Oct  8 11:22:54 2007
***************
*** 100,105 ****
--- 100,106 ----
  #endif
  Lisp_Object Qparent_id;
  Lisp_Object Qtitle, Qname;
+ Lisp_Object Qexplicit_name;
  Lisp_Object Qunsplittable;
  Lisp_Object Qmenu_bar_lines, Qtool_bar_lines;
  Lisp_Object Qleft_fringe, Qright_fringe;
***************
*** 3006,3011 ****
--- 3007,3013 ----
      tem = Qnil;
    else
      XSETFASTINT (tem, FRAME_X_OUTPUT (f)->parent_desc);
+   store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
    store_in_alist (alistptr, Qparent_id, tem);
  }
  
***************
*** 3967,3972 ****
--- 3969,3976 ----
    staticpro (&Qframep);
    Qframe_live_p = intern ("frame-live-p");
    staticpro (&Qframe_live_p);
+   Qexplicit_name = intern ("explicit-name");
+   staticpro (&Qexplicit_name);
    Qheight = intern ("height");
    staticpro (&Qheight);
    Qicon = intern ("icon");

*** frame.el.~1.243.2.5.~	Sat Oct  6 11:05:52 2007
--- frame.el	Mon Oct  8 11:27:14 2007
***************
*** 807,814 ****
  			;; Since we can't set a frame's minibuffer status,
  			;; we might as well omit the parameter altogether.
  			(let* ((parms (nth 1 parameters))
! 			       (mini (assq 'minibuffer parms)))
! 			  (if mini (setq parms (delq mini parms)))
  			  parms))
  		       (set-window-configuration (nth 2 parameters)))
  		   (setq frames-to-delete (cons frame frames-to-delete))))))
--- 807,818 ----
  			;; Since we can't set a frame's minibuffer status,
  			;; we might as well omit the parameter altogether.
  			(let* ((parms (nth 1 parameters))
! 			       (mini (assq 'minibuffer parms))
! 			       (name (assq 'name parms))
! 			       (explicit-name (cdr (assq 'explicit-name parms))))
! 			  (when mini (setq parms (delq mini parms)))
! 			  (when (and name (not explicit-name))
! 			    (setq parms (delq name parms)))
  			  parms))
  		       (set-window-configuration (nth 2 parameters)))
  		   (setq frames-to-delete (cons frame frames-to-delete))))))

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-10-08  9:31     ` martin rudalics
@ 2007-10-08 19:05       ` Glenn Morris
  2007-10-08 21:07         ` martin rudalics
  0 siblings, 1 reply; 15+ messages in thread
From: Glenn Morris @ 2007-10-08 19:05 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

martin rudalics wrote:

>>>Could you try the patch below (against EMACS_22_BASE)?

Works for me, thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration'
  2007-10-08 19:05       ` Glenn Morris
@ 2007-10-08 21:07         ` martin rudalics
  0 siblings, 0 replies; 15+ messages in thread
From: martin rudalics @ 2007-10-08 21:07 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

>>>>Could you try the patch below (against EMACS_22_BASE)?
> 
> 
> Works for me, thanks.

Thanks for testing.  I'll install this in a couple of days
if noone objects.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-10-08 21:07 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-30 17:41 22.1.1; Frame title no more updated after calling `set-frame-configuration' Sébastien Rocca Serra
2007-08-31 11:36 ` martin rudalics
2007-08-31 12:09   ` Sébastien Rocca Serra
2007-09-04  8:06     ` Sébastien Rocca Serra
2007-09-07  3:53   ` Glenn Morris
2007-09-07 22:52     ` Glenn Morris
2007-09-08  8:45       ` martin rudalics
2007-09-12  7:32         ` Glenn Morris
2007-09-28  3:53           ` Glenn Morris
2007-09-28  5:44             ` martin rudalics
2007-09-28  7:10               ` Glenn Morris
2007-09-28 19:04             ` Richard Stallman
2007-10-08  9:31     ` martin rudalics
2007-10-08 19:05       ` Glenn Morris
2007-10-08 21:07         ` martin rudalics

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.