Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gomain opened this issue Jun 29, 2021 · 6 comments
Closed

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

gomain opened this issue Jun 29, 2021 · 6 comments

Comments

@gomain
Copy link

gomain commented Jun 29, 2021

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)
@syohex
Copy link
Collaborator

syohex commented Jun 29, 2021

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
Copy link
Collaborator

syohex commented Jul 5, 2021

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.

@gomain
Copy link
Author

gomain commented Jul 5, 2021

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

@syohex
Copy link
Collaborator

syohex commented Jul 5, 2021

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
Copy link
Collaborator

syohex commented Jul 22, 2021

How about #627 change ?

@cfclrk
Copy link

cfclrk commented Nov 3, 2022

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

@syohex syohex closed this as completed Nov 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants