From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.help Subject: Re: naming and/or directly addressing particular windows? Date: Tue, 04 Dec 2012 10:01:26 +0100 Message-ID: <50BDBBE6.8080504@gmx.at> References: <50BB9407.7060104@gmx.at> <50BCE495.4020604@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1354632088 15143 80.91.229.3 (4 Dec 2012 14:41:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Dec 2012 14:41:28 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Matt Price Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 04 15:41:39 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tftgk-0007Pa-N9 for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 15:41:34 +0100 Original-Received: from localhost ([::1]:35171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TftgY-0000Sv-KC for geh-help-gnu-emacs@m.gmane.org; Tue, 04 Dec 2012 09:41:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TftgQ-0000Sl-GQ for help-gnu-emacs@gnu.org; Tue, 04 Dec 2012 09:41:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TftgK-0002HR-HX for help-gnu-emacs@gnu.org; Tue, 04 Dec 2012 09:41:14 -0500 Original-Received: from mailout-de.gmx.net ([213.165.64.23]:60442) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TftgK-0002HE-7F for help-gnu-emacs@gnu.org; Tue, 04 Dec 2012 09:41:08 -0500 Original-Received: (qmail invoked by alias); 04 Dec 2012 14:41:06 -0000 Original-Received: from 62-47-48-231.adsl.highway.telekom.at (EHLO [62.47.48.231]) [62.47.48.231] by mail.gmx.net (mp029) with SMTP; 04 Dec 2012 15:41:06 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19P/IMPycJP7MVqPIBkcZVtdimUFwmSSTMhN1L37f tyFlno7PWy68Qr In-Reply-To: X-Y-GMX-Trusted: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 213.165.64.23 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88038 Archived-At: > in the 'let' expression above, how would I replace \\*foo\\* and *foo* > with a regular expression that will match, say, > > (concat (buffer-name) "-" [:digit:]) Try ".+-[0-9]$" instead of "\\*foo\\*" and "foo-1" instead of "*foo*". Note that if the purpose of your functions is to display buffers always approximately at the same location within an Emacs frame, then side windows (see the function `display-buffer-in-side-window' and the variables `window-sides-vertical' and `window-sides-slots') might be more appropriate. In your case there would be a centered "main window", the "guide window" at the left and the "metadata window" at the bottom of the frame. In any case be always aware of two issues: (1) A user may delete any window at any time (with a few restrictions). So be prepared that you may have to re-create your windows and give them a name for showing the buffer of your choice. (2) Emacs and other applications might reuse or split a window at any time, for example, to display information like a warning or a backtrace. You can fix some of these by making windows dedicated and/or fixing their sizes but doing that is not entirely trivial. martin