From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.devel Subject: Re: switch-to-buffer: for interactive use only Date: Thu, 07 Jul 2011 16:50:25 -0400 Message-ID: <8739ihlsry.fsf@stupidchicken.com> References: <0aiprg76eu.fsf@fencepost.gnu.org> <87hb6zt8rg.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1310071877 28642 80.91.229.12 (7 Jul 2011 20:51:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 7 Jul 2011 20:51:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 07 22:51:11 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 1QevXO-0006RH-Fa for ged-emacs-devel@m.gmane.org; Thu, 07 Jul 2011 22:51:06 +0200 Original-Received: from localhost ([::1]:49808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QevXN-0006jM-Cp for ged-emacs-devel@m.gmane.org; Thu, 07 Jul 2011 16:51:05 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48242) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QevWx-0006i2-OG for emacs-devel@gnu.org; Thu, 07 Jul 2011 16:50:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QevWr-0006sA-Te for emacs-devel@gnu.org; Thu, 07 Jul 2011 16:50:39 -0400 Original-Received: from vm-emlprdomr-06.its.yale.edu ([130.132.50.147]:58146) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QevWl-0006qy-3j; Thu, 07 Jul 2011 16:50:27 -0400 Original-Received: from furball (dhcp128036225109.central.yale.edu [128.36.225.109]) (authenticated bits=0) by vm-emlprdomr-06.its.yale.edu (8.14.4/8.14.4) with ESMTP id p67KoPph009049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 7 Jul 2011 16:50:26 -0400 In-Reply-To: (Stefan Monnier's message of "Thu, 07 Jul 2011 15:52:46 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Scanned-By: MIMEDefang 2.71 on 130.132.50.147 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.132.50.147 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:141747 Archived-At: Stefan Monnier writes: >> How would you change this? > >> (defun unbury-buffer () >> "Switch to the last buffer in the buffer list." >> (interactive) >> (switch-to-buffer (last-buffer))) > > Either using with-no-warnings or using set-window-buffer. What's wrong with using switch-to-buffer? If you could elaborate a bit more on what bugs you are referring to when you say > 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). then maybe we could come up with a way to issue the warning more selectively. Because AFAICT the usage in unbury-buffer, and probably many other places in Emacs, is completely correct, and I agree with Glenn that issuing a zillion warnings for this not satisfactory.