[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automatically read-only status

From: Stephen Berman
Subject: Re: automatically read-only status
Date: Tue, 01 Mar 2011 14:49:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

On Mon, 28 Feb 2011 13:47:45 -0800 (PST) Kejia柯嘉 <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]