markdown-mode
markdown-mode copied to clipboard
How do I get back from markdown-view-mode to editing source
Whiles in markdown-mode I enter M-x markdown-view-mode to view the file. Then I can't get back to editing the file. Returning to M-x markdown-mode has the file remaining read-only.
Expected Behavior
The file is editable, i.e. not read-only.
Actual Behavior
File is read-only. Alternatively, the docs address how to do this.
Steps to Reproduce
The above suffices.
Software Versions
- Markdown Mode: 2.4
- Emacs: GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0)
- OS: NixOs 19.09.2522.75f4ba05c63 (Loris)
Thanks for reporting the issue. markdown-view-mode and gfm-view-mode should toggle its state, however current implementations do not. I'll try to check whether they can implement like that later.
BTW you can toggle read-only-mode by C-x X-q.
I misunderstood. markdown-view-mode is major-mode, not minor-mode. major-mode cannot be toggled. So we need to disable markdown-view-mode by enabling another major-mode like markdown-mode.
Switching to markdown-view-mode sets the file read-only. Switching to markdown-mode should set the file read-write.
Currently I'm doing
M-x markdown-view-mode # switch to view mode
# viewed enough
M-x makrdown-mode # switch back
M-x read-only-mode # toggle read-only
Switching to
markdown-view-modesets the file read-only. Switching tomarkdown-modeshould set the file read-write.
Yes. I'll consider about this.
How about #627 change ?
This is working for me. I think this issue should be closed.