Re: bad mc-edit paste behavior?
Felix: Switch it off with F9 - Options - General - Return does autoindent. This feature is very useful e.g. when writing source code. MC Developers: It would be cool to have autoindent disabled when pasting, I've commented on https://www.midnight-commander.org/ticket/2661 On Sun, Sep 15, 2013 at 6:16 PM, Felix Miata mrma...@earthlink.net wrote: http://lists.opensuse.org/**opensuse-kde/2013-09/msg00072.**htmlhttp://lists.opensuse.org/opensuse-kde/2013-09/msg00072.htmlseems to describe a bug in mc-edit. Is the responder there correct that auto-indent switched off would stop the bad behavior? Should it need to be? Adding all those spaces and/or tabs doesn't make any sense to me regardless of how line endings are handled. -- The wise are known for their understanding, and pleasant words are persuasive. Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ __**_ mc-devel mailing list https://mail.gnome.org/**mailman/listinfo/mc-develhttps://mail.gnome.org/mailman/listinfo/mc-devel ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
Hello, On Sun, 15 Sep 2013 12:16:53 -0400 Felix Miata mrma...@earthlink.net wrote: http://lists.opensuse.org/opensuse-kde/2013-09/msg00072.html seems to describe a bug in mc-edit. Is the responder there correct that auto-indent switched off would stop the bad behavior? Should it need to be? Adding all those spaces and/or tabs doesn't make any sense to me regardless of how line endings are handled. I've been having that problem for ages - with Gnome though. If you think about it, it's logical, assuming pasting is handled by terminal emulator, and not mc itself. And term emu can only implement pasting by sending pasted content as key presses, including spaces and tab, and mcedit, with autoindent on, has no idea that it's something else but keypresses, so blindly applies autoindent as usual. So, long ago I indeed worked that around by going to setting and turning autoindent off then on (boring!). Then however I noticed that depending on the way you paste you may be able to work it around by several paste attempts. For example, Gnome terminal has 3 ways to paste: menu command, Ctrl+Shift+V, Shift+Ins. So far, my background pattern matcher didn't find exact rule what works better, it seems to be just non-deterministic, though intuitively, Shift+Ins appear to work better. The way to resolve it would be to handle paste on mc side, and knowing that mc already has some X integration, I may imagine, when Shift+Ins works, that's what happens. The culprit is that it doesn't work all the time and with all paste methods. Which probably partly due to braindead X clipboard design (multiple buffers, etc). -- Best regards, Paul mailto:pmis...@gmail.com ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
Paul, please see the ticket I linked in my previous post. There is a standard way of solving this problem, mc should go for that rather than its own hacks. I'm working on the patch right now. On Sun, Sep 15, 2013 at 7:07 PM, Paul Sokolovsky pmis...@gmail.com wrote: Hello, On Sun, 15 Sep 2013 12:16:53 -0400 Felix Miata mrma...@earthlink.net wrote: http://lists.opensuse.org/opensuse-kde/2013-09/msg00072.html seems to describe a bug in mc-edit. Is the responder there correct that auto-indent switched off would stop the bad behavior? Should it need to be? Adding all those spaces and/or tabs doesn't make any sense to me regardless of how line endings are handled. I've been having that problem for ages - with Gnome though. If you think about it, it's logical, assuming pasting is handled by terminal emulator, and not mc itself. And term emu can only implement pasting by sending pasted content as key presses, including spaces and tab, and mcedit, with autoindent on, has no idea that it's something else but keypresses, so blindly applies autoindent as usual. So, long ago I indeed worked that around by going to setting and turning autoindent off then on (boring!). Then however I noticed that depending on the way you paste you may be able to work it around by several paste attempts. For example, Gnome terminal has 3 ways to paste: menu command, Ctrl+Shift+V, Shift+Ins. So far, my background pattern matcher didn't find exact rule what works better, it seems to be just non-deterministic, though intuitively, Shift+Ins appear to work better. The way to resolve it would be to handle paste on mc side, and knowing that mc already has some X integration, I may imagine, when Shift+Ins works, that's what happens. The culprit is that it doesn't work all the time and with all paste methods. Which probably partly due to braindead X clipboard design (multiple buffers, etc). -- Best regards, Paul mailto:pmis...@gmail.com ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
On 2013-09-15 18:57 (GMT+0200) Egmont Koblinger composed: Felix: Switch it off with F9 - Options - General - Return does autoindent. This feature is very useful e.g. when writing source code. I don't write code, but I've never turned it off either, would rather not need to, and use mc-edit more than any other editor except the FC/2-FC/W editor if and when it's available. MC Developers: It would be cool to have autoindent disabled when pasting, I've commented on https://www.midnight-commander.org/ticket/2661 Definitely. On 2013-09-15 20:42 (GMT+0200) Egmont Koblinger composed: I'm working on the patch right now. Thanks! -- The wise are known for their understanding, and pleasant words are persuasive. Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
I don't write code, but I've never turned it off either, would rather not need to, It might make sense to turn it off by default, although I find this a really minor priority question. You can easily turn it off for yourself and then save your setup, and you're done forever :) bye, egmont ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
On Sun, Sep 15, 2013 at 7:07 PM, Paul Sokolovsky pmis...@gmail.com wrote: So, long ago I indeed worked that around by going to setting and turning autoindent off then on (boring!). Then however I noticed that depending on the way you paste you may be able to work it around by several paste attempts. For example, Gnome terminal has 3 ways to paste: menu command, Ctrl+Shift+V, Shift+Ins. Yup it's a real nightmare. I'm really not sure what happens in the three different cases. My patch fixes the menu command. ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
On Mon, Sep 16, 2013 at 12:40 AM, Felix Miata mrma...@earthlink.net wrote: It might make sense to turn it off by default, although I find this a really minor priority question. You can easily turn it off for yourself and then save your setup, and you're done forever :) I don't understand this response. I purposely have not tried to disable auto indent because it's something I routinely use. Sorry, apparently I misunderstood you. Can you try my patch with xterm or gnome-terminal? Konsole doesn't support the desired feature and I couldn't patch it in in about half an hour, so I just filed them a request. OTOH, I don't use it quite enough to have figured out why it sometimes auto indents a half tab instead of a full tab on a line start. -- The wise are known for their understanding, and pleasant words are persuasive. Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ __**_ mc-devel mailing list https://mail.gnome.org/**mailman/listinfo/mc-develhttps://mail.gnome.org/mailman/listinfo/mc-devel ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
Okay I managed to come up with a patch for Konsole too :) It's at https://bugs.kde.org/show_bug.cgi?id=324946 Just in case you feel like recompiling both konsole and mc to get this cool feature :) On Mon, Sep 16, 2013 at 1:04 AM, Egmont Koblinger egm...@gmail.com wrote: On Mon, Sep 16, 2013 at 12:40 AM, Felix Miata mrma...@earthlink.netwrote: It might make sense to turn it off by default, although I find this a really minor priority question. You can easily turn it off for yourself and then save your setup, and you're done forever :) I don't understand this response. I purposely have not tried to disable auto indent because it's something I routinely use. Sorry, apparently I misunderstood you. Can you try my patch with xterm or gnome-terminal? Konsole doesn't support the desired feature and I couldn't patch it in in about half an hour, so I just filed them a request. OTOH, I don't use it quite enough to have figured out why it sometimes auto indents a half tab instead of a full tab on a line start. -- The wise are known for their understanding, and pleasant words are persuasive. Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ __**_ mc-devel mailing list https://mail.gnome.org/**mailman/listinfo/mc-develhttps://mail.gnome.org/mailman/listinfo/mc-devel ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel
Re: bad mc-edit paste behavior?
On 2013-09-16 01:36 (GMT+0200) Egmont Koblinger composed: Just in case you feel like recompiling both konsole and mc to get this cool feature :) Besides normal use, I only install and test (a lot, on a lot of different hardware, never in a VM). I don't compile anything. When anyone builds rpms for Fedora, Mageia or openSUSE, and puts them where I can find them easily enough, I can try them. I appreciate your interest. I wasn't expecting anything to happen in response to my OP so swiftly. -- The wise are known for their understanding, and pleasant words are persuasive. Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ ___ mc-devel mailing list https://mail.gnome.org/mailman/listinfo/mc-devel