help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (newbie) checking for which buffers are visible to the user


From: Tassilo Horn
Subject: Re: (newbie) checking for which buffers are visible to the user
Date: Tue, 11 Sep 2007 16:02:36 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux)

Stuart McLean <makhector@gmail.com> writes:

Hi,

> I have bound f6 to bring up the calendar. Here is what I would like to
> do. If the calendar is not visible to me, make it visible. However, if
> I can see it, I would like to bury the calendar buffer. I am not sure
> the most effective way to check if a buffer is visible to the user
> (me) and how to write a function that takes advantage of this.

,----[ C-h f get-buffer-window RET ]
| get-buffer-window is a built-in function in `C source code'.
| (get-buffer-window BUFFER &optional FRAME)
| 
| Return a window currently displaying BUFFER, or nil if none.
| BUFFER can be a buffer or a buffer name.
| If optional argument FRAME is `visible', search all visible frames.
| If optional argument FRAME is 0, search all visible and iconified frames.
| If FRAME is t, search all frames.
| If FRAME is nil, search only the selected frame.
| If FRAME is a frame, search only that frame.
`----

HTH,
Tassilo
-- 
* delYsid has mortgage, opportunity and penis in his score file.
<delYsid> thats pretty effective against spam
<Luke> aren't you worried about missing opportunities to mortgage
       your penis?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]