Closed tummychow closed 6 years ago
Just to say I'm looking at this stuff Sundays only at present, and the window just closed for this week, so I'll try to get around to it next. But I'm not ignoring it!
Thanks, I like this pattern, merging.
Please could you write a release note (and perhaps paste it into this report) that I can add to a new release to help users transition?
Sure. I imagine most people are using (dtrt-indent-mode 1)
in their current config. They can simply replace that with (dtrt-indent-global-mode 1)
. If you want to preserve the exact behavior that currently exists (ie the mode runs when you find any file), you can instead use (add-hook 'find-file-hook 'dtrt-indent-mode)
.
Other configurations are also possible, of course. For example, maybe you want the mode in prog-mode buffers but not in text-mode buffers. In that case you can (add-hook 'prog-mode-hook 'dtrt-indent-mode)
instead of enabling the global mode. Etc.
That's the sort of thing; could you just possibly reword it as instructions to users, I mean literally a couple of paras I can add to a release note? Many thanks!
like this?
This release separates dtrt-indent into two minor modes, a buffer-local mode (dtrt-indent-mode
) and a global mode (dtrt-indent-global-mode
). If you are currently using (dtrt-indent-mode 1)
in your emacs configuration, replace it with (dtrt-indent-global-mode 1)
to maintain the current behavior of activating dtrt-indent-mode
in all buffers. Alternatively, dtrt-indent-mode
can be activated with a hook, eg (add-hook 'find-file-hook 'dtrt-indent-mode)
, for more granular control over which buffers will be affected.
Thanks, that's perfect.
I've just made the release and used the above as the notes. Thanks again!
And now for my last trick. This change is definitely breaking. It splits dtrt-indent into two modes. The existing
dtrt-indent-mode
is local to the current buffer, and a newdtrt-indent-global-mode
enables the mode for allprog-mode
/text-mode
buffers. People who currently invokedtrt-indent-mode
in their config will have to switch todtrt-indent-global-mode
. Let me know what you think and whether this change is acceptable to you.