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 08:27:48 -0500 Message-ID: References: <87vc84shhw.fsf@wanadoo.es> <87r4issey8.fsf@wanadoo.es> <878v4zg41l.fsf@web.de> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec544f030f6737e04d974d16e X-Trace: ger.gmane.org 1364995686 28964 80.91.229.3 (3 Apr 2013 13:28:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Apr 2013 13:28:06 +0000 (UTC) To: help-gnu-emacs@gnu.org, =?ISO-8859-1?Q?=D3scar_Fuentes?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 03 15:28:33 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 1UNNjt-0004w5-BL for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 15:28:33 +0200 Original-Received: from localhost ([::1]:47500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNNjU-0004IP-B6 for geh-help-gnu-emacs@m.gmane.org; Wed, 03 Apr 2013 09:28:08 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNNjG-0004IJ-JL for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 09:27:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNNjC-0001Li-GW for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 09:27:54 -0400 Original-Received: from mail-pa0-f51.google.com ([209.85.220.51]:58292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNNjC-0001LX-7P for help-gnu-emacs@gnu.org; Wed, 03 Apr 2013 09:27:50 -0400 Original-Received: by mail-pa0-f51.google.com with SMTP id jh10so898109pab.38 for ; Wed, 03 Apr 2013 06:27:49 -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:content-type; bh=4c8joIcR7OY+Gg4ps2HX2WsUXWxJwV7WXVO7k72nqB0=; b=sFERV12RxXl2n9enJCQgndTswUHfSjd7/QgMBkd9OHou+fNaxJTus6CSOqN8YFBNSj 4yfDq/iY1G6QDuRmt9bDGXtJZnHq1HDFv97c4QU+jNhUGYYR++tyOyaeC1sICTqLJ+U4 0XudSlaFfWgNFl/Ftlq3acvsip25Y1f7k2wst7FLsScI4e9HFEYgUOLCRS4Vg6VZLGI3 pppDMzfRmEK6aifAlkvvKiJpOUiQ+ijzTXrC8LBTHkcRXlKu+NGP1xMm7IIUi02mL6M/ 3L1ntC4dbe0t59dRyr77ZSqprSqu5/380lqRWa8Whhd8452yt2I65Bo7BfIQs4DJHstT br1Q== X-Received: by 10.68.40.165 with SMTP id y5mr2402109pbk.218.1364995668863; Wed, 03 Apr 2013 06:27:48 -0700 (PDT) Original-Received: by 10.70.6.100 with HTTP; Wed, 3 Apr 2013 06:27:48 -0700 (PDT) In-Reply-To: <878v4zg41l.fsf@web.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.220.51 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:89932 Archived-At: --bcaec544f030f6737e04d974d16e Content-Type: text/plain; charset=ISO-8859-1 The source code is on github: https://github.com/sdegutis/auto-dim-other-buffers.el Window overlays seem inefficient here, given this line in the docs: "due to a different implementation, overlays generally don't scale well (many operations take a time that is proportional to the number of overlays in the buffer)" and the following recommendation to avoid them when dealing with "the visual appearance of many portions of the buffer". I don't quite know if that applies here since I'm actually affecting the entire portion of every buffer extremely often. I would assume so. Then again, I don't really know elisp. And I only just started using emacs a few months ago. So who knows, maybe I'm way off. -Steven On Wed, Apr 3, 2013 at 8:03 AM, Michael Heerdegen wrote: > Steven Degutis writes: > > > Originally I wanted to make it change the face per-window, so I could > > easily know which window I'm editing in. I even named it > > auto-dim-other-windows at first. > > > > Then I realized emacs only allows us to set per-buffer faces. It > > doesn't allow us to set per-window faces. Please file a bug asking > > for the feature to set per-window faces. For now, this is the best we > > can do with what emacs gives us. > > You can use the `window' overlay property for that - see (elisp) Overlay > Properties. > > Apropos color: To get a dim color that is always derived live from the > current background color, you can (optionally) use "hexrgb" by Drew > Adam's for color transformation. I can help with the coding if you are > interested. > > > Regards, > > Michael. > > --bcaec544f030f6737e04d974d16e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Window overlay= s seem inefficient here, given this line in the docs: "due to a differ= ent implementation, overlays generally don't scale well (many operation= s take a time that is proportional to the number of overlays in the buffer)= " and the following recommendation to avoid them when dealing with &qu= ot;the visual appearance of many portions of the buffer". I don't = quite know if that applies here since I'm actually affecting the entire= portion of every buffer extremely often. I would assume so.

Then again, I don't really know elisp. And I only j= ust started using emacs a few months ago. So who knows, maybe I'm way o= ff.

-Steven


On Wed, Apr 3, 2013 at 8:03 AM, Michael = Heerdegen <michael_heerdegen@web.de> wrote:
Steven Degutis <sbdegutis@gmail.com> writes:

> Originally I wanted to make it change the face per-window, so I could<= br> > easily know which window I'm editing in. I even named it
> auto-dim-other-windows at first.
>
> Then I realized emacs only allows us to set per-buffer faces. It
> doesn't allow us to set per-window faces. Please file a bug asking=
> for the feature to set per-window faces. For now, this is the best we<= br> > can do with what emacs gives us.

You can use the `window' overlay property for that - see (e= lisp) Overlay
Properties.

Apropos color: To get a dim color that is always derived live from the
current background color, you can (optionally) use "hexrgb" by Dr= ew
Adam's for color transformation. =A0I can help with the coding if you a= re
interested.


Regards,

Michael.


--bcaec544f030f6737e04d974d16e--