From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.devel Subject: Re: switch-to-buffer: for interactive use only Date: Wed, 06 Jul 2011 07:55:39 +0200 Message-ID: <4E13F8DB.1090304@online.de> References: <0aiprg76eu.fsf@fencepost.gnu.org> <9x62ngw53l.fsf@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1309931843 10558 80.91.229.12 (6 Jul 2011 05:57:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2011 05:57:23 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 06 07:57:18 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 1QeL6s-0005aW-9s for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2011 07:57:18 +0200 Original-Received: from localhost ([::1]:55754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeL6r-0004BC-Kh for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2011 01:57:17 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:58294) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeL6c-0004B3-J2 for emacs-devel@gnu.org; Wed, 06 Jul 2011 01:57:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QeL6a-0002T2-Ot for emacs-devel@gnu.org; Wed, 06 Jul 2011 01:57:02 -0400 Original-Received: from moutng.kundenserver.de ([212.227.126.187]:50108) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QeL6a-0002SB-AQ for emacs-devel@gnu.org; Wed, 06 Jul 2011 01:57:00 -0400 Original-Received: from [192.168.178.27] (brln-4d0c17ac.pool.mediaWays.net [77.12.23.172]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0Lsdqf-1RfbvM1XlB-012E1s; Wed, 06 Jul 2011 07:56:57 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11 In-Reply-To: <9x62ngw53l.fsf@fencepost.gnu.org> X-Provags-ID: V02:K0:llMVEnpQcElpuHE5csD81es0KUUn5x6OQMNHqzUqqL8 9rK22JmrXVfjVcm4AoW1nGds+9PvnezPOzp/VfRpft7+ijPZCh AMh83UQoyZwCNlPfKBJ7NRvtLy9SJ3XcVtZt1D4BSr6e5BJh9d RB8AAHpd34ib8XJ40WasvcDlohM5qs/Zfq5L/8LWMulYlqB9MD 7YTXYRrDxjVlFRrIIBGyBnENUr4KON9BAFwsU4xPas= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.126.187 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:141640 Archived-At: Am 06.07.2011 03:49, schrieb Glenn Morris: > Stefan Monnier wrote: > >> Most of those calls were bugs waiting to catch you in Emacs<23 ("you" >> being typically a user like myself who uses dedicated windows and/or >> minibuffer-only frames). > [...] >>> Isn't there a better way to handle this than replacing hundreds of >>> calls with `pop-to-buffer-same-window'? >> >> Not sure what that way would be. > > Fix switch-to-buffer? > > Eg make it call pop-to-buffer-same-window in the non-interactive-case? > Then make a new function > switch-to-buffer-sometimes-fails-and-you-probably-dont-want-this > that does what the old version used to? > > Since you say above that "most" calls to switch-to-buffer were wrong, > why not fix the majority by fixing switch-to-buffer, and let the > minority of cases which need to do something different do so, if and > when it turns out to matter? > > Hi, AFAIU switch-to-buffer is simply not TRT when called from a program. AFAICT it has the nasty side-effect slowing down execution, introducing that kind of bug at least. So far marking "for interacive use only" looks correct for me. Cheers, Andreas