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 16:22:40 +0300 Message-ID: References: <874mygxh5r.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0115ea30fa17db04fe638822 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7le2-0002AN-Eu for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 09:22:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7ldx-00088G-3q for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 09:22:46 -0400 Received: from mail-ie0-x233.google.com ([2607:f8b0:4001:c03::233]:33002) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7ldw-00088B-SD for emacs-orgmode@gnu.org; Thu, 17 Jul 2014 09:22:41 -0400 Received: by mail-ie0-f179.google.com with SMTP id rl12so2846994iec.38 for ; Thu, 17 Jul 2014 06:22:40 -0700 (PDT) In-Reply-To: <874mygxh5r.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: Thorsten Jolitz Cc: org mode --089e0115ea30fa17db04fe638822 Content-Type: text/plain; charset=UTF-8 Thx Thorston this looks great can you recommend a way to open all orgmode notes in view mode by default, i guess i would then bind a key to disable view mode to start editing right? thanks alot again Z On Thu, Jul 17, 2014 at 4:13 PM, Thorsten Jolitz wrote: > Xebar Saram writes: > > > hi all > > > > 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? i have used such > > options in previous note taking apps that had that option build in but > > i understand that since orgmode notes are just text files its a bit > > more complicated > > > > i would love to hear any suggestions on how you guys deal with > > protecting notes/data that still needs to be edited (i do use git ofc > > but i dont always know i screwed my notes :)) > > ,----[ C-h f view-mode RET ] > | view-mode is an interactive autoloaded compiled Lisp function in > | `view.el'. > | > | (view-mode &optional ARG) > | > | Toggle View mode, a minor mode for viewing text but not editing it. > | With a prefix argument ARG, enable View mode if ARG is positive, > | and disable it otherwise. If called from Lisp, enable View mode > | if ARG is omitted or nil. > | > | When View mode is enabled, commands that do not change the buffer > | contents are available as usual. Kill commands insert text in > | kill buffers but do not delete. Most other commands beep and > | tell the user that the buffer is read-only. > | > | > | > | The following additional commands are provided. Most commands > | take prefix arguments. Page commands default to "page size" > | lines which is almost a whole window, or number of lines set by > | z or w. > | Half page commands default to and set "half page size" lines > | which initially is half a window full. Search commands default > | to a repeat count of one. > | > | H, h, ? This message. > | Digits provide prefix arguments. > | - negative prefix argument. > | < move to the beginning of buffer. > | > move to the end of buffer. > | o scroll so that buffer end is at last line of window. > | SPC scroll forward "page size" lines. > | With prefix scroll forward prefix lines. > | DEL scroll backward "page size" lines. > | With prefix scroll backward prefix lines. > | z like SPC but with prefix sets "page size" to prefix. > | w like DEL but with prefix sets "page size" to prefix. > | d scroll forward "half page size" lines. With prefix, sets > | "half page size" to prefix lines and scrolls forward that much. > | u scroll backward "half page size" lines. With prefix, sets > | "half page size" to prefix lines and scrolls backward that much. > | RET, LFD scroll forward one line. With prefix scroll forward prefix > line(s). > | y scroll backward one line. With prefix scroll backward prefix > line(s). > | F revert-buffer if necessary and scroll forward. > | Use this to view a changing file. > | = prints the current line number. > | % goes prefix argument (default 100) percent into buffer. > | g goes to line given by prefix argument (default first line). > | . set the mark. > | x exchanges point and mark. > | @ return to mark and pops mark ring. > | Mark ring is pushed at start of every successful search and when > | jump to line occurs. The mark is set on jump to buffer start or > end. > | m save current position in character register. > | ' go to position saved in character register. > | s do forward incremental search. > | r do reverse incremental search. > | / searches forward for regular expression, starting after current > page. > | ! and @ have a special meaning at the beginning of the regexp. > | ! means search for a line with no match for regexp. @ means > start > | search at beginning (end for backward search) of buffer. > | \ searches backward for regular expression, starting before current > page. > | n searches forward for last regular expression. > | p searches backward for last regular expression. > | q quit View mode, restoring this window and buffer to previous state. > | q is the normal way to leave view mode. > | e exit View mode but stay in current buffer. Use this if you started > | viewing a buffer (file) and find out you want to edit it. > | This command restores the previous read-only status of the > buffer. > | E exit View mode, and make the current buffer editable > | even if it was not editable before entry to View mode. > | Q quit View mode, restoring all windows to previous state. > | c quit View mode and maybe switch buffers, but don't kill this > buffer. > | C quit View mode, kill current buffer and go back to other buffer. > | > | The effect of c, q and C depends on how view-mode was entered. If it was > | entered by view-file, view-file-other-window, view-file-other-frame, or > | M-x dired-view-file (M-x view-file, M-x view-file-other-window, > | M-x view-file-other-frame, or the Dired mode v command), > | then q will try to kill the current buffer. > | If view-mode was entered from another buffer, by C-c v, > | M-x view-buffer-other-window, M-x view-buffer-other frame, M-x view-file, > | M-x view-file-other-window, or M-x view-file-other-frame, > | then c, q and C will return to that buffer. > | > | Entry to view-mode runs the normal hook `view-mode-hook'. > | > | [back] > `---- > > -- > cheers, > Thorsten > > > --089e0115ea30fa17db04fe638822 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thx Thorston this looks great

can you r= ecommend a way to open all orgmode notes in view mode by default, i guess i= would then bind a key to disable view mode to start editing right?

thanks alot again

Z


On Thu, Jul 17, 2= 014 at 4:13 PM, Thorsten Jolitz <tjolitz@gmail.com> wrote:
Xeba= r Saram <zeltakc@gmail.com> = writes:

> hi all
>
> 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? i have used such=
> options in previous note taking apps that had that option build in but=
> i understand that since orgmode notes are just text files its a bit > more complicated
>
> i would love to hear any suggestions on how you guys deal with
> protecting notes/data that still needs to be edited (i do use git ofc<= br> > but i dont always know i screwed my notes :))

,----[ C-h f view-mode RET ]
| view-mode is an interactive autoloaded compiled Lisp function in
| `view.el'.
|
| (view-mode &optional ARG)
|
| Toggle View mode, a minor mode for viewing text but not editing it.
| With a prefix argument ARG, enable View mode if ARG is positive,
| and disable it otherwise. =C2=A0If called from Lisp, enable View mode
| if ARG is omitted or nil.
|
| When View mode is enabled, commands that do not change the buffer
| contents are available as usual. =C2=A0Kill commands insert text in
| kill buffers but do not delete. =C2=A0Most other commands beep and
| tell the user that the buffer is read-only.
|
|
|
| The following additional commands are provided. =C2=A0Most commands
| take prefix arguments. =C2=A0Page commands default to "page size&quo= t;
| lines which is almost a whole window, or number of lines set by
| z or w.
| Half page commands default to and set "half page size" lines | which initially is half a window full. =C2=A0Search commands default
| to a repeat count of one.
|
| H, h, ? =C2=A0 =C2=A0 =C2=A0 =C2=A0This message.
| Digits =C2=A0 =C2=A0 =C2=A0 =C2=A0provide prefix arguments.
| - =C2=A0 =C2=A0 negative prefix argument.
| < =C2=A0 =C2=A0 move to the beginning of buffer.
| > =C2=A0 =C2=A0 move to the end of buffer.
| o =C2=A0 =C2=A0 scroll so that buffer end is at last line of window.
| SPC =C2=A0 scroll forward "page size" lines.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 With prefix scroll forward prefix lines.
| DEL =C2=A0 scroll backward "page size" lines.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 With prefix scroll backward prefix lines.
| z =C2=A0 =C2=A0 like =C2=A0SPC =C2=A0but with prefix sets "page size= " to prefix.
| w =C2=A0 =C2=A0 like =C2=A0DEL =C2=A0but with prefix sets "page size= " to prefix.
| d =C2=A0 =C2=A0 scroll forward "half page size" lines. =C2=A0Wi= th prefix, sets
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 "half page size" to prefix lines an= d scrolls forward that much.
| u =C2=A0 =C2=A0 scroll backward "half page size" lines. =C2=A0W= ith prefix, sets
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 "half page size" to prefix lines an= d scrolls backward that much.
| RET, LFD =C2=A0scroll forward one line. =C2=A0With prefix scroll forward = prefix line(s).
| y =C2=A0 =C2=A0 scroll backward one line. =C2=A0With prefix scroll backwa= rd prefix line(s).
| F =C2=A0 =C2=A0 revert-buffer if necessary and scroll forward.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 Use this to view a changing file.
| =3D =C2=A0 =C2=A0 prints the current line number.
| % =C2=A0 =C2=A0 goes prefix argument (default 100) percent into buffer. | g =C2=A0 =C2=A0 goes to line given by prefix argument (default first line= ).
| . =C2=A0 =C2=A0 set the mark.
| x =C2=A0 =C2=A0 exchanges point and mark.
| @ =C2=A0 =C2=A0 return to mark and pops mark ring.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 Mark ring is pushed at start of every success= ful search and when
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 jump to line occurs. =C2=A0The mark is set on= jump to buffer start or end.
| m =C2=A0 =C2=A0 save current position in character register.
| ' =C2=A0 =C2=A0 go to position saved in character register.
| s =C2=A0 =C2=A0 do forward incremental search.
| r =C2=A0 =C2=A0 do reverse incremental search.
| / =C2=A0 =C2=A0 searches forward for regular expression, starting after c= urrent page.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 ! and @ have a special meaning at the beginni= ng of the regexp.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 ! means search for a line with no match for r= egexp. =C2=A0@ means start
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 search at beginning (end for backward search)= of buffer.
| \ =C2=A0 =C2=A0 searches backward for regular expression, starting before= current page.
| n =C2=A0 =C2=A0 searches forward for last regular expression.
| p =C2=A0 =C2=A0 searches backward for last regular expression.
| q =C2=A0 =C2=A0 quit View mode, restoring this window and buffer to previ= ous state.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 q is the normal way to leave view mode.
| e =C2=A0 =C2=A0 exit View mode but stay in current buffer. =C2=A0Use this= if you started
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 viewing a buffer (file) and find out you want= to edit it.
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 This command restores the previous read-only = status of the buffer.
| E =C2=A0 =C2=A0 exit View mode, and make the current buffer editable
| =C2=A0 =C2=A0 =C2=A0 =C2=A0 even if it was not editable before entry to V= iew mode.
| Q =C2=A0 =C2=A0 quit View mode, restoring all windows to previous state.<= br> | c =C2=A0 =C2=A0 quit View mode and maybe switch buffers, but don't ki= ll this buffer.
| C =C2=A0 =C2=A0 quit View mode, kill current buffer and go back to other = buffer.
|
| The effect of c, q and C depends on how view-mode was entered. =C2=A0If i= t was
| entered by view-file, view-file-other-window, view-file-other-frame, or | M-x dired-view-file (M-x view-file, M-x view-file-other-window,
| M-x view-file-other-frame, or the Dired mode v command),
| then q will try to kill the current buffer.
| If view-mode was entered from another buffer, by C-c v,
| M-x view-buffer-other-window, M-x view-buffer-other frame, M-x view-file,=
| M-x view-file-other-window, or M-x view-file-other-frame,
| then c, q and C will return to that buffer.
|
| Entry to view-mode runs the normal hook `view-mode-hook'.
|
| [back]
`----

--
cheers,
Thorsten



--089e0115ea30fa17db04fe638822--