* Re: inactive-mode-line face? [not found] ` <5137-Tue22Jan2002120220+0200-eliz@is.elta.co.il> @ 2002-02-09 0:09 ` Kim F. Storm 2002-02-09 8:32 ` Pavel Janík 2002-02-09 9:37 ` Eli Zaretskii 0 siblings, 2 replies; 9+ messages in thread From: Kim F. Storm @ 2002-02-09 0:09 UTC (permalink / raw) "Eli Zaretskii" <eliz@is.elta.co.il> writes: > > > | This isn't a bug, but a feature request: I would like to be able to set > > > | different colors for the modeline of the active Emacs window as opposed to > > > | the modelines of other, inactive windows. This would be one more visual > > > | cue that would immediately tell me which buffer has the focus. > > I like it, and users keep asking for it on gnu.emacs.help. > > If this is coded, I think we should have a special face for the mode > line of the selected window, not just a color. I just added a new mode-line-inactive face for non-selected windows. > > Also, there could be complications with code that switches windows > temporarily (I'm not sure we want the active mode line to follow > that). I haven't seen such problems, so don't hesitate to tell me if you find any! -- Kim F. Storm <storm@cua.dk> http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-09 0:09 ` inactive-mode-line face? Kim F. Storm @ 2002-02-09 8:32 ` Pavel Janík 2002-02-09 19:49 ` Kim F. Storm 2002-02-09 9:37 ` Eli Zaretskii 1 sibling, 1 reply; 9+ messages in thread From: Pavel Janík @ 2002-02-09 8:32 UTC (permalink / raw) Cc: emacs-devel From: storm@cua.dk (Kim F. Storm) Date: 09 Feb 2002 01:09:27 +0100 Hi Kim, > I just added a new mode-line-inactive face for non-selected windows. it works really nice (even with my focus-follows-change ;-). But I see one problem. If I run emacs with -rv, the default values for mode-line faces force me to think that the window with lighter mode-line is selected (and it is not). -- Pavel Janík Don't compare floating point numbers just for equality. -- The Elements of Programming Style (Kernighan & Plaugher) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-09 8:32 ` Pavel Janík @ 2002-02-09 19:49 ` Kim F. Storm 0 siblings, 0 replies; 9+ messages in thread From: Kim F. Storm @ 2002-02-09 19:49 UTC (permalink / raw) Pavel@Janik.cz (Pavel Janík) writes: > From: storm@cua.dk (Kim F. Storm) > Date: 09 Feb 2002 01:09:27 +0100 > > Hi Kim, > > > I just added a new mode-line-inactive face for non-selected windows. > > it works really nice (even with my focus-follows-change ;-). But I see one > problem. If I run emacs with -rv, the default values for mode-line faces > force me to think that the window with lighter mode-line is selected (and > it is not). I admit that the current default for the mode-line-inactive face are pretty arbitrary. I would really like people to suggest better alternatives. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-09 0:09 ` inactive-mode-line face? Kim F. Storm 2002-02-09 8:32 ` Pavel Janík @ 2002-02-09 9:37 ` Eli Zaretskii 2002-02-09 20:07 ` Kim F. Storm 2002-02-11 2:08 ` Richard Stallman 1 sibling, 2 replies; 9+ messages in thread From: Eli Zaretskii @ 2002-02-09 9:37 UTC (permalink / raw) Cc: emacs-devel > From: storm@cua.dk (Kim F. Storm) > Date: 09 Feb 2002 01:09:27 +0100 > > I just added a new mode-line-inactive face for non-selected windows. Did it really compile without any warnings and work for you? I find that I need the additional changes below to make it compile and work. (I installed these changes.) > > Also, there could be complications with code that switches windows > > temporarily (I'm not sure we want the active mode line to follow > > that). > > I haven't seen such problems, so don't hesitate to tell me if you find > any! Well, one problem is that all the windows become inactive when you are in the minibuffer. That is, as soon as you type "M-x" or "C-x C-f", all the mode lines become displayed in the inactive face. This might be regarded as a feature, but perhaps users would like to know what window is active even when they are typing at the minibuffer prompt. Also, I wonder whether the default for this face should really be different from the mode-line face. Perhaps we want that by default this feature is invisible; if so, the default face definitions should just inherit from the mode-line face. Here are the changes I installed: Index: src/dispextern.h =================================================================== RCS file: /cvs/emacs/src/dispextern.h,v retrieving revision 1.124 diff -u -r1.124 dispextern.h --- src/dispextern.h 8 Feb 2002 23:48:50 -0000 1.124 +++ src/dispextern.h 9 Feb 2002 09:09:20 -0000 @@ -927,7 +927,7 @@ This depends on whether the window is selected or not. */ #define CURRENT_MODE_LINE_FACE_ID(W) \ - ((W) == selected_window \ + ((W) == XWINDOW (selected_window) \ ? MODE_LINE_FACE_ID \ : MODE_LINE_INACTIVE_FACE_ID) Index: src/xdisp.c =================================================================== RCS file: /cvs/emacs/src/xdisp.c,v retrieving revision 1.724 diff -u -r1.724 xdisp.c --- src/xdisp.c 8 Feb 2002 23:48:02 -0000 1.724 +++ src/xdisp.c 9 Feb 2002 09:15:34 -0000 @@ -13433,8 +13433,10 @@ if (WINDOW_WANTS_MODELINE_P (w)) { + struct window *old_w = XWINDOW (old_selected_window); + /* Select mode line face based on the real selected window. */ - display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (old_selected_window), + display_mode_line (w, CURRENT_MODE_LINE_FACE_ID (old_w), current_buffer->mode_line_format); ++n; } _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-09 9:37 ` Eli Zaretskii @ 2002-02-09 20:07 ` Kim F. Storm 2002-02-09 20:39 ` Karl Eichwalder 2002-02-11 2:08 ` Richard Stallman 1 sibling, 1 reply; 9+ messages in thread From: Kim F. Storm @ 2002-02-09 20:07 UTC (permalink / raw) "Eli Zaretskii" <eliz@is.elta.co.il> writes: > > I just added a new mode-line-inactive face for non-selected windows. > > Did it really compile without any warnings and work for you? Definitely! I compiled and tested it on redhat 6.2 (x86 with X). > I find that I need the additional changes below to make it compile > and work. (I installed these changes.) Thanks Eli. > Well, one problem is that all the windows become inactive when you are > in the minibuffer. That is, as soon as you type "M-x" or "C-x C-f", > all the mode lines become displayed in the inactive face. This might > be regarded as a feature, but perhaps users would like to know what > window is active even when they are typing at the minibuffer prompt. Personally, I like to know that the minibuffer window is active. But I can see that it might be useful to know ... however, it is not different from how Emacs behaves today (where all windows use the same face for the mode line). > Also, I wonder whether the default for this face should really be > different from the mode-line face. Perhaps we want that by default > this feature is invisible; if so, the default face definitions should > just inherit from the mode-line face. I think there should be some visible difference - but I don't know exactly what it should be... the current default isn't optimal. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-09 20:07 ` Kim F. Storm @ 2002-02-09 20:39 ` Karl Eichwalder 0 siblings, 0 replies; 9+ messages in thread From: Karl Eichwalder @ 2002-02-09 20:39 UTC (permalink / raw) Cc: emacs-devel storm@cua.dk (Kim F. Storm) writes: > Personally, I like to know that the minibuffer window is active. When there's only one windows (besides the minibuffer) the mode-line will be changed; not everbody will like this behavior. -- ke@suse.de (work) / keichwa@gmx.net (home): | http://www.suse.de/~ke/ | ,__o Free Translation Project: | _-\_<, http://www.iro.umontreal.ca/contrib/po/HTML/ | (*)/'(*) _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-09 9:37 ` Eli Zaretskii 2002-02-09 20:07 ` Kim F. Storm @ 2002-02-11 2:08 ` Richard Stallman 2002-02-11 8:29 ` Kim F. Storm 2002-02-11 15:05 ` Kim F. Storm 1 sibling, 2 replies; 9+ messages in thread From: Richard Stallman @ 2002-02-11 2:08 UTC (permalink / raw) Cc: storm, emacs-devel Well, one problem is that all the windows become inactive when you are in the minibuffer. That is, as soon as you type "M-x" or "C-x C-f", all the mode lines become displayed in the inactive face. This might be regarded as a feature, but perhaps users would like to know what window is active even when they are typing at the minibuffer prompt. I think that when the minibuffer is selected, the window in minibuffer-scroll-window should count as the "selected" window as regards the mode line. (That is the window that was selected "outside" the minibuffer.) Also, I wonder whether the default for this face should really be different from the mode-line face. Perhaps we want that by default this feature is invisible; This feature should be good for beginners if we get the colors right. So the default should be that it does something you can see. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-11 2:08 ` Richard Stallman @ 2002-02-11 8:29 ` Kim F. Storm 2002-02-11 15:05 ` Kim F. Storm 1 sibling, 0 replies; 9+ messages in thread From: Kim F. Storm @ 2002-02-11 8:29 UTC (permalink / raw) Richard Stallman <rms@gnu.org> writes: > I think that when the minibuffer is selected, > the window in minibuffer-scroll-window should count > as the "selected" window as regards the mode line. > I will look into that. _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: inactive-mode-line face? 2002-02-11 2:08 ` Richard Stallman 2002-02-11 8:29 ` Kim F. Storm @ 2002-02-11 15:05 ` Kim F. Storm 1 sibling, 0 replies; 9+ messages in thread From: Kim F. Storm @ 2002-02-11 15:05 UTC (permalink / raw) Richard Stallman <rms@gnu.org> writes: > Well, one problem is that all the windows become inactive when you are > in the minibuffer. That is, as soon as you type "M-x" or "C-x C-f", > all the mode lines become displayed in the inactive face. This might > be regarded as a feature, but perhaps users would like to know what > window is active even when they are typing at the minibuffer prompt. > > I think that when the minibuffer is selected, > the window in minibuffer-scroll-window should count > as the "selected" window as regards the mode line. Done. > > (That is the window that was selected "outside" the minibuffer.) > > Also, I wonder whether the default for this face should really be > different from the mode-line face. Perhaps we want that by default > this feature is invisible; > > This feature should be good for beginners if we get the colors right. > So the default should be that it does something you can see. As part of the above change, I added a mode-line-in-non-selected-windows variable which the user can set to nil to disable this feature. -- Kim F. Storm <storm@cua.dk> http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-02-11 15:05 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <m31ygj2zmf.fsf@Janik.cz> [not found] ` <5xd703e406.fsf@kfs2.cua.dk> [not found] ` <5137-Tue22Jan2002120220+0200-eliz@is.elta.co.il> 2002-02-09 0:09 ` inactive-mode-line face? Kim F. Storm 2002-02-09 8:32 ` Pavel Janík 2002-02-09 19:49 ` Kim F. Storm 2002-02-09 9:37 ` Eli Zaretskii 2002-02-09 20:07 ` Kim F. Storm 2002-02-09 20:39 ` Karl Eichwalder 2002-02-11 2:08 ` Richard Stallman 2002-02-11 8:29 ` Kim F. Storm 2002-02-11 15:05 ` Kim F. Storm
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).