AWESOME works perfect ofnuts! Even with 4 layers of content they autocrop very nicely.
Besides the Hello script that has got to be the smallest Python script i have seen to date.
Could you tell me how to edit the script if i wanted all the layers to become unlinked after the cropping takes effect?
Python can be quite terse, and the object classes defined by the python-fu interface are well done. I've yet to find a real-life case where Scheme is more suitable than Python for Gimp scripts.
For your request, just add the line "layer.linked=False" as below. Pay attention to the indenting, python is very fussy, indenting should be consistent (tabs and spaces are different, and I use tabs).
for layer in image.layers:
print 'Autocropping layer %s' % layer.name