From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: switch-to-buffer: for interactive use only Date: Fri, 08 Jul 2011 08:43:52 +0200 Message-ID: <4E16A728.5040002@gmx.at> References: <0aiprg76eu.fsf@fencepost.gnu.org> <87hb6zt8rg.fsf@stupidchicken.com> <8739ihlsry.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1310107477 14165 80.91.229.12 (8 Jul 2011 06:44:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Jul 2011 06:44:37 +0000 (UTC) Cc: Chong Yidong , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 08 08:44:32 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf4ng-0004eB-8w for ged-emacs-devel@m.gmane.org; Fri, 08 Jul 2011 08:44:32 +0200 Original-Received: from localhost ([::1]:46393 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf4ne-0008Nf-Hn for ged-emacs-devel@m.gmane.org; Fri, 08 Jul 2011 02:44:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qf4nL-0008Ms-Tv for emacs-devel@gnu.org; Fri, 08 Jul 2011 02:44:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qf4nE-0001Yb-IZ for emacs-devel@gnu.org; Fri, 08 Jul 2011 02:44:11 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:57643) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qf4nD-0001X8-IE for emacs-devel@gnu.org; Fri, 08 Jul 2011 02:44:04 -0400 Original-Received: (qmail invoked by alias); 08 Jul 2011 06:43:57 -0000 Original-Received: from 62-47-63-105.adsl.highway.telekom.at (EHLO [62.47.63.105]) [62.47.63.105] by mail.gmx.net (mp065) with SMTP; 08 Jul 2011 08:43:57 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/GxDAGsGbGoLVEStOVokahlMXQJPWR4+GBoJoyEm hJ9ULsSYVeag+3 User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 213.165.64.23 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:141776 Archived-At: > There are two different uses of switch-to-buffer: > - the ones like in unbury-buffer where the main point is that it > operates on the selected window. > - the ones like in find-file where the main point is that it wants to > display a given buffer. > > In single-frame circumstances, the two cases are identical, so most > authors who use Emacs in a single-frame mode don't even realize that > there's a choice to be made. They are identical for the single-frame/single-window case. The main difference is that `switch-to-buffer' doesn't care whether the selected window is weakly dedicated. > PS: BTW, I think the interactive use of switch-to-buffer is "the second > case" (and should hence call pop-to-buffer-same-window). If this refers to the two cases cited above, then I think that the interactive use of `switch-to-buffer' is "the first case" and should not call `pop-to-buffer-same-window'. martin