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: Thu, 17 Jul 2014 18:15:49 +0300 Message-ID: References: <87d2d49h63.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0115ea30af243804fe651d17 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7nPU-0008JZ-3k for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 11:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7nPS-00079D-Ql for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 11:15:52 -0400 Received: from mail-ig0-x22d.google.com ([2607:f8b0:4001:c05::22d]:35608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7nPS-00078x-Kc for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 11:15:50 -0400 Received: by mail-ig0-f173.google.com with SMTP id h18so6327396igc.6 for ; Thu, 17 Jul 2014 08:15:50 -0700 (PDT) In-Reply-To: <87d2d49h63.fsf@gmail.com> 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: "Jorge A. Alfaro-Murillo" Cc: org mode --089e0115ea30af243804fe651d17 Content-Type: text/plain; charset=UTF-8 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 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. > > > --089e0115ea30af243804fe651d17 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks guys. really appreciate all your help=C2=A0
im now using view-mode with hooks as suggested. btw whats the a= dvantages of viewer-mode over read-only-mode

best<= /div>

Z


On Thu, Jul 17, 2014 at 5:46 PM, Jorge A. Alfaro-Murill= o <jorge.a.alfaro@gmail.com> wrote:
Xebar Saram <zeltakc@gmail.com> 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 particu= lar
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.



--089e0115ea30af243804fe651d17--