all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Buffers and frames
@ 2010-08-19  8:20 Gary
  2010-08-19 13:12 ` Tim Visher
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Gary @ 2010-08-19  8:20 UTC (permalink / raw)
  To: help-gnu-emacs

Maybe I'm peculiar, but what I would like to do is kind of "lock" some
buffers to frames (or maybe I mean the opposite, I'm not sure). That is,
I would like to only be offered certain buffers when list-buffers is run
in a certain frame. Possible?

For example, I want to have gnus and only gnus in one frame, my php
editing buffers (and only...) in another frame, and so on.

I'm wondering if I could somehow use ido to do this (ido-ignore-buffers)
but it looks like that might be rather long winded. Ideally I would
simply like buffers opened in one frame to only be visible in that one
frame (perhaps with a way of "forcing" all buffers to be visible on a
case by case basis).

-- 
Gary
GNU Emacs 23.2.1
emacsclient 23.2
1.7.4(0.225/5/3) 2010-04-07 11:02 Cygwin




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

* Re: Buffers and frames
       [not found] <mailman.0.1282206047.24938.help-gnu-emacs@gnu.org>
@ 2010-08-19  9:21 ` Stefan Monnier
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2010-08-19  9:21 UTC (permalink / raw)
  To: help-gnu-emacs

> For example, I want to have gnus and only gnus in one frame, my php
> editing buffers (and only...) in another frame, and so on.

Sounds like the frame-parameter `buffer-predicate' should do pretty much
what you want, according to the Elisp manual:

`buffer-predicate'
     The buffer-predicate function for this frame.  The function
     `other-buffer' uses this predicate (from the selected frame) to
     decide which buffers it should consider, if the predicate is not
     `nil'.  It calls the predicate with one argument, a buffer, once
     for each buffer; if the predicate returns a non-`nil' value, it
     considers that buffer.

But, as the above says, it only applies to `other-buffer'.  But I think
this is a misfeature which would deserve to be fixed.  So please try it
out and when it doesn't DTRT (i.e. when a command ignores this parameter
whereas you'd want it to obey it), please report it with M-x
report-emacs-bug.


        Stefan


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

* Re: Buffers and frames
  2010-08-19  8:20 Buffers and frames Gary
@ 2010-08-19 13:12 ` Tim Visher
  2010-08-19 14:00   ` Gary
  2010-08-19 14:12 ` Drew Adams
  2010-08-22 11:54 ` Bernardo
  2 siblings, 1 reply; 6+ messages in thread
From: Tim Visher @ 2010-08-19 13:12 UTC (permalink / raw)
  To: Gary; +Cc: help-gnu-emacs

On Thu, Aug 19, 2010 at 4:20 AM, Gary <help-gnu-emacs@garydjones.name> wrote:
> Maybe I'm peculiar, but what I would like to do is kind of "lock" some
> buffers to frames (or maybe I mean the opposite, I'm not sure). That is,
> I would like to only be offered certain buffers when list-buffers is run
> in a certain frame. Possible?
>
> For example, I want to have gnus and only gnus in one frame, my php
> editing buffers (and only...) in another frame, and so on.
>
> I'm wondering if I could somehow use ido to do this (ido-ignore-buffers)
> but it looks like that might be rather long winded. Ideally I would
> simply like buffers opened in one frame to only be visible in that one
> frame (perhaps with a way of "forcing" all buffers to be visible on a
> case by case basis).

I won't even attempt to approach this from an elisp perspective but
have you considered just launching multiple emacs instances, perhaps
with different default frame names, to house the different purposes
you're using it for? It's almost like you're using emacs as an OS at
this point and launching your PHP IDE and your Mail Reader, etc.

Just a thought. Obviously, it's not ideal.

-- 

In Christ,

Timmy V.

http://blog.twonegatives.com/
http://five.sentenc.es/ - Spend less time on e-mail



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

* Re: Buffers and frames
  2010-08-19 13:12 ` Tim Visher
@ 2010-08-19 14:00   ` Gary
  0 siblings, 0 replies; 6+ messages in thread
From: Gary @ 2010-08-19 14:00 UTC (permalink / raw)
  To: help-gnu-emacs

Tim Visher wrote:

> On Thu, Aug 19, 2010 at 4:20 AM, Gary wrote:
>> For example, I want to have gnus and only gnus in one frame, my php
>> editing buffers (and only...) in another frame, and so on.

>
> I won't even attempt to approach this from an elisp perspective but
> have you considered just launching multiple emacs instances, perhaps
> with different default frame names, to house the different purposes

I don't really want to do that. I like everything in one place (even if
that place is spread across a few frames), so I can just use the
keyboard in one window. My colleagues think I'm mad, btw.

> you're using it for? It's almost like you're using emacs as an OS

Well, isn't it? <g>

-- 
Gary
GNU Emacs 23.2.1
emacsclient 23.2
1.7.4(0.225/5/3) 2010-04-07 11:02 Cygwin




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

* RE: Buffers and frames
  2010-08-19  8:20 Buffers and frames Gary
  2010-08-19 13:12 ` Tim Visher
@ 2010-08-19 14:12 ` Drew Adams
  2010-08-22 11:54 ` Bernardo
  2 siblings, 0 replies; 6+ messages in thread
From: Drew Adams @ 2010-08-19 14:12 UTC (permalink / raw)
  To: 'Gary', help-gnu-emacs

> Maybe I'm peculiar, but what I would like to do is kind of "lock" some
> buffers to frames (or maybe I mean the opposite, I'm not 
> sure).

Look up dedicated windows in the doc - e.g. `(elisp) Dedicated Windows'.

> That is, I would like to only be offered certain buffers when 
> list-buffers is run in a certain frame. Possible?

That's something different from locking a frame/window to a particular buffer.

See option `Buffer-menu-use-frame-buffer-list'.  If that doesn't give you what
you want, you should be able to write a little Lisp code based on the code in
buff-menu.el.

> For example, I want to have gnus and only gnus in one frame, my php
> editing buffers (and only...) in another frame, and so on.
> 
> Ideally I would simply like buffers opened in one frame to only be
> visible in that one frame (perhaps with a way of "forcing" all
> buffers to be visible on a case by case basis).

That's something different from the first two things you mentioned.  I don't
know a simple answer for that, but at least take a look at option
`display-buffer-reuse-frames'.  It doesn't _prevent_ display of a buffer in more
than one frame (e.g. `C-x 5 2'), but it might be sufficient for your use case.






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

* Re: Buffers and frames
  2010-08-19  8:20 Buffers and frames Gary
  2010-08-19 13:12 ` Tim Visher
  2010-08-19 14:12 ` Drew Adams
@ 2010-08-22 11:54 ` Bernardo
  2 siblings, 0 replies; 6+ messages in thread
From: Bernardo @ 2010-08-22 11:54 UTC (permalink / raw)
  To: Gary; +Cc: help-gnu-emacs

> Maybe I'm peculiar, but what I would like to do is kind of "lock" some
> buffers to frames (or maybe I mean the opposite, I'm not sure). That is,
> I would like to only be offered certain buffers when list-buffers is run
> in a certain frame. Possible?
> 
> For example, I want to have gnus and only gnus in one frame, my php
> editing buffers (and only...) in another frame, and so on.
> 
> I'm wondering if I could somehow use ido to do this (ido-ignore-buffers)
> but it looks like that might be rather long winded. Ideally I would
> simply like buffers opened in one frame to only be visible in that one
> frame (perhaps with a way of "forcing" all buffers to be visible on a
> case by case basis).
> 

as Drew suggested, Dedicated Windows is probably the place to start looking;
this snippet was posted on the list some time ago:
http://lists.gnu.org/archive/html/help-gnu-emacs/2007-05/msg00975.html




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

end of thread, other threads:[~2010-08-22 11:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-19  8:20 Buffers and frames Gary
2010-08-19 13:12 ` Tim Visher
2010-08-19 14:00   ` Gary
2010-08-19 14:12 ` Drew Adams
2010-08-22 11:54 ` Bernardo
     [not found] <mailman.0.1282206047.24938.help-gnu-emacs@gnu.org>
2010-08-19  9:21 ` Stefan Monnier

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.