Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-02

FPCDocs: diff: saving fpdoc gives huge diff

13 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

fpdocs Revision 889
svn revert --recursive .
Open FPDocEditor on ExpandFileName, type a space somewhere, click Save icon. (Space seems to be automatically removed)

This gives a 605 kb diff file; uploaded to
https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/FPCDocs_r889_StartingFPDocEditor.diff

To my untrained (and probably tired ;) eye), it seems that the file had been formatted in a certain way and fpde forces its own format on the file....

Regards,
Reinier

Reply by email

Reinier Olislagers
to Reinier Olislagers
Reinier Olislagers wrote 15 lines
fpdocs Revision 889 svn revert --recursive . Open FPDocEditor on ExpandFileName, type a space somewhere, click Save icon. (Space seems to be automatically removed) This gives a 605 kb diff file; uploaded to https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/FPCDocs_r889_StartingFPDocEditor.diff To my untrained (and probably tired ;) eye), it seems that the file had been formatted in a certain way and fpde forces its own format on the file.... Regards, Reinier

When I do
fpdocs Revision 889
svn revert --recursive .
Open LazDocEditor on ExpandFileName, click save, I get a different diff: https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/LazDE_r889_StartingFPDocEditor.diff

Regards,
Reinier

Reply by email

Unknown author
to Reinier Olislagers: fpdocs Revision 889 svn revert --recursive . Open FPDocEditor on ExpandFileName, type a…
Reinier Olislagers wrote 11 lines
fpdocs Revision 889 svn revert --recursive . Open FPDocEditor on ExpandFileName, type a space somewhere, click Save icon. (Space seems to be automatically removed) This gives a 605 kb diff file; uploaded to https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/FPCDocs_r889_StartingFPDocEditor.diff To my untrained (and probably tired ;) eye), it seems that the file had been formatted in a certain way and fpde forces its own format on the file....

Correct. I use a plain text editor to edit the documentation. It still works faster than any tool I've seen.

Michael.

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 18 lines
On Wed, 8 Feb 2012, Reinier Olislagers wrote: > fpdocs Revision 889 > svn revert --recursive . > Open FPDocEditor on ExpandFileName, type a space somewhere, click Save > icon. (Space seems to be automatically removed) > > This gives a 605 kb diff file; uploaded to > https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/FPCDocs_r889_StartingFPDocEditor.diff > > To my untrained (and probably tired ;) eye), it seems that the file had > been formatted in a certain way and fpde forces its own format on the > file.... Correct. I use a plain text editor to edit the documentation. It still works faster than any tool I've seen.

Yes, but without any indentation it is hard to read.

Mattias

Reply by email

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
On Wed, 8 Feb 2012 09:26:10 +0100 (CET) wrote: > > > On Wed, 8 Feb 2012, Reinier Olislagers wrote: > >> fpdocs Revision 889 >> svn revert --recursive . >> Open FPDocEditor on ExpandFileName, type a space somewhere, click Save >> icon. (Space seems to be automatically removed) >> >> This gives a 605 kb diff file; uploaded to >> https://bitbucket.org/reiniero/fpc_laz_patch_playground/downloads/FPCDocs_r889_StartingFPDocEditor.diff >> >> To my untrained (and probably tired ;) eye), it seems that the file had >> been formatted in a certain way and fpde forces its own format on the >> file.... > > Correct. I use a plain text editor to edit the documentation. > It still works faster than any tool I've seen. Yes, but without any indentation it is hard to read.

Allow me to disagree...
It's much easier to read than the XML which the FPDoc editors produce :-)

Michael.

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Wed, 8 Feb 2012 09:26:10 +0100 (CET) Yes, but without any indentation it is hard to…
Mattias Gaertner wrote
Yes, but without any indentation it is hard to read.

Indentation (whitespace), which is purely for human enjoyment, causes problems in some of the fpdoc output formats that don't ignore such whitespace in the final output. TXT, IPF, RTF etc are some of them affected.

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Graeme Geldenhuys
to Unknown author: Allow me to disagree... It's much easier to read than the XML which the FPDoc editors…
> > Yes, but without any indentation it is hard to read. Allow me to disagree...

+1

I edit my documentation using the source code editor of my IDE. I get syntax highlighting for free, and I make extensive use of code templates to reduce a LOT of typing (yeah XML is damn verbose).

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Reinier Olislagers
to Unknown author: Allow me to disagree... It's much easier to read than the XML which the FPDoc editors…
Show quoted text 15 lines
On Wed, 8 Feb 2012, Mattias Gaertner wrote: > On Wed, 8 Feb 2012 09:26:10 +0100 (CET) > wrote: >> On Wed, 8 Feb 2012, Reinier Olislagers wrote: >>> To my untrained (and probably tired ;) eye), it seems that the file had >>> been formatted in a certain way and fpde forces its own format on the >>> file.... >> >> Correct. I use a plain text editor to edit the documentation. >> It still works faster than any tool I've seen. > > Yes, but without any indentation it is hard to read. Allow me to disagree... It's much easier to read than the XML which the FPDoc editors produce :-)

I was going to respond with a remark about the lack of usability of FPDoc and LazDE but I'll sleep on it - I think I've not been thinking straight lately.

In any case, thanks a lot to you both for your efforts with FPC & Lazarus...

Regards,
Reinier

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: Indentation (whitespace), which is purely for human enjoyment, causes problems in some of…
Show quoted text 8 lines
On 8 February 2012 10:44, Mattias Gaertner wrote: > > Yes, but without any indentation it is hard to read. Indentation (whitespace), which is purely for human enjoyment, causes problems in some of the fpdoc output formats that don't ignore such whitespace in the final output. TXT, IPF, RTF etc are some of them affected.

fpdoc uses xml and in most xml formats anything between two tags that consists only of space characters is ignored. That's why normally the indentation is only for readability and can be changed without altering the xml. As far as I know fpdoc does the same. If not, then this is uncommon and should get a prominent hint in the docs.

If fpdoc uses the usual xml rules than the output backends must do the same.

Of course it would be nicer if the used xml readers/writers can be told to keep the spaces. Especially for version control systems. I will take a look.

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner
Mattias Gaertner wrote
fpdoc uses xml and in most xml formats anything between two tags that consists only of space characters is ignored.

Yes, there is no technical problems with indenting XML tags. But read further...

altering the xml. As far as I know fpdoc does the same.

FPDoc Editor indents help text / content too, thus adding whitespace into the help itself. This white spaces might be ignore by fpdoc's Latex and HTML output (eg: a web browser viewing the generated HTML), but such whitespace is not ignored by IPF, TXT, RTF etc output writers and there associated viewers.

I can't remember if I filed any bug report on this, but I do know I raised the issue with Michael at one point. That's when he told me the problem lies with FPDoc Editor, and not fpdoc. Since then I edit the XML via my source code editor.

I'll search my email history to find you that example.

Regards,   - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Mattias Gaertner
to Mattias Gaertner: On Wed, 8 Feb 2012 11:43:19 +0200 fpdoc uses xml and in most xml formats anything between…
[...] Of course it would be nicer if the used xml readers/writers can be told to keep the spaces. Especially for version control systems. I will take a look.

The xml reader/writer used by the fpdoc editor now preserve the attribute order and have options to preserve white spacing. This means the fpdoc editor now only changes the edited element and keeps the rest.

There are still some whitespace issues about the edited element.

Mattias

Reply by email

waldo kitty
to Mattias Gaertner
Mattias Gaertner wrote 12 lines
On Wed, 8 Feb 2012 16:03:05 +0100 Mattias Gaertner wrote: > [...] > Of course it would be nicer if the used xml readers/writers can be told > to keep the spaces. Especially for version control systems. > I will take a look. The xml reader/writer used by the fpdoc editor now preserve the attribute order and have options to preserve white spacing. This means the fpdoc editor now only changes the edited element and keeps the rest.

excellent! :)

There are still some whitespace issues about the edited element.

there's always something to do, eh? ;)

Reply by email

Reinier Olislagers
to Mattias Gaertner: On Wed, 8 Feb 2012 16:03:05 +0100 The xml reader/writer used by the fpdoc editor now…
Mattias Gaertner wrote 10 lines
On Wed, 8 Feb 2012 16:03:05 +0100 Mattias Gaertner wrote: > [...] > Of course it would be nicer if the used xml readers/writers can be told > to keep the spaces. Especially for version control systems. > I will take a look. The xml reader/writer used by the fpdoc editor now preserve the attribute order and have options to preserve white spacing. This means the fpdoc editor now only changes the edited element and keeps the rest.

Great, thanks a lot, Mattias!

There are still some whitespace issues about the edited element.

What waldo said ;)

Thanks,
Reinier

Reply by email