From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: More enhancements to fringe bitmaps. Date: 19 Mar 2004 15:04:24 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1079702113 10279 80.91.224.253 (19 Mar 2004 13:15:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 19 Mar 2004 13:15:13 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Mar 19 14:15:05 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B4Jq5-0007Dn-00 for ; Fri, 19 Mar 2004 14:15:05 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B4Jq5-0002ew-00 for ; Fri, 19 Mar 2004 14:15:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B4Jkj-0003GE-1U for emacs-devel@quimby.gnus.org; Fri, 19 Mar 2004 08:09:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1B4Jjn-0003DN-T9 for emacs-devel@gnu.org; Fri, 19 Mar 2004 08:08:35 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1B4JjG-000396-UW for emacs-devel@gnu.org; Fri, 19 Mar 2004 08:08:34 -0500 Original-Received: from [212.88.64.25] (helo=mail-relay.sonofon.dk) by monty-python.gnu.org with smtp (Exim 4.30) id 1B4JgA-0002ow-Sq for emacs-devel@gnu.org; Fri, 19 Mar 2004 08:04:51 -0500 Original-Received: (qmail 62999 invoked from network); 19 Mar 2004 13:04:45 -0000 Original-Received: from unknown (HELO kfs-l.imdomain.dk.cua.dk) (213.83.150.2) by 0 with SMTP; 19 Mar 2004 13:04:45 -0000 Original-To: emacs-devel@gnu.org In-Reply-To: Original-Lines: 132 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20605 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20605 Marco Munari writes: > Assumption: Window managers call "window" what emacs calls "frame" and > emacs calls "window" the partitioned/split text area; is it allways so for > emacs and you? Yes. > moreover... Is there a difference between "selected" and "active" window? > (sometime i have the impression that "active window" in emacs is used for > "acrive frame"), if i whatch more the code i can find answare on my own, > but apparently you prefere the short cut. No, active window and selected window are (or should be) the same thing. However, there are some border cases, eg. if you are in a window, X, and enter the minibuffer, e.g. by typing C-x C-f, the minibuffer window is (of course) selected/active, but window X is still considered the "selected window" in terms of mode-line-in-non-selected-windows functionality. Please see the doc string for that variable. > > I can add fringe_in_non_selected_windows locally (i can't do elsewhere), > but how do you preferre to syncronize idea in the code? You know emacs > code more than me and you have write access to cvs, not all file > patched by me are in the best way and i know. Just post your patches here; I can install them for you when time comes. > Kim> A simple approach would be to use fringe-inactive unconditionally > Kim> in non-selected windows, and the fringe face (or user defined > Kim> face) in selected window. > > Yes, i didn't realize it is what i should do, now it's OK. > (it is the whole cvs diff, so following patch has even previous > fringe.c bitmaps redefinition, i will move that code later) That's ok. In any case, I'm not going to install anything until RMS tells me that yours papers have arrived. > Index: AUTHORS > =================================================================== Don't patch AUTHORS file. It is machine generated. > +(defface fringe-inactive > + '((((class color) (background light)) > + :background "grey75") > + (((class color) (background dark)) > + :background "grey30") > + (t > + :background "light gray")) > + "Basic face for the fringes of active input emacs windows." > + :version "21.4" > + :group 'frames > + :group 'basic-faces) Maybe fringe-inactive should inherit from fringe face (or vice versa)? > =================================================================== > RCS file: /cvsroot/emacs/emacs/src/dispextern.h,v > retrieving revision 1.169 > diff -u -r1.169 dispextern.h > --- src/dispextern.h 14 Mar 2004 00:28:01 -0000 1.169 > +++ src/dispextern.h 19 Mar 2004 03:35:16 -0000 > @@ -1172,6 +1172,20 @@ > ? MATRIX_HEADER_LINE_ROW (MATRIX)->height \ > : 0) > > +/* Return the fringe mode relative to selected/unselected window, > + parameters W the window, AFFID Active Fringe Face ID */ > + > +#define CURRENT_FRINGE_FACE_ID_2(W,AFFID) \ > + (fringe_in_non_selected_windows \ Don't you mean !fringe_in_non_selected_windows here ? > + DEFVAR_BOOL ("fringe-in-non-selected-windows", &fringe_in_non_selected_windows, > + doc: /* Non-nil means to use `fringe-inactive' face in non-selected windows. */); > mode_line_in_non_selected_windows = 1; You mean fringe-in-non-selected-windows here. > Kim> A more flexible approach would be for the code which does the > Kim> actual fg/bg color selection to look at fringe-inactive face > Kim> colors if current window is non-selected and actual face's colors > Kim> match the fringe face colors. > > It appare you like very much fixed color customization (insted i > prefere to think the passage from monocrome to generic color image > (a newline-arrow bitmap for example could have 3D aspect if it's > a color image) My current approach is a step-wise improvement to the original mono-crome fringe code. Adding full image support in the fringe would be ok, but like you I think there are more important things to work on, so the current level of functionality is based on "need to have" (and can be done with reasonable efforts) rather than "nice to have" (which requires more work). > > i think there are some more interesting customization to think on... > minibuffer positioning > bottom(default) and top, than absolute or relative to selected window Feel free to work on it :-) > > notice i resize and position the bitmaps You can do that with define-fringe-bitmap as well. Please report it as a bug if it doesn't work. > Kim> > M src/xfns.c > personal preference (narrow scroll bar) > > Kim> This is supposed to be customizable via the scroll-bar-width > Kim> frame parameter. > > i compiled with --with-x-toolkit=yes --without-toolkit-scroll-bars > but setting scroll-bar-width don't change the width of scroll bar > it works after long time How do you set the scroll-bar width? (modify-frame-parameters nil '((scroll-bar-width . 12))) works for me. -- Kim F. Storm http://www.cua.dk