* 'Strange' changes in status line
@ 2008-08-26 23:52 Angelo Graziosi
2008-08-28 6:00 ` Glenn Morris
0 siblings, 1 reply; 10+ messages in thread
From: Angelo Graziosi @ 2008-08-26 23:52 UTC (permalink / raw)
To: emacs-devel
In the status line, now I see 'Emacs' near the buffer name
--:----Emacs foo.f90 59% ....
Just a curiosity, Why this change and which usefulness?
Angelo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-26 23:52 'Strange' changes in status line Angelo Graziosi
@ 2008-08-28 6:00 ` Glenn Morris
2008-08-28 8:09 ` Angelo Graziosi
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Glenn Morris @ 2008-08-28 6:00 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: Eli Zaretskii, emacs-devel
Angelo Graziosi wrote:
> In the status line, now I see 'Emacs' near the buffer name
>
> --:----Emacs foo.f90 59% ....
>
> Just a curiosity, Why this change and which usefulness?
I believe it's an unintended consequence of this:
2008-08-25 Eli Zaretskii <eliz@gnu.org>
* bindings.el (mode-line-frame-control): New function, caters to
`pc' ``window system''.
(mode-line-frame-identification): Use it instead of
accessing window-system directly.
In X:
emacs -Q
C-h v mode-line-frame-identification
Its value is ("-%F ")
M-: (mode-line-frame-control)
-> " "
ie, the variable is being set at the wrong time.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-28 6:00 ` Glenn Morris
@ 2008-08-28 8:09 ` Angelo Graziosi
2008-08-28 18:15 ` Eli Zaretskii
2008-08-28 18:54 ` Eli Zaretskii
2008-08-28 19:33 ` Eli Zaretskii
2 siblings, 1 reply; 10+ messages in thread
From: Angelo Graziosi @ 2008-08-28 8:09 UTC (permalink / raw)
To: Glenn Morris; +Cc: Eli Zaretskii, emacs-devel
Glenn Morris ha scritto:
> Angelo Graziosi wrote:
>
>> In the status line, now I see 'Emacs' near the buffer name
>>
>> --:----Emacs foo.f90 59% ....
>>
>> Just a curiosity, Why this change and which usefulness?
>
> I believe it's an unintended consequence of this:
>
> 2008-08-25 Eli Zaretskii <eliz@gnu.org>
>
> * bindings.el (mode-line-frame-control): New function, caters to
> `pc' ``window system''.
> (mode-line-frame-identification): Use it instead of
> accessing window-system directly.
>
>
> In X:
>
> emacs -Q
>
> C-h v mode-line-frame-identification
> Its value is ("-%F ")
>
> M-: (mode-line-frame-control)
> -> " "
>
> ie, the variable is being set at the wrong time.
In other words: is it a BUG?
Angelo
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-28 8:09 ` Angelo Graziosi
@ 2008-08-28 18:15 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-08-28 18:15 UTC (permalink / raw)
To: Angelo Graziosi; +Cc: rgm, emacs-devel
> Date: Thu, 28 Aug 2008 10:09:44 +0200
> From: Angelo Graziosi <angelo.graziosi@alice.it>
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
>
> > C-h v mode-line-frame-identification
> > Its value is ("-%F ")
> >
> > M-: (mode-line-frame-control)
> > -> " "
> >
> > ie, the variable is being set at the wrong time.
>
> In other words: is it a BUG?
Yes, of course, and I'm sorry for introducing it.
I'll try to debug it soon, unless someone beats me to it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-28 6:00 ` Glenn Morris
2008-08-28 8:09 ` Angelo Graziosi
@ 2008-08-28 18:54 ` Eli Zaretskii
2008-08-28 19:33 ` Eli Zaretskii
2 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-08-28 18:54 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel, angelo.graziosi
> From: Glenn Morris <rgm@gnu.org>
> Date: Thu, 28 Aug 2008 02:00:51 -0400
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
>
> Angelo Graziosi wrote:
>
> > In the status line, now I see 'Emacs' near the buffer name
> >
> > --:----Emacs foo.f90 59% ....
> >
> > Just a curiosity, Why this change and which usefulness?
>
> I believe it's an unintended consequence of this:
>
> 2008-08-25 Eli Zaretskii <eliz@gnu.org>
>
> * bindings.el (mode-line-frame-control): New function, caters to
> `pc' ``window system''.
> (mode-line-frame-identification): Use it instead of
> accessing window-system directly.
>
>
> In X:
>
> emacs -Q
>
> C-h v mode-line-frame-identification
> Its value is ("-%F ")
>
> M-: (mode-line-frame-control)
> -> " "
>
> ie, the variable is being set at the wrong time.
I don't see this problem on MS-Windows: the frame name is not
displayed in the mode line, and the value of
mode-line-frame-identification is " ", as I'd expect.
I won't have access to a system with X for a couple of days. If you
still see this with the current CVS, please put a breakpoint in
decode_mode_spec and tell me when and from where it is called ``at the
wrong time''.
Thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-28 6:00 ` Glenn Morris
2008-08-28 8:09 ` Angelo Graziosi
2008-08-28 18:54 ` Eli Zaretskii
@ 2008-08-28 19:33 ` Eli Zaretskii
2008-08-29 6:34 ` Glenn Morris
2 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2008-08-28 19:33 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel, angelo.graziosi
> From: Glenn Morris <rgm@gnu.org>
> Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
> Date: Thu, 28 Aug 2008 02:00:51 -0400
>
> Angelo Graziosi wrote:
>
> > In the status line, now I see 'Emacs' near the buffer name
> >
> > --:----Emacs foo.f90 59% ....
> >
> > Just a curiosity, Why this change and which usefulness?
>
> I believe it's an unintended consequence of this:
>
> 2008-08-25 Eli Zaretskii <eliz@gnu.org>
>
> * bindings.el (mode-line-frame-control): New function, caters to
> `pc' ``window system''.
> (mode-line-frame-identification): Use it instead of
> accessing window-system directly.
>
>
> In X:
>
> emacs -Q
>
> C-h v mode-line-frame-identification
> Its value is ("-%F ")
>
> M-: (mode-line-frame-control)
> -> " "
>
> ie, the variable is being set at the wrong time.
Does this change fix the problem on X? (I cannot try this on X right
now, but I verified that it works on a tty, MS-Windows, and MS-DOS.)
Index: lisp/bindings.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/bindings.el,v
retrieving revision 1.211
diff -u -r1.211 bindings.el
--- lisp/bindings.el 25 Aug 2008 21:50:55 -0000 1.211
+++ lisp/bindings.el 28 Aug 2008 19:30:19 -0000
@@ -219,8 +219,8 @@
(defun mode-line-frame-control ()
"Compute mode-line control for frame identification.
Value is used for `mode-line-frame-identification', which see."
- (if (or (null (window-system))
- (eq (window-system) 'pc))
+ (if (or (null initial-window-system)
+ (eq initial-window-system 'pc))
"-%F "
" "))
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-28 19:33 ` Eli Zaretskii
@ 2008-08-29 6:34 ` Glenn Morris
2008-08-29 9:14 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2008-08-29 6:34 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, angelo.graziosi
Eli Zaretskii wrote:
> Does this change fix the problem on X? (I cannot try this on X right
> now, but I verified that it works on a tty, MS-Windows, and MS-DOS.)
Afraid not (guess it gets eval'd during dumping).
In any case, an approach like that is not going to work for multi-tty
with mixed X and tty frames. You need something that's eval'd at
runtime. This seems to work:
(setq mode-line-frame-identification '(:eval (mode-line-frame-control)))
(put 'mode-line-frame-identification 'risky-local-variable t)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-29 6:34 ` Glenn Morris
@ 2008-08-29 9:14 ` Eli Zaretskii
2008-08-29 16:34 ` Glenn Morris
0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2008-08-29 9:14 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel, angelo.graziosi
> From: Glenn Morris <rgm@gnu.org>
> Cc: angelo.graziosi@alice.it, emacs-devel@gnu.org
> Date: Fri, 29 Aug 2008 02:34:22 -0400
>
> In any case, an approach like that is not going to work for multi-tty
> with mixed X and tty frames. You need something that's eval'd at
> runtime.
I thought I was doing just that ;-) But quoting in Lisp was always my
weak spot; thanks for showing me the light.
> This seems to work:
>
> (setq mode-line-frame-identification '(:eval (mode-line-frame-control)))
> (put 'mode-line-frame-identification 'risky-local-variable t)
Installed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-29 9:14 ` Eli Zaretskii
@ 2008-08-29 16:34 ` Glenn Morris
2008-08-29 17:58 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2008-08-29 16:34 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel, angelo.graziosi
Eli Zaretskii wrote:
>> (setq mode-line-frame-identification '(:eval (mode-line-frame-control)))
>> (put 'mode-line-frame-identification 'risky-local-variable t)
>
> Installed.
No need for a separate setq, you can do the setting in the defvar
(sorry for being unclear, that was an example rather than a patch).
Also, the change to use initial-window-system in
mode-line-frame-control is wrong, again because of multi-tty mixed X
and tty frames. Just using the variable (no need for the function)
window-system seems fine.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: 'Strange' changes in status line
2008-08-29 16:34 ` Glenn Morris
@ 2008-08-29 17:58 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-08-29 17:58 UTC (permalink / raw)
To: Glenn Morris; +Cc: emacs-devel, angelo.graziosi
> From: Glenn Morris <rgm@gnu.org>
> Cc: angelo.graziosi@alice.it, emacs-devel@gnu.org
> Date: Fri, 29 Aug 2008 12:34:40 -0400
>
> Eli Zaretskii wrote:
>
> >> (setq mode-line-frame-identification '(:eval (mode-line-frame-control)))
> >> (put 'mode-line-frame-identification 'risky-local-variable t)
> >
> > Installed.
>
> No need for a separate setq, you can do the setting in the defvar
> (sorry for being unclear, that was an example rather than a patch).
>
> Also, the change to use initial-window-system in
> mode-line-frame-control is wrong, again because of multi-tty mixed X
> and tty frames. Just using the variable (no need for the function)
> window-system seems fine.
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-08-29 17:58 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26 23:52 'Strange' changes in status line Angelo Graziosi
2008-08-28 6:00 ` Glenn Morris
2008-08-28 8:09 ` Angelo Graziosi
2008-08-28 18:15 ` Eli Zaretskii
2008-08-28 18:54 ` Eli Zaretskii
2008-08-28 19:33 ` Eli Zaretskii
2008-08-29 6:34 ` Glenn Morris
2008-08-29 9:14 ` Eli Zaretskii
2008-08-29 16:34 ` Glenn Morris
2008-08-29 17:58 ` Eli Zaretskii
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.