Notepad3 icon indicating copy to clipboard operation
Notepad3 copied to clipboard

it's confusing that remove dup lines has two meanings in different submenu.

Open LennaHammer opened this issue 1 year ago โ€ข 5 comments

when using lines > remove dup lines, it works like the uniq command which keeps the first dup line,

but when using selections > sort lines > remove dup lines, the lines that appear twice will all be removed.

it's very confusing that the same command has two different meanings in two different submenus. I've used these commands incorrectly, I think it can be avoided by providing a better name.

LennaHammer avatar Mar 12 '24 17:03 LennaHammer

@hpwamr : No it is no bug or regression, this is an option within the "Sort lines" working as designed. @LennaHammer is correct, that the wording is not chosen well and may be misleading.

  1. Remove unique lines. => OK
  2. Remove empty lines. => OK
  3. Remove white-space lines. => called in the Edit -> Lines -> menu: Remove Blank Lines - better: use same wording
  4. Remove duplicate lines. => the meaning is as described by @LennaHammer : remove all duplicates (incl. first one) maybe we can find a better wording here.
  5. Merge duplicate lines. => Merge duplicate lines (into the first one) - this is the same functionality as menu Edit -> Lines -> Remove Duplicate Lines - which removes all dupes except the first/original line.

So, functionality is correct - we should find better wording here - any suggestions ?

xxx.txt

RaiKoHoff avatar May 30 '24 19:05 RaiKoHoff

@hpwamr : Since this is all about wording, I leave it up to you to find better wording. Suggestion: For the Sort-Lines Dialog:

  • Remove duplicate lines. => Remove all dupes (incl. orig. line).
  • Merge duplicate lines. => Remove duplicate lines.

RaiKoHoff avatar Jun 28 '24 21:06 RaiKoHoff

Since this is all about wording, I leave it up to you to find better wording.

Hello @craigo-, @jupester, @kofifus, @ltGuillaume, @MelchiorGaspar, and other Notepad3 BETA/RC testers, I need your help. ๐Ÿค” Do you have an idea for better wording (or the above suggestion is OK)?

hpwamr avatar Jun 29 '24 08:06 hpwamr

  1. Keep "Remove duplicate(s of) lines" and use it for "Merge duplicate lines" (you're not merging anything really.
  2. Use "Remove all lines occurring multiple times" or "Remove all non-unique lines" for the other option.

ltguillaume avatar Jun 29 '24 10:06 ltguillaume

Not functions I use regularly, but I do love having consistent wording - good catch, @LennaHammer ๐Ÿ˜„

I initially reacted positively to the suggestion from @ltguillaume - it does clear up the inconsistency, but I find it troublesome to apply everywhere else.

I actually find the following definition (as found in the majority of the menu options) to be fairly clear, i.e.:

  • Merge = retain one instance
  • Remove = retain no instances

i.e. how it is currently in the following functions:

  • Edit > Lines: Merge Empty Lines vs Remove Empty Lines
  • Edit > Lines: Merge Blank Lines vs Remove Blank Lines
  • Edit > Selection > Sort Lines: Merge duplicate lines vs Remove duplicate lines

Therefore, I would propose the following change:

  • Edit > Lines > ~~Remove Duplicate Lines~~ Merge Duplicate Lines (and move it to the third position in the section, above "Remove Empty Lines" - that way the ordering is always Empty, Blank, Duplicate)

You could even add the then-missing function "Edit > Lines > Remove Duplicate Lines", which retains no instances of duplicated lines (but that might be beyond the scope of this issue, and as we know, extra keyboard shortcuts are hard to find!)

Does that then clear up the inconsistency everywhere? I cannot find anywhere else that this exists.

As for clarification of the wording, is it possible to add a ToolTip for menu options and/or the sort dialogue that explains the merge/remove definitions? And also in the documentation at rizonesoft.com?

May I also add one thing? Can the Sort Lines dialogue option "Remove white-space lines." be changed to "Remove blank lines."? I believe this is the correct phraseology used elsewhere.

craigo- avatar Jun 29 '24 23:06 craigo-

I'd say the definition of merging is not retaining one of several identical things, but combining two or more (different) things into one (new) thing. This makes the term "merge" confusing in the presented context imho.

In essence, what we're doing, instead of merging, is deduplicating.

ltguillaume avatar Jul 01 '24 11:07 ltguillaume

In essence, what we're doing, instead of merging, is deduplicating.

Just a question: is not "Keep unique lines" better than "Merge duplicate lines"? ๐Ÿค”

hpwamr avatar Jul 01 '24 21:07 hpwamr

In essence, what we're doing, instead of merging, is deduplicating.

OK, I can get on board with that.

Just a question: is not "Keep unique lines" better than "Merge duplicate lines"? ๐Ÿค”

Also a good option.

So we have two primary candidates (and a couple of alternates) to replace the "Merge" function:

  • Deduplicate lines
  • Keep unique lines
  • Deduplicate lines (keep unique) [see below]
  • Deduplicate lines (merge) [see below]

What do we do with the "Remove" function? Suggestions:

  • Remove all duplicate lines [I still don't think this is clear enough]
  • Deduplicate lines (remove unique) [i.e. paired with the third option from above]
  • Deduplicate lines (remove) [i.e. paired with the fourth option from above]
  • ???

That's the best I can come up with in the limited time I have, and I must say I'm not wildly happy about any of them - they all seem rather unwieldy, which is why I originally stuck with the existing merge/remove wording. I'd still like to table that as a viable option, but if I was forced to choose a best alternative pair, it would probably be:

  • Deduplicate lines (merge)
  • Deduplicate lines (remove)

Whatever we end up with:

  • The wording will also need to be applied to the Edit > Selection > Sort Lines dialogue
  • We'll probably have to redo the accelerator keys as well (gah!)

craigo- avatar Jul 02 '24 01:07 craigo-

How about Keep (only) first of duplicated lines (=merge) and Remove all duplicated lines (=remove)?

ltguillaume avatar Jul 02 '24 03:07 ltguillaume

  1. instead of "merge" (implies something new) or "deduplicate" (which is a negation, better be positive), I would prefer "unite duplicate lines"
  2. drop the "remove all duplicate lines" case (in sort dialog only) - I can't imagine any sensible use case, only very artificially created ones, so this case isn't really needed.

RaiKoHoff avatar Jul 02 '24 21:07 RaiKoHoff

Hello @LennaHammer , @craigo- , @ltguillaume ,

Feel free to test the "BETA/RC PortableApps", version "Notepad3Portable_6.24.703.1_rc3.paf" or newer, see the 1st list in issueย #1129.

"Notepad3Portable BETA/RC PortableApps" version can be used with or without ".7z" extension.

Also, feel free to test the "BETA/RC Setup", version "Notepad3_6.24.703.1_rc3_Setup" or newer, see the 2nd list in issueย #1129.

Comments and suggestions are welcome... ๐Ÿ˜ƒ

hpwamr avatar Jul 03 '24 17:07 hpwamr

Testing version 6.24.703.1 rc3

Fairly quick test, please excuse nonexhaustive testing that I normally pride myself on.

  1. instead of "merge" (implies something new) or "deduplicate" (which is a negation, better be positive), I would prefer "unite duplicate lines"

Yep, that works. As long as the wording is easily understood, and most importantly, consistent ๐Ÿ˜„

On that note:

Edit > Lines Menu

We should then also change the use of the word "Merge" here, i.e.:

  • Merge Empty Lines > Unite Empty Lines
  • Merge Blank Lines > Unite Blank Lines

...and then the order of that section of the menu probably needs changing. We either arrange by function (Unite, Remove), i.e.:

  • Unite Duplicate Lines
  • Unite Empty Lines
  • Unite Blank Lines
  • Remove Duplicate Lines
  • Remove Empty Lines
  • Remove Blank Lines

...or arrange by target (Duplicate, Empty, Blank), i.e.:

  • Unite Duplicate Lines
  • Remove Duplicate Lines
  • Unite Empty Lines
  • Remove Empty Lines
  • Unite Blank Lines
  • Remove Blank Lines

To me, the former option seems better.

Edit > Advanced > Sort Lines Menu

  • Unite duplicate lines (I trust this marries up with the same functionality of "Unite Duplicate Lines" above)
  • Remove duplicate lines (I trust this marries up with the same functionality of "Remove Duplicate Lines" above)
  • Remove unique lines (redundant, done by the "Remove duplicate lines" function?)
  • Remove empty lines (I trust this marries up with the same functionality of "Remove Empty Lines" above)
  • Remove blank lines (I trust this marries up with the same functionality of "Remove Blank Lines" above)

I propose that this is rearranged by function, as is my preference above, to:

  • Unite duplicate lines
  • Remove duplicate lines
  • Remove empty lines
  • Remove blank lines

Also, is there any appetite for removing the trailing full stop on these dialogue options? They are a bit of an eyesore to me.

image

image

craigo- avatar Jul 05 '24 00:07 craigo-

"Remove unique lines" (redundant, done by the "Remove duplicate lines" function?)

No, it's the opposite as "Remove duplicate lines": it removes ONLY the unique lines, NOT the duplicate lines! (try it) ๐Ÿค”

hpwamr avatar Jul 05 '24 01:07 hpwamr

No, it's the opposite as "Remove duplicate lines": it removes ONLY the unique lines, NOT the duplicate lines! (try it) ๐Ÿค”

Whoops, quite right, different to the "keep unique lines" wording discussed above. Cool. Wow, an option that I don't think I will ever find the need for ๐Ÿ˜„

And therefore the Edit > Advanced > Sort Lines menu might look like this:

  • Unite duplicate lines
  • Remove duplicate lines
  • Remove empty lines
  • Remove blank lines
  • Remove unique lines

(Suggest moving the "unique" entry to the bottom to retain the duplicate/empty/blank ordering suggested for elsewhere, and that I consider this option to be less useful!)

craigo- avatar Jul 05 '24 01:07 craigo-