From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.help Subject: Re: Lock buffer to window Date: Thu, 24 May 2007 23:45:28 +0200 Organization: GNU's Not UNIX! Message-ID: <200705242145.l4OLjSA3015430@localhost.localdomain> References: <4654ab90$0$90266$14726298@news.sunsite.dk> Reply-To: Xavier Maillard NNTP-Posting-Host: lo.gmane.org X-Trace: sea.gmane.org 1180044560 19524 80.91.229.12 (24 May 2007 22:09:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 24 May 2007 22:09:20 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Nikolaj Fogh Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 25 00:09:15 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HrLUg-0006Ou-SC for geh-help-gnu-emacs@m.gmane.org; Fri, 25 May 2007 00:09:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HrLUj-0007xA-KZ for geh-help-gnu-emacs@m.gmane.org; Thu, 24 May 2007 18:09:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HrLT3-000743-HX for help-gnu-emacs@gnu.org; Thu, 24 May 2007 18:07:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HrLT1-00072T-Ba for help-gnu-emacs@gnu.org; Thu, 24 May 2007 18:07:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HrLT1-00072O-8X for help-gnu-emacs@gnu.org; Thu, 24 May 2007 18:07:31 -0400 Original-Received: from master.uucpssh.org ([193.218.105.66]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HrLT0-0005HQ-Am for help-gnu-emacs@gnu.org; Thu, 24 May 2007 18:07:30 -0400 Original-Received: by master.uucpssh.org (Postfix, from userid 10) id BB2E6643F9; Fri, 25 May 2007 00:05:24 +0200 (CEST) Original-Received: from localhost.localdomain (IDENT:1001@localhost [127.0.0.1]) by zogzog.home (8.13.8/8.13.8) with ESMTP id l4OLjSr5015433; Thu, 24 May 2007 23:45:28 +0200 Original-Received: (from zedek@localhost) by localhost.localdomain (8.13.8/8.13.8/Submit) id l4OLjSA3015430; Thu, 24 May 2007 23:45:28 +0200 In-reply-to: <4654ab90$0$90266$14726298@news.sunsite.dk> (message from Nikolaj Fogh on Wed, 23 May 2007 21:14:58 +0200) User-Agent: Rmail in GNU Emacs 23.0.51.1 on GNU/Linux Jabber-ID: zedek@im.lolica.org X-uucpssh: Found to be clean X-uucpssh-SpamCheck: not spam, SpamAssassin (not cached, score=-4.279, required 4.6, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.12, BAYES_00 -2.60, SPF_HELO_PASS -0.00) X-uucpssh-From: xma@gnu.org X-detected-kernel: Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44406 Archived-At: Hi, I was wondering if there was any way of locking a specific buffer to a window it emacs, so that that window never changes buffer. I have some trouble when I edit a LaTeX document and compile it, the compilation buffer overrides my reftex-toc buffer. If you want to do this interactively, you would use `toggle-read-only' bound to C-x C-q. If you want to do this programmatically, you could `buffer-read-only' variable this way: (let ((buffer-read-only nil) .... ) (message "Buffer is read/write")) Xavier -- http://www.gnu.org http://www.april.org http://www.lolica.org