Bug 492840

Summary: Allow using "Always save in history" option when "Keep the selection and clipboard the same" option is disabled
Product: [Plasma] plasmashell Reporter: Flavio Stanchina <flavio>
Component: Clipboard widget & pop-upAssignee: Plasma Bugs List <plasma-bugs-null>
Status: ASSIGNED ---    
Severity: wishlist CC: cspiegel, d.milivojevic, kde, kdedev, nate, tomashnyk, wozniakg
Priority: NOR    
Version First Reported In: 5.27.5   
Target Milestone: 1.0   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Proof-of-concept patch

Description Flavio Stanchina 2024-09-08 20:29:31 UTC
SUMMARY
Option "Always save in history" for text selection should be available even if "Keep the selection and clipboard the same" is deactivated.

STEPS TO REPRODUCE
1. Open clipboard settings
2. Deactivate "Keep the selection and clipboard the same"
3. Option "Always save in history" for text selection  is deactivated and disabled

OBSERVED RESULT
Selection is not added to the clipboard history.

EXPECTED RESULT
There should be an option to add the selection to the clipboard history, even when not synchronizing the selection and the clipboard.
This is how clipboard history worked in previous releases, as far as I can remember.

SOFTWARE/OS VERSIONS
Debian GNU/Linux "bookworm"
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2024-09-18 19:13:47 UTC
This is clearly intentional, though I'm not aware of the reason for it.
Comment 2 Nate Graham 2025-01-16 18:23:07 UTC
Ah so basically, primary selections would be added as history items, but not kept synchronized with traditional selections. Hopefullt this is possible, yeah.
Comment 3 Nate Graham 2025-01-16 18:23:47 UTC
*** Bug 498715 has been marked as a duplicate of this bug. ***
Comment 4 Chris Spiegel 2025-01-16 18:48:41 UTC
Created attachment 177434 [details]
Proof-of-concept patch

This is a quick-and-dirty proof of concept patch I created for plasma-workspace 6.2.5; it allows the radioboxes to be selected regardless of synchronization status. So far, with my short testing, it works as I expect: clipboards aren't synchronized, but history is stored for both PRIMARY and CLIPBOARD. So it looks like the clipboard code itself handles it fine, and it's just a UI matter preventing it from being exposed.
Comment 5 Nate Graham 2025-01-16 20:01:15 UTC
You can probably remove the setEnabled lines entirely, since the default is true.

Wanna submit it formally and see what people say?
Comment 6 Nate Graham 2025-01-17 15:50:16 UTC
*** Bug 498766 has been marked as a duplicate of this bug. ***
Comment 7 Bug Janitor Service 2025-01-18 03:05:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5085
Comment 8 tomashnyk 2025-08-02 10:25:01 UTC
*** Bug 481119 has been marked as a duplicate of this bug. ***
Comment 9 tomashnyk 2025-08-02 10:26:23 UTC
*** Bug 506883 has been marked as a duplicate of this bug. ***
Comment 10 tomashnyk 2025-08-02 10:27:28 UTC
From a duplicate:

Workaround for this issue:
Add IgnoreSelection=false to ~/.config/klipperrc

(I made an older bug a duplicate of this one as this has merge request attached to it)
Comment 11 Dragan 2025-08-02 14:41:34 UTC
This should be treated as a regression fix, this behaviour was the standard for probably more than a decade.
Comment 12 Bug Janitor Service 2025-10-16 20:58:02 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5922