Xmonad.Util.Paste patch

This patch fixes pasting strings that contain whitespace characters -- Daan van Rossum

Hi Daan, The idea of this patch looks good to me, but the implementation looks a bit strange. Maybe these cases could be added to pasteChar with pattern-matching instead of pasteString with if/then/else... what do you think? I'm happy to be convinced otherwise. ~d On 2013-10-08 01:43, Daan van Rossum wrote:
This patch fixes pasting strings that contain whitespace characters
-- Daan van Rossum
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

...or, having read a bit more of the code, perhaps push the special cases even deeper: perhaps it makes sense to add some cases for these things to XMonad.Util.EZConfig.parseRegular. Though there I would want some EZConfig user/author to sign off that changing things there just so pasting works is a sensible thing to do. ~d On 2013-10-08 14:22, Daniel Wagner wrote:
Hi Daan,
The idea of this patch looks good to me, but the implementation looks a bit strange. Maybe these cases could be added to pasteChar with pattern-matching instead of pasteString with if/then/else... what do you think? I'm happy to be convinced otherwise.
~d
On 2013-10-08 01:43, Daan van Rossum wrote:
This patch fixes pasting strings that contain whitespace characters
-- Daan van Rossum
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

The differentiation was originally done in the pasteString function, so that's where I generalized it until it did what it should do. But I agree that the way you suggest would be more elegant. An more thorough solution would be to make (readP_to_S parseKey) return non-zero for whitespace chars. Anyway, please feel free to improve. I'd be happy to test better patches.
Daan
* on Tuesday, 08.10.13 at 14:22, Daniel Wagner
Hi Daan,
The idea of this patch looks good to me, but the implementation looks a bit strange. Maybe these cases could be added to pasteChar with pattern-matching instead of pasteString with if/then/else... what do you think? I'm happy to be convinced otherwise.
~d
On 2013-10-08 01:43, Daan van Rossum wrote:
This patch fixes pasting strings that contain whitespace characters
-- Daan van Rossum
participants (2)
-
Daan van Rossum
-
Daniel Wagner