jschaf / esup

ESUP - Emacs Start Up Profiler
398 stars 22 forks source link

Fix indentation in the esup buffer #80

Closed benley closed 4 years ago

benley commented 4 years ago

Fixes #63 by adding a function to strip common leading whitespace from a multiline string.

This should behave correctly for all styles of indentation except for strings with an inconsistent mixture of tabs and spaces between lines.

sergeyklay commented 4 years ago

I stopped the build because it was stuck for a 100 minutes with the following message:

The esup-child-run during performing
  loads file
  loads file (1.26ms)
Wrong number of arguments: #<subr min>, 0

Tests was passed only for Emacs 27. Could you please try to sort out?

benley commented 4 years ago

Huh, ok. I will figure it out!

codecov-commenter commented 4 years ago

Codecov Report

Merging #80 into master will increase coverage by 1.70%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
+ Coverage   36.17%   37.87%   +1.70%     
==========================================
  Files           2        2              
  Lines         387      396       +9     
==========================================
+ Hits          140      150      +10     
+ Misses        247      246       -1     
benley commented 4 years ago

I think it's fixed now, sorry about that. My first version failed to account for empty strings, or strings containing only whitespace.

sergeyklay commented 4 years ago

Thank you for the patch, and for helping make Esup better!