Skip to content

Use backspace to move to the previous indentation position in haskell-indentation #866

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

Closed
wants to merge 1 commit into from

Conversation

gergoerdi
Copy link

This patch restores the "backspace on first colum unindents" functionality.

I wasn't able to find any existing tests for interactive indentation commands so I didn't bother.

unindent instead of deleting a single character. This restores the old
behaviour mentioned in `haskell-indentation-mode`'s docstring. See
haskell#500
@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015

Test cases are crucial for quality engineering. We do not want your functionality to accidentally stop working in a couple of weeks annoying everybody.

We try to roughly follow the process described in Pull request checklist.

Please add a test case.

@gergoerdi
Copy link
Author

OK, do you have an example of a test that tests interactive editing, that I can base my test cases on? I'd like the test to enter text, position the cursor, press backspace, and then check what has been deleted and where the cursor ends up.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015

haskell-indentation-tests.el has relevant code in the macro. You can extract this into other function.

@gergoerdi
Copy link
Author

I've looked at haskell-indentation-tests.el before, but that one seems geared more towards testing where the indentation points are determined to be, than testing navigation between them.

@gracjan
Copy link
Contributor

gracjan commented Sep 13, 2015

That is the kind of tests that are done currently. Can you add different kind of tests that will test interactive functions? We have more than one interactive function to test.

@gracjan gracjan changed the title Patch for #500 Use backspace to move to the previous indentation position in haskell-indentation Sep 17, 2015
@PierreR
Copy link
Contributor

PierreR commented Nov 15, 2015

@gergoerdi very useful fix indeed ! I don't think I feel confident enough to add the test case (as you said there is no template/file for this kind of tests yet)

@gracjan
Copy link
Contributor

gracjan commented Nov 20, 2015

I've added example tests in #994. You need to create a similar test.

@gracjan
Copy link
Contributor

gracjan commented Dec 24, 2015

I've been running with this commit for a while and I find it very confusing. Is this really what people want?

@bergey
Copy link
Contributor

bergey commented Dec 24, 2015

I don't feel strongly either way. I often want haskell-indentation-indent-backwards, I almost never want to delete indentation not to an indent point. But shift-tab works fine for me.

@gracjan
Copy link
Contributor

gracjan commented Jan 3, 2016

I've run with this functionality for a month now and so far learned to fear my Backspace. This is not going in.

@gracjan gracjan closed this Jan 3, 2016
@bergmark
Copy link

bergmark commented Jan 3, 2016

That echoes my experience with such functionality elsewhere.

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

Successfully merging this pull request may close these issues.

5 participants