jscheid / dtrt-indent

A minor mode that guesses the indentation offset originally used for creating source code files and transparently adjusts the corresponding settings in Emacs, making it more convenient to edit foreign files.
187 stars 31 forks source link

Implement `dtrt-indent-set` #84

Closed ramnes closed 4 months ago

ramnes commented 4 months ago

Closes #82

rrthomas commented 4 months ago

Wow, this is great! Thanks for doing this.

What would you think about having a message if no variable can be found, when the function is called interactively? Would be nice to warn/explain to the user who might otherwise be confused when it has no effect.

ramnes commented 4 months ago

Why not, but then ideally we'd want to error before prompting the user for an offset, and I'm not sure how to do that. I'll eventually take a deeper look when I have some time to spare. :)

rrthomas commented 4 months ago

I think giving an error is the main thing, so while you're right, I don't think that matters, and I'd rather land the PR sooner; so, I'd be quite happy with just having a message output when there's no setting variable found and the function is called interactively.

ramnes commented 4 months ago

@rrthomas done then :)

rrthomas commented 4 months ago

Many thanks! New release shortly.