all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Highlighting current window
@ 2012-06-30 10:30 Francesco Mazzoli
  2012-06-30 18:23 ` Drew Adams
  0 siblings, 1 reply; 11+ messages in thread
From: Francesco Mazzoli @ 2012-06-30 10:30 UTC (permalink / raw)
  To: help-gnu-emacs

Hi list,

I was looking for ways to make the focused window clearer. The best
way would probably a slightly lighter background.

However, I couldn't find any hooks to easily do that. I was expecting
something along the lines of `window-leave-hook' and
`window-focus-hook' but I couldn't find anything similar.

The best suggestion that the IRC people came up with is to use
`post-command-hook' and match `switch-buffer', but that sounds a bit
ugly. Is there a better way?

--
Francesco * Often in error, never in doubt



^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: Highlighting current window
@ 2012-07-01  9:06 martin rudalics
  2012-07-04  1:20 ` Le Wang
  0 siblings, 1 reply; 11+ messages in thread
From: martin rudalics @ 2012-07-01  9:06 UTC (permalink / raw)
  To: f; +Cc: help-gnu-emacs

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

 > I was looking for ways to make the focused window clearer. The best
 > way would probably a slightly lighter background.
 >
 > However, I couldn't find any hooks to easily do that. I was expecting
 > something along the lines of `window-leave-hook' and
 > `window-focus-hook' but I couldn't find anything similar.
 >
 > The best suggestion that the IRC people came up with is to use
 > `post-command-hook' and match `switch-buffer',

What is `switch-buffer'?

 > but that sounds a bit
 > ugly. Is there a better way?

I don't think that using `post-command-hook' is a priori bad in this
case.  Doing it on a `window-leave-hook' or `window-focus-hook' would
mean you'd have to do that background setting whenever you leave a
window or change the focus, which can happen a couple of times during
one and the same command.  Obviously `post-command-hook' will fail when
the focus changes asynchronously but I think such cases should be rare.

I attach an old version which can run into a problem I forgot about.
There's a better way to provide whole-window overlays for Emacs 24.1 but
I didn't implement them yet.  If you use Emacs 24, I can look into this.

martin

[-- Attachment #2: hiselwin.el --]
[-- Type: application/emacs-lisp, Size: 1358 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-07-04  9:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-30 10:30 Highlighting current window Francesco Mazzoli
2012-06-30 18:23 ` Drew Adams
2012-06-30 19:30   ` Francesco Mazzoli
2012-06-30 20:16     ` Christopher Grubert
2012-07-01  1:22       ` Drew Adams
2012-07-01  1:48         ` Christopher Grubert
     [not found]       ` <mailman.3792.1341105740.855.help-gnu-emacs@gnu.org>
2012-07-01  1:56         ` Michael Heerdegen
2012-07-01 11:49       ` Francesco Mazzoli
  -- strict thread matches above, loose matches on Subject: below --
2012-07-01  9:06 martin rudalics
2012-07-04  1:20 ` Le Wang
2012-07-04  9:18   ` martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.