Introducing smblog-mode for emacs

Aurélien Aptel aaptel at
Tue Mar 15 16:16:25 UTC 2016

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.

The colors could be tweaked some more but this is outside my
expertise :)

Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smblog2.png
Type: image/png
Size: 294713 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smblog3.png
Type: image/png
Size: 285193 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the samba-technical mailing list