bug#47505: 25.1; ediff thinks words changed when filling prefixed

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#47505: 25.1; ediff thinks words changed when filling prefixed

Samuel Wales
to reproduce, please put this in file a:

# asdfjkansdkljfan ksd fnak nsdflkadsnfkansdkfnakdsnf
# aklsfdnakljfnsdkasdnfja sdn fkljad nsfkj ansdkfn aksdjfna
# ksjfndk ajdnsf kajsndkfjansdkfjn ja nsdkjfn askdj fnakjs fdnakj
# nsdfkaj dns

then set fill-column to 60.  then fill.  then save to file b.

you now have a and b with the same text, but a filled commented
paragraph that differs between them.

now open in diff mode.  you will notice that it thinks only the comments
changed.  this is expected behavior.

now open with m-x ediff RET.  it thinks the first word in the last line
in b is different.  but it is not different.

best i can do for a bug report.  thanks.


On 3/28/21, Eli Zaretskii <[hidden email]> wrote:

>> From: Samuel Wales <[hidden email]>
>> Date: Sun, 28 Mar 2021 21:48:18 -0700
>> Cc: [hidden email]
>>
>> for purpoes of the test do something like this:
>>
>> # asdfjkansdkljfan ksd fnak nsdflkadsnfkansdkfnakdsnf
>> # aklsfdnakljfnsdkasdnfja sdn fkljad nsfkj ansdkfn aksdjfna
>> # ksjfndk ajdnsf kajsndkfjansdkfjn ja nsdkjfn askdj fnakjs fdnakj
>> # nsdfkaj dns
>>
>> then fill to a narrow fill column.
>
> Please submit a full bug report with the details, TIA.
>
>


--
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Reply | Threaded
Open this post in threaded view
|

bug#47505: 25.1; ediff thinks words changed when filling prefixed

Samuel Wales
doyou think diff's behavior is a bug then?  i choose ediff's.

On 3/31/21, Andreas Schwab <[hidden email]> wrote:

> On Mär 30 2021, Samuel Wales wrote:
>
>> now open with m-x ediff RET.  it thinks the first word in the last line
>> in b is different.  but it is not different.
>
> I don't see how that is a bug.  The word moved around, and ediff
> correctly marked it as such.
>
> Andreas.
>
> --
> Andreas Schwab, [hidden email]
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."
>


--
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html



Reply | Threaded
Open this post in threaded view
|

bug#47505: 25.1; ediff thinks words changed when filling prefixed

Michael Heerdegen
Samuel Wales <[hidden email]> writes:

> doyou think diff's behavior is a bug then?  i choose ediff's.

Depends on what you think what "fine diffs" are.  They are actually word
wise diffs, and comment starts are a just a word.  That how it's
implemented.  In the case you describe I find that sometimes annoying,
too.  But I guess it's not easy to change that.

It might be possible to tell Ediff to ignore certain words (like comment
starts) but it's then not trivial to decide whether some text got
commented that was not commented before.

This is all not trivial.  There can be lines that are partly code and
partly comment; in Elisp, the comment start can have changed (e.g. ;; ->
;;;), you can have "doubled comments" like ;;; ;;; where uncommenting
would leave comments ... how would you define when two regions
should count as similar?

Regards,

Michael.



Reply | Threaded
Open this post in threaded view
|

bug#47505: 25.1; ediff thinks words changed when filling prefixed

Samuel Wales
i don't know.  i just know what seems right and seems wrong.  not too
useful is it?  but it is better than not filing the bug perhaps.

diff-mode does it right so ediff can.  filladapt can intuit prefixes.
comment syntaxes are known.  somewhere in there lies a fix maybe.

commented paragraphs in org/shell/elisp style are always commented at
bol.  idk what diff-mode does.


On 3/31/21, Michael Heerdegen <[hidden email]> wrote:

> Samuel Wales <[hidden email]> writes:
>
>> doyou think diff's behavior is a bug then?  i choose ediff's.
>
> Depends on what you think what "fine diffs" are.  They are actually word
> wise diffs, and comment starts are a just a word.  That how it's
> implemented.  In the case you describe I find that sometimes annoying,
> too.  But I guess it's not easy to change that.
>
> It might be possible to tell Ediff to ignore certain words (like comment
> starts) but it's then not trivial to decide whether some text got
> commented that was not commented before.
>
> This is all not trivial.  There can be lines that are partly code and
> partly comment; in Elisp, the comment start can have changed (e.g. ;; ->
> ;;;), you can have "doubled comments" like ;;; ;;; where uncommenting
> would leave comments ... how would you define when two regions
> should count as similar?
>
> Regards,
>
> Michael.
>


--
The Kafka Pandemic

Please learn what misopathy is.
https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html