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: Re: compilation-goto-locus, pop-up-windows, same-window-regexps Date: Mon, 24 Mar 2003 21:35:06 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <871y0wcxl1.fsf@gnu.org> References: <87vfyjbnhr.fsf@gnu.org> <87d6kqfj72.fsf@gnu.org> <87smtly24a.fsf@gnu.org> <87vfycib7k.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 1048538235 8137 80.91.224.249 (24 Mar 2003 20:37:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 24 Mar 2003 20:37:15 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Mar 24 21:37:08 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 18xYgu-00026M-00 for ; Mon, 24 Mar 2003 21:37:08 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18xYhX-0004D1-00 for ; Mon, 24 Mar 2003 21:37:48 +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 18xYgS-0004mR-09 for emacs-devel@quimby.gnus.org; Mon, 24 Mar 2003 15:36:40 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18xYgE-0004kX-00 for emacs-devel@gnu.org; Mon, 24 Mar 2003 15:36:26 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18xYfL-0003uK-00 for emacs-devel@gnu.org; Mon, 24 Mar 2003 15:35:37 -0500 Original-Received: from isp247n.hispeed.ch ([62.2.95.247] helo=smtp.hispeed.ch) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.10.13) id 18xYez-00036V-00; Mon, 24 Mar 2003 15:35:09 -0500 Original-Received: from confusibombus.gnu.org (dclient217-162-238-57.hispeed.ch [217.162.238.57])h2OKZ62K015681; Mon, 24 Mar 2003 21:35:06 +0100 Original-To: rms@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 In-Reply-To: (Richard Stallman's message of "Sun, 23 Mar 2003 21:05:17 -0500") User-Agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 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:12578 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12578 Richard Stallman writes: > > I used to think that C-x r w 1 (store window config in register) was > > the way to get back easily to complex window configurations, but it > > turned out to not work. For one, it remembered buffer positions, > > > > Perhaps we should add a way of restoring a window configuration > > that does not restore the positions. > > I don't think that is enough, because when I want a "Gnus" window, > that window might hold the group buffer, the summary buffer, an > article, or a new message I am writing. > > I don't see precisely how that relates to the issue; could you spell > out the connection? "store window config in register" stores both the buffer and the position per window. The way I work, I care neither about the exact position *nor* about the exact buffer in the context of Gnus. The reason is that I have a window for "reading mail", in it, different buffers are shown at different times (group, summary, article, message). When I start working, I store the window configuration in a register. Later, I compiled code (which splits a window) and read some mail (which splits the window), etc. And now I want to restore the window configuration. In the Gnus window, however, I don't want to see the buffer that was shown there at the time I stored the window configuration. I want to see the buffer that is most appropriate (the one furthest down in the hierarchy) buffer. In fact, It should do something along the lines of my switch-to-gnus function: (defun switch-to-gnus () "Switch to a Gnus related buffer. Candidates are buffers starting with *mail or *reply or *wide reply *Summary *Group* If no candidate exists, start Gnus." (interactive) (let (candidate priority (tests '(("^\\*\\(mail\\|\\(wide \\)?reply\\)" . 1) ("^\\*Article" . 2) ("^\\*Summary" . 3) ("^\\*Group" . 4)))) (dolist (buf (buffer-list)) (dolist (test tests) (when (and (string-match (car test) (buffer-name buf)) (or (not priority) (< (cdr test) priority)) (> (buffer-size buf) 0)) (setq candidate buf priority (cdr test))))) (if (buffer-live-p candidate) (switch-to-buffer candidate) (gnus)))) As you can see, this problem is difficult to solve in a generic way, because the same problem arises when I work in a multi-file project. When I want to undo the effect of window splitting due to compilation and grepping, I really want to get the most recently used buffer for the project -- not the buffer current at the time a window configuration was stored in a register. This is why I feel that Emacs should not touch the window configuration if the user has indicated via some variable that the window configuration is very important. Alex.