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
Suggestion: cleaner debug code #13
Comments
This is awesome. Thanks! I didn't know this existed. Would you like to work on a PR for this? |
Ok, I pushed a branch here: https://github.com/alphapapa/eless/tree/collapsing-debug I tried to build it according to the instructions, but unfortunately I have several Org-export variables set differently, and this resulted in a lot of whitespace noise and other minor differences in the exported files. It doesn't seem worth the time it would take for me to figure out which variables to change and what to change them to to make the output the same as you get, so I haven't committed the exported changes, just the raw changes to the org file. |
(It's a GitHub "feature".. The commit message had "Fixes Issue#", so it auto-closed this issue.) Thanks for that commit! It did get rid of a lot of clutter from
Ah, that sucks.. I will figure out how to resolve this so that org based project collaboration becomes easier. May be I just need to have a look at your config for now to see which
No problem. Thanks for that commit! |
Cool, thanks for fixing it up. :) |
Hi again,
Just a suggestion you might want to consider. There's a really cool technique for Bash scripts, which I've seen called a "collapsing function." It's especially useful for optional debug output. Here's an example:
Then to send debug output, you just do:
debug "Something"
instead of having to do:
And by redefining or "collapsing" the function, it avoids the tests when debugging is disabled (though I doubt it matters in a shell script).
The text was updated successfully, but these errors were encountered: