diff -ru sensible-utils-0.0.9/select-editor sensible-utils-0.0.9+/select-editor
--- sensible-utils-0.0.9/select-editor	2013-06-06 14:22:08.000000000 +0200
+++ sensible-utils-0.0.9+/select-editor	2013-08-25 19:23:57.956543798 +0200
@@ -10,10 +10,36 @@
 
 editors=`update-alternatives --list editor | wc -l`
 if [ $editors -gt 1 ]; then
+	# output a sorted list of editors based on the priority the alternative has
+	# editors with a priority below zero are not displayed
+	sorted_list_of_editors() {
+		update-alternatives --query editor | while read emptyline; do
+			# skip the first entry (header) as well as the rest of processed entries
+			if [ -z "$emptyline" ]; then continue; fi
+
+			# extract the two interesting fields
+			local ALTERNATIVE=''
+			local PRIORITY=''
+			while read field value; do
+				case "${field}" in
+					'Alternative:') ALTERNATIVE="${value}";;
+					'Priority:') PRIORITY="${value}";;
+				esac
+				if [ -n "$ALTERNATIVE" ] && [ -n "$PRIORITY" ]; then break; fi
+			done
+			if [ -z "$ALTERNATIVE" ] || [ -z "$PRIORITY" ]; then continue; fi
+
+			# the chosen few can use ed to modify the file by hand
+			if [ $PRIORITY -lt 0 ]; then continue; fi
+
+			echo "${PRIORITY}:${ALTERNATIVE}"
+		done | sort --numeric-sort --reverse | cut -d':' -f 2-
+	}
+
 	echo
 	echo "`gettext 'Select an editor.  To change later, run'`" "'select-editor'."
 	i=0
-	editors=`update-alternatives --list editor`
+	editors=`sorted_list_of_editors`
 	for e in $editors; do
 		i=`expr $i + 1`
 		desc=
