From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Ekstrand Newsgroups: gmane.emacs.help Subject: Re: Help in Emacs Date: Sat, 18 Oct 2008 09:32:01 -0500 Organization: Aioe.org NNTP Server Message-ID: <87abd2oty6.fsf@elehack.net> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1224344450 15001 80.91.229.12 (18 Oct 2008 15:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 18 Oct 2008 15:40:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 18 17:41:50 2008 connect(): Connection refused 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 1KrDw2-0001a9-BG for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Oct 2008 17:41:46 +0200 Original-Received: from localhost ([127.0.0.1]:41463 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KrDux-0005bo-00 for geh-help-gnu-emacs@m.gmane.org; Sat, 18 Oct 2008 11:40:39 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!goblin1!goblin2!goblin.stu.neva.ru!feeder.erje.net!newsfeed.straub-nv.de!news.k-dsl.de!aioe.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: N8w1zDuSd4zhmZ454raJDg.user.aioe.org Original-X-Complaints-To: abuse@aioe.org Original-NNTP-Posting-Date: Sat, 18 Oct 2008 15:00:03 +0000 (UTC) Cancel-Lock: sha1:rE+O3hUEj3wAxK8Qs2Qjxp0CYYw= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Original-Xref: news.stanford.edu gnu.emacs.help:163568 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:58910 Archived-At: "Rupam Jaiswal" writes: > I am using emacs. Many times, I have to open files just for viewing > and not > for editing.but by mistake some or the other lines get edited. > In order to avoid editing. Is there any way to open emacs in view mode > and not edit mode.(Just like in vi editior,where file can be open in > view mode by command view FileName). There is the command `view-file' which will open a file read-only; in my Emacs, it does not seem to be bound to any key, but you could bind it to some convenient key in your .emacs. Also, after opening a file, you can type C-x C-q (`toggle-read-only') to put it in read-only mode. In the default mode line, this will also result in two % characters in the left end of the mode line, indicating that the file is read-only. - Michael -- mouse, n: A device for pointing at the xterm in which you want to type. Confused by the strange files? I cryptographically sign my messages. For more information see .