From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xebar Saram Subject: Re: a quick way to switch orgmode notes between read-only/editing? Date: Fri, 18 Jul 2014 10:50:12 +0300 Message-ID: References: <87d2d49h63.fsf@gmail.com> <8761ivsgb2.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e011777d9d65e1004fe73016b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X82vs-0008SX-Lc for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 03:50:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X82vm-0007LR-My for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 03:50:20 -0400 Received: from mail-oa0-x233.google.com ([2607:f8b0:4003:c02::233]:49551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X82vm-0007Ko-HG for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 03:50:14 -0400 Received: by mail-oa0-f51.google.com with SMTP id o6so2585121oag.24 for ; Fri, 18 Jul 2014 00:50:12 -0700 (PDT) In-Reply-To: <8761ivsgb2.fsf@ericabrahamsen.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: org mode --089e011777d9d65e1004fe73016b Content-Type: text/plain; charset=UTF-8 Thx again all, really cool. one last question. anyone mind pasting code to revert an open buffer to read only when idle for lets say 5 minutes? thx alot! Z On Fri, Jul 18, 2014 at 2:42 AM, Eric Abrahamsen wrote: > Xebar Saram writes: > > > Thanks guys. really appreciate all your help > > > > im now using view-mode with hooks as suggested. btw whats the > > advantages of viewer-mode over read-only-mode > > Mostly that you get more convenient navigation commands. Scrolling and > searching etc don't require control modifiers, and it becomes a bit > easier to move around files. > > > best > > > > Z > > > > > > On Thu, Jul 17, 2014 at 5:46 PM, Jorge A. Alfaro-Murillo < > > jorge.a.alfaro@gmail.com> wrote: > > > > Xebar Saram writes: > > > > > i keep once and a while screwing up my notes with unintended > > editing > > > (erroneous key presses etc) and was wondering if any one knew > > of a way > > > to to switch orgmode notes between read-only/editing? > > > > Hi Xebar. Use C-x C-q. This works for every file, I use it in > > particular > > for notes that I do not want to edit. > > > > It runs the command read-only-mode which changes whether the > > current > > buffer is read-only. Actually the command switches the local > > variable > > buffer-read-only, so you can use that variable as local for every > > file > > that you do not want to edit by default. At the end of those > > files add: > > > > #+BEGIN_EXAMPLE > > %%% Local Variables: > > %%% buffer-read-only: t > > %%% End: > > #+END_EXAMPLE > > > > And every time that you want to edit them just do C-x C-q > > > > Best, > > > > Jorge. > > > > > > > --089e011777d9d65e1004fe73016b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thx again all, really cool.

one last qu= estion. anyone mind pasting code to revert an open buffer to read only when= idle for lets say 5 minutes?

thx alot!

Z


On Fri, Jul 18, 2014 at 2:42 AM, Eric Abrahamsen <e= ric@ericabrahamsen.net> wrote:
Xebar Saram <zeltakc@gmail.com> writes:

> Thanks guys. really appreciate all your help=C2=A0
>
> im now using view-mode with hooks as suggested. btw whats the
> advantages of viewer-mode over read-only-mode

Mostly that you get more convenient navigation commands. Scrolling an= d
searching etc don't require control modifiers, and it becomes a bit
easier to move around files.

> best
>
> Z
>
>
> On Thu, Jul 17, 2014 at 5:46 PM, Jorge A. Alfaro-Murillo <
> jorge.a.alfaro@gmail.com> wrote:
>
> =C2=A0 =C2=A0 Xebar Saram <
zel= takc@gmail.com> writes:
>
> =C2=A0 =C2=A0 > i keep once and a while screwing up my notes with u= nintended
> =C2=A0 =C2=A0 editing
> =C2=A0 =C2=A0 > (erroneous key presses etc) and was wondering if an= y one knew
> =C2=A0 =C2=A0 of a way
> =C2=A0 =C2=A0 > to to switch orgmode notes between read-only/editin= g?
>
> =C2=A0 =C2=A0 Hi Xebar. Use C-x C-q. This works for every file, I use = it in
> =C2=A0 =C2=A0 particular
> =C2=A0 =C2=A0 for notes that I do not want to edit.
>
> =C2=A0 =C2=A0 It runs the command read-only-mode which changes whether= the
> =C2=A0 =C2=A0 current
> =C2=A0 =C2=A0 buffer is read-only. Actually the command switches the l= ocal
> =C2=A0 =C2=A0 variable
> =C2=A0 =C2=A0 buffer-read-only, so you can use that variable as local = for every
> =C2=A0 =C2=A0 file
> =C2=A0 =C2=A0 that you do not want to edit by default. At the end of t= hose
> =C2=A0 =C2=A0 files add:
>
> =C2=A0 =C2=A0 #+BEGIN_EXAMPLE
> =C2=A0 =C2=A0 %%% Local Variables:
> =C2=A0 =C2=A0 %%% buffer-read-only: t
> =C2=A0 =C2=A0 %%% End:
> =C2=A0 =C2=A0 #+END_EXAMPLE
>
> =C2=A0 =C2=A0 And every time that you want to edit them just do C-x C-= q
>
> =C2=A0 =C2=A0 Best,
>
> =C2=A0 =C2=A0 Jorge.
>
>



--089e011777d9d65e1004fe73016b--