markdown-mode icon indicating copy to clipboard operation
markdown-mode copied to clipboard

How do I get back from markdown-view-mode to editing source

Open gomain opened this issue 4 years ago • 5 comments
trafficstars

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)

gomain avatar Jun 29 '21 03:06 gomain

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.

syohex avatar Jun 29 '21 04:06 syohex

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.

syohex avatar Jul 05 '21 01:07 syohex

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

gomain avatar Jul 05 '21 02:07 gomain

Switching to markdown-view-mode sets the file read-only. Switching to markdown-mode should set the file read-write.

Yes. I'll consider about this.

syohex avatar Jul 05 '21 03:07 syohex

How about #627 change ?

syohex avatar Jul 22 '21 08:07 syohex

This is working for me. I think this issue should be closed.

cfclrk avatar Nov 03 '22 13:11 cfclrk