roswell / roswell

intended to be a launcher for a major lisp environment that just works.
MIT License
1.79k stars 121 forks source link

Unresolved Issue: /bin/bash: ros: command not foundconfig #494

Open rocksolidity opened 3 years ago

rocksolidity commented 3 years ago

Please note that this issue was submitted some time ago by someone else (and I viewed the detailed interactions a short while ago) but it was not fully resolved (at least not for my case). I think it only refers to macOS and in my experience only one specific situation is affected as I will explain below but first I include the necessary details for posting here.


Environment

uname -a
Darwin schultz-4.local 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
ros --version    # if roswell runs successfully
roswell 21.06.14.110(NO-GIT-REVISION)
build with Apple clang version 12.0.5 (clang-1205.0.22.9)
libcurl=7.64.1
Quicklisp=2021-02-13
Dist=2021-08-07
lispdir='/usr/local/Cellar/roswell/21.06.14.110/etc/roswell/'
homedir='/Users/rama/.roswell/'
sbcl-bin-variant=''
ros config
ecl.version=21.2.1
cmu-bin.version=21d
sigsegv.version=2.11
allegro.version=10.1express
abcl-bin.version=1.8.0
sbcl.version=2.1.9
emacs.type=slime
slime.version=2021.08.07
ccl-bin.version=1.12.1
setup.time=3841848590
sbcl-bin.version=2.1.9
default.lisp=sbcl-bin

Possible subcommands:
set
show

Entry in .emacs file

;;;(add-to-list 'exec-path "/usr/local/bin")
(load (expand-file-name "~/.roswell/helper.el"))
(setq inferior-lisp-program "ros -Q run")

I initially inserted only the last two lines as the tutorial suggests, but I also tried using a suggestion from one person on the forum to including /usr/local/bin in the exec-path.

How to reproduce the issue

My issue only occurs if I double click on a file icon in the Finder. I get an error when Emacs opens and the following is in my Warnings buffer. (I have Emacs assigned as the default application for .lisp, .asd and .org files for example.

Warning (initialization): An error occurred while loading ‘/Users/rama/.emacs’:

File is missing: Opening input file, No such file or directory, /bin/bash: ros: command not foundconfig

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.

I do not get this error when I launch emacs using Roswell or by emacs <filename> or even by open <filename> from the Terminal.

It could be a problem with the launching options from macOS but I would really like to find a solution because in many contexts when looking over files in different directories and making some editing changes I prefer to launch Emacs with a double click.

IN CASE I HAVE A RUNNING EMACS PROCESS THEN I DO NOT GET THE ERROR! This confuses me and perhaps it is an Emacs issue too - but I am submitting it here because I have never experienced this before with any other program in 12 years actively using OS X. It is only after installing Roswell yesterday that I have had problems and I would really like to know how to trouble shoot it because I feel it is a good tool for me in the long term for many reasons. Already I have found installing some of the less frequently used Lisps made very easy for me by using Roswell.

This is my first post here and I hope that I have followed the guidelines. I will be happy to edit or add more info as needed. Many thanks.

Rama Lakshmanan

snmsts commented 3 years ago

Are there emacs on osx user here? You should check how the envvar changes and how you should manage when emacs launched from shell or from finder.

rocksolidity commented 3 years ago

Are there emacs on osx user here? You should check how the envvar changes and how you should manage when emacs launched from shell or from finder.

Thanks for this feedback. I have been trying to find out more details about how macOS implements the open command but no luck as yet. I have been working on other things so have left this for now. I actually have Emacs also installed as an App using homebrew so maybe I should try and figure out how to use one or the other. The problem is that I need to have an App that in Apple's framework in order for me to be able to launch from the Finder by double clicking. I cannot specify a binary as far as I know but maybe some Automator option might work and I can launch Emacs using Roswell. I will keep trying and if I figure out a solution I will post it here. I am managing by having a running Emacs all the time (launched from the Terminal). Then it seems as though I can launch with the Application. There is an emacsclient binary in the App but not an actual emacs binary.