all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: help-gnu-emacs@gnu.org
Subject: Re: automatically read-only status
Date: Tue, 01 Mar 2011 14:49:45 +0100	[thread overview]
Message-ID: <87ei6r9chy.fsf@escher.fritz.box> (raw)
In-Reply-To: d8cca8e5-7beb-491e-a062-15a09c8e4e11@r19g2000prm.googlegroups.com

On Mon, 28 Feb 2011 13:47:45 -0800 (PST) Kejia柯嘉 <w.kejia@gmail.com> wrote:

> Hi people,
>
> I know C-x C-q makes into read-only mode. My question is how to
> activate the read-only mode after n minutes idle.

You could evaluate this:

(setq my-ro-timer (run-with-idle-timer 180 t 'toggle-read-only 1))

This will make the current buffer read-only every time Emacs is idle for
three minutes.  To stop this, evaluate (cancel-timer my-ro-timer).  Type
`C-h f run-with-idle-timer' for more information.

Steve Berman




  reply	other threads:[~2011-03-01 13:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 21:47 automatically read-only status Kejia柯嘉
2011-03-01 13:49 ` Stephen Berman [this message]
     [not found] ` <mailman.0.1298987405.12792.help-gnu-emacs@gnu.org>
2011-03-02 15:14   ` Kejia柯嘉

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ei6r9chy.fsf@escher.fritz.box \
    --to=stephen.berman@gmx.net \
    --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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.