Am Sat, 20 Feb 2010 12:03:42 +0100 schrieb Christopher Roy Bratusek <[email protected]>:
> Am Sat, 20 Feb 2010 14:54:09 +0900 (JST) > schrieb Teika Kazura <[email protected]>: > > > Chris, are you going to replace the current jump-or-exec > > with cycle-or-exec? If so, I won't touch jump-or-exec.jl for a while. > > It seems good. > > Nope. I wanted to have both. Besides cycle-or-exec (coe) technically can't > replace > jump-or-exec (joe): > > a) the case of multiple matches is pretty low as both start an app or switch > to it, > more instances must be started manually and since I'm using joe the amount of > windows on my desktop dramatically decreased (yay!) > > b) coe is a cycling command, therefore the binding must start with a > modifier, fake > modifiers from macros ("nested keybindings") won't work, joe wins here. > > Chris > > > > > But the *filename* jump-or-exec.jl is really good, so we should't > > throw it away. > > > > I'll work on it later, waiting my class enhancements, but what you > > want must look like this: > > ------------------------------------------------------------------------ > > (define (cycle-or-exec re prog #!key name match-class) > > (let (forward-name backward-name) > > (when (stringp prog) > > (setq name prog)) > > (if name > > (prog > > (setq forward-name (concat "cycle-" name)) > > (setq backward-name (concat forward-name "-backwards"))) > > (setq forward-name > > (concat "cycle-" (closure-name prog))) > > (setq backward-name > > (concat forward-name "-backwards"))) > > (if match-class > > (define-cycle-command-pair > > forward-name backward-name > > (cycle-or-exec-backend (filter-windows-by-class re) prog)) > > (define-cycle-command-pair > > forward-name backward-name > > (cycle-or-exec-backend (filter-windows-by-name re) prog))))) > > ------------------------------------------------------------------------ > > This is closer to the original one. Here, 'intern' is not necessary. > > (I learned what's 'intern'. :) > > even more comfort with the key and name arg. key arg for joe would also be > good, > wouldn't it? with *a* key arg. to pass the desired keybinding directly to joe or coe. say (jump-or-exec "regex" "app" "keybinding" "match-class" "on-focus"), no? > > Also shouldn't filter-windows-by-name/class go into windows.jl rather than > cycle-or-exec.jl, I thougth so, as they are usefull for other stuff, too. > > > 1. 'prog' can be string or function, as original. > > 2. If 'name' is non-nil, it's used as the name for command. > > 3. Else, the function name is used for command. > > > > On Sat, 13 Feb 2010 21:10:20 +0100, Christopher Roy Bratusek wrote: > > > 2. Someone got a link to a good lisp doc (got holidays next week, so > > > finally some time to get more familar with something different when > > > python). > > > > It may be trivial, but it's good to ask at ML, too, if you come across > > a lisp riddle. If you don't know something, many don't, so asking here > > helps to share knowledge. :) > > > > Regards, > > Teika (Teika kazura) > > > > > -- Wettbewerb »Extend Firefox 3.5« gestartet Gesendet von speedy am Mi, 17. Jun 2009 um 10:00 Ein Wettbewerb "Entfettet Firefox 3.5" wäre mir ehrlich gesagt lieber.
