Thread:Adnoam/@comment-26115937-20170830153100/@comment-25219384-20170901215421

I tried a bit and it's complicated. The Options template can't directly strip the DEFAULTSORT tag, as that's a special word which is processed before the text regexp manipulations of Options.

The only idea I have at the moment is to modify the Retired/Seasonal templates so that they wrap the DEFAULTSORT usage in some tag, and have Options strip everything in that tag. But this will not be pretty.

Theoretically, it would have been ideal if there was a way to determine the current DEFAULTSORT key. This way it would be easy to modify Options to save this value at the start and restore it at the end. But I'm not sure this is exposed anywhere (though the API seems to exist deep down).