From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: storm@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: Jumping to C source from *Help* Date: 15 Apr 2004 18:27:37 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <20040407025556.FCC3.LEKTU@mi.madritel.es> <87wu4rxaki.fsf@mail.jurta.org> <877jwqfmjb.fsf-monnier+emacs@alfajor.local> <871xmrg3gu.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1082040221 16901 80.91.224.253 (15 Apr 2004 14:43:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Apr 2004 14:43:41 +0000 (UTC) Cc: juri@jurta.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Apr 15 16:43:32 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BE85U-0003Jh-00 for ; Thu, 15 Apr 2004 16:43:32 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BE85T-00057U-00 for ; Thu, 15 Apr 2004 16:43:31 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BE84v-0006ZM-Q1 for emacs-devel@quimby.gnus.org; Thu, 15 Apr 2004 10:42:57 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BE7xX-0004cZ-1c for emacs-devel@gnu.org; Thu, 15 Apr 2004 10:35:19 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BE7ql-0002lT-0T for emacs-devel@gnu.org; Thu, 15 Apr 2004 10:28:50 -0400 Original-Received: from [195.41.46.236] (helo=pfepb.post.tele.dk) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BE7qh-0002iz-NL; Thu, 15 Apr 2004 10:28:16 -0400 Original-Received: from kfs-l.imdomain.dk.cua.dk (0x503e2644.bynxx3.adsl-dhcp.tele.dk [80.62.38.68]) by pfepb.post.tele.dk (Postfix) with SMTP id 3873C5EE047; Thu, 15 Apr 2004 16:27:54 +0200 (CEST) Original-To: Stefan Monnier In-Reply-To: Original-Lines: 92 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:21694 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:21694 Stefan Monnier writes: > >> But I think it would be a change for the worse to do this. > > Why exactly? > > It puts more complexity in something simple. > > [ I don't see it, but let's put that aside for now. ] > > OK, so you don't want a function that can either use pop-to-buffer or > signal an error depending on an extra argument. Fair enough. > > Given that I think the problem is serious enough for users such as myself > that I'd like to see this resolved, I have three alternatives (from least > preferred to most preferred): > 1 - Leave switch-to-buffer as is, but introduce a new function (call it > `pop-to-buffer-this-window'). > 2 - Change switch-to-buffer to call pop-to-buffer rather than signal an > error, and introduce a new command (call it > `switch-to-buffer-this-window') which we'd then bind to C-h b. > 3 - Change switch-to-buffer to call pop-to-buffer rather than signal an > error and leave everything else unchanged. > > Option 1 has the problem that it doesn't fix anything in itself and > requires to change all the packages to use the new function. In general, > I can't change all those packages, so I'll still have to live with > spurious errors every once in a while. > > Option 3 is better because it's the simplest. Now you might think that you > don't like it because it changes the default behavior, but think again: > it only changes the behavior in the case where you used to get an error > "Cannot switch buffers in minibuffer window" or > "Cannot switch buffers in a dedicated window". When was the last time > you saw such an error message? Most users have never seen this message > because they don't have dedicated windows and they never hit C-x b > while they're in the minibuffer. I see the "cannot switch buffers in minibuffer window" from time to time. And it always annoys me -- of course I don't want to switch buffer in the minibuffer window, I obviously want to have the buffer I select to appear in some ordinary window. I'd vote for 3 as well. I don't see how that can surprise users -- quite the contrary. Consider this: (0) suppose we have one dedicated window showing a buffer (1) enter C-x b (notice there is no warning at this point) (2) enter the name of some other buffer (3) => "cannot switch buffer in a dedicated window" SIGH! (4) manually split current (dedicated) window, C-x 2 Hey, no, wait -- that creates another window, but leaves the dedicated window selected, so (5) select the other window, C-x o (6) repeat step (1) (7) repeat step (2) (8) => the buffer you wanted to select is now present in a different window. Compare this to [option 3]: (0) suppose we have one dedicated window showing a buffer (1) enter C-x b (notice there is no warning at this point) (2) enter the name of some other buffer (3) => the buffer you wanted to select is now present in a different window. If we are discussing what is simple/non-confusing to the (novice) user, I would way that option 3 is much better than the current situation... And then it solves some "odd" bugs in various packages as an added bonus. -- Kim F. Storm http://www.cua.dk