From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Lue Newsgroups: gmane.emacs.help Subject: Re: C-x b w/Multiple Windows and Frames Date: Sat, 18 Nov 2006 14:44:11 -0800 (PST) Message-ID: <829576.92056.qm@web32815.mail.mud.yahoo.com> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1163889870 5530 80.91.229.2 (18 Nov 2006 22:44:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 18 Nov 2006 22:44:30 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 18 23:44:28 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GlYvC-0003kA-Ce for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Nov 2006 23:44:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlYvB-0007oR-M2 for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Nov 2006 17:44:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GlYuz-0007oA-Rl for help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 17:44:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GlYuz-0007ny-6o for help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 17:44:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GlYuz-0007nv-3I for help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 17:44:13 -0500 Original-Received: from [68.142.206.45] (helo=web32815.mail.mud.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.52) id 1GlYuz-0007Yt-2u for help-gnu-emacs@gnu.org; Sat, 18 Nov 2006 17:44:13 -0500 Original-Received: (qmail 93251 invoked by uid 60001); 18 Nov 2006 22:44:11 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=yxjDzzdkPEIwgyZCXLNtOvX4jt0wq+5V9S+kafPcZPsRekR0MDw8KUVp+DAF7Og6apgkXqD6qwdnfJz/aQhvMYywzLG3LfYDxsa7wXJa+d8VKEqfwQYNn/f/uQz052LMit0GIlpctsZAKIC9gdCjayADC3BsYflSsTnrh6w8cgM=; X-YMail-OSG: 1fJTrVYVM1kZ14qB6wuzOQmthcSysX4PcZdQBJFISY24hTP2HIE1XNW9m9nwwZT_WbU5O45dQXrYysNBP6NOyJD1Uoj1ltZIp0TSxDXklarXAllbIZe9Pv2RZHUjR8ICJ3DDMxempbPHIBDeVO6sJhURzrMoXl4gi398.x0XeJ8KP1vBLzES0ray2fTX Original-Received: from [66.245.225.127] by web32815.mail.mud.yahoo.com via HTTP; Sat, 18 Nov 2006 14:44:11 PST Original-To: Kevin Rodgers , help-gnu-emacs@gnu.org In-Reply-To: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38808 Archived-At: Awesome. This is exactly what I was looking for. Thanks, Alan --- Kevin Rodgers wrote: > Alan Lue wrote: > > Using `C-x b' without an argument displays the > most > > recent buffer among those not currently displayed. > I > > find this behavior annoying when I intend to keep > the > > same buffer displayed in multiple windows and > frames; > > oftentimes I need to briefly visit another file, > and > > when I return to a buffer that is already > displayed in > > another frames, I need to specify its name > explicity. > > > > Is there some way I could modify the behavior of > > `switch-to-buffer' so that invoking `C-x b' > without an > > argument will bring me back to the most recent > buffer, > > whether or not it is currently displayed in > another > > window/frame? > > Try this: > > (defadvice switch-to-buffer (before > interactive-default-buffer activate) > "Consider buffers that are already visible as the > default BUFFER." > (interactive (list (read-buffer "Switch to > buffer: " > (other-buffer (current-buffer) t))))) > > -- > Kevin > > > > _______________________________________________ > help-gnu-emacs mailing list > help-gnu-emacs@gnu.org > http://lists.gnu.org/mailman/listinfo/help-gnu-emacs > ____________________________________________________________________________________ Sponsored Link Mortgage rates near 39yr lows. $510k for $1,698/mo. Calculate new payment! www.LowerMyBills.com/lre