unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Diff on Emacs
@ 2003-11-11  4:19 Jasen
  2003-11-11  4:27 ` Jasen
  0 siblings, 1 reply; 15+ messages in thread
From: Jasen @ 2003-11-11  4:19 UTC (permalink / raw)


Hi,

How do I enable diff on Emacs?  Doesn't diff a standard built-in 
function in Emacs?  Wheh I try to diff two buffers, i got "no such file 
or directory" error that doesn't sound right, what did I miss here?

Thanks,
Jasen

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  4:19 Diff on Emacs Jasen
@ 2003-11-11  4:27 ` Jasen
  2003-11-11  4:37   ` Jesper Harder
  0 siblings, 1 reply; 15+ messages in thread
From: Jasen @ 2003-11-11  4:27 UTC (permalink / raw)




Jasen wrote:
> Hi,
> 
> How do I enable diff on Emacs?  Doesn't diff a standard built-in 
> function in Emacs?  Wheh I try to diff two buffers, i got "no such file 
> or directory" error that doesn't sound right, what did I miss here?
> 
> Thanks,
> Jasen
> 

Sorry, forgot to tell you that I'm using Emacs 21.2.1 on Windows XP.

Thanks,
Jasen

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  4:27 ` Jasen
@ 2003-11-11  4:37   ` Jesper Harder
  2003-11-11  5:30     ` Jasen
  2003-11-11 17:45     ` kgold
  0 siblings, 2 replies; 15+ messages in thread
From: Jesper Harder @ 2003-11-11  4:37 UTC (permalink / raw)


Jasen <xx@yy.zz> writes:

>> How do I enable diff on Emacs?  Doesn't diff a standard built-in
>> function in Emacs?  Wheh I try to diff two buffers, i got "no such
>> file or directory" error that doesn't sound right, what did I miss
>> here?
>
> Sorry, forgot to tell you that I'm using Emacs 21.2.1 on Windows XP.

Ah, then you need to install the 'diff' program from somewhere.  One
possibility is to get it from the Cygwin tools.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  4:37   ` Jesper Harder
@ 2003-11-11  5:30     ` Jasen
  2003-11-11  7:46       ` Joakim Hove
                         ` (3 more replies)
  2003-11-11 17:45     ` kgold
  1 sibling, 4 replies; 15+ messages in thread
From: Jasen @ 2003-11-11  5:30 UTC (permalink / raw)


There are many diff*.el and ediff*.el files in ../lisp/ directory so 
isn't diff a standard built-in function for emacs?

Jasen

Jesper Harder wrote:

> Jasen <xx@yy.zz> writes:
> 
> 
>>>How do I enable diff on Emacs?  Doesn't diff a standard built-in
>>>function in Emacs?  Wheh I try to diff two buffers, i got "no such
>>>file or directory" error that doesn't sound right, what did I miss
>>>here?
>>
>>Sorry, forgot to tell you that I'm using Emacs 21.2.1 on Windows XP.
> 
> 
> Ah, then you need to install the 'diff' program from somewhere.  One
> possibility is to get it from the Cygwin tools.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  5:30     ` Jasen
@ 2003-11-11  7:46       ` Joakim Hove
  2003-11-11 10:04         ` Barman Brakjoller
  2003-11-11  9:50       ` Alan Mackenzie
                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Joakim Hove @ 2003-11-11  7:46 UTC (permalink / raw)



Jasen <xx@yy.zz> writes:

> There are many diff*.el and ediff*.el files in ../lisp/ directory so
> isn't diff a standard built-in function for emacs?

Snipped from diff.el:

  ;; This package helps you explore differences between files, using the
  ;; UNIX command diff(1).  The commands are `diff' and `diff-backup'.
  ;; You can specify options with `diff-switches'.

So, altough diff.el is standard emacs, it is based on the external
program diff, which is standard on Unix varieties, but obviously not
on Win XP. 


HTH - Joakim


-- 
  /--------------------------------------------------------------------\
 / Joakim Hove  / hove@bccs.no  /  (55 5) 84076       |                 \
 | Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
 | CMU                                                | 5231 Paradis    |
 \ Thormøhlensgt.55, 5020 Bergen.                     | 55 91 28 18     /
  \--------------------------------------------------------------------/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  5:30     ` Jasen
  2003-11-11  7:46       ` Joakim Hove
@ 2003-11-11  9:50       ` Alan Mackenzie
  2003-11-13 13:50       ` LEE Sau Dan
  2003-11-14 16:02       ` Juri Linkov
  3 siblings, 0 replies; 15+ messages in thread
From: Alan Mackenzie @ 2003-11-11  9:50 UTC (permalink / raw)


Jasen <xx@yy.zz> wrote on Mon, 10 Nov 2003 21:30:59 -0800:

> Jesper Harder wrote:

>> Jasen <xx@yy.zz> writes:

>>>>How do I enable diff on Emacs?  Doesn't diff a standard built-in
>>>>function in Emacs?  Wheh I try to diff two buffers, i got "no such
>>>>file or directory" error that doesn't sound right, what did I miss
>>>>here?

>>>Sorry, forgot to tell you that I'm using Emacs 21.2.1 on Windows XP.

>> Ah, then you need to install the 'diff' program from somewhere.  One
>> possibility is to get it from the Cygwin tools.

> There are many diff*.el and ediff*.el files in ../lisp/ directory so 
> isn't diff a standard built-in function for emacs?

Let me clarify Jesper's post:

All these elisp files eventually call a separate executable program
"diff.exe".  There is no such program included in Microsoft operating
systems (guess why we all prefer GNU/linux?  :-), and that is what your
error message ("no such file...") is about.

So you're going to have to install diff.exe yourself.  A good place to
download it from would be <http://www.cygwin.org/>  (If I remember the
URL correctly - if not, do a Web search for "cygwin").

> Jasen

-- 
Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  7:46       ` Joakim Hove
@ 2003-11-11 10:04         ` Barman Brakjoller
  0 siblings, 0 replies; 15+ messages in thread
From: Barman Brakjoller @ 2003-11-11 10:04 UTC (permalink / raw)


>   ;; This package helps you explore differences between files, using the
>   ;; UNIX command diff(1).  The commands are `diff' and `diff-backup'.
>   ;; You can specify options with `diff-switches'.
> 
> So, altough diff.el is standard emacs, it is based on the external
> program diff, which is standard on Unix varieties, but obviously not
> on Win XP. 

A lot of unix tools has been natively ported to Windows:

http://unxutils.sourceforge.net/

Works extremely well and no need for cygwin-dlls and stuff.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: Diff on Emacs
@ 2003-11-11 11:42 Victor Kirk
  0 siblings, 0 replies; 15+ messages in thread
From: Victor Kirk @ 2003-11-11 11:42 UTC (permalink / raw)


Alan Mackenzie said:
> So you're going to have to install diff.exe yourself.  A good place to
> download it from would be <http://www.cygwin.org/>  (If I remember the
> URL correctly - if not, do a Web search for "cygwin").

Or better still (depending on your view of cygwin), either of

http://unxutils.sourceforge.net/
http://gnuwin32.sourceforge.net/


Regards,

Vic
--
Victor Kirk
Analyst
Serco Integrated Transport
Tel: +44 (0)1287 611225
Fax: +44 (0)1287 610360
--
This message, including attachments, is intended only for the use by the
person(s) to whom it is addressed. It may contain information which is
privileged and confidential. Copying or use by anybody else is not
authorised. If you are not the intended recipient, please contact the sender
as soon as possible. The views expressed in this communication may not
necessarily be the views held by Serco Integrated Transport.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  4:37   ` Jesper Harder
  2003-11-11  5:30     ` Jasen
@ 2003-11-11 17:45     ` kgold
  2003-11-12  6:09       ` Jasen
  1 sibling, 1 reply; 15+ messages in thread
From: kgold @ 2003-11-11 17:45 UTC (permalink / raw)


Jesper Harder <harder@myrealbox.com> writes:
> Jasen <xx@yy.zz> writes:
> 
> >> How do I enable diff on Emacs?  Doesn't diff a standard built-in
> >> function in Emacs?  Wheh I try to diff two buffers, i got "no such
> >> file or directory" error that doesn't sound right, what did I miss
> >> here?
> >
> > Sorry, forgot to tell you that I'm using Emacs 21.2.1 on Windows XP.
> 
> Ah, then you need to install the 'diff' program from somewhere.  One
> possibility is to get it from the Cygwin tools.

If you don't want the entire Cygwin environment, you can get individual
Unix utilities.  For example:

	http://unxutils.sourceforge.net/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11 17:45     ` kgold
@ 2003-11-12  6:09       ` Jasen
  0 siblings, 0 replies; 15+ messages in thread
From: Jasen @ 2003-11-12  6:09 UTC (permalink / raw)


Thank you very much for everyone's help.  Now the problem resolved.

Jasen



kgold wrote:
> Jesper Harder <harder@myrealbox.com> writes:
> 
>>Jasen <xx@yy.zz> writes:
>>
>>
>>>>How do I enable diff on Emacs?  Doesn't diff a standard built-in
>>>>function in Emacs?  Wheh I try to diff two buffers, i got "no such
>>>>file or directory" error that doesn't sound right, what did I miss
>>>>here?
>>>
>>>Sorry, forgot to tell you that I'm using Emacs 21.2.1 on Windows XP.
>>
>>Ah, then you need to install the 'diff' program from somewhere.  One
>>possibility is to get it from the Cygwin tools.
> 
> 
> If you don't want the entire Cygwin environment, you can get individual
> Unix utilities.  For example:
> 
> 	http://unxutils.sourceforge.net/
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  5:30     ` Jasen
  2003-11-11  7:46       ` Joakim Hove
  2003-11-11  9:50       ` Alan Mackenzie
@ 2003-11-13 13:50       ` LEE Sau Dan
  2003-11-14 16:02       ` Juri Linkov
  3 siblings, 0 replies; 15+ messages in thread
From: LEE Sau Dan @ 2003-11-13 13:50 UTC (permalink / raw)


>>>>> "Jasen" == Jasen  <xx@yy.zz> writes:

    Jasen> There are many diff*.el and ediff*.el files in ../lisp/
    Jasen> directory so isn't diff a standard built-in function for
    Jasen> emacs?

No.  The  'diff' utility  works so  well and is  so verstaile  that it
doesn't  make  sense  to  reinvent  the  wheel  and  incorporate  this
reinvented wheel into Emacs.



-- 
Lee Sau Dan                     李守敦(Big5)                    ~{@nJX6X~}(HZ) 

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-11  5:30     ` Jasen
                         ` (2 preceding siblings ...)
  2003-11-13 13:50       ` LEE Sau Dan
@ 2003-11-14 16:02       ` Juri Linkov
  2003-11-17 17:46         ` LEE Sau Dan
  3 siblings, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2003-11-14 16:02 UTC (permalink / raw)


Jasen <xx@yy.zz> writes:
> There are many diff*.el and ediff*.el files in ../lisp/ directory so
> isn't diff a standard built-in function for emacs?

To compare two buffers you can use Emacs function `compare-windows'
from compare-w.el which now implements a simple diff algorithm.
Instead of line by line output of the 'diff' program, `compare-windows'
provides differences character by character which produces more
fine-grained results than the 'diff' program.

-- 
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-14 16:02       ` Juri Linkov
@ 2003-11-17 17:46         ` LEE Sau Dan
  2003-11-18  9:52           ` Juri Linkov
  0 siblings, 1 reply; 15+ messages in thread
From: LEE Sau Dan @ 2003-11-17 17:46 UTC (permalink / raw)


>>>>> "Juri" == Juri Linkov <juri@jurta.org> writes:

    Juri> Jasen <xx@yy.zz> writes:
    >> There are many diff*.el and ediff*.el files in ../lisp/
    >> directory so isn't diff a standard built-in function for emacs?

    Juri> To compare two buffers you can use Emacs function
    Juri> `compare-windows' from compare-w.el which now implements a
    Juri> simple diff algorithm.  Instead of line by line output of
    Juri> the 'diff' program, `compare-windows' provides differences
    Juri> character by character which produces more fine-grained
    Juri> results than the 'diff' program.

M-x  ediff-buffers gives  you a  diff output  that can  be  refined to
character-based diff.



-- 
Lee Sau Dan                     李守敦(Big5)                    ~{@nJX6X~}(HZ) 

E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-17 17:46         ` LEE Sau Dan
@ 2003-11-18  9:52           ` Juri Linkov
  2003-11-18 18:38             ` Kevin Rodgers
  0 siblings, 1 reply; 15+ messages in thread
From: Juri Linkov @ 2003-11-18  9:52 UTC (permalink / raw)


LEE Sau Dan <danlee@informatik.uni-freiburg.de> writes:
>>>>>> "Juri" == Juri Linkov <juri@jurta.org> writes:
>     Juri> Jasen <xx@yy.zz> writes:
>     >> There are many diff*.el and ediff*.el files in ../lisp/
>     >> directory so isn't diff a standard built-in function for emacs?
>     Juri> To compare two buffers you can use Emacs function
>     Juri> `compare-windows' from compare-w.el which now implements a
>     Juri> simple diff algorithm.  Instead of line by line output of
>     Juri> the 'diff' program, `compare-windows' provides differences
>     Juri> character by character which produces more fine-grained
>     Juri> results than the 'diff' program.
>
> M-x  ediff-buffers gives  you a  diff output  that can  be  refined to
> character-based diff.

This is not completely true.  Ediff refinements are word-based.
Although this is a big improvement over line-based diff output,
this is not the same thing as character-based `compare-windows'.

-- 
http://www.jurta.org/emacs/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Diff on Emacs
  2003-11-18  9:52           ` Juri Linkov
@ 2003-11-18 18:38             ` Kevin Rodgers
  0 siblings, 0 replies; 15+ messages in thread
From: Kevin Rodgers @ 2003-11-18 18:38 UTC (permalink / raw)


Juri Linkov wrote:

> LEE Sau Dan <danlee@informatik.uni-freiburg.de> writes:
>>M-x  ediff-buffers gives  you a  diff output  that can  be  refined to
>>character-based diff.
> 
> This is not completely true.  Ediff refinements are word-based.
> Although this is a big improvement over line-based diff output,
> this is not the same thing as character-based `compare-windows'.

But you can (setq ediff-forward-word-function 'forward-char).

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-11-18 18:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11  4:19 Diff on Emacs Jasen
2003-11-11  4:27 ` Jasen
2003-11-11  4:37   ` Jesper Harder
2003-11-11  5:30     ` Jasen
2003-11-11  7:46       ` Joakim Hove
2003-11-11 10:04         ` Barman Brakjoller
2003-11-11  9:50       ` Alan Mackenzie
2003-11-13 13:50       ` LEE Sau Dan
2003-11-14 16:02       ` Juri Linkov
2003-11-17 17:46         ` LEE Sau Dan
2003-11-18  9:52           ` Juri Linkov
2003-11-18 18:38             ` Kevin Rodgers
2003-11-11 17:45     ` kgold
2003-11-12  6:09       ` Jasen
  -- strict thread matches above, loose matches on Subject: below --
2003-11-11 11:42 Victor Kirk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).