[வியாழன் மே 09, 2024] Visuwesh wrote: >>> > I don't think I understand this difficulty, either: with >>> > occur-edit-mode it is solved by making occur-edit-mode be derived from >>> > occur-mode. Couldn't you do the same with your mode? >>> >>> No because occur-mode makes occur-revert-arguments permanent-local so >>> `g' survives the major-mode changes. >>> >>> For revert-buffer alone, compilation-arguments needs to be marked >>> permanent-local. As it is a part of compile.el, I am not sure if >>> marking it as such is safe. This is why I think having a minor-mode is >>> better. >> >> It sounds like a minor issue which shouldn't have such grave >> consequences. Why do you think making compilation-arguments >> permanent-local would be a problem? We could ask people who >> frequently contribute to compile.e land grep.el if they see any >> problem with doing that. > > It feels like a potential far-fetching change. But in any case, I will > give a shot at recreating the required markers, etc. for > occur-after-change-function to work. Will send a patch once I have a > working prototype. OK, please find attached patch. I am still not using a major-mode because of the change-major-mode-hook in compilation-setup: (add-hook 'change-major-mode-hook #'compilation--remove-properties nil t) that strips off all the text-properties. And there seem to be too many important local variables that is set up by both grep.el and compile.el so I think it is easier to use a minor-mode here.