Date: Mon, 21 Jan 2002 14:43:30 -0500 (EST) From: Christopher Masto <chris@netmonger.net> To: FreeBSD-gnats-submit@freebsd.org Subject: gnu/34128: sdiff "e" doesn't work with some editors Message-ID: <200201211943.g0LJhUZ08799@lion-around.at.yiff.net>
next in thread | raw e-mail | index | archive | help
>Number: 34128 >Category: gnu >Synopsis: sdiff "e" doesn't work with some editors >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 21 11:50:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Christopher Masto >Release: FreeBSD 4.4-STABLE i386 >Organization: >Environment: System: FreeBSD lion-around.at.yiff.net 4.4-STABLE FreeBSD 4.4-STABLE #0: Tue Oct 9 13:36:55 EDT 2001 root@lion-around.at.yiff.net:/usr/obj/usr/src/sys/LION-AROUND i386 >Description: When using sdiff, one of the options is to edit the left, right, both or a new file. The implementation creates a temporary file, runs an editor on it, then seeks back to the beginning and reads the results. Unfortunately, this doesn't work with some editors, principally emacs, which do not rewrite the original file but instead write a new file and then rename it into place. sdiff still has the old file open and won't read any of the changes. There is no warning or notice that this is happening, and it can lead to serious corruption of files. Since sdiff is an integral part of the mergemaster process, this is likely to bite people who are upgrading. >How-To-Repeat: With EDITOR set to emacs or xemacs, use the edit option within sdiff. The following is sufficient: chris@lion-around:~/tmp/sdiff$ echo 1 > one; echo 2 > two; sdiff -o out one two 1 | 2 %e l [emacs starts with "1" in the buffer. Change it to anything, save, and exit.] chris@lion-around:~/tmp/sdiff$ cat out 1 Note that the change silently disappeared. >Fix: sdiff should reopen the file after the editor exits. It should probably also notice if no changes were made, and prompt/warn the user. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201211943.g0LJhUZ08799>