gedit external tools fails to save documents

The bug is filed here: bugs.launchpad.net/ubuntu
/>source/gedit
bug/1244338

and here: bugzilla.gnome.org/…ow_bug.cgi

but if you can’t wait for the fix to come down from upstream, you can simply run this code as root:

EXT='/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/functions.py' #for 64-bit systems
EXT='/usr/lib/i386-linux-gnu/gedit/plugins/externaltools/functions.py' #for 32-bit systems
mv $EXT $EXT.sav
sed -e 's%if doc.get_modified()%if not doc.get_modified()%' \
    -e 's%for i in range(len(docs)):%for i in reversed(range(len(docs))):%' \
    $EXT.sav > $EXT
  • There is a new bug as of 14–04 which can be patched with:
EXT='/usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/functions.py' #for 64-bit systems
EXT='/usr/lib/i386-linux-gnu/gedit/plugins/externaltools/functions.py' #for 32-bit systems
rm -f $EXT.sav
mv $EXT $EXT.sav
sed -e 's%len(docs) and len(docs)%len(window.get_documents()) and len(docs_to_save)%' \
    $EXT.sav > $EXT