rizonesoft / Notepad3

Notepad like text editor based on the Scintilla source code. Notepad3 based on code from Notepad2 and MiniPath on code from metapath. Download Notepad3:
https://www.rizonesoft.com/downloads/notepad3/
Other
4.79k stars 322 forks source link

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

Open LennaHammer opened 3 months ago

LennaHammer commented 3 months ago

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.

RaiKoHoff commented 1 month ago

@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 commented 5 days ago

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

hpwamr commented 5 days ago

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)?

ltguillaume commented 5 days ago
  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.
craigo- commented 4 days ago

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.:

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

Therefore, I would propose the following change:

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.

ltguillaume commented 3 days ago

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.

hpwamr commented 2 days ago

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

Just a question: is not "Keep unique lines" better than "Merge duplicate lines"? 🤔

craigo- commented 2 days ago

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:

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

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:

Whatever we end up with:

ltguillaume commented 2 days ago

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

RaiKoHoff commented 1 day ago
  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.
hpwamr commented 23 hours ago

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... 😃