[dev] WMII / ruby question about launch method in config.rb

From: Armando Di Cianno <armando_AT_goodship.net>
Date: Tue, 8 Dec 2009 12:46:26 -0500

Suraj + all,

I'm running the 3.9b1 release here, on a Gentoo Linux system. I'm
running Suraj's latest wmiirc, from the git repo, with (so far) minor
additions.

I've editted my config.yaml a bit (making it very task/project based),
but generally haven't altered the basic functionality yet. I'm
confused with the launch method in config.rb, as I can't seem to make
it launch a command with options. For example, I have
CONFIG['progam']['editor'] set to "emacsclient --alternate-editor
emacs +%d %s" (my basic idea here is to have at most one and exactly
one emacs instance per tag). Just having CONFIG['progam']['editor']
set to "emacs" works just fine.

[Aside: yes, I know emacs sucks, but I've found no better programming
editor with respect being language/context aware, so just bear with
me, please.]

Now, if I open up irb, and recreate the launch method, here's what I see:

irb(main):067:0> cmd = "emacsclient --alternate-editor emacs foo"
=> "emacsclient --alternate-editor emacs foo"

irb(main):068:0> system(cmd)
Waiting for Emacs...
=> true
... i.e., it works.

irb(main):069:0> launch(cmd)
sh: emacsclient --alternate-editor emacs foo: command not found
=> true
... i.e. it failed to launch.

... so, I guess I'm asking what the intention of the "command =
words.shelljoin" in the launch method was supposed to really do?
Would removing the line, which does work, be a good idea overall, or
am I missing the real intention you had in mind?

__armando
Received on Tue Dec 08 2009 - 17:46:26 UTC

This archive was generated by hypermail 2.2.0 : Tue Dec 08 2009 - 17:48:02 UTC