<div dir="ltr">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.<div><br></div><div><a href="http://emacswiki.org/emacs/TabBarMode">http://emacswiki.org/emacs/TabBarMode</a><br></div><div><br></div><div>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.</div><div><br></div><div>-- Nathaniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 26, 2015 at 10:19 AM, Pete Siemsen <span dir="ltr"><<a href="mailto:siemsen@ucar.edu" target="_blank">siemsen@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">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:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><pre style="padding:9.5px;font-family:Monaco,Menlo,Consolas,'Courier New',monospace;font-size:12.8000001907349px;color:rgb(51,51,51);border-radius:4px;margin-top:0px;margin-bottom:10px;line-height:1.5em;word-wrap:break-word;white-space:pre-wrap;border:1px solid rgba(0,0,0,0.14902);background-color:rgb(245,245,245)">(<span style="color:rgb(127,0,127)">defun</span> <span style="color:rgb(0,0,255)">my-new-frame-with-new-scratch</span> ()
  (interactive)
  (<span style="color:rgb(127,0,127)">let</span> ((one-buffer-one-frame t))
    (new-frame-with-new-scratch)))</pre></div><div><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">​So I tried the following:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><pre style="padding:9.5px;font-family:Monaco,Menlo,Consolas,'Courier New',monospace;font-size:12.8000001907349px;color:rgb(51,51,51);border-radius:4px;margin-top:0px;margin-bottom:10px;line-height:1.5em;word-wrap:break-word;white-space:pre-wrap;border:1px solid rgba(0,0,0,0.14902);background-color:rgb(245,245,245)">(defun find-file-same-frame ()<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline">​​</div>
  (interactive)<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline">​​</div>
  (let ((one-bu<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline">​​</div>ffer-one-frame 0))
    (ido-find-f<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline">​​</div>ile)))<div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline">​</div></pre><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline">​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.</div></div><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small;display:inline"><br></div></div><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">​Am I on the right track, or is there a smarter approach?​​</div></div><span class="HOEnZb"><font color="#888888"><div dir="ltr"><br></div><div dir="ltr">-- Pete<div><br></div></div></font></span></div>
</div>
<br><br>
_____________________________________________________________<br>
MacOSX-Emacs mailing list<br>
<a href="mailto:MacOSX-Emacs@email.esm.psu.edu">MacOSX-Emacs@email.esm.psu.edu</a><br>
<a href="https://email.esm.psu.edu/mailman/listinfo/macosx-emacs" rel="noreferrer" target="_blank">https://email.esm.psu.edu/mailman/listinfo/macosx-emacs</a><br>
List Archives: <a href="http://dir.gmane.org/gmane.emacs.macintosh.osx" rel="noreferrer" target="_blank">http://dir.gmane.org/gmane.emacs.macintosh.osx</a><br>
<br></blockquote></div><br></div>