'light' script always opens a new window
Bug Report
'light' script always starts a new window. I'm not sure if this is a bug or a feature but it would be nice if it would always open files in the same window, or if there was an option to do this.
Steps to Reproduce
- To make sure the install is clean, delete the lighttable directory in /Applications and delete "~/Library/Application Support/LightTable".
- Download lighttable-0.8.1-mac.tar.gz from LightTable website. It will extract automatically to ~/Downloads/lighttable-0.8.1-mac/
- Move lighttable-0.8.1-mac dir to /Applications.
- Start LightTable with <command>+<space> lighttable <Enter>.
- In terminal window, in home dir, run
-
/Applications/lighttable-0.8.1-mac/light .bashrc
-
This will start a new window with .bashrc. Repeating the script call will always open a new window.
Environment
| Info | Details |
|---|---|
| Light Table version | 0.8.1 |
| Binary Version | 0.34.5 |
| Operating system | macOS Sierra 10.12.2 |
No extra plugins. No modifications to user.keymap or user.behaviors.
Error Messages
On first startup with command+space method:
Failed to open path '/Users/chris/Library/Application Support/LightTable/ltcache/default.clj' with error: Error: ENOENT: no such file or directory, open '/Users/chris/Library/Application Support/LightTable/ltcache/default.clj'
Later starups using the command+space method produce no errors.
Terminal output when calling the 'light' script:
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
[warn] kq_init: detected broken kqueue; not using.: Undefined error: 0
Unfortunately, I do not have access to any macOS, but hopefully someone else is able to confirm this is a bug (or a feature request).
There is some relevant discussion about this topic at the Light Table forum, for Windows, at least:
https://groups.google.com/forum/#!topic/light-table-discussion/ZvKRV_lY_hk
This is an issue on the latest version of macOS (10.12.4) at the very least. Discussion on https://github.com/tmux/tmux/issues/475 offers the following code to prevent the error messages: export EVENT_NOKQUEUE=1. Unfortunately, this does nothing to prevent new windows from opening.
Thank you for confirming the issue exists, @jkroes.
@sbauer322 if we replace the last line of the script to the one using open -a ${APP_DIR}/LightTable.app/ --args $@, then the files are always opened in one LightTable instance.
Documentation
The problem is, however, that if we use open, then we don't get any stdout to the console. I guess, that the problem, that open command doesn't forward any output, this is why it is not printed out.
Still, when -h flag is passed, no LightTable instance is created (as intended, since the process will be killed and help output should be generated).
Any suggestions?