From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: annoyances [Was: shrink-window-if-larger-than-buffer in VC-diff] Date: Mon, 16 Aug 2010 10:45:21 +0900 Message-ID: <87vd7bbaa6.fsf@uwakimon.sk.tsukuba.ac.jp> References: <87aaoo7pmj.fsf@stupidchicken.com> <87zkwoq823.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1281924306 20809 80.91.229.12 (16 Aug 2010 02:05:06 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Aug 2010 02:05:06 +0000 (UTC) Cc: emacs-devel@gnu.org To: Uday S Reddy Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 16 04:05:05 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Okp4S-0000D3-7W for ged-emacs-devel@m.gmane.org; Mon, 16 Aug 2010 04:05:04 +0200 Original-Received: from localhost ([127.0.0.1]:60756 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Okp4R-0001pV-Ct for ged-emacs-devel@m.gmane.org; Sun, 15 Aug 2010 22:05:03 -0400 Original-Received: from [140.186.70.92] (port=42098 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Okp4J-0001m7-3E for emacs-devel@gnu.org; Sun, 15 Aug 2010 22:04:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Okong-0001kj-6c for emacs-devel@gnu.org; Sun, 15 Aug 2010 21:47:48 -0400 Original-Received: from mtps01.sk.tsukuba.ac.jp ([130.158.97.223]:40000) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Okonf-0001jx-SU for emacs-devel@gnu.org; Sun, 15 Aug 2010 21:47:44 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps01.sk.tsukuba.ac.jp (Postfix) with ESMTP id 6F68E1535AC; Mon, 16 Aug 2010 10:47:39 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id 475031A46B1; Mon, 16 Aug 2010 10:45:21 +0900 (JST) In-Reply-To: X-Mailer: VM undefined under 21.5 (beta29) "garbanzo" ed3b274cc037 XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:128767 Archived-At: Uday S Reddy writes: > But the more general point is about Emacs taking liberties with > switching windows. I suppose you understand that. I understand, but don't necessarily sympathize. For example, with find-file, it's pretty clear that automatically switching windows is a good thing. Maybe in the case of C-x ` (is that `next-error' in your context, as it is for me?) it should be optional. I admit I'm an infrequent user of next-error, but I think it's quite natural to switch windows since it's documented as visiting the error buffer and the corresponding source file. This is almost always what I want. If you don't like that behavior, you need to write your own function that implements the workflow you want. As usual.[1] It's true that many third-party modes do things like switching windows that I find really annoying. However, most of that has long since been beaten out of modes and functions that are part of core Emacs. Footnotes: [1] If the basic functionally you need is all hard-coded into next-error, making this an annoying process of copying many large sections of code, I would consider that a design bug. But if next-error is well-factored into an error parser, a source finder, and a window popper-upper, it should be easy to write your alternative workflow, perhaps with some minor refactoring.