unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* one file per frame  -- customization possible?
@ 2003-11-03 21:36 David Reitter
  2003-11-04  6:03 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: David Reitter @ 2003-11-03 21:36 UTC (permalink / raw)


Hello,

I would like to tell emacs to display each new buffer in a new frame. When
I switch buffers, this should amount to bringing the according frame in
front. Closing a frame should amount to closing the buffer.
More temporary buffers that contain messages belonging to the actual
document shouldn't be displayed in separate frames - split windows would do.

Essentially, what I would like to have, is a one-document-per-window scheme,
just like in pretty much all OS X applications (and most Windows
applications). 
 
I guess I'm not the first to ask for this, so there should be a solution out
there, which I couldn't find -- anyone??

I am using Andrew Choi's 21.3 port on a Mac OS X 10.3 machine.

Cheers
Dave

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

* Re: one file per frame  -- customization possible?
  2003-11-03 21:36 one file per frame -- customization possible? David Reitter
@ 2003-11-04  6:03 ` Eli Zaretskii
       [not found] ` <mailman.3087.1067925712.21628.help-gnu-emacs@gnu.org>
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2003-11-04  6:03 UTC (permalink / raw)


> From: David Reitter <r8@davids-welt.de>
> Newsgroups: gnu.emacs.help
> Date: Mon, 03 Nov 2003 21:36:20 +0000
> 
> I would like to tell emacs to display each new buffer in a new frame.

One way is to set the value of special-display-regexps to a regexp
that matches any buffer name.

> When
> I switch buffers, this should amount to bringing the according frame in
> front.

I think Emacs does that automatically.  In any case, you could use
"C-x 5 o".

> Closing a frame should amount to closing the buffer.

You could set up the list in delete-frame-functions to do that.

> More temporary buffers that contain messages belonging to the actual
> document shouldn't be displayed in separate frames - split windows would do.

Then make special-display-regexps a bit less trivial ;-)

> Essentially, what I would like to have, is a one-document-per-window scheme,
> just like in pretty much all OS X applications (and most Windows
> applications). 

It's IMHO a bad idea to try to tweak Emacs's look and feel in such a
fundamental way.  You are welcome to try, but I'd warn you that you
will meet many obstacles down the road.  It's just not the way Emacs
was designed to work.

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

* Re: one file per frame  -- customization possible?
       [not found] ` <mailman.3087.1067925712.21628.help-gnu-emacs@gnu.org>
@ 2003-11-04 12:11   ` David Reitter
  2003-11-04 15:47     ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: David Reitter @ 2003-11-04 12:11 UTC (permalink / raw)


Eli Zaretskii wrote on 04/11/2003 06:03:

> One way is to set the value of special-display-regexps to a regexp
> that matches any buffer name.

Unfortunately, this just pertains to buffers that are normally opened in an
emacs window, but not the ones that are simply shown in the current frame.
Buffers with standard files are absolutely not affected by
special-display-regexps; that's what the manual says and that's what I found
out when I tried it!


Dave

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

* Re: one file per frame  -- customization possible?
  2003-11-04 12:11   ` David Reitter
@ 2003-11-04 15:47     ` Stefan Monnier
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2003-11-04 15:47 UTC (permalink / raw)


>> One way is to set the value of special-display-regexps to a regexp
>> that matches any buffer name.

> Unfortunately, this just pertains to buffers that are normally opened in an
> emacs window, but not the ones that are simply shown in the current frame.
> Buffers with standard files are absolutely not affected by
> special-display-regexps; that's what the manual says and that's what I found
> out when I tried it!

It's not even that simple.  It depends on the command you use to get to
that buffer.  Basically, most Emacs commands don't just mean "show me this
file/buffer", but they mean something more specific like "show me this
file/buffer in the current window".  So the best thing to do is to get used
to using C-x 5 f instead of C-x C-f, C-x 5 b instead of C-x b, etc...

As mentioned, you'll want to set special-display-regexps to a very liberal
regexp (something like "\\`\\*.*\\*\\'" or even just ".*").  Also you'll
want to set pop-up-windows and pop-up-frames and most importantly,
you'll need to be ready to report bugs, because a fair bit of code
breaks (it's improved since Emacs-20.1, among other things because I use
such a setup and have reported/fixed a number of bugs).

I've added recently (I think it's only in Emacs-CVS) code so you can put
(same-frame . t) in the special-display-regexps and
special-display-buffer-names parameters so as to override the default
for those few buffers that you want to keep in split windows.

After you tried the above, feel free to ask questions about specific
problems and circumstances.  I've switched to such a setup (together with
a separate minibuffer-only frame) a long time ago and can't remember which
part(s) of my .emacs is relevant so I might have missed some parts.


        Stefan

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

* Re: one file per frame  -- customization possible?
  2003-11-03 21:36 one file per frame -- customization possible? David Reitter
  2003-11-04  6:03 ` Eli Zaretskii
       [not found] ` <mailman.3087.1067925712.21628.help-gnu-emacs@gnu.org>
@ 2003-12-04 19:58 ` Kai Grossjohann
  2003-12-04 23:38   ` Stefan Monnier
  2003-12-05  8:25 ` Thomas F. Burdick
  3 siblings, 1 reply; 11+ messages in thread
From: Kai Grossjohann @ 2003-12-04 19:58 UTC (permalink / raw)


David Reitter <r8@davids-welt.de> writes:

> I would like to tell emacs to display each new buffer in a new frame.

IMHO it doesn't make sense.  There are too many buffers.  Many Emacs
packages use little temp buffers for their work -- if those kept
popping up frames on your display, you'd be annoyed soon.

(I now have 38 buffers, and I'm doing nothing but reading news with
Gnus.  Type M-: (length (buffer-list)) RET to find out your value.
And be amazed!)

Kai

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

* Re: one file per frame  -- customization possible?
  2003-12-04 19:58 ` Kai Grossjohann
@ 2003-12-04 23:38   ` Stefan Monnier
  2003-12-05  0:26     ` Galen Boyer
  2003-12-05 16:46     ` Kai Grossjohann
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2003-12-04 23:38 UTC (permalink / raw)


>> I would like to tell emacs to display each new buffer in a new frame.
> IMHO it doesn't make sense.

Ahem!  Excuse sir, are you saying that my config doesn't make sense?

> There are too many buffers.

But of course, this only applies to buffers that are displayed (not
internal ones).

> (I now have 38 buffers,

I've often had Emacs sessions with about a hundred frames.


        Stefan

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

* Re: one file per frame  -- customization possible?
  2003-12-04 23:38   ` Stefan Monnier
@ 2003-12-05  0:26     ` Galen Boyer
  2003-12-05 16:50       ` Kai Grossjohann
  2003-12-05 16:46     ` Kai Grossjohann
  1 sibling, 1 reply; 11+ messages in thread
From: Galen Boyer @ 2003-12-05  0:26 UTC (permalink / raw)


On Thu, 04 Dec 2003, monnier@iro.umontreal.ca wrote:

> I've often had Emacs sessions with about a hundred frames.

Whoa!  I can't imagine that.  How do you keep them straight?  I
know, in the windows world, they all show up on the task bar,
which makes that idea completely unusable, but I'd love to hear
how you work this way.  Sounds quite powerful if you know how to
handle it.

-- 
Galen Boyer

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

* Re: one file per frame  -- customization possible?
  2003-11-03 21:36 one file per frame -- customization possible? David Reitter
                   ` (2 preceding siblings ...)
  2003-12-04 19:58 ` Kai Grossjohann
@ 2003-12-05  8:25 ` Thomas F. Burdick
  3 siblings, 0 replies; 11+ messages in thread
From: Thomas F. Burdick @ 2003-12-05  8:25 UTC (permalink / raw)


David Reitter <r8@davids-welt.de> writes:

> Hello,
> 
> I would like to tell emacs to display each new buffer in a new frame. When
> I switch buffers, this should amount to bringing the according frame in
> front. Closing a frame should amount to closing the buffer.
> More temporary buffers that contain messages belonging to the actual
> document shouldn't be displayed in separate frames - split windows would do.
> 
> Essentially, what I would like to have, is a one-document-per-window scheme,
> just like in pretty much all OS X applications (and most Windows
> applications). 

I just saw this post, and decided to try to see what it would take to
get Emacs to do this.  The answer is, not much at all.  Here's what I have:

  (setq pop-up-frames t)
  
  (defadvice switch-to-buffer (around force-other-frame (&rest args) activate)
    (apply #'switch-to-buffer-other-frame args))
  
  (defun kill-buffer-for-frame (frame)
    (kill-buffer (window-buffer (frame-selected-window frame))))
  
  (add-to-list 'delete-frame-functions 'kill-buffer-for-frame)

I tested it lightly, and it seems to work.  It's kind of cool, and
seems like it might be perfectly usable.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               

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

* Re: one file per frame  -- customization possible?
  2003-12-04 23:38   ` Stefan Monnier
  2003-12-05  0:26     ` Galen Boyer
@ 2003-12-05 16:46     ` Kai Grossjohann
  1 sibling, 0 replies; 11+ messages in thread
From: Kai Grossjohann @ 2003-12-05 16:46 UTC (permalink / raw)


Stefan Monnier <monnier@iro.umontreal.ca> wrote in message news:<jwviskwdull.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca>...
> >> I would like to tell emacs to display each new buffer in a new frame.
> > IMHO it doesn't make sense.
> 
> Ahem!  Excuse sir, are you saying that my config doesn't make sense?

*blush*

Somebody, please hand me a rock to hide under.

Kai

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

* Re: one file per frame  -- customization possible?
  2003-12-05  0:26     ` Galen Boyer
@ 2003-12-05 16:50       ` Kai Grossjohann
  2003-12-08  1:52         ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Kai Grossjohann @ 2003-12-05 16:50 UTC (permalink / raw)


Galen Boyer <galenboyer@hotpop.com> wrote in message news:<ullpsf6yl.fsf@standardandpoors.com>...
> On Thu, 04 Dec 2003, monnier@iro.umontreal.ca wrote:
> 
> > I've often had Emacs sessions with about a hundred frames.
> 
> Whoa!  I can't imagine that.  How do you keep them straight?

The window manager Sawfish provides a command that's quite similar to
Emacs' iswitchb.  Except that it selects X11 windows, of course.  I
like it.

But I think Stefan uses ctwm.  Hm.  That one has an icon manager which
lists the windows one below each other, and you can use the keyboard
to navigate that list.  Also, of course, there are up to 32
workspaces.  So maybe he keeps 3 frames in each workspace, that adds
up to about 100 frames.

Stefan?

> I know, in the windows world, they all show up on the task bar,
> which makes that idea completely unusable, but I'd love to hear
> how you work this way.  Sounds quite powerful if you know how to
> handle it.

I guess that I would use sww.el in that circumstance.  My
understanding is that it is something similar to C-x b, but for
Windows task bar entries.  I've never used it.

Kai

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

* Re: one file per frame  -- customization possible?
  2003-12-05 16:50       ` Kai Grossjohann
@ 2003-12-08  1:52         ` Stefan Monnier
  0 siblings, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2003-12-08  1:52 UTC (permalink / raw)


>> > I've often had Emacs sessions with about a hundred frames.
>> Whoa!  I can't imagine that.  How do you keep them straight?

Let's see:
3 - 4 workspaces, so you get about 30 to 40 frames per workspace.
1800x1440 lets you use some of the real estate for an "icon manager"
that lists (with no icon but with text) those on one side of the
screen while still leaving a lot of space to work with.

Of course, now that I sometimes work on a puny 1024x768 laptop
where the vertical resolution is not even sufficient to list those
40 frames, I work differently.


        Stefan

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

end of thread, other threads:[~2003-12-08  1:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-03 21:36 one file per frame -- customization possible? David Reitter
2003-11-04  6:03 ` Eli Zaretskii
     [not found] ` <mailman.3087.1067925712.21628.help-gnu-emacs@gnu.org>
2003-11-04 12:11   ` David Reitter
2003-11-04 15:47     ` Stefan Monnier
2003-12-04 19:58 ` Kai Grossjohann
2003-12-04 23:38   ` Stefan Monnier
2003-12-05  0:26     ` Galen Boyer
2003-12-05 16:50       ` Kai Grossjohann
2003-12-08  1:52         ` Stefan Monnier
2003-12-05 16:46     ` Kai Grossjohann
2003-12-05  8:25 ` Thomas F. Burdick

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).