- AuthorPosts
- March 17, 2022 at 2:44 am #28097StefanParticipant
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 —— Eightand 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
Eightwhich I can then further process or save.
.
Thanks for considering
/StefanMarch 17, 2022 at 8:30 am #28102Yutaka EmuraKeymasterYou 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.
May 17, 2022 at 8:28 am #28179StefanParticipantHello 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
May 17, 2022 at 8:35 am #28180StefanParticipantAh, 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..
May 17, 2022 at 5:47 pm #28181Yutaka EmuraKeymasterI’ve fixed the crash bug on v21.7.904.
Thank you!May 18, 2022 at 12:37 am #28182StefanParticipantFix confirmed in 904:
“Extract Bookmarked Lines to New File” works now from both compare panels for my setup too.
Thank you. - AuthorPosts
- You must be logged in to reply to this topic.