On 09/05/2011 11:58 AM, Bruce Dubbs wrote:
>
> I have never seen the use of an editor in diffutils, but I learn new
> stuff all the time.  The only place DEFAULT_EDITOR_PROGRAM is in the
> code is sdiff.
>
> After some looking, I found Section 2.5.1 in the diffutils info page
> about 'ed' scripts.
>
> "`diff' can produce commands that direct the `ed' text editor to change
> the first file into the second file.  Long ago, this was the only
> output mode that was suitable for editing one file into another
> automatically; today, with `patch', it is almost obsolete.  Use the
> `--ed' (`-e') option to select this output format."
>
> It looks like diffutils uses 'ed' to produce old style scripts.  I have
> no idea if changing 'ed' to 'vi' will break this obsolete functionality
> or not, but it might.
>
> If the change is made, then it needs to be tested and the info page
> updated.  I don't think it's worth the effort.
>
I had no idea what it did...just seen it in passing, figured I'd throw 
it up here for somebody who used that functionality seeing as we no 
longer install ed. If you choose ed from the % prompt, it does indeed 
open the actual diffs with context (not the output file) in vi as 
expected, but the eb, el, er, e1, e2... commands all do the same thing, 
'vi $tmpfile'

sdiff -o file.diff file1.txt file2.txt
%ed

I can't see many people using that functionality, but it is configured 
incorrectly by default. :-/ Setting the EDITOR environment variable 
allows you to change it, but you'll never get the intended functionality 
out of any random editor value.

-- DJ Lucas


-- 
This message has been scanned for viruses and
dangerous content, and is believed to be clean.

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to