2012-08-09

An argument for Emacs window-local variables

The Emacs developers used argue that window-local variables are not neccessary, since there are indirect buffers, which can do mostly the same thing. In recent Emacs releases, the window state is anyway mostly hidden from Lisp. However, I think sometimes it is useful to have window-local variables, instead of buffer-local variables. Emacs is very buffer-centric, but sometimes the UI and the user's view is rather window-centric. Two use-cases for window-local variables are:
I am using ECB, and it would be neat to enable or disable minor modes according to the ECB window I am in. This is also useful for people who manually tile their Emacs frame. In the main edit window, I like to have the tabbar, but in my compilation window, I'd rather not.

The buffer stack for a navigation history definitely should be window specific. Everything else would be very confusing. If a window is split, the new window will inherit its parents history.

No comments:

Post a Comment