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

Indentation of code blocks after pressing enter on Emacs 24.5.1 #28

Closed
elboulangero opened this issue Sep 28, 2015 · 4 comments
Closed

Comments

@elboulangero
Copy link

Maybe it's me, I'm new to markdown mode on Emacs. I never used it before, so I can't compare with a previous version of Emacs. But it seems that indentation of code blocks is broken.

Let's say I want to write a code block, I hit Tab, then type my first line. It gives:

I'm gonna write a code block:

    my first line of code█

Now, when I hit enter, my line is brought back to the beginning of the line:

I'm gonna write a code block:

my first line of code
█

Does anybody else experience that ? I saw that ticket #16 looks a little bit like this, maybe it's related...

Anyway, the workaround is simple: I go back to the first line, hit Tab to reindent, go to the second line, hit Tab to indent, write some code, hit Enter. And at this moment the indentation remains, and I can keep on writing my code block. The problem only happens for the first line of the code block.

@vyp vyp mentioned this issue Sep 29, 2015
jrblevin added a commit that referenced this issue Dec 16, 2015
@jrblevin
Copy link
Owner

Thanks for reporting this. This was due to the same issue as in #16 and #30. The issue was fixed in commit 0c71203. I also added a test case in commit 6f09417.

@ianmackinnon
Copy link

This issue is still occurring for me exactly as the example here above. I'm using Emacs 24.5.1 and I've tried with:

  • The latest version from Melpa: 20170619.1503
  • The tip of the repository (currently ab45304, 2.3-dev)
  • The commit made to fix the issue (0c71203, 2.2)

And the error occurs in every case.

Is there any way I could try to determine why this is still happening on my system despite the fix?

@jrblevin
Copy link
Owner

I added a regression test when this issue came up, and it's still passing, so I don't think it's the same issue with markdown-mode. I also double-checked, just to be sure, and I'm not seeing the behavior.

As for your local configuration: I'd first check to see if something is overriding your return key: M-x describe-key RET. It should be bound to markdown-enter-key. Next, check to see what minor modes are active (C-h m) and if any of them seem like they might be affecting indentation.

@ianmackinnon
Copy link

Many thanks for your help. RET was indeed not bound to markdown-enter-key due to other minor mode settings.

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