HEADER line is printed after SECTION line(s) causing loss of desired major mode in Emacs
blais opened this issue · 3 comments
Original report by Milind Kamble (Bitbucket: mbkamble, GitHub: mbkamble).
In extract.py, the HEADER line is printed just before printing new entries. However, identify.py can inject SECTION lines into the output. As a result, the HEADER line whose purpose is to set the file major mode for emacs, is not the first non-blank line. So the mode setting is not honored when Emacs opens the file.
Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).
There's a known bug about this and it's been getting on my nerves, I have it on my TODO list to fix it. I think it may have something to do with a thorny issue of ordering due to buffering wrappers in the entry printer. I have to look into this, this only started recently.