Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #256576 > unrolled thread

Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Started by"Susmita/Rajib" <bkpsusmitaa@gmail.com>
First post2023-03-31 18:40 +0200
Last post2023-04-01 14:20 +0200
Articles 20 on this page of 50 — 12 participants

Back to article view | Back to linux.debian.user


Contents

  Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-03-31 18:40 +0200
    Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible? rhkramer@gmail.com - 2023-03-31 21:30 +0200
    Re: Which Diff tool could I use for visually comparing two text  files  where Word Wrap is possible? local10 <local10@tutanota.com> - 2023-03-31 23:00 +0200
    Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-01 00:30 +0200
      Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-01 02:20 +0200
        Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-01 03:50 +0200
          Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? Greg Wooledge <greg@wooledge.org> - 2023-04-01 04:10 +0200
    Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-01 06:00 +0200
      Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-01 07:40 +0200
        Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-01 09:00 +0200
          Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? David <curmudgeon@telaman.net.au> - 2023-04-01 09:10 +0200
          Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? <tomas@tuxteam.de> - 2023-04-01 10:20 +0200
          Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-01 11:10 +0200
            Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-01 11:20 +0200
              Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-02 18:00 +0200
                Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-02 18:20 +0200
                  Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-03 10:00 +0200
                    Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-04 13:10 +0200
                      Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson@freevolt.org - 2023-04-04 13:20 +0200
                        Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson@freevolt.org - 2023-04-04 13:50 +0200
                    Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-04 19:40 +0200
                      Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-05 09:40 +0200
                        Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-05 18:00 +0200
                          Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-05 18:10 +0200
                          Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-05 18:30 +0200
                          paragraph conversion (was Re: Which Diff tool could I use for visually  comparing two text files where Word Wrap is possible?) davidson <davidson@freevolt.org> - 2023-04-08 07:50 +0200
                        Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-06 08:40 +0200
                          Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-06 20:30 +0200
                            Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson@freevolt.org - 2023-04-06 20:40 +0200
                          Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-07 06:40 +0200
                            Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-08 15:30 +0200
                              Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-08 16:10 +0200
                            Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-08 20:10 +0200
                              Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? "Andrew M.A. Cater" <amacater@einval.com> - 2023-04-08 20:30 +0200
                              Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-09 04:50 +0200
                                Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-09 12:10 +0200
                                  Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? Greg Wooledge <greg@wooledge.org> - 2023-04-09 14:50 +0200
                                  [Solved] Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? "Susmita/Rajib" <bkpsusmitaa@gmail.com> - 2023-04-09 20:10 +0200
                                Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-09 12:20 +0200
                Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-03 03:30 +0200
            Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-01 13:00 +0200
              Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-01 13:10 +0200
      Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? <tomas@tuxteam.de> - 2023-04-01 08:00 +0200
      Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? davidson <davidson@freevolt.org> - 2023-04-01 09:40 +0200
      Re: Which Diff tool could I use for visually comparing two text files  where Word Wrap is possible? Max Nikulin <manikulin@gmail.com> - 2023-04-01 13:10 +0200
      Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible? rhkramer@gmail.com - 2023-04-01 15:10 +0200
        Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible? rhkramer@gmail.com - 2023-04-01 15:30 +0200
        Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? debian-user@howorth.org.uk - 2023-04-01 16:30 +0200
          Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible? rhkramer@gmail.com - 2023-04-01 19:10 +0200
    Re: Which Diff tool could I use for visually comparing two text  files where Word Wrap is possible? Nate Bargmann <n0nb@n0nb.us> - 2023-04-01 14:20 +0200

Page 1 of 3  [1] 2 3  Next page →


#256576 — Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-03-31 18:40 +0200
SubjectWhich Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GfpXb-gpYu-3@gated-at.bofh.it>
My dear illustrious leaders and senior debian-user list-members,

I tried diffuse, but it appears to me that it suffers from a
limitation so far as my need is concerned. It compares files by lines
and line numbers, so I can't use word-wrap to have the differences
between two files within the program window without venturing out to
the right within the two file windows.

Is there a way to Word Wrap? Am I making a mistake here? Which program
would be the best suited for my work for comparing text files?

There is a package called diffoscope but it has to install a long list
of dependent packages in my present Debian system installed from
"Official Debian GNU/Linux Live 11.6.0 lxde 2022-12-17T11:46"

Eagerly awaiting your advice.

Best wishes,
Rajib B
Etc.

[toc] | [next] | [standalone]


#256579 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromrhkramer@gmail.com
Date2023-03-31 21:30 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GfsBI-grF8-5@gated-at.bofh.it>
In reply to#256576
On Friday, March 31, 2023 12:13:33 PM Susmita/Rajib wrote:
> There is a package called diffoscope but it has to install a long list
> of dependent packages in my present Debian system installed from
> "Official Debian GNU/Linux Live 11.6.0 lxde 2022-12-17T11:46"

It's been quite a while since I actually used diff, but I always preferred a 
word diff (to a line based diff).  Two options are wdiff and wdiff2 (aka mdiff -w)

-- 
rhk 

(sig revised 20230312 -- modified first paragraph, some other irrelevant 
wordsmithing)
                
| No entity has permission to use this email to train an AI. 

If you reply: snip, snip, and snip again; leave attributions; avoid HTML; 
avoid top posting; and keep it "on list".  (Oxford comma (and semi-colon) 
included at no charge.)  If you revise the topic, change the Subject: line.  
If you change the topic, start a new thread.

Writing is often meant for others to read and understand (legal documents 
excepted?) -- make it easier for your reader by various means, including 
liberal use of whitespace (short paragraphs, separated by whitespace / blank 
lines) and minimal use of (obscure?) jargon, abbreviations, acronyms, and 
references.

If someone has already responded to a question, decide whether any response 
you add will be helpful or not ...

A picture is worth a thousand words.  A video (or "audio"): not so much -- 
divide by 10 for each minute of video (or audio) or create a transcript and 
edit it to 10% of the original.

A speaker who uses ahhs, ums, or such may have a real physical or mental 
disability, or may be showing disrespect for his listeners by not properly 
preparing in advance and thinking before speaking. (That speaker might have 
been "trained" to do this by being interrupted often if he pauses.)  (Remember 
Cicero who did not have enough time to write a short missive.)

A radio (or TV) station which broadcasts speakers with high pitched voices (or 
very low pitched / gravelly voices) (which older people might not be able to 
hear properly) disrespects its listeners.   Likewise if it broadcasts 
extraneous or disturbing sounds (like gunfire or crying), or broadcasts 
speakers using their native language (with or without an overdubbed 
translation).

A person who writes a sig this long probably has issues and disrespects (and 
offends) a large number of readers. ;-)
'

[toc] | [prev] | [next] | [standalone]


#256580 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromlocal10 <local10@tutanota.com>
Date2023-03-31 23:00 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<Gfu0N-gsoo-1@gated-at.bofh.it>
In reply to#256576
Mar 31, 2023, 16:30 by bkpsusmitaa@gmail.com:

> I tried diffuse, but it appears to me that it suffers from a
> limitation so far as my need is concerned. It compares files by lines
> and line numbers, so I can't use word-wrap to have the differences
> between two files within the program window without venturing out to
> the right within the two file windows.
>
> Is there a way to Word Wrap? Am I making a mistake here? Which program
> would be the best suited for my work for comparing text files?
>


Try Kompare. I tried several diff tools but I liked Kompare the most: clean, intuitive interface, easy to use, lots of features.

Regards,

[toc] | [prev] | [next] | [standalone]


#256582 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromdavidson <davidson@freevolt.org>
Date2023-04-01 00:30 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GfvpU-gtnm-7@gated-at.bofh.it>
In reply to#256576
On Fri, 31 Mar 2023 Susmita/Rajib wrote:
> My dear illustrious leaders and senior debian-user list-members,
>
> I tried diffuse, but it appears to me that it suffers from a
> limitation so far as my need is concerned. It compares files by lines
> and line numbers, so I can't use word-wrap to have the differences
> between two files within the program window without venturing out to
> the right within the two file windows.

  $ diff <(fmt file1) <(fmt file2)

fmt has a -w option to adjust the max line width. The default is 75.

> Is there a way to Word Wrap? Am I making a mistake here? Which program
> would be the best suited for my work for comparing text files?

It depends on your precise requirements, which we cannot know until
you tell us what they are. (Sometimes one does not know oneself. This
is also okay.)

I don't believe you have specified any of your requirements that the
solution above does not provide.

-- 
Hackers are free people. They are like artists. If they are in a good
mood, they get up in the morning and begin painting their pictures.
-- Vladimir Putin

[toc] | [prev] | [next] | [standalone]


#256583 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromdavidson <davidson@freevolt.org>
Date2023-04-01 02:20 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<Gfx8l-gut3-7@gated-at.bofh.it>
In reply to#256582
On Fri, 31 Mar 2023 davidson wrote:

Some elaboration on my first take.

> On Fri, 31 Mar 2023 Susmita/Rajib wrote:
>> My dear illustrious leaders and senior debian-user list-members,

I neglected to notice the proper subset of readers on whom you
intended to inflict your request.

>> I tried diffuse,

I see that diffuse has quite a number of features:

  diffuse - graphical tool for merging and comparing text files
   Diffuse is a graphical tool for merging and comparing text
   files. Diffuse is able to compare an arbitrary number of files
   side-by-side and gives users the ability to manually adjust
   line-matching and directly edit files. Diffuse can also retrieve
   revisions of files from bazaar, CVS, darcs, git, mercurial,
   monotone, Subversion and GNU Revision Control System (RCS)
   repositories for comparison and merging.

Which of these features do you *require*?

>> but it appears to me that it suffers from a limitation so far as my
>> need is concerned. It compares files by lines and line numbers, so
>> I can't use word-wrap

By "word-wrap", do you mean you need to break *lines* into smaller
lines (so that your screen can accomodate their content)?

Or do you mean instead that you are dealing with words so long that
some words won't fit within a single line on your screen until you
turn them into smaller words by inserting newlines.

>> to have the differences between two files within the program window
>> without venturing out to the right within the two file windows.

I see (from its package description above) that diffuse can display
files' content side-by-side. Is this a requirement of yours?

Because if it is not, you can double your effective screen width by
simply discarding the side-by-side feature.

> $ diff <(fmt file1) <(fmt file2)
>
> fmt has a -w option to adjust the max line width. The default is 75.

If I may say so myself, this is almost certainly not a helpful
solution. How embarrassing.

Start here instead:

  $ diff file1 file2

It displays the differences, and your terminal will wrap lines (and
break words) to fit the window for you.

Does it do what you want?

>> Is there a way to Word Wrap? Am I making a mistake here? Which program
>> would be the best suited for my work for comparing text files?
>
> It depends on your precise requirements, which we cannot know until
> you tell us what they are. (Sometimes one does not know oneself. This
> is also okay.)
>
> I don't believe you have specified any of your requirements that the
> solution above does not provide.

-- 
Hackers are free people. They are like artists. If they are in a good
mood, they get up in the morning and begin painting their pictures.
-- Vladimir Putin

[toc] | [prev] | [next] | [standalone]


#256584 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromdavidson <davidson@freevolt.org>
Date2023-04-01 03:50 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<Gfyxs-gvcS-1@gated-at.bofh.it>
In reply to#256583
On Sat, 1 Apr 2023 davidson wrote:
> Start here instead:
>
> $ diff file1 file2
>
> It displays the differences, and your terminal will wrap lines (and
> break words) to fit the window for you.
>
> Does it do what you want?

A concise explanation of diff's default output format (which is a
little cryptic but quite simple) can be viewed in the info browser
with

  $ info -n "Detailed Normal" diffutils # type 'q' to quit

or written to a text file with

  $ info -o diff_format_explained.txt -n "Detailed Normal" diffutils

-- 
We've been looking for the enemy for some time now. We've finally found him.
We're surrounded. That simplifies things.  -- Chesty Puller

[toc] | [prev] | [next] | [standalone]


#256585 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

FromGreg Wooledge <greg@wooledge.org>
Date2023-04-01 04:10 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GfyQN-gvyS-1@gated-at.bofh.it>
In reply to#256584
On Sat, Apr 01, 2023 at 01:41:22AM +0000, davidson wrote:
> On Sat, 1 Apr 2023 davidson wrote:
> > Start here instead:
> > 
> > $ diff file1 file2
> > 
> > It displays the differences, and your terminal will wrap lines (and
> > break words) to fit the window for you.
> > 
> > Does it do what you want?
> 
> A concise explanation of diff's default output format (which is a
> little cryptic but quite simple) can be viewed in the info browser
> with
> 
>  $ info -n "Detailed Normal" diffutils # type 'q' to quit
> 
> or written to a text file with
> 
>  $ info -o diff_format_explained.txt -n "Detailed Normal" diffutils

Most people prefer diff -u format.  Here's a quick sample of the three
formats:

unicorn:~$ diff <(seq 1 3) <(printf '1\n4\n3\n')
2c2
< 2
---
> 4


unicorn:~$ diff -c <(seq 1 3) <(printf '1\n4\n3\n')
*** /dev/fd/63	Fri Mar 31 21:53:34 2023
--- /dev/fd/62	Fri Mar 31 21:53:34 2023
***************
*** 1,3 ****
  1
! 2
  3
--- 1,3 ----
  1
! 4
  3


unicorn:~$ diff -u <(seq 1 3) <(printf '1\n4\n3\n')
--- /dev/fd/63	2023-03-31 21:53:37.023781025 -0400
+++ /dev/fd/62	2023-03-31 21:53:37.023781025 -0400
@@ -1,3 +1,3 @@
 1
-2
+4
 3


The first one (default) gives no context lines.  It simply says "replace
line 2, which is "2", with "4".  This works fine for some inputs, but it
doesn't allow for applying a code patch to a function that has moved a
few lines down in the file since the patch was written.

So, the second format, "context", was introduced.  It shows the lines
before and after the change.  This allows the patch applier to look around
in the file and find the appropriate place to apply the patch, if the
content has moved around.

The third format, "unified", is just a more compact version of "context".
It shows the lines before and after the change, but only once instead
of twice.

In some ways, the "context" format can be easier to read, because you
see the actual new content exactly as it should appear, without the
old lines interwoven.

On the other hand, the "unified" format shows you the before and after
lines right next to each other.  In some cases, that can be easier to
use.  Especially once you get used to it.

[toc] | [prev] | [next] | [standalone]


#256586

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-01 06:00 +0200
Message-ID<GfAzf-gwus-3@gated-at.bofh.it>
In reply to#256576
My illustrious team leaders and senior debian-user list-members,

Thank you for replying to my email and for your help.

The situation is complex. The alteration can't be straightaway applied
by plain replacing.
I will try to illustrate the situation with a clear example:

Suppose I wrote a book book1.txt. I then send it to an editor who
corrects the initial mistakes, altering some lines while doing so,
renaming to another file book2.txt.

When I receive the editor's correction, I don't accept them
straightaway, but based on his suggestions I change my book1 and edit
and alter it further. Diff helps in comparing the two draft editions.

This one cycle could again be repeated.

Dear Mr. l0f4r0:
that pointer, https://unix.stackexchange.com/questions/537418/how-to-make-text-wrap-with-diff-y;
indeed helped and led me to icdiff which is wonderful. Unfortunately,
for two very large text files, the terminal truncates the beginning
and just highlights the end sections of the files. Icdiff didn't work
with " | less". But it sure worked with " | more".

Similarly, with diff -y <(fold -s -w72 file1) <(fold -s -w72 file2) -W
200, the beginning is truncated and only the end is displayed. And
yes, it works with " | more". But it is bland. Without colours
differences can't be spotted so easily.

Of course, I could use icdiff part by part also. Though tedious, might
help. But presently, I am thinking of sticking to icdiff with " |
more".

Dear Mr. Kramer:
Thank you. I fondly remember my interactions with you on several
occasions. I checked wdiff and also dwdiff. But they are very bland
and very complicated to handle as dwdiff uses a lot of braces with +
and - signs, but doesn't present the two files side by side for
intuitive/visual comparison.
And regarding your "... A person who writes a sig this long probably
has issues and disrespects (and offends) a large number of readers.
;-) ...", yes it is generally true. For me, the post below your
solution did confuse me, but I am generally adept at skimming and
skipping paras.

Dear Mr. DdB:
I fondly remember my interaction with you some time during May 2022.
Perhaps you have overlooked that I needed text wrapping for diff. I
have checked the synaptic screenshot for meld, have installed and
tried it. But it too suffers from the lack of text wrapping function.
For huge text files it is thus problematic. Is a text wrap option
available? Am I missing something?

Dear Mr. local10:
I can't try kompare though meld appears to be monocrome. Since my
Desktop Environment is lxde, installing kompare, accompanied by a huge
download of kde packages, is impossible unless I use knoppix, which I
do.

Dear Mr. Davidson:
I have already mentioned about diff above. So won't repeat it. But
thank you very much for the line.

Bottom line is: icdiff is wonderful, but from a terminal it becomes
limited. Can;t a good programmer have icdiff ported to GUI? It would
be the best solution available for me, and for people like me.

The above limitations directs me to suggest to Debian Teams across all
Mailing Lists and the Board to have GPT4 added to extend
functionalities of GNU-Linux systems, for example, in this present
case, have icdiff extended to a GUI, and then have gifted and humane
programmers work in tandem with GPT4 to plug in the insecurities
accompanying a new program.

Thank you for your suggestions. Shall be expecting better solutions
with my having explained my needs clearer this time.

Best wishes,
Rajib B
Etc.

[toc] | [prev] | [next] | [standalone]


#256588

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-01 07:40 +0200
Message-ID<GfC81-gxDI-1@gated-at.bofh.it>
In reply to#256586
My illustrious team leaders and senior debian-user list-members,

Thank you for replying to my email and for your help.

I had posted another, a second message on the issue and clarified my
requirements. But between this time, a couple of emails were received
from Mr. Davidson, and also from Mr. Stefan Monnier, Mr. Van Snyder
and Mr. Greg Wooledge.

I thank Mr. Davidson and Mr. Greg Wooledge for their advice. I fondly
remember Mr. Wooledge and his support earlier too.

Since my earlier 2nd post on this very subject at Sat, 1 Apr 2023
09:07:30 +0530 with message-Id:
CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com
makes my need clear, I would like to avoid diff. My reason has been
posted in that earlier 2nd post.

Dear Mr. Stefan Monnier and Mr. Van Snyder:
Unfortunately, I once tried to learn emacs but it is complex. So it is
difficult for me to use diff from within emacs. I am sorry that I am
not a worthy student.

I would refer to my earlier post but like to repeat the last
paragraphs of that post:
[quote]
Bottom line is: icdiff is wonderful, but from a terminal it becomes
limited. Can;t a good programmer have icdiff ported to GUI? It would
be the best solution available for me, and for people like me.

The above limitations directs me to suggest to Debian Teams across all
Mailing Lists and the Board to have GPT4 added to extend
functionalities of GNU-Linux systems, for example, in this present
case, have icdiff extended to a GUI, and then have gifted and humane
programmers work in tandem with GPT4 to plug in the insecurities
accompanying a new program.

Thank you for your suggestions. Shall be expecting better solutions
with my having explained my needs clearer this time.
[/quote]

Best wishes,
Rajib B
Etc.

[toc] | [prev] | [next] | [standalone]


#256591

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-01 09:00 +0200
Message-ID<GfDnr-gykH-1@gated-at.bofh.it>
In reply to#256588
    To: debian-user@lists.debian.org
    Subject: Re: Which Diff tool could I use for visually comparing
two text files where Word Wrap is possible?
    From: <tom***@tux***.de***>
    Date: Sat, 1 Apr 2023 07:56:24 +0200
    Message-id: <[🔎] ZCfHiBIPCtx8okpG@tuxteam.de>
    In-reply-to: <[🔎]
CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
    References:
<CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
<CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
<[🔎] CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>

On Sat, Apr 01, 2023 at 09:07:30AM +0530, Susmita/Rajib wrote:

[...]

> The above limitations directs me to suggest to Debian Teams across all
> Mailing Lists and the Board to have GPT4 added to extend
> functionalities of GNU-Linux systems [...]

GPT is not free software, so it can't be included in Debian.

Besides, it's being used in very free-software unfriendly ways, but this
is a whole different story.

Cheers
-- 
t


[     ...     ]

Strange, isn't it, Mr. Tomas? They named the project as OpenAI. Would
like to know the aspects on "... Besides, it's being used in very
free-software unfriendly ways, but this
is a whole different story."
You could write to me privately, as this forum shouldn't be used for
our discussions on the issue.
Best wishes,
Rajib

[toc] | [prev] | [next] | [standalone]


#256592 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

FromDavid <curmudgeon@telaman.net.au>
Date2023-04-01 09:10 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GfDx7-gyDw-1@gated-at.bofh.it>
In reply to#256591
On Sat, 2023-04-01 at 12:10 +0530, Susmita/Rajib wrote:
>     To: debian-user@lists.debian.org
>     Subject: Re: Which Diff tool could I use for visually comparing
> two text files where Word Wrap is possible?
>     From: <tom***@tux***.de***>
>     Date: Sat, 1 Apr 2023 07:56:24 +0200
>     Message-id: <[🔎] ZCfHiBIPCtx8okpG@tuxteam.de>
>     In-reply-to: <[🔎]
> CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
>     References:
> <CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
> <CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
> <[🔎] 
> CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
> 
> On Sat, Apr 01, 2023 at 09:07:30AM +0530, Susmita/Rajib wrote:
> 
> [...]
> 
> > The above limitations directs me to suggest to Debian Teams across
> > all
> > Mailing Lists and the Board to have GPT4 added to extend
> > functionalities of GNU-Linux systems [...]
> 
> GPT is not free software, so it can't be included in Debian.

Russia is currently developing an equivalent, so it may pay to keep an
eye on that. They have already developed an equivalent to ChatGPT.
Cheers!

[toc] | [prev] | [next] | [standalone]


#256595 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

From<tomas@tuxteam.de>
Date2023-04-01 10:20 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GfECR-gzhc-1@gated-at.bofh.it>
In reply to#256591

[Multipart message — attachments visible in raw view] — view raw

On Sat, Apr 01, 2023 at 12:10:27PM +0530, Susmita/Rajib wrote:
>     To: debian-user@lists.debian.org
>     Subject: Re: Which Diff tool could I use for visually comparing
> two text files where Word Wrap is possible?
>     From: <tom***@tux***.de***>
>     Date: Sat, 1 Apr 2023 07:56:24 +0200
>     Message-id: <[🔎] ZCfHiBIPCtx8okpG@tuxteam.de>
>     In-reply-to: <[🔎]
> CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
>     References:
> <CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
> <CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
> <[🔎] CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
> 
> On Sat, Apr 01, 2023 at 09:07:30AM +0530, Susmita/Rajib wrote:
> 
> [...]
> 
> > The above limitations directs me to suggest to Debian Teams across all
> > Mailing Lists and the Board to have GPT4 added to extend
> > functionalities of GNU-Linux systems [...]
> 
> GPT is not free software, so it can't be included in Debian.
> 
> Besides, it's being used in very free-software unfriendly ways, but this
> is a whole different story.
> 
> Cheers
> -- 
> t
> 
> 
> [     ...     ]
> 
> Strange, isn't it, Mr. Tomas? They named the project as OpenAI.

Perhaps (quite probably) the original authors dreamt of some
openness. Then, big Microsoft money flowed in.

Those things happen time and again. Remember when Google had
"do no evil" as motto?

> Would
> like to know the aspects on "... Besides, it's being used in very
> free-software unfriendly ways, but this
> is a whole different story."

I'm not going into big depths here. One use of OpenAI's software,
though, has been discussed in this list: Github Copilot (a Microsoft
product). It uses all the software published under Github (even
that published under copyleft licenses) without even helping the
users to follow the license the software is coming from.

Microsoft says this is no problem. On the other hand, they don't
train Copilot with their own proprietary software (they seem to
see a problem there).

I'm convinced that they are trying to dilute the significance
of copyleft licenses. I don't think that's their main thrust,
but they see that as a collateral benefit.

This is, in my eyes, hostile to free software.

Cheers
-- 
t

[toc] | [prev] | [next] | [standalone]


#256596

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-01 11:10 +0200
Message-ID<GfFpf-gzOL-17@gated-at.bofh.it>
In reply to#256591
    To: debian-user@lists.debian.org
    Subject: Re: Which Diff tool could I use for visually comparing
two text files where Word Wrap is possible?
    From: davidson <da***n@fre***lt.or***>
    Date: Sat, 1 Apr 2023 07:34:39 +0000 (UTC)
    Message-id: <[🔎] alpine.DEB.2.21.2304010734350.15475@azone.org>
    In-reply-to: <[🔎]
CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
    References:
<CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
<CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
<[🔎] CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>

Dear Mr. Davidson, thank you for your reply. My lines are interspersed
in between your lines to maintain their relevance.

[   ...   ]
"Didn't work." A remarkably inarticulate non-description, and
uncharacteristic of our honored declaimant.
[   ...   ]
Wow! What exposition! But the inspiration to address my senior
user-group members thus is felt from within, not merely rhetorical.
You all, who guide me so well with your insights and experiences, are
truly my leaders and seniors in the present field. And indeed, I shall
forever remain a novice in these matters.


[   ...   ]
Try

 icdiff file1 file2 | less -R

and report back.
[   ...   ]

Yes, it worked. Worked better than the code-line with " | more".
Mouse-scrolling working both ways. So really thank you.

My need should have been fulfilled so far as the purpose of the
present thread is concerned. But I have another immediately related
query:  how could I capture the output from the code-line with all its
colours to a file on the HDD? Then repeated invoking the line won't be
required.  "> file.txt" drops all colours.

Thank you, my leaders and seniors on the debian-user group for the
support that you have provided.

Best wishes,
Rajib B
Etc.

[toc] | [prev] | [next] | [standalone]


#256597

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-01 11:20 +0200
Message-ID<GfFyV-gzSs-1@gated-at.bofh.it>
In reply to#256596
    To: debian-user@lists.debian.org
    Subject: Re: Which Diff tool could I use for visually comparing
two text files where Word Wrap is possible?
    From: <to***s@tu***m.de***>
    Date: Sat, 1 Apr 2023 10:14:44 +0200
    Message-id: <ZCfn9A2/d+l51uDO@tuxteam.de>
    In-reply-to: <[🔎]
CAEG4cZUXaUAxG=0zLWpXuY44X9RTf7TNEwvGfuDDMZQ7iLEfzA@mail.gmail.com>
    References:
<CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
<CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
<[🔎] CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
<[🔎] CAEG4cZVrPz=aZN6C0V0J3EPYMrH=UGkWcbVCc8xY=31FF_PqQA@mail.gmail.com>
<[🔎] CAEG4cZUXaUAxG=0zLWpXuY44X9RTf7TNEwvGfuDDMZQ7iLEfzA@mail.gmail.com>

On Sat, Apr 01, 2023 at 12:10:27PM +0530, Susmita/Rajib wrote:
[   ...   ]
> Strange, isn't it, Mr. Tomas? They named the project as OpenAI.

Perhaps (quite probably) the original authors dreamt of some
openness. Then, big Microsoft money flowed in.

Those things happen time and again. Remember when Google had
"do no evil" as motto?

Yes, I have a problem with the Android ecosystem, closed source and
the restrictions on the synthetic speech binary. I remember that I had
talked about the libttspico0 package, the svox binary and the
pico2wave program generating good quality TTS.

I have an intuitive belief that if the phonemes are broken down
further into sub-phonemes like it is done in differential calculus,
into tiny 𝚫s, then the natural voices could well be possible even in
Debian across the board. But I am not a programmer. So I can't
translate my intuition into a real binary.

[   ...   ]
> Would
> like to know the aspects on "... Besides, it's being used in very
> free-software unfriendly ways, but this
> is a whole different story."

I'm not going into big depths here. One use of OpenAI's software,
though, has been discussed in this list: Github Copilot (a Microsoft
product). It uses all the software published under Github (even
that published under copyleft licenses) without even helping the
users to follow the license the software is coming from.

Microsoft says this is no problem. On the other hand, they don't
train Copilot with their own proprietary software (they seem to
see a problem there).

I'm convinced that they are trying to dilute the significance
of copyleft licenses. I don't think that's their main thrust,
but they see that as a collateral benefit.

This is, in my eyes, hostile to free software.

Cheers
-- 
t

[   ...   ]

Thank you, Mr. Tomas. You have given me a direction to find out more.
Yes, Doze's "proprietary"-ty is troublesome. One day I might repackage
free air as cleaned, pure air and charge you for it.

Thank you and best wishes,
Rajib
Etc.

[toc] | [prev] | [next] | [standalone]


#256615

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-02 18:00 +0200
Message-ID<Gg8hz-gRUc-1@gated-at.bofh.it>
In reply to#256597
    To: debian-user@lists.debian.org
    Subject: Re: Which Diff tool could I use for visually comparing
two text files where Word Wrap is possible?
    From: davidson <davidson@freevolt.org>
    Date: Sat, 1 Apr 2023 10:54:06 +0000 (UTC)
    Message-id: <[🔎] alpine.DEB.2.21.2304011044320.15475@azone.org>
    In-reply-to: <[🔎]
CAEG4cZVcE+49-MKWGW7Le3L1T6ztSak7JD3KchkEVFGH30366w@mail.gmail.com>
    References:
<CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
<CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
<[🔎] CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
<[🔎] CAEG4cZVrPz=aZN6C0V0J3EPYMrH=UGkWcbVCc8xY=31FF_PqQA@mail.gmail.com>
<[🔎] CAEG4cZUXaUAxG=0zLWpXuY44X9RTf7TNEwvGfuDDMZQ7iLEfzA@mail.gmail.com>
<[🔎] CAEG4cZVcE+49-MKWGW7Le3L1T6ztSak7JD3KchkEVFGH30366w@mail.gmail.com>

On Sat, 1 Apr 2023 Susmita/Rajib wrote:

[   ...   ]
You do not tell us what application you are using to view the file
contents. If it is not a terminal application, it might well fail to
independently implement for your delightful spectation the ECMA-48 set
graphics control sequences.
[   ...   ]

Sorry for replying late.
It is the same lxterminal available with the live ISO as narrated earlier.
Was it not apparent from my email?

Best wishes,
Rajib
Etc.

[toc] | [prev] | [next] | [standalone]


#256616

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-02 18:20 +0200
Message-ID<Gg8AV-gSgi-1@gated-at.bofh.it>
In reply to#256615
    To: debian-user@lists.debian.org
    Subject: Re: Which Diff tool could I use for visually comparing
two text files where Word Wrap is possible?
    From: rhkramer@gmail.com
    Date: Sat, 1 Apr 2023 09:07:47 -0400
    Message-id: <[🔎] 202304010907.47888.rhkramer@gmail.com>
    In-reply-to: <[🔎]
CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
    References:
<CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
<CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
<[🔎] CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>


On Friday, March 31, 2023 11:37:30 PM Susmita/Rajib wrote:
[   ...    ]
Thanks for the reply!

I don't remember the name of the utility that I used to use in the
Microsoft world, but it was very nice in showing changes within lines
or paragraphs, using underline and crossout (wrong name) ...
...
Aside: I'm not sure I can show crossout in an email, so will precede
and end it with "-".
...
The utility also showed a vertical line at the beginning of either a
line or paragraph that had changed.
...
I don't remember the name of the utility that I used to use in the
Microsoft world, but it was very nice in showing changes within lines
or paragraphs, using underline and crossout (wrong name).
[   ...   ]

In your later reply you were helped by debian-user@howorth.org.uk to
have recalled the MS application called MS-Word. I had used it too
till 2008. It was called "show/hide Corrections" that had to be
activated from the Options menu. It would strike through (not
underline) changed lines/words and mark the corrected parts in red.

Best wishes,
Rajib
Etc.

[toc] | [prev] | [next] | [standalone]


#256678

From"Susmita/Rajib" <bkpsusmitaa@gmail.com>
Date2023-04-03 10:00 +0200
Message-ID<GgngB-h1qT-1@gated-at.bofh.it>
In reply to#256616
    To: debian-user@lists.debian.org
    Subject: Re: Which Diff tool could I use for visually comparing
two text files where Word Wrap is possible?
    From: davidson <da***on@fre***lt.or***>
    Date: Mon, 3 Apr 2023 01:27:46 +0000 (UTC)
    Message-id: <[🔎] alpine.DEB.2.21.2304030127380.28350@azone.org>
    In-reply-to: <[🔎]
CAEG4cZU4ZCCbKC9FFF66nwWr2ubD_1p_z1BDNHRh_sjP3ikEYg@mail.gmail.com>
    References:
<CAEG4cZU336q12B2DXH_O52=00up2fG+sd8Oz3WjKXou+Y1Menw@mail.gmail.com>
<CAEG4cZW5aXEVwx0dZrOhcD2q44S8g75OGgUH+hrVe23joqPz0A@mail.gmail.com>
<[🔎] CAEG4cZUS4DYT02PVm5bYvrpxTxVDEYBTHFGWHRHi80uPoY962A@mail.gmail.com>
<[🔎] CAEG4cZVrPz=aZN6C0V0J3EPYMrH=UGkWcbVCc8xY=31FF_PqQA@mail.gmail.com>
<[🔎] CAEG4cZUXaUAxG=0zLWpXuY44X9RTf7TNEwvGfuDDMZQ7iLEfzA@mail.gmail.com>
<[🔎] CAEG4cZVcE+49-MKWGW7Le3L1T6ztSak7JD3KchkEVFGH30366w@mail.gmail.com>
<[🔎] CAEG4cZWKu1LVJY_Js+VtXA00tVEDPR_JuPaCJ=jrqeRAe4413w@mail.gmail.com>
<[🔎] CAEG4cZU4ZCCbKC9FFF66nwWr2ubD_1p_z1BDNHRh_sjP3ikEYg@mail.gmail.com>

[   ...   ]
You have reported that redirecting icdiff output to a file, in your
words, "drops all colors".

And so I have three questions:

1. Show us the full command line you enter, to redirect the output of
icdiff to a file.

2. Show us the full command line you enter, to view the contents of
that file.

3. For a suitable pair of files, report whether colors are displayed
as expected when you do

 $ icdiff file1 file2 > pretty_diff
 $ less -R pretty_diff
[   ...   ]

Yes, thank you. From your indications it became apparent to me the
idiocy that I was engaged in. I failed to look into what was really
meant by your two lines of codes. I was redirecting the output to a
file with a .txt extension. So when the default application for my
Debian installation, mousepad, opened the file it dropped all colours.
with a lot of extended chars.

This time, I just redirected the output to a file without extension.
Yes, your 2nd line, less -R reproduces all colours. I imagined myself
in your position and looked into what was supposedly intended with
those two lines of codes.

So, thank you for bringing to me to notice my idiocy.

This leads me to the next automatic questions:

Would it be possible to increase the column length for the either of
the two files being compared, so that I could let the terminal window
frame occupy the entire screen space?

If that is not possible then which application should I use in GUI to
have all colours faithfully represented? This might help me overcome
the column restrictions.

Thank you, truly.

Best wishes,
Rajib

[toc] | [prev] | [next] | [standalone]


#256729 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromdavidson <davidson@freevolt.org>
Date2023-04-04 13:10 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GgMI1-hhGI-1@gated-at.bofh.it>
In reply to#256678
On Mon, 3 Apr 2023 Susmita/Rajib wrote:
[trimmed headers]
> [   ...   ]
> You have reported that redirecting icdiff output to a file, in your
> words, "drops all colors".
>
> And so I have three questions:
[trimmed davidson's questions]
> $ icdiff file1 file2 > pretty_diff
> $ less -R pretty_diff
> [   ...   ]
>
> Yes, thank you. From your indications it became apparent to me the
> idiocy that I was engaged in.

No mistakes means no learning. Learning how to make mistakes, to dare
the facts to expose one's false beliefs, is a great art.

Children tend to be adept at this. But grown-ups can do it too with
practice.

> I failed to look into what was really meant by your two lines of
> codes. I was redirecting the output to a file with a .txt
> extension. So when the default application for my Debian
> installation, mousepad, opened the file it dropped all colours.
> with a lot of extended chars.

The output contains, in addition to the characters that comprise your
document's text, embedded character sequences which you can display
literally with (for example),

  $ cat -v pretty_diff.txt # the digraph '^[' is the ESC character

and these instruct a terminal which implements them to do various
things.

As I understand it, the semantics of these sequences were defined for
terminals. They implement many functions --not just color-- useful for
any teletype-descendant like a unix terminal emulator. Expecting other
applications to implement them too will probably lead to
disappointment. But do prove me wrong if you like.

[trimmed]
> This leads me to the next automatic questions:
>
> Would it be possible to increase the column length for the either of
> the two files being compared,

I take this to mean that you would like to increase the length of
lines displayed...

> so that I could let the terminal window frame occupy the entire
> screen space?

...in order to maximise the use of screen real estate.

That is, you'd like to be shown as many characters on one screen as
possible, without a lot of wastefully empty margins.

(I expect I have overstated your intent here. Do correct me.)

It looks to me like icdiff tries to remain faithful to the source
comparands, to the files you request it to compare.

More concretely: Let's say the source files have newlines at a
position no greater than column 55 (say). This means a side-by-side
comparison will require about 113 columns.

Since you have a giant display that can accomodate far more than that,
icdiff displays sizeable righthand margins on each half of a maximised
terminal window.

So you would like icdiff to "flow" the text when it displays each
source on its half of the terminal. You would like icdiff to replace
newlines with spaces, and then wrap them (ie, inserting new newlines)
as appropriate to fill up the right margins on each half.

icdiff will not do that. icdiff is faithful to its sources. I have
determined this by trying it out a little myself, and by examining the
command line options documented in its manual page ("man icdiff").

You could give it different sources:

  $ icdiff <( tr '\n' ' ' <file1 ) <( tr '\n' ' ' <file2 )

You can define a function to do the same thing, to save some typing at
future invocations,

  $ icdiff-flowed () { <( tr '\n' ' ' <file1 ) <( tr '\n' ' ' <file2 ) ; }

and then use it like so

  $ icdiff-flowed file1 file2 | less -R

I imagine this is not quite what you want. But this seems like a good
place to pause, to give you an opportunity to correct me, or to
elaborate on the requirements.

> If that is not possible

I expect it is, but I may not yet fully understand what you are
looking for.

> then which application should I use in GUI to have all colours
> faithfully represented?

You will have far more experience with the range of GUI applications
that might serve your needs than I ever will. Control by keyboard is a
hard requirement of mine. GUIs, naturally enough, rarely meet it.

> This might help me overcome the column restrictions.

Do correct or extend my understanding of what you seek.

-- 
Hackers are free people. They are like artists. If they are in a good
mood, they get up in the morning and begin painting their pictures.
-- Vladimir Putin

[toc] | [prev] | [next] | [standalone]


#256730 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromdavidson@freevolt.org
Date2023-04-04 13:20 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GgMRI-hhKG-7@gated-at.bofh.it>
In reply to#256729
On Tue, 4 Apr 2023 davidson wrote:
[trim]
> icdiff will not do that. icdiff is faithful to its sources. I have
> determined this by trying it out a little myself, and by examining the
> command line options documented in its manual page ("man icdiff").
>
> You could give it different sources:
>
> $ icdiff <( tr '\n' ' ' <file1 ) <( tr '\n' ' ' <file2 )
>
> You can define a function to do the same thing, to save some typing at
> future invocations,

Typos ahead:

> $ icdiff-flowed () { <( tr '\n' ' ' <file1 ) <( tr '\n' ' ' <file2 ) ; }

Correction:

  $ icdiff-flowed () { <( tr '\n' ' ' <"$1" ) <( tr '\n' ' ' <"$2" ) ; }

> and then use it like so
>
> $ icdiff-flowed file1 file2 | less -R

-- 
Sometimes it pays to have squirrels in your head running around making
you question everything.  -- Clive Robinson

[toc] | [prev] | [next] | [standalone]


#256735 — Re: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?

Fromdavidson@freevolt.org
Date2023-04-04 13:50 +0200
SubjectRe: Which Diff tool could I use for visually comparing two text files where Word Wrap is possible?
Message-ID<GgNkJ-hhVI-3@gated-at.bofh.it>
In reply to#256730
On Tue, 4 Apr 2023 davidson@freevolt.org wrote:
> On Tue, 4 Apr 2023 davidson wrote:
> [trim]
>> icdiff will not do that. icdiff is faithful to its sources. I have
>> determined this by trying it out a little myself, and by examining the
>> command line options documented in its manual page ("man icdiff").
>> 
>> You could give it different sources:
>> 
>> $ icdiff <( tr '\n' ' ' <file1 ) <( tr '\n' ' ' <file2 )
>> 
>> You can define a function to do the same thing, to save some typing at
>> future invocations,
>
> Typos ahead:

True.

>> $ icdiff-flowed () { <( tr '\n' ' ' <file1 ) <( tr '\n' ' ' <file2 ) ; }
>
> Correction:
>
> $ icdiff-flowed () { <( tr '\n' ' ' <"$1" ) <( tr '\n' ' ' <"$2" ) ; }

Yet another correction:

  $ icdiff-flowed () { icdiff <( tr '\n' ' ' <"$1" ) <( tr '\n' ' ' <"$2" ) ; }

>> and then use it like so
>> 
>> $ icdiff-flowed file1 file2 | less -R

And a caveat:

I recall that the files you are comparing are quite large.

The above worked on okay on about 1000 line files with about 50,000
characters.

But I would not use it with significantly larger files.

   $ wc -l vinge_1981_true_names.*html # how many lines
   3688 vinge_1981_true_names.html
   4152 vinge_1981_true_names.parafix.html

   $ du -h vinge_1981_true_names.*html
   176K    vinge_1981_true_names.html
   176K    vinge_1981_true_names.parafix.html

I think those were too big:

   $ icdiff-flowed vinge_1981_true_names.html vinge_1981_true_names.parafix.html >vinge_1981_true_names.icdiff_flowed
  Traceback (most recent call last):
   File "/usr/bin/icdiff", line 11, in <module>
     load_entry_point('icdiff==1.9.5', 'console_scripts', 'icdiff')()
   File "/usr/lib/python3/dist-packages/icdiff.py", line 598, in start
     diff(options, *args)
   File "/usr/lib/python3/dist-packages/icdiff.py", line 635, in diff
     diff_files(options, a, b)
   File "/usr/lib/python3/dist-packages/icdiff.py", line 764, in diff_files
     for line in cd.make_table(
   File "/usr/lib/python3/dist-packages/icdiff.py", line 350, in make_table
     for left, right in self._generate_table(fromdesc, todesc, diffs):
   File "/usr/lib/python3/dist-packages/icdiff.py", line 360, in _generate_table
     for i, line in enumerate(diffs):
   File "/usr/lib/python3/dist-packages/icdiff.py", line 255, in _collect_lines
     for fromdata, todata, flag in diffs:
   File "/usr/lib/python3/dist-packages/icdiff.py", line 232, in _line_wrapper
     self._split_line(fromlist, fromline, fromtext)
   File "/usr/lib/python3/dist-packages/icdiff.py", line 217, in _split_line
     self._split_line(data_list, '>', line2)
   File "/usr/lib/python3/dist-packages/icdiff.py", line 217, in _split_line
     self._split_line(data_list, '>', line2)
   File "/usr/lib/python3/dist-packages/icdiff.py", line 217, in _split_line
     self._split_line(data_list, '>', line2)
   [Previous line repeated 984 more times]
   File "/usr/lib/python3/dist-packages/icdiff.py", line 180, in _split_line
     if ((self._display_len(text) - (text.count('\0') * 3) <=
   File "/usr/lib/python3/dist-packages/icdiff.py", line 163, in _display_len
     return sum(width(c) for c in s)
   File "/usr/lib/python3/dist-packages/icdiff.py", line 163, in <genexpr>
     return sum(width(c) for c in s)
   File "/usr/lib/python3/dist-packages/icdiff.py", line 156, in width
     if ((isinstance(c, type(u"")) and
RecursionError: maximum recursion depth exceeded while calling a Python object

-- 
Sometimes it pays to have squirrels in your head running around making
you question everything.  -- Clive Robinson

[toc] | [prev] | [next] | [standalone]


Page 1 of 3  [1] 2 3  Next page →

Back to top | Article view | linux.debian.user


csiph-web