Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #28097
    Stefan
    Participant

    Hello Yutaka -san.

    Since EmEditor is that fast I would like to use
    the compare tool to export matching lines to a new document.

    Instead of a report I need to get the
    real lines (as they are in original document) without any decorations like “x││+1│”

    I want to compare two lists from two documents like List-A.txt and List-B.txt like
    List-A — List-B
    One —— One
    Two —— Three
    Four —– Four
    Five —– Five
    Six —— Eight

    and have the option to export to a new tab as either:
    () Lines in A only (Result would be: Two, Six)
    (o) Lines in B only (Three, Eight)
    () Lines in both common (One, Four, Five)
    () Lines in both but w/o duplicates (One, Two, Three, Four, Five, Six, Eight)

    Here above I imagine to get a new tab (document) with two lines as result:
    Three
    Eight

    which I can then further process or save.

    .

    Thanks for considering
    /Stefan

    #28102
    Yutaka Emura
    Keymaster

    You could select Bookmark Changes on the Macros menu to set bookmarks on changed lines. Then, select the Invert Bookmarks command to set bookmarks on unchanged lines. You can then extract bookmaked lines. This way might not distinguish between changes and added/delete lines, but might help.

    #28179
    Stefan
    Participant

    Hello Yutaka-san,

    thank you for your advice and I want to ask to apologize my late response.

    After I have found out what you are telling me (see below), I could see that it works somehow,
    not nice for daily work, but at least there is one way. Maybe I can build a macro with that tips.

    Maybe this could also be considered as feature wish:
    >> “compare two files for differences, not line-by-line wise as the compare tool does,
    but whole files-wise, (compare each line of file A with each line of file B)”

    – Extract lines which are in first file only
    – Extract lines which are in second file only
    – Extract lines that are in both files common
    – Link to “remove duplicate lines” -command

    – – –
    Please note:
    “Extract Bookmarked Lines to New File” works for me from the left-side document only.
    If I try that from the right doc, I get a Crash (v21.7.0 , portable , with new “comparison results in one vertically split window” feature)
    – – –

    Here is what I have done as you told me to this way:

    – You could select Bookmark Changes on the Macros menu to set bookmarks on changed lines.
    (Tools > All Commands… > Compare > Bookmark Changes)
    – Then, select the Invert Bookmarks command to set bookmarks on unchanged lines.
    (Tools > All Commands… > Edit > Bookmarks > Invert Bookmarks)
    – You can then extract bookmarked lines.
    (Tools > All Commands… > Edit > Bookmarks > Extract Bookmarked Lines to New File)
    – This way might not distinguish between changes and added/delete lines, but might help.

    Thank you for making EmEditor

    #28180
    Stefan
    Participant

    Ah, I wanted to add for the Crash :
    – tested with files with 5 lines only, as shown in my first post
    – Win 10.0.19044.1706 , 64-bit , 16GB RAM with 60% free at that moment.

    – – –

    And, FYI:
    on my test I missed a “swap files” option in the Compare menu (somehow as like in the “Compare with Options…” -dialog)
    Maybe this would be also an idea to add.

    .

    #28181
    Yutaka Emura
    Keymaster

    I’ve fixed the crash bug on v21.7.904.
    Thank you!

    #28182
    Stefan
    Participant

    Fix confirmed in 904:
    “Extract Bookmarked Lines to New File” works now from both compare panels for my setup too.
    Thank you.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.