If you aren't comfortable with emacs-lisp
, you can add the following three lines to the very bottom of your ~/PATH/index.org
, and save it. Next time when you open that file in Emacs
, it will be read-only
.
# Local Variables:
# eval: (view-mode 1)
# End:
If you don't want to close Emacs
, you can try re-visiting the file in same session with M-x revert-buffer RET
. Now try editing the file, and see what happens.
The above suggestion will work only for org
files.
You can add the above 3 lines with
M-x add-file-local-variable <return> eval <return> ( view-mode SPC 1) <return>
C-x C-s
C-x C-v <return>
This will add the 3 lines that I suggested previously. Remember to save the file.
Above 3 steps will work for any file.