Introducing smblog-mode for emacs

Ralph Boehme rb at
Tue Mar 15 17:39:10 UTC 2016

On Tue, Mar 15, 2016 at 05:16:25PM +0100, Aurélien Aptel wrote:
> On Tue, 15 Mar 2016 14:28:25 +0100 Ralph Boehme <rb at> wrote:
> > - SMB2 opcode should be black, leading text can be grey
> > 
> > - allow to split the window vertically (maybe with uppercase r)
> Done. You can use the prefix argument now: C-u r
> > - the request lines contain somewhat redundant and unneeded info that
> >  disctracts the eye:
> > 
> >  "SMB request SMB2_OP_CLOSE            , status NT_STATUS_OK"
> > 
> >  Maybe something like this would be better:
> > 
> >  "SMB2 request CLOSE            ... response NT_STATUS_OK"
> > 
> >  The text "SMB2 request" could be grey, but "CLOSE", the SMB2 opcode
> >  should be black.
> Done. I've left the default color for SMB2 request but changed the
> formating, it's clearer indeed.
> I've added another feature: jumping from the request window to the logs
> hilights the whole request and everything in between (from the opcode
> message to the result). The corresponding line in the request window is
> also highlighted.
> I've also added a magic-fallback-mode-alist entry, which lets us match
> a regex against the header of a newly opened file to set the proper
> major mode (instead of a regex on the file name/file extension). Much
> more accurate.
> I have attached a screenshot for the curious people who haven't tried
> the mode yet (on a dark and on a light theme). Top-left is the log
> window, bottom is the request window. The hilighted request (green
> background) is hilighted in both window. Finally right window is after
> pressing RET on the "Skipper user change" log message. It jumped to the
> corresponding DEBUG statement in the samba sources.

perfect! Now analyzing log files actually makes fun. Well, sort
of... ;)

Thanks a *lot* for sharing this!


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen,

More information about the samba-technical mailing list