[OS X Emacs] opening *some* files in same window

Nathaniel Cunningham nathaniel.cunningham at gmail.com
Wed Aug 26 11:32:27 EDT 2015


Pete, in case it's useful for you: the original tabbar mode (upon which
Aquamacs's tabbed interface is built) is organized precisely around
grouping buffers by major-mode.

http://emacswiki.org/emacs/TabBarMode

Having said that, it might take a bit of work to get that original-tabbar
behavior, given the changes that have been implemented on top of that base
in Aquamacs.  Or tab grouping may not be of interest to you, in getting
same major-mode buffers into the same frame.

-- Nathaniel

On Wed, Aug 26, 2015 at 10:19 AM, Pete Siemsen <siemsen at ucar.edu> wrote:

> In general, I like that Aquamacs opens new files in new windows (frames).
> But I think I might sometimes like it better if it opened similar files in
> the same window. For example, if I'm editing several Perl files that are
> part of one program, I might like to handle them in the same window. I'd
> like a "find-file-same-frame" command. I understand that I can use
> open-buffer-one-frame-mode to set the behavior, but I'd like some guidance
> as to how to do it elegantly.
>
> I looked around a bit and found, in the Aquamacs Wiki under "Customize
> Aquamacs" a description of how to define a function that does the opposite
> of what I want, like so:
>
> (defun my-new-frame-with-new-scratch ()
>   (interactive)
>   (let ((one-buffer-one-frame t))
>     (new-frame-with-new-scratch)))
>
> ​So I tried the following:
>
> (defun find-file-same-frame ()
> ​​
>
>   (interactive)
> ​​
>
>   (let ((one-bu
> ​​
> ffer-one-frame 0))
>     (ido-find-f
> ​​
> ile)))
>>
> ​This just opens the file, in a new window. I think ido-find-file forces
> it to open in a new window, regardless of the setting of
> one-buffer-one-frame.
>
> ​Am I on the right track, or is there a smarter approach?​​
>
> -- Pete
>
>
>
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> https://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://email.esm.psu.edu/pipermail/macosx-emacs/attachments/20150826/ae926ed3/attachment.html>


More information about the MacOSX-Emacs mailing list