Description: use Debian's sensible-editor instead of trying to guess the editor the original bug that triggered this change was that quilt doesn't honour $VISUAL Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=509076 Forwarded: not-needed Author: Ryan Niebur --- quilt/edit.in | 4 +--- quilt/header.in | 4 +--- quilt/mail.in | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) --- a/quilt/edit.in +++ b/quilt/edit.in @@ -6,8 +6,6 @@ # # See the COPYING and AUTHORS files for more details. -: ${EDITOR:=vi} - # Read in library functions if [ "$(type -t patch_file_name)" != function ] then @@ -65,7 +63,7 @@ if [ $status -ne 0 -a $status -ne 2 ] then exit $status fi -LANG=$ORIGINAL_LANG $EDITOR "${@/#/$SUBDIR}" +LANG=$ORIGINAL_LANG sensible-editor "${@/#/$SUBDIR}" status=$? for file in "$@" do --- a/quilt/header.in +++ b/quilt/header.in @@ -17,8 +17,6 @@ then . $QUILT_DIR/scripts/patchfns fi -: ${EDITOR:=vi} - usage() { printf $"Usage: quilt header [-a|-r|-e] [--backup] [--strip-diffstat] [--strip-trailing-whitespace] [patch]\n" @@ -151,7 +149,7 @@ else if [ -n "$opt_edit" ] then - LANG=$ORIGINAL_LANG $EDITOR "$tmp" || exit 1 + LANG=$ORIGINAL_LANG sensible-editor "$tmp" || exit 1 fi maybe_strip_diffstat < $tmp \ --- a/quilt/mail.in +++ b/quilt/mail.in @@ -6,8 +6,6 @@ # # See the COPYING and AUTHORS files for more details. -: ${EDITOR:=vi} - # Read in library functions if [ "$(type -t patch_file_name)" != function ] then @@ -524,7 +522,7 @@ introduction="$(gen_tempfile)" if [ -z "$opt_message" ] then - if ! LANG=$ORIGINAL_LANG $EDITOR $introduction + if ! LANG=$ORIGINAL_LANG sensible-editor $introduction then rm -f $introduction exit 1 --- a/test/edit.test +++ b/test/edit.test @@ -6,6 +6,7 @@ $ cat > editor < sed -e 's:foo:bar:' $1 > $1.new < mv $1.new $1 $ chmod +x editor +$ unset VISUAL $ export EDITOR=%{PWD}/editor $ quilt new patch