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 doesn't preserve column position #133

Closed
tom-seddon opened this issue Apr 30, 2016 · 3 comments
Closed

Indentation doesn't preserve column position #133

tom-seddon opened this issue Apr 30, 2016 · 3 comments

Comments

@tom-seddon
Copy link

tom-seddon commented Apr 30, 2016

Despite PR #125, I'm still having problems with indentation not preserving the column position. This happens every time I type a comma.

To reproduce, create a new buffer, enter markdown-mode, type a few chars, and insert a comma - for me, the cursor then moves to the beginning of the line.

I'm using commit b838d80.

Thanks,

--Tom

P.S. This isn't a suggested fix by any means, but I had a quick glance at the function, and it looked like it might not always be fixing up the column position. So my workaround for now has been some advice as follows.

  (defadvice markdown-indent-line (around markdown-indent-line-around)
    "Fix markdown-indent line."
    (let (column)
      (save-excursion
    (setq column (current-column))
    (back-to-indentation)
    (setq column (- column (current-column)))
    (when (< column 0)
      (setq column 0)))
      ad-do-it
      (back-to-indentation)
      (move-to-column (+ (current-column) column))))
@jrblevin
Copy link
Owner

jrblevin commented May 1, 2016

Thank you for reporting this and being specific about which commit you are using. However, I am unable to reproduce this behavior. Can you please confirm that this still happens when no other minor modes, etc. are loaded that might interfere? In other words, are you launching Emacs with emacs -Q?

@syohex
Copy link
Collaborator

syohex commented May 1, 2016

I cannot reproduce this issue too.

@tom-seddon
Copy link
Author

This turns out to be a dup of #5 and pierre-arlaud/funda-haxe-mode#11

I've added a note to the Haxe mode issue about a possible fix.

Thanks,

--Tom

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