The problem is that FitCanvasToDrawing doesn't 'dirty' the file, so Saving has no effect. You can verify this by just calling the first verb:
$ inkscape --verb=FitCanvasToDrawing drawing.svg
The drawing resizes as expected, but if you close Inkscape, you don't get the dialog asking if you want to save your changes. The changes really are there though: if you choose File->Save As, then the resulting file is cropped as you'd expect. Hmm...
Another, possibly related issue is that if you use the -z or --without-gui command line option (which is supposed to suppress the GUI), then many other verbs also don't result in changes being saved:
Funny thing, though: FitCanvasToSele ctionOrDrawing *does* work: FitCanvasToSele ctionOrDrawing --verb=FileSave --verb=FileClose drawing.svg ; See Bug 171511 .
$ inkscape --verb=
The problem is that FitCanvasToDrawing doesn't 'dirty' the file, so Saving has no effect. You can verify this by just calling the first verb: FitCanvasToDraw ing drawing.svg
$ inkscape --verb=
The drawing resizes as expected, but if you close Inkscape, you don't get the dialog asking if you want to save your changes. The changes really are there though: if you choose File->Save As, then the resulting file is cropped as you'd expect. Hmm...
Another, possibly related issue is that if you use the -z or --without-gui command line option (which is supposed to suppress the GUI), then many other verbs also don't result in changes being saved:
$ inkscape -z --verb= FitCanvasToSele ctionOrDrawing --verb=FileSave --verb=FileClose drawing.svg ; EditSelectAll --verb= SelectionUnGrou p --verb=FileSave tree.svg
$ inkscape -z --verb=
This is all confirmed in latest SVN (rev 17195) under Linux.