[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 22.1.1; Frame title no more updated after calling `set-frame-configu
From: |
martin rudalics |
Subject: |
Re: 22.1.1; Frame title no more updated after calling `set-frame-configuration' |
Date: |
Fri, 31 Aug 2007 13:36:16 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> 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))))))