[mew-int 2998] Saving to an existing file

Christophe TROESTLER <[email protected]> Mon, 20 Jun 2011 21:42:32 +0200 (CEST)
Newsgroups gmane.mail.mew.general
Organization Universite de Mons (http://math.umons.ac.be/an/)
Message-ID <20110620.214232.617026217390191998.Christophe.Troestler@umons.ac.be>
Hi,

When saving a message or an attachment to an already existing file 
(and answering "y" to the question), Mew saves gibberish and seems to 
move the point at a random location in the Summary buffer.  The 
simple attached patch solved that (but maybe this is to be considered 
as a bug in y-or-n-p to also be reported to emacs?).

Best,
C.
save.patch (text/x-patch, 449 B)
=== modified file 'mew-edit.el'
--- old/mew-edit.el	2011-02-01 02:43:41 +0000
+++ new/mew-edit.el	2011-06-20 19:29:07 +0000
@@ -302,7 +302,8 @@
 	     (setq action "Overwrite")
 	   (setq action "Append")
 	   (setq append-p t))
-	 (if (y-or-n-p (format "File exists. %s it to %s? " action file))
+	 (if (save-excursion
+	       (y-or-n-p (format "File exists. %s it to %s? " action file)))
 	     (setq doit t)))
        ;;
        (if (not doit)