From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Help in Emacs
Date: Fri, 17 Oct 2008 22:47:28 -0600 [thread overview]
Message-ID: <gdbpol$h6a$1@ger.gmane.org> (raw)
In-Reply-To: <871vyfouoq.fsf@cyd.mit.edu>
Chong Yidong wrote:
> "Rupam Jaiswal" <rupamj@rediff.co.in> writes:
>
>> 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).
>
> C-x C-r visits a file in read-only mode.
Or from the command line:
emacs --eval "(find-file-read-only \"Please Hammer Don't Hurt 'Em.txt\")"
You can also define a new command line option, like this:
;; Usage: emacs --read-only FILE
(defun command-line-find-file-read-only (switch)
(find-file-read-only (pop command-line-args-left)))
(add-to-list 'command-switch-alist
'("--read-only" . command-line-find-file-read-only))
--
Kevin Rodgers
Denver, Colorado, USA
next prev parent reply other threads:[~2008-10-18 4:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081017095807.BB30CD5074@spunkymail-mx9.g.dreamhost.com>
2008-10-17 20:03 ` Help in Emacs Chong Yidong
2008-10-18 4:47 ` Kevin Rodgers [this message]
[not found] <mailman.1419.1224301974.25473.help-gnu-emacs@gnu.org>
2008-10-18 14:32 ` Michael Ekstrand
2008-10-17 9:57 Rupam Jaiswal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='gdbpol$h6a$1@ger.gmane.org' \
--to=kevin.d.rodgers@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).