Csound Csound-dev Csound-tekno Search About

[Csound] Setting csound environment variables for Emacs shell

Date2015-10-07 09:47
FromHl=?UTF-8?Q?=C3=B6=C3=B0ver?=
Subject[Csound] Setting csound environment variables for Emacs shell
This is an old issue and I found some people in the archives having this
problem in the past. If I either run csound package for emacs or just open a
shell in emacs and type csound I always hit the same error message: WARNING:
Error opening plugin directory '~': No such file or directory

Some say it's a bad practice to use emacs shell so I dont worry too much
about this. But it will make my programming faster to stay in emacs rather
than to open seperate window. So does any Emacs/Csound user know the
workaround for this, how to tell emacs shell to find the corresponding
variables. I get the same output from "echo $PATH" in Emacs as I do in a
terminal app...

Date2015-10-07 10:01
FromVictor Lazzarini
SubjectRe: [Csound] Setting csound environment variables for Emacs shell
The problem I think is that ~ does not get expanded. You could try $HOME instead of ~
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 7 Oct 2015, at 09:47, Hlöðver  wrote:
> 
> This is an old issue and I found some people in the archives having this
> problem in the past. If I either run csound package for emacs or just open a
> shell in emacs and type csound I always hit the same error message: WARNING:
> Error opening plugin directory '~': No such file or directory
> 
> Some say it's a bad practice to use emacs shell so I dont worry too much
> about this. But it will make my programming faster to stay in emacs rather
> than to open seperate window. So does any Emacs/Csound user know the
> workaround for this, how to tell emacs shell to find the corresponding
> variables. I get the same output from "echo $PATH" in Emacs as I do in a
> terminal app...

Date2015-10-07 10:30
FromHlöðver Sigurðsson
SubjectRe: [Csound] Setting csound environment variables for Emacs shell
In every environment variable I do use $HOME instead of ~ but I now noticed that there is a difference between the two shells. Emacs shell will actually display a single tilde sign ~ with "echo $OPCODEDIR" and "echo OPCODEDIR64" while being empty in terminal app. Have no idea why emacs shell does this and no idea where to fix this. Changing OPCODEDIR and OPCODEDIR64 in .bash_profile had no effect on the error message WARNING: Error opening plugin directory '~': No such file or directory

2015-10-07 11:01 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
The problem I think is that ~ does not get expanded. You could try $HOME instead of ~
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 7 Oct 2015, at 09:47, Hlöðver <hlolli@GMAIL.COM> wrote:
>
> This is an old issue and I found some people in the archives having this
> problem in the past. If I either run csound package for emacs or just open a
> shell in emacs and type csound I always hit the same error message: WARNING:
> Error opening plugin directory '~': No such file or directory
>
> Some say it's a bad practice to use emacs shell so I dont worry too much
> about this. But it will make my programming faster to stay in emacs rather
> than to open seperate window. So does any Emacs/Csound user know the
> workaround for this, how to tell emacs shell to find the corresponding
> variables. I get the same output from "echo $PATH" in Emacs as I do in a
> terminal app...


Date2015-10-07 11:09
FromHlöðver Sigurðsson
SubjectRe: [Csound] Setting csound environment variables for Emacs shell
Ok, I believe I found the bug, it was inside Stephane Rollandin's csound-x in the file csound-x/csound-csd.el

(dolist (var '("SSDIR" "SFDIR" "INCDIR" "MFDIR" "SADIR"
           "OPCODEDIR" "OPCODEDIR64" "OPCODE6DIR" "OPCODE6DIR64"
           "RAWWAVE_PATH"))
  (cscsd-defenv var "~"))
 
(cscsd-defenv "CSOUNDRC" "~/.csoundrc")
(cscsd-defenv "CSOUND6RC" "~/.csound6rc")

Does someone know if Stephane is still maintaining csound-x? Looking trough these source files I see a lot of potential, I wish he would upload it on github.

2015-10-07 11:30 GMT+02:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
In every environment variable I do use $HOME instead of ~ but I now noticed that there is a difference between the two shells. Emacs shell will actually display a single tilde sign ~ with "echo $OPCODEDIR" and "echo OPCODEDIR64" while being empty in terminal app. Have no idea why emacs shell does this and no idea where to fix this. Changing OPCODEDIR and OPCODEDIR64 in .bash_profile had no effect on the error message WARNING: Error opening plugin directory '~': No such file or directory

2015-10-07 11:01 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
The problem I think is that ~ does not get expanded. You could try $HOME instead of ~
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 7 Oct 2015, at 09:47, Hlöðver <hlolli@GMAIL.COM> wrote:
>
> This is an old issue and I found some people in the archives having this
> problem in the past. If I either run csound package for emacs or just open a
> shell in emacs and type csound I always hit the same error message: WARNING:
> Error opening plugin directory '~': No such file or directory
>
> Some say it's a bad practice to use emacs shell so I dont worry too much
> about this. But it will make my programming faster to stay in emacs rather
> than to open seperate window. So does any Emacs/Csound user know the
> workaround for this, how to tell emacs shell to find the corresponding
> variables. I get the same output from "echo $PATH" in Emacs as I do in a
> terminal app...



Date2015-10-07 11:14
FromHlöðver Sigurðsson
SubjectRe: [Csound] Setting csound environment variables for Emacs shell
Confirmed, commenting out this part fixes all my csound->emacs-shell problems.

2015-10-07 12:09 GMT+02:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
Ok, I believe I found the bug, it was inside Stephane Rollandin's csound-x in the file csound-x/csound-csd.el

(dolist (var '("SSDIR" "SFDIR" "INCDIR" "MFDIR" "SADIR"
           "OPCODEDIR" "OPCODEDIR64" "OPCODE6DIR" "OPCODE6DIR64"
           "RAWWAVE_PATH"))
  (cscsd-defenv var "~"))
 
(cscsd-defenv "CSOUNDRC" "~/.csoundrc")
(cscsd-defenv "CSOUND6RC" "~/.csound6rc")

Does someone know if Stephane is still maintaining csound-x? Looking trough these source files I see a lot of potential, I wish he would upload it on github.

2015-10-07 11:30 GMT+02:00 Hlöðver Sigurðsson <hlolli@gmail.com>:
In every environment variable I do use $HOME instead of ~ but I now noticed that there is a difference between the two shells. Emacs shell will actually display a single tilde sign ~ with "echo $OPCODEDIR" and "echo OPCODEDIR64" while being empty in terminal app. Have no idea why emacs shell does this and no idea where to fix this. Changing OPCODEDIR and OPCODEDIR64 in .bash_profile had no effect on the error message WARNING: Error opening plugin directory '~': No such file or directory

2015-10-07 11:01 GMT+02:00 Victor Lazzarini <Victor.Lazzarini@nuim.ie>:
The problem I think is that ~ does not get expanded. You could try $HOME instead of ~
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 7 Oct 2015, at 09:47, Hlöðver <hlolli@GMAIL.COM> wrote:
>
> This is an old issue and I found some people in the archives having this
> problem in the past. If I either run csound package for emacs or just open a
> shell in emacs and type csound I always hit the same error message: WARNING:
> Error opening plugin directory '~': No such file or directory
>
> Some say it's a bad practice to use emacs shell so I dont worry too much
> about this. But it will make my programming faster to stay in emacs rather
> than to open seperate window. So does any Emacs/Csound user know the
> workaround for this, how to tell emacs shell to find the corresponding
> variables. I get the same output from "echo $PATH" in Emacs as I do in a
> terminal app...




Date2015-10-07 15:14
FromStéphane Rollandin
SubjectRe: [Csound] Setting csound environment variables for Emacs shell
Le 07/10/2015 12:14, Hlöðver Sigurðsson a écrit :
> Confirmed, commenting out this part fixes all my csound->emacs-shell
> problems.
>
> 2015-10-07 12:09 GMT+02:00 Hlöðver Sigurðsson  >:
>
>     Ok, I believe I found the bug, it was inside Stephane Rollandin's
>     csound-x in the file csound-x/csound-csd.el
>
>     (dolist (var '("SSDIR" "SFDIR" "INCDIR" "MFDIR" "SADIR"
>                 "OPCODEDIR" "OPCODEDIR64" "OPCODE6DIR" "OPCODE6DIR64"
>                 "RAWWAVE_PATH"))
>        (cscsd-defenv var "~"))
>
>     (cscsd-defenv "CSOUNDRC" "~/.csoundrc")
>     (cscsd-defenv "CSOUND6RC" "~/.csound6rc")
>
>     Does someone know if Stephane is still maintaining csound-x? Looking
>     trough these source files I see a lot of potential, I wish he would
>     upload it on github.

Thanks for the report. It's a bug affecting Emacs 25, which I have not 
installed yet. So yes, I am still maintaining csound-x. I will upload a 
fixed version soon.

As for github, I don't know...
Could you email me privately so that we can discuss this ?

Best,

Stef