> If I open a file in emacs, enable both hexl-mode and > auto-revert-mode in its buffer and then modify the content of the file > externally, the buffer gets refreshed but its content seems... rather > littered. C-l doesn't fix it. > > I have similar problems with "auto-revert-tail-mode", but not when I > revert the buffer "manually" with M-x revert-buffer. > > It seems that when the buffer gets refreshed, it behaves as if > hexl-mode was not here (for instance with auto-revert-tail-mode, it > just appends the text, without printing the hex values) but I'm not > sure about what's going on here. It's because `auto-revert-mode' doesn't reset the major mode when reverting the buffer and `hexl-mode' does nothing when the buffer is already in `hexl-mode'. Does the attached patch give good results?