[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help: adapting your library to new M-x compile
From: |
Daniel Pfeiffer |
Subject: |
Re: help: adapting your library to new M-x compile |
Date: |
Mon, 5 Jan 2004 10:40:59 +0100 |
Saluton,
Stefan Monnier <address@hidden> skribis:
> > - diff-mode.el:
>
> > A cleanup is included in my compile.el. The question is why this
> > needs compilation-minor-mode at all, only to override its commands?
>
> So that C-x ` can be used, but I think it's turned off now.
For the cases where guessing the changed line number fails?
> > Even though the concepts don't quite fit, it might be interesting to
> > derive diff-mode from compilation-mode and let that do the parsing.
>
> No, because it's not line-number based but text-content based: diff-mode
> assumes that the file might have changed since the diff was generated and
> only uses the line number as a hint.
Yes, but it could use the text-properties compile sets, for its hint. It would
only need different goto commands. Mine could be tweaked such that yours could
hook in.
> > - diff.el:
>
> > This little library messes around in internal variables extensively.
> > IMHO it should be merged into diff-mode, as it offers little extra.
>
> > I would be glad if they were merged; it is ugly to have both.
> > Would you like to do it?
>
> I personally can't do it right now. If we're willing to change the
> behavior of M-x diff, (to match the one of diff-mode), then it's an
> easy change. Otherwise, it'll need improvements in diff-mode.
I guess the reason it's there is that your parser doesn't work on the fly.
That's where my idea to base this on compile, i.e. font-lock, comes from. Then
it'll work both on a diff file and on an ongoing command. The faces could be
adapted easily to be like old diff-mode. As happened in compile this would
mean eliminating a good part of what's there in diff-mode as well as almost all
of diff.
My only problem is what to do with the primitive diff options that don't give
file names? I could just set them to "*unknown file*" which is very unlikely
to exist or "" with special handling, and then the user will be prompted. It
could also modify the buffer once a file name is known. Then it would become a
half -u, half primitive diff.
coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn
Daniel Pfeiffer
--
lerne / learn / apprends / läramå Esperanto:
http://lernu.net/
- Re: help: adapting your library to new M-x compile, Stefan Monnier, 2004/01/04
- Re: help: adapting your library to new M-x compile,
Daniel Pfeiffer <=
- Re: help: adapting your library to new M-x compile, Miles Bader, 2004/01/05
- Re: help: adapting your library to new M-x compile, Stefan Monnier, 2004/01/05
- diff adapted for new M-x compile, Daniel Pfeiffer, 2004/01/11
- Re: diff adapted for new M-x compile, Miles Bader, 2004/01/12
- Re: diff adapted for new M-x compile, Daniel Pfeiffer, 2004/01/12
- Re: diff adapted for new M-x compile, Miles Bader, 2004/01/12
- Re: diff adapted for new M-x compile, Daniel Pfeiffer, 2004/01/13
- Re: diff adapted for new M-x compile, Miles Bader, 2004/01/13