From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alex Schroeder Newsgroups: gmane.emacs.devel Subject: compilation-goto-locus, pop-up-windows, same-window-regexps Date: Sun, 16 Mar 2003 11:43:28 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87vfyjbnhr.fsf@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1047811407 4807 80.91.224.249 (16 Mar 2003 10:43:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 16 Mar 2003 10:43:27 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 16 11:43:25 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18uVbp-0001F6-00 for ; Sun, 16 Mar 2003 11:43:17 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18uW0x-0001Ez-00 for ; Sun, 16 Mar 2003 12:09:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18uVcT-0001os-03 for emacs-devel@quimby.gnus.org; Sun, 16 Mar 2003 05:43:57 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18uVc5-0001kC-00 for emacs-devel@gnu.org; Sun, 16 Mar 2003 05:43:33 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18uVc2-0001bs-00 for emacs-devel@gnu.org; Sun, 16 Mar 2003 05:43:32 -0500 Original-Received: from isp247n.hispeed.ch ([62.2.95.247] helo=smtp.hispeed.ch) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18uVc2-0001V2-00 for emacs-devel@gnu.org; Sun, 16 Mar 2003 05:43:30 -0500 Original-Received: from confusibombus.gnu.org (dclient217-162-32-115.hispeed.ch [217.162.32.115])h2GAhSf0028298 for ; Sun, 16 Mar 2003 11:43:28 +0100 Original-To: emacs-devel@gnu.org Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEX///89Pjl6hX25yeD/ 373gtJdgTEW6a14sduMzR7J4AAAAAXRSTlMAQObYZgAAAeJJREFUeNp1lMGSmzAMhvMKolOaa5wB cg3p5gGy8va8xCZn0658LlPg3Bw6PHZlArbZ2XUOJHz+f1mylM3pk7UJX8t/zf4DUOYAlJJnHuyA ARgCIVagNLCsZA0grMkuBrQQ5/aRAtII7GIA+f4TAM11AWYN4OcMntwPiuh+E2I3Q0GUphNNF3Di /UU2DD29UzxB2rZZpat+8iQKVkmRaV7VtJ988BPYttMaUebrU5XQuP0KsTJrkAoHkEH+DnQzmCVf PJiskL3kbq0goW996zR1DLhWqb0RtBniS5ygK2Jy6/lsCl8M57FU1135V6xTOyi8pDYDfx85mF+o h46DXKj7QQsoBdEflC5DvGRKZl4hsp5fToAfOlytEAPOCn6qAIqiUVJ2DJRTBnAuLGd+69Alj/Ia QG8s6dubcgJVBkVJ9I3rOExBpIgURG9aYuWKJesmKE5Edpjy49B5E81Hbsg+7hDxdxKBM1vNV/Vs ksiqtFxA5cD3V4itarKt5sPK51cDIjouWO4rKZE7y8A9gCM0mVaSo5ir2R68FTc194l7XycCxoNX HF23Z7oSBYkdHILVY4yaPDdJ9Xc7enD0Y2mSHMZxvM/AjxIBg/soZnD2fwrcXrBlhXiAZYweQzje +XP6D3vk9qXUjAFlAAAAAElFTkSuQmCC User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2.92 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12387 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12387 I propose to change the end of compilation-goto-locus from this: ;; Show compilation buffer in other window, scrolled to this error. (let* ((pop-up-windows t) ;; Use an existing window if it is in a visible frame. (w (or (get-buffer-window (marker-buffer (car next-error)) 'visible) ;; Pop up a window. (display-buffer (marker-buffer (car next-error)))))) (set-window-point w (car next-error)) (set-window-start w (car next-error)) (compilation-set-window-height w))) to this: ;; Show compilation buffer in other window, scrolled to this error. (when pop-up-windows ;; Use an existing window if it is in a visible frame. (let ((w (or (get-buffer-window (marker-buffer (car next-error)) 'visible) ;; Pop up a window. (display-buffer (marker-buffer (car next-error)))))) (set-window-point w (car next-error)) (set-window-start w (car next-error)) (compilation-set-window-height w)))) What I am trying to achieve is this: I want Emacs to use one window for each task, ie. when I read mail, in one window, and write code in a second window, I don't Emacs to change my window configurations. I don't want Emacs to split my windows, and I don't want Emacs to delete other windows. This is why I started using the following settings. Try it in emacs -q. (setq pop-up-windows nil same-window-regexps '(".")) Now run a grep command: (grep "grep -n setq ~/.emacs") The *grep* buffer should be the only visible window, now. Hit RET on one of the matches. The window continues to show the grep buffer! I am not very happy with this solution, however. I think the best solution would be to eliminate all occurences of binding pop-up-windows. We should look at these situations and decide what the best way to handle them is -- without making new windows. Alex.