From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Steven Degutis Newsgroups: gmane.emacs.help Subject: Re: `auto-dim-other-windows` -- scrutiny invited Date: Wed, 3 Apr 2013 15:22:31 -0500 Message-ID: References: <87ehersl1c.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8ff24ffa17d52904d97a9dab X-Trace: ger.gmane.org 1365020570 31080 80.91.229.3 (3 Apr 2013 20:22:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 20:22:50 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 03 22:23:17 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UNUDD-0002Io-Hi for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 22:23:15 +0200 Original-Received: from localhost ([::1]:54008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNUCo-0002X8-Fz for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 16:22:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35337) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNUCZ-0002W8-GS for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 16:22:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNUCW-0002XM-Ln for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 16:22:35 -0400 Original-Received: from mail-da0-x22b.google.com ([2607:f8b0:400e:c00::22b]:50701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNUCW-0002XB-E8 for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 16:22:32 -0400 Original-Received: by mail-da0-f43.google.com with SMTP id u36so821200dak.30 for ; Wed, 03 Apr 2013 13:22:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=UV4ezjyAOQKhe0yMW71NbaUGFWIyae0ukPyDoSuQlK0=; b=AZ+e14RBmab/QA0Y+m2ZEirXHo0zwOUSYF/Lk94X+9FjQa1MG6hH6khSE/t6e3WOy1 br7kv3jn43jbh+QIAdgjr09I90LMsBPLXSbcm5jTq71QKqZcyMxYCMyyMuCoHlhll0dv bi/ozGniNcw5glMLNKXrfhHq1CecVQFR5Ivn4nKkp/Wi9DEOugKtranb7pNGCfc3Il/e hTNjuAEMJuCWTUDRa/3LB+4JDak5jK43HpjClKD9vqZuZ4q+yxGilpS/0OViCMDAGq4M IzVxagnUK27Jj06PmCWMy7K45ufG/0TF+pp0/x+F45nkHHaYexD9PidbhuJHQDYa2cKo xjLw== X-Received: by 10.68.228.164 with SMTP id sj4mr4526410pbc.180.1365020551531; Wed, 03 Apr 2013 13:22:31 -0700 (PDT) Original-Received: by 10.70.6.100 with HTTP; Wed, 3 Apr 2013 13:22:31 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c00::22b X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89963 Archived-At: --e89a8ff24ffa17d52904d97a9dab Content-Type: text/plain; charset=ISO-8859-1 The problem with `window-configuration-change-hook` is that it isn't called all the times we would need it. For example, it's not called when you do `other-window` via `C-x o`. -Steven On Wed, Apr 3, 2013 at 3:13 PM, Stefan Monnier wrote: > > We could add overlays to every buffer, and whenever you change windows, > > remove the overlay from the current buffer and add it back to the > previous > > buffer. > > Auto-adding the overlays can be done in window-configuration-change-hook. > We're talking about N overlays per buffer where N is small (it's number of > windows where the buffer is displayed), so there's no performance > problem there. > > > Or, we could have it reversed. We could only have an overlay on the > current > > buffer at any given time, and give it the window of (selected-window), > and > > keep updating these any time you change buffers or windows. > > That would be a lot simpler, indeed, but I think it will be difficult > to make it look good. > > > Stefan > > > --e89a8ff24ffa17d52904d97a9dab Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The problem with `window-configuration-change-hook` is tha= t it isn't called all the times we would need it. For example, it's= not called when you do `other-window` via `C-x o`.

-Steven


On Wed, Apr 3, 2013 at 3:13 PM, Stefan Monnier <= monnier@iro.u= montreal.ca> wrote:
> We could add overlays= to every buffer, and whenever you change windows,
> remove the overlay from the current buffer and add it back to the prev= ious
> buffer.

Auto-adding the overlays can be done in window-configuration-change-h= ook.
We're talking about N overlays per buffer where N is small (it's nu= mber of
windows where the buffer is displayed), so there's no performance
problem there.

> Or, we could have it reversed. We could only have an overlay on the cu= rrent
> buffer at any given time, and give it the window of (selected-window),= and
> keep updating these any time you change buffers or windows.

That would be a lot simpler, indeed, but I think it will be difficult=
to make it look good.


=A0 =A0 =A0 =A0 Stefan



--e89a8ff24ffa17d52904d97a9dab--