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

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

Re: one file per frame -- customization possible?


From: Thomas F. Burdick
Subject: Re: one file per frame -- customization possible?
Date: 05 Dec 2003 00:25:13 -0800

David Reitter <address@hidden> 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!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               


reply via email to

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