From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: a quick way to switch orgmode notes between read-only/editing? Date: Fri, 18 Jul 2014 07:42:41 +0800 Message-ID: <8761ivsgb2.fsf@ericabrahamsen.net> References: <87d2d49h63.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59378) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7vKI-0006qg-TE for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 19:43:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7vKB-0000lo-Df for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 19:43:02 -0400 Received: from plane.gmane.org ([80.91.229.3]:44217) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7vKB-0000li-7y for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 19:42:55 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X7vKA-0001LP-3d for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 01:42:54 +0200 Received: from 114.248.8.139 ([114.248.8.139]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Jul 2014 01:42:54 +0200 Received: from eric by 114.248.8.139 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Jul 2014 01:42:54 +0200 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: emacs-orgmode@gnu.org 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. > >