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

Delete trailing blank line #318

Closed
wants to merge 1 commit into from
Closed

Delete trailing blank line #318

wants to merge 1 commit into from

Conversation

dudebout
Copy link
Contributor

@dudebout dudebout commented Jan 5, 2012

No description provided.

@sigma
Copy link
Contributor

sigma commented Jan 6, 2012

Can you give an example of the problem you're solving?
Also, if we happen to insert too many blank lines, it'd seem better to fix it at insert time, rather than deleting them afterwards.

@dudebout
Copy link
Contributor Author

dudebout commented Jan 7, 2012

magit-insert-section puts a trailing whitespace (except if the section is cancelled).
This allows for sections such as Staged changes, Unstaged changes, etc to be nicely separated by an empty line.
This however leaves an extra empty line after the last section.

I use the same trick in branch-manager to separate Local branches and Remote branches and then end up with two extra empty lines (one from magit-insert-section and one from me).

What we would like to do is join strings with "\n". It would be a cleaner approach for sure.
But we do not have all the strings upfront, we generate some from magit, we create some from lisp, we just wash some others.

Therefore, I think that deleting the remaining blank lines at the end of execution of body is not too bad.

@sigma
Copy link
Contributor

sigma commented Jan 6, 2013

I think this kind of kludge should be left over for now. I'm even wondering if we shouldn't think about rewriting all the UI layer in a cleaner way, and maybe split it into a separate package.

@sigma sigma closed this Jan 6, 2013
@dudebout
Copy link
Contributor Author

dudebout commented Jan 6, 2013

I agree that splitting magit.el in more manageable files would be beneficial.

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.

2 participants