another patch: modifies selection

Hey List, Here's another patch. It modifies the XSelection module so you can pass a string modifying function to the promptSelect functions. This lets you run your own escape routines for various reasons. -Yaakov

On Sun, Dec 21, 2008 at 09:25:23PM -0500, Yaakov Nemoy wrote:
Hey List,
Here's another patch. It modifies the XSelection module so you can pass a string modifying function to the promptSelect functions. This lets you run your own escape routines for various reasons.
These functions seem useful. However, would you mind giving them better names, adding some Haddock documentation, and resubmitting the patch? Also, why is the unsafe variant necessary? -Brent

2009/1/1 Brent Yorgey
On Sun, Dec 21, 2008 at 09:25:23PM -0500, Yaakov Nemoy wrote:
Hey List,
Here's another patch. It modifies the XSelection module so you can pass a string modifying function to the promptSelect functions. This lets you run your own escape routines for various reasons.
These functions seem useful. However, would you mind giving them better names, adding some Haddock documentation, and resubmitting the patch? Also, why is the unsafe variant necessary?
I'm not sure what to call them other than those names. The unsafe variant is necessary because there is an unsafe variant of the original function. That said, the word 'unsafe' can be dropped from the function name. If you have any better names, just fill them in here, and i'll include them with my revised patch. -Yaakov
-Brent _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

On Fri, Jan 02, 2009 at 10:40:00AM -0500, Yaakov Nemoy wrote:
2009/1/1 Brent Yorgey
: On Sun, Dec 21, 2008 at 09:25:23PM -0500, Yaakov Nemoy wrote:
Hey List,
Here's another patch. It modifies the XSelection module so you can pass a string modifying function to the promptSelect functions. This lets you run your own escape routines for various reasons.
These functions seem useful. However, would you mind giving them better names, adding some Haddock documentation, and resubmitting the patch? Also, why is the unsafe variant necessary?
I'm not sure what to call them other than those names. The unsafe variant is necessary because there is an unsafe variant of the original function. That said, the word 'unsafe' can be dropped from the function name. If you have any better names, just fill them in here, and i'll include them with my revised patch.
Well, how about promptSelectionModify, promptSelectionModified, promptSelectionTransform... just to suggest a few off the top of my head. The names you gave just seemed too long. The names aren't really that big of a deal in the end, though, the real showstopper was the Haddock documentation. As long as you add some nice documentation I don't really care what you call the functions. =) The unsafe variant is fine if it really is needed, I was just trying to understand the difference between the two versions. -Brent

2009/1/2 Brent Yorgey
On Fri, Jan 02, 2009 at 10:40:00AM -0500, Yaakov Nemoy wrote:
2009/1/1 Brent Yorgey
: On Sun, Dec 21, 2008 at 09:25:23PM -0500, Yaakov Nemoy wrote:
Hey List,
Here's another patch. It modifies the XSelection module so you can pass a string modifying function to the promptSelect functions. This lets you run your own escape routines for various reasons.
These functions seem useful. However, would you mind giving them better names, adding some Haddock documentation, and resubmitting the patch? Also, why is the unsafe variant necessary?
I'm not sure what to call them other than those names. The unsafe variant is necessary because there is an unsafe variant of the original function. That said, the word 'unsafe' can be dropped from the function name. If you have any better names, just fill them in here, and i'll include them with my revised patch.
Well, how about promptSelectionModify, promptSelectionModified, promptSelectionTransform... just to suggest a few off the top of my head. The names you gave just seemed too long. The names aren't really that big of a deal in the end, though, the real showstopper was the Haddock documentation. As long as you add some nice documentation I don't really care what you call the functions. =) The unsafe variant is fine if it really is needed, I was just trying to understand the difference between the two versions.
I like transform. I put it first because that's the order the actions happen. I've included the original patch in the file, so they can apply as one, or even be merged (i'm not sure how to do that in darcs, just in git.) I'm not sure the unsafe variant is 'needed', but i put it in for symmetry and completeness. Plus my cat was asking for it to be there, so i was happy to comply. BTW, any comments about the other patch i submitted around the time of this one? -Yaakov

On Fri, Jan 02, 2009 at 02:15:47PM -0500, Yaakov Nemoy wrote:
2009/1/2 Brent Yorgey
: On Fri, Jan 02, 2009 at 10:40:00AM -0500, Yaakov Nemoy wrote:
2009/1/1 Brent Yorgey
: On Sun, Dec 21, 2008 at 09:25:23PM -0500, Yaakov Nemoy wrote:
Hey List,
Here's another patch. It modifies the XSelection module so you can pass a string modifying function to the promptSelect functions. This lets you run your own escape routines for various reasons.
These functions seem useful. However, would you mind giving them better names, adding some Haddock documentation, and resubmitting the patch? Also, why is the unsafe variant necessary?
I'm not sure what to call them other than those names. The unsafe variant is necessary because there is an unsafe variant of the original function. That said, the word 'unsafe' can be dropped from the function name. If you have any better names, just fill them in here, and i'll include them with my revised patch.
Well, how about promptSelectionModify, promptSelectionModified, promptSelectionTransform... just to suggest a few off the top of my head. The names you gave just seemed too long. The names aren't really that big of a deal in the end, though, the real showstopper was the Haddock documentation. As long as you add some nice documentation I don't really care what you call the functions. =) The unsafe variant is fine if it really is needed, I was just trying to understand the difference between the two versions.
I like transform. I put it first because that's the order the actions happen. I've included the original patch in the file, so they can apply as one, or even be merged (i'm not sure how to do that in darcs, just in git.) I'm not sure the unsafe variant is 'needed', but i put it in for symmetry and completeness. Plus my cat was asking for it to be there, so i was happy to comply.
Applied, thanks.
BTW, any comments about the other patch i submitted around the time of this one?
Hmm, which one was that? I don't see another patch. -Brent

2009/1/2 Brent Yorgey
On Fri, Jan 02, 2009 at 02:15:47PM -0500, Yaakov Nemoy wrote:
BTW, any comments about the other patch i submitted around the time of this one?
Hmm, which one was that? I don't see another patch.
This one. It lets you do stuff like kill all the open windows on any given workspace or move them in bulk to another workspace. Originally, the message read as: Hey List, Here's a bit of code i've found useful in my config. You can think of it as the 'get your *** out of work quickly card', as well as the 'oh ****, hide all the open porn!' button. Admittedly, i'm not sure it belongs in SinkAll, but that's where i shamelessly stole the code from. It also didn't seem like enough to actually spin out a new module just because. I'll let you all decide where it should go. Personally, i really don't care as much, just so long the functionality is there. :) Cheers, Yaakov

On Fri, Jan 02, 2009 at 03:45:23PM -0500, Yaakov Nemoy wrote:
2009/1/2 Brent Yorgey
: On Fri, Jan 02, 2009 at 02:15:47PM -0500, Yaakov Nemoy wrote:
BTW, any comments about the other patch i submitted around the time of this one?
Hmm, which one was that? I don't see another patch.
This one. It lets you do stuff like kill all the open windows on any given workspace or move them in bulk to another workspace.
Originally, the message read as:
Hey List,
Here's a bit of code i've found useful in my config. You can think of it as the 'get your *** out of work quickly card', as well as the 'oh ****, hide all the open porn!' button.
Admittedly, i'm not sure it belongs in SinkAll, but that's where i shamelessly stole the code from. It also didn't seem like enough to actually spin out a new module just because. I'll let you all decide where it should go. Personally, i really don't care as much, just so long the functionality is there. :)
Applied, thanks. I renamed it to XMonad.Actions.WithAll, and made SinkAll into a backwards-compatibility module that just re-exports the sinkAll function. -Brent

2009/1/27 Brent Yorgey
On Fri, Jan 02, 2009 at 03:45:23PM -0500, Yaakov Nemoy wrote:
2009/1/2 Brent Yorgey
: On Fri, Jan 02, 2009 at 02:15:47PM -0500, Yaakov Nemoy wrote:
BTW, any comments about the other patch i submitted around the time of this one?
Hmm, which one was that? I don't see another patch.
This one. It lets you do stuff like kill all the open windows on any given workspace or move them in bulk to another workspace.
Originally, the message read as:
Hey List,
Here's a bit of code i've found useful in my config. You can think of it as the 'get your *** out of work quickly card', as well as the 'oh ****, hide all the open porn!' button.
Admittedly, i'm not sure it belongs in SinkAll, but that's where i shamelessly stole the code from. It also didn't seem like enough to actually spin out a new module just because. I'll let you all decide where it should go. Personally, i really don't care as much, just so long the functionality is there. :)
Applied, thanks. I renamed it to XMonad.Actions.WithAll, and made SinkAll into a backwards-compatibility module that just re-exports the sinkAll function.
E_WORKSFORME :) Thanks! -Yaakov
participants (2)
-
Brent Yorgey
-
Yaakov Nemoy