-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
savannah: support for x clipboard wanted #30
Comments
|
fwiw, overriding xterm's mapping is in fact a FAQ. the solution is to add
to the ~/.Xresources file (or whatever your setup has).
iow, there is nothing to make this feature unfeasible. |
I think, better to support XWindow clipboard more native - for example, pressing ALT+F (in additional) will add to Xclipboard current selection in editor... |
Replying to slavazanko:
that's more explicit, but definitely not more native - quite to the contrary even, as the x clipboard is native in an x environment and can be expected to be found under the usual keybindings (that's why xterm has that keybinding in the first place). mc's own clipboard is still reachable via ctrl-f and shift-f5, so why deviate from the intuitive keybindings? one reason could be consistent access from mc instances running in consoles and in xterms at the same time. seems like a corner case which i would not want to sacrifice for better integration into the windowing environment. but that can be configurable as indicated in the original submission.
fwiw, given that you did not choose to use alt-shift-ins for vertical pasting, you could it use now to paste PRIMARY (as opposed to CLIPBOARD with shift-ins). |
|
|
In path "editcmd.c xclip patch for 4.7.0-pre2" memory leak be present.
In functions edit_copy_to_X_buf_cmd() and edit_cut_to_X_buf_cmd() instead code
...must have code
I don't know, how make path file, but please insert this code correction. |
editcmd.c xclip patch for 4.7.0-pre2 |
Oops, solving for copy to X-buffer with "xclip" have any problem.
If system locale i.e. KOI-8R, and text file in other codepage (i.e. UTF-8), we select by Ctrl+T UTF-8 codepage. In "copy to X-buffer action", in cooledit.clip file putted text in UTF-8 codepade. Next, running command
xlib -i cooledit.clip
and in buffer inserting UTF-8 text. If paste from buffer this text into MC or into any text editor, we seen bad cyrillic symbol.
Solved this problem - convert cooledit.clip (before run xlib) from editor codepage to system codepage.
For write code, need known:
How get editor codepage as string, i.e. "UTF-8"? |
Use enca, Luke. |
use "get_codepage_id (source_codepage)" |
Replying to angel_il:
Im jumble.
Index "source_codepage" - it is current editor codepage? |
This is bullshit. The official version of xclip uncorrect work with national (cyrillic) symbols.
Prooflink for russian people - http://habrahabr.ru/blogs/linux/48954/
If locale is KOI-8R, and in cooledit.clip put text in KOI-8R, then after command
in clipbord put text with bad cyrillic symbols.
What is to do? |
|
|
branch: 30_external_clipboard_utility
please review :) |
branch: 30_external_clipboard_utility (forced update) |
|
|
Merged: [781706e] |
|
line 3987 in mc.1.in contains a copy&paste mistake (somewhat ironic in the context of this ticket :D).
i'm not sure why you chose to invoke an external tool and thus introduce an additional dependency for that. the x11 code to support that is pretty simple; you'd need to copy only a small part from xclip.
at the very least, the xclip calls should be in the default setup. otherwise it's as if the function wasn't there at all (many people miss it, but i don't think anyone would expect it to be actually there, "just needing configuration").
other than that, it works quite nicely, it seems. ;) |
A bundled "brand new" keymap is on the way. I hope it will make it into master. One day. In what concerns xclip it's more tricky: one needs time and competence to implement this.
Line 3987 is .I xterm_mode. Hmmm?
Patches welcome. |
Replying to zaytsev:
noooo, *don't* add separate key bindings for that! it should work transparently as it does now. it should just be there by default.
i meant in the commit that went in (781706...). |
Damn it, damned damn!
Branch: 30_typo_fixup (parent: master) |
The keymap is not going to be added just for that. It will encompass all the bindings for the new features, that break old behavior.
Right now, I don't see how one can make this working transparently by default without breaking old behavior and dependency on xclip doesn't make things any easier. |
you're right, the non-cua key bindings should not be affected. i even implied that myself in the original submission. :) |
|
|
Forget me if this is unrelated. There are "clipboard_store" and "clipboard_paste" options in ".mc/ini" file. What keys precisely invoke those commands in "mcedit"? I need to exchange with "Xorg" clipboard, but "mcedit" runs in a text console (i.e. Ctrl+F1 in Linux).
Also there are, I guess, mistakes in man pages:
"clipboard_store This variable contains path (with options) to the external clipboard utility like 'xclip' to read text into X selection from file." --- What file? Perhaps stdin?
"clipboard_paste This variable contains path (with options) to the external clipboard utility like 'xclip' to print the selection to standard out. For example: |
Replying to beroal:
By default, that are common shortcuts ctrl-ins, shift-ins, shift-del. You can redefined it in keymap file
File that is loaded in mcedit.
What is unrelated? xclip prints selection to the its standard out. xclip's stdout is read by mc. |
Replying to andrew_b:
Excerpt from "man xclip":
Does "mc" gives the name of that file to the "clipboard_store" command as argument? Or sends text to "stdin" of the process of the "clipboard_store" command?
I did not expect that it would be hard to explain. When you write the example for "clipboard_paste", using "clipboard_store" in the example looks meaningless!
Please do not explain here, just fix the man pages. |
Replying to andrew_b:
So, this keys coincide with those that works with "~/.mc/cedit/cooledit.clip". If I start "mc" with "DISPLAY" variable, should it use "~/.mc/cedit/cooledit.clip" or the Xorg server clipboard? |
Replying to beroal:
after you start action EditXStore (ctrl-insert pressed) mc do next steps:
for more detail see
PS: if you understood my explanation please send their corrections to the 'man'. |
I don't want to reopen this very old ticket: granted, it was implemented, that can't be challenged. But I have some proposals how to enhance functionality, so I opened new bug #3083. |
|
|
|
Important
This issue was migrated from Trac:
ossi
(@ossilator)zaytsev
(@zyv)xclip
,clipboard
Original: http://savannah.gnu.org/bugs/?13751
Original submission:
Comment 1 by Jan Engelhardt <hirogen2> at Sun 06 Jul 2008 04:19:44 PM UTC:
Note
Original attachments:
angel_il
(@ilia-maslakov) onAug 17, 2009 at 17:15 UTC
uchti
(uchtii@….com) onSep 11, 2009 at 11:13 UTC
The text was updated successfully, but these errors were encountered: