mode-line-stats
mode-line-stats copied to clipboard
mls-toggle-key is unused.
With the upcomming update that adds the :buffer related stuff we no longer need mls-toggle-key to switch between :primary and :secondary formats. Perhaps it could be replaced with another buffer-related command?
I forgot to say this early but the :buffer feature is a WorkInProgress! Like almost everything in the experimental branch :)
I think the mls-toggle-key should be used to switch between current-buffer and mls :buffer now. But probably we should rename the variable with a better name too :)
@Idorobots Does it make sense to have a keymap in mls just to switch to mls-buffer?
Maybe we could remove this keymap and let the user define his own key bind to whatever he wants (in his .emacs.d config file)?
For example:
(global-set-key (kbd "C-c m") 'mls-buffer-show)
But with the new mls-buffer I think it makes more sense to have a major mode in mls-buffer instead, to do some actions:
- refresh stats
- enable/disable a module?
- toggle UI (percent bar/numeric)?
- quit
@agpchil I think we can drop the keymap, it's best to leave mls-buffer-show for the users to use as they please.
On the other hand, major mode for the mls-buffer could be fairly useful. An easy way to manage various modules and their formats could be very handy. I'm thinking something in the vein of short, single-letter Org-Agenda commands. For example, n to move to the next stat, u to force-update it, e and d to enable/disable modules. Any thoughts?
@Idorobots I agree with that.
I'll try to do this changes and add the major-mode and some basic actions but I probably won't implement all the features for now (like enable/disable modules).
@Idorobots I did some testing and to be able to add the navigation stuff, filters, control, etc. we'll need to make a lot of custom code and it will be hard to maintain data consistency...
I think we should re-think the mls-buffer view. IMHO using something like Tabulated List mode should be a better option (and maybe easier to add the features we want).
@agpchil, offloading mls-buffer structuring & navigation to an external mode sounds reasonable, but it would be nice to leave a way for the users to change Tabulated List mode to something else if they want to (Org-Mode/Org-Agenda maby? :)). I think that defaulting modules' formatters to Tabulated List mode specific formats is ok, but we shouldn't ship mls with Tabulated List mode as a hard dependency.
What do you think about it?
I think Tabulated list mode is shipped with emacs 24 already so I don't think it's a hard dependency...
Can you give me more details about the org-* use case? I don't understand why the user would want to change the major mode when mls-buffer already use its own.
I think if someone wants a different view of mls they should write an specific mode for that or just call some mls internals to to that. Should we ship mls with a few different view modes?