Ticket #3083 (new enhancement)
Elaborate/make user-friedly mcedit X11 Copy/Paste support
Reported by: | pfalcon | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | Future Releases |
Component: | mcedit | Version: | master |
Keywords: | Cc: | oswald.buddenhagen@… | |
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Support for X11 clipboard Copy/Paste? was implemented in #30, but that implementation suffer typical "last mile problem": while everything to support feature is there, it's not enabled by default (and it's not easy to enable it by default for downstream packages). Then, it's fairly basic feature, so users expect it to work out of the box, or assume it's not available at all (example: user expects colors to work OOB, and it's indeed how it is now (there were dark ages when b&w was default), user expects mouse to work OOB, and indeed, it's such in default source builds and packages supplied by distro). So, such situation leads to reports like #3081.
So, let's consider current implementation.
- It depends on availability of "xclip" external tool. I found that it's not installed on my Ubuntu system which is in use for 1.5+ years (i.e. I neither installed it explicitly, nor it was pulled as dependency for lots of software I installed over this time). I'd expect such small and basic utility to be part of default X install, alas, it's not.
- Allow to use external tool to handle clipboard copy/paste is actually cool extra feature. It can be used to implement networked clipboard, or work around charset problems (see #30 comments), etc, etc. But then its application should not depend on DISPLAY envvar set (see https://www.midnight-commander.org/ticket/30#comment:33 for reference), or that hardcodes its usage to X session only.
- From 1, relying on xclip leads for the feature not working of the box. mc now includes some X integration and thus dependency, so it should be possible to include clipboard handling code to mcedit itself.
Thus, proposed changes are:
- Remove DISPLAY var check.
- If clipboard_store/clipboard_paste ini vars are set, execute corresponding commands.
- Otherwise, use builtin copy/paste implementation.
Comments on such proposal are welcome.
Change History
comment:3 Changed 11 years ago by ossi
- Cc oswald.buddenhagen@… added
+1 - as i noted in the original issue, the amount of code needed for this is ridiculously small, given that we already have an X connection open.
fwiw, the current behavior to have a configurable command which has a hard-coded condition doesn't even make any sense ... you could hard-code the command itself just as well.