From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: next-error-last-buffer Date: Tue, 11 May 2004 02:45:12 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <874qqnvm0n.fsf@mail.jurta.org> References: <871xluig40.fsf@mail.jurta.org> <873c6983t9.fsf@mail.jurta.org> <87wu3kqguz.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 1084237684 13754 80.91.224.253 (11 May 2004 01:08:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 May 2004 01:08:04 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 11 03:07:54 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 1BNLkQ-0002ib-00 for ; Tue, 11 May 2004 03:07:54 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNLkP-0007Rt-00 for ; Tue, 11 May 2004 03:07:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNLjX-0002Bg-Ps for emacs-devel@quimby.gnus.org; Mon, 10 May 2004 21:06:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BNLjP-00028g-H9 for emacs-devel@gnu.org; Mon, 10 May 2004 21:06:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BNLir-0001sw-In for emacs-devel@gnu.org; Mon, 10 May 2004 21:06:48 -0400 Original-Received: from [66.33.219.6] (helo=knife.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BNLQ3-00065U-84; Mon, 10 May 2004 20:46:51 -0400 Original-Received: from mail.jurta.org (80-235-39-207-dsl.mus.estpak.ee [80.235.39.207]) by knife.dreamhost.com (Postfix) with ESMTP id 8C880E409E; Mon, 10 May 2004 17:41:16 -0700 (PDT) Original-To: Stefan Monnier In-Reply-To: <87wu3kqguz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "10 May 2004 14:28:17 -0400") User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) 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:23095 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23095 Stefan Monnier writes: >> If you switch to another source buffer that was last reached >> through C-x ` from a compilation error, then C-x ` will get the >> next compilation error, rather than the next occurrence. >> At least, it sounds like your change would have that result. > > Indeed. In order to get the right behavior in all cases, we'd need > to read the user's mind. So the current approach at least has the > advantage of being simple for the user to understand (and thus predict), > while working correctly for the most common cases. The current approach is simple, but unusable in real situations. Imagine for example such a typical scenario: 1. Start compilation. The compilation buffer is displayed in another window. 2. Type C-x `. A source file is visited in the same window. 3. Make a new frame. 4. Run grep or occur. A grep or occur buffer is displayed in another window. 5. Type C-x `. A file found by grep or occur is visited in the same window. 6. Switch back to the initial frame. Buffers are displayed in the same state as they were left - with two windows: one with the source buffer and another with the compilation buffer, and the point in the source buffer on the line with previous error. 7. Now type C-x `. What is the most expected behavior when the point is located in the file visited by C-x ` is that next C-x ` will find next errors in the same file. But alas, the buffer is unexpectedly switched to some file which happens to be the next found by last grep/occur. This is very confusing. And even if the user can remember always to switch to the compilation buffer before typing C-x ` to make it last, it is still too inconvenient. -- Juri Linkov http://www.jurta.org/emacs/