From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: next-error-find-buffer Date: Thu, 02 Aug 2007 16:45:44 -0400 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: References: <87r6mndorr.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1186087568 12208 80.91.229.12 (2 Aug 2007 20:46:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 2 Aug 2007 20:46:08 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 02 22:46:06 2007 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.50) id 1IGhYW-00086F-Bt for ged-emacs-devel@m.gmane.org; Thu, 02 Aug 2007 22:46:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGhYV-00012u-Tm for ged-emacs-devel@m.gmane.org; Thu, 02 Aug 2007 16:45:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IGhYR-000128-V4 for emacs-devel@gnu.org; Thu, 02 Aug 2007 16:45:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IGhYR-00011w-54 for emacs-devel@gnu.org; Thu, 02 Aug 2007 16:45:55 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IGhYR-00011t-39 for emacs-devel@gnu.org; Thu, 02 Aug 2007 16:45:55 -0400 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IGhYQ-00041H-L4 for emacs-devel@gnu.org; Thu, 02 Aug 2007 16:45:54 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IGhYN-0000mI-R1 for emacs-devel@gnu.org; Thu, 02 Aug 2007 22:45:51 +0200 Original-Received: from 69.25.70.4 ([69.25.70.4]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Aug 2007 22:45:51 +0200 Original-Received: from tzz by 69.25.70.4 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 Aug 2007 22:45:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 69.25.70.4 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (darwin) Cancel-Lock: sha1:aIwvu9WeJbaOIeox9059tbxRhCw= X-Detected-Kernel: 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:75965 Archived-At: On Thu, 02 Aug 2007 12:17:44 -0400 Stefan Monnier wrote: SM> To remind people of the context, C-x ` has two problems: SM> 1 - if you have two projects, do C-x ` in the first, then do C-x ` in the SM> second, and then come back to the first and do C-x ` again, you'd want SM> this C-x ` to use the compilation buffer of the first project, not of SM> the second one. So you'd want to sometimes ignore SM> next-error-last-buffer. This is the reason why "next-error capable SM> buffer in the current frame" currently takes precedence over SM> next-error-last-buffer. SM> 2 - if you do C-x ` on a compilation buffer and that jumps to a patch file, SM> and then do C-x ` from that patch file's buffer, it should look for the SM> next error in the compilation buffer rather than the next hunk in the SM> patch file. SM> Currently this is done by giving precedence to next-error-last-buffer SM> over current-buffer (i.e. basically this always ignores SM> current-buffer. In practice current-buffer is still often used because SM> of the first rule "next-error capable buffer in current frame"). SM> The way I use Emacs, I have one frame per buffer. So the first rule SM> basically means that current-buffer is always selected, so for me problem SM> number 2 is not corrected. SM> My original suggestion to fix number 2 was to introduce a new variable SM> next-error-last-source-buffer which is set to the last source buffer visited SM> by next-error. Then C-x ` would ignore current-buffer (and obey SM> next-error-last-buffer instead) if the current buffer is equal to SM> next-error-last-source-buffer: in the example problem, the C-x ` that puts SM> me in the patch file would set next-error-last-source-buffer to that patch SM> file buffer so hitting C-x ` in that patch file buffer would correctly SM> ignore the patch file buffer and use the compilation buffer instead. I think your fix makes sense. I've avoided work on next-error in the past because of the recent release, but this was annoying behavior in some cases. I have some other proposals for the next/previous functionality, if anyone is interested. Basically I think it should be expanded to other parts of Emacs, because it's so handy. Ted