On Sat, 18 Sep 2010 19:45:21 +0200, Christopher Roy Bratusek wrote: >> A. I propose to merge it to jump-or-exec; > > One thing could be a base-function with jor and tor-wrappers. Yes. So at least we can do with one module.
(As a side effect, it'll be easier to navigate through the lisp file directories if there're fewer files. Until a few years ago, I was not familiar, and it was a labyrinth for me.) > the different things [...] should be honorerd with two different > commands. I also think that's more intuitive. It's true, but one file will be simple enough, too. Let's review the situation; toggle-or-exec can be implemented as a new option to jump-or-exec. But it already has the argument `oufocused'. So if we change it to: (define (jump-or-exec regex prog #!key match-class onfocused) ...) Then toggle-or-exec can be written by jump-or-exec as: ( bind-keys global-keymap "W-F10" `( jump-or-exec "Geany" "geany" #:onfocused 'hide ;; look here ) ) For me, it's simple enough. :) # Current j-or-e can already surrogate t-or-e, by passing # `iconify-window' as "onfocused", The strength of providing them as a single function is that you can add any more options in future. > Attached is a version, which adds (and makes use of) a new "exit-leave" > window-matcher. > We could manually do window-put in the before-add-window-hook, but a > window-matcher saves > some lines of code and does the same. I thought the same. :) Matcher is much better. As for the name, "iconify-on-leave" is more self-descriptive. >> F. >> If it'll be an independent func / module, how about the name >> `show-hide-or-exec' [instead of toggle-or-exec]? > > sound unintuitive. Well, same for toggle. But as soon as people know what the > function > does, toggle is better I believe. At first glance, I didn't understand it. "Toggle? Toggle what?" It's after I read the code that I understood this new device. (Even the document didn't help. ;) Before dwelling on this, I'll finish cycle-or-exec. Best regards, Teika (Teika kazura)
