unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Steven Degutis <sbdegutis@gmail.com>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: Re: `auto-dim-other-windows` -- scrutiny invited
Date: Wed, 3 Apr 2013 14:19:21 -0500	[thread overview]
Message-ID: <CACeWA3jqHxi2NuPM4Uene=x+RgtxZaKkDfhvns6HeTEuD2CLdw@mail.gmail.com> (raw)
In-Reply-To: <CACeWA3iCG5dr2ThDeO5wXd_kHxe6PMmYdXEVn=VhUMrjVwGpeA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2137 bytes --]

Okay, figured it out.

Now it's a global minor mode.

(But melpa won't catch up for a few hours.)

Thanks guys.

Later, if I can find some time, I might try to make a new similar project
that uses window-overlays via Michael's idea. And I'm going to name it
`tunnel-vision`, since the current project's name is way too long.

-Steven


On Wed, Apr 3, 2013 at 1:54 PM, Steven Degutis <sbdegutis@gmail.com> wrote:

> Seems legit. But then how do users typically install it? It's not like
> other minor modes which are part of a hook. Do they just do
> "auto-dim-other-buffers-mode" and it's enabled globally until they disable
> it the same way or quit emacs?
>
> Funny, melpa *just* updated it a few minutes ago, and it's already about
> to be woefully out of date again. At least the version in melpa right now
> is much more efficient than the last one.
>
> -Steven
>
>
> On Wed, Apr 3, 2013 at 1:10 PM, Óscar Fuentes <ofv@wanadoo.es> wrote:
>
>> Steven Degutis <sbdegutis@gmail.com> writes:
>>
>> > So it's more conventional to use a minor-mode to do this than just two
>> > functions?
>> >
>> > If so, is it considerably more difficult to implement it as a
>> minor-mode?
>> > And would the code look any cleaner?
>>
>> From the POV of the user a minor mode is an standard interface for
>> customizing Emacs with active features. For instance, he can query Emacs
>> about which modes are active at any moment (M-x describe-mode). Emacs
>> provides some sugar for making it easy to implement minor modes. A minor
>> mode for this feature would be quite simple and could be implemented
>> with something like (not tested):
>>
>> (define-minor-mode auto-dim-other-windows-mode
>>   "Dim the background of non-selected windows
>>
>>   blah, blah, blah (more info here)"
>>
>>   (if auto-dim-other-windows-mode
>>       (auto-dim-other-windows-mode-disable)
>>     (auto-dim-other-windows-mode-enable))
>>
>> where auto-dim-other-windows-mode-enable/disable are the functions your
>> current implementation is using.
>>
>> As you can see, the code overhead is minimal.
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3169 bytes --]

  reply	other threads:[~2013-04-03 19:19 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-02 21:06 `auto-dim-other-windows` -- scrutiny invited Steven Degutis
2013-04-02 22:19 ` Óscar Fuentes
2013-04-02 22:48   ` Steven Degutis
2013-04-02 23:14     ` Óscar Fuentes
2013-04-02 23:19       ` Steven Degutis
     [not found]       ` <mailman.23338.1364944796.855.help-gnu-emacs@gnu.org>
2013-04-03 13:03         ` Michael Heerdegen
2013-04-03 13:27           ` Steven Degutis
     [not found] ` <mailman.23335.1364941179.855.help-gnu-emacs@gnu.org>
2013-04-03 13:11   ` Michael Heerdegen
2013-04-03 13:19     ` Steven Degutis
2013-04-03 14:44 ` Steven Degutis
2013-04-03 14:47   ` Mark Skilbeck
2013-04-03 14:52     ` Steven Degutis
2013-04-03 14:55       ` Mark Skilbeck
2013-04-03 15:09         ` Steven Degutis
2013-04-03 15:17           ` Óscar Fuentes
2013-04-03 15:15   ` Óscar Fuentes
2013-04-03 15:32     ` Steven Degutis
2013-04-03 16:03       ` Steven Degutis
2013-04-03 17:03         ` Óscar Fuentes
2013-04-03 17:13           ` Steven Degutis
2013-04-03 17:17             ` Óscar Fuentes
2013-04-03 17:42               ` Steven Degutis
2013-04-03 18:10                 ` Óscar Fuentes
2013-04-03 18:54                   ` Steven Degutis
2013-04-03 19:19                     ` Steven Degutis [this message]
2013-04-03 20:13         ` Stefan Monnier
2013-04-03 20:22           ` Steven Degutis
2013-04-03 22:23             ` Stefan Monnier
2013-04-04 21:55               ` Drew Adams
2013-04-04 22:01                 ` Steven Degutis
2013-04-05 12:49                   ` Stefan Monnier
2013-04-06 19:23                     ` Drew Adams
     [not found]       ` <mailman.23406.1365005023.855.help-gnu-emacs@gnu.org>
2013-04-03 17:20         ` Michael Heerdegen
2013-04-03 17:44           ` Steven Degutis
2013-04-03 20:55           ` Steven Degutis
2013-04-04 16:02           ` Steven Degutis
2013-04-04  7:27         ` Joost Kremers
2013-04-04 20:52           ` Ludwig, Mark
2013-04-04 20:53             ` Steven Degutis
2013-04-04 21:31               ` Steven Degutis
2013-04-03 15:57   ` Ludwig, Mark
2013-04-03 16:06     ` Steven Degutis
2013-04-03 16:37     ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACeWA3jqHxi2NuPM4Uene=x+RgtxZaKkDfhvns6HeTEuD2CLdw@mail.gmail.com' \
    --to=sbdegutis@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).