Apologies for this very trivial 'issue'. It's probably only relevant to my unusual use case, where I'm 'installing' ESS (from source) into my .emacs.d/ directory, rather than the usual places (i.e., via elpa, or in /usr/emacs/site-lisp).
The variable ess-lisp-directory is defined in ess-custom.el:
it is passed on to file-name-directory again. When file-name-directory receives a directory, it returns the same directory. In this case I think the intention is to return the parent directory of ess-lisp-directory, so this is an error. The consequence is that when I call ess-version I get the following message:
ess-version: [<unknown>] (loaded from /home/smithty/.emacs.d2/repos/ess/lisp/)
I think this can be corrected by coercing ess-lisp-directory to a directory file name:
With this change, I get the correct value from ess-version:
ess-version: [git: d941b25f10716c307f546bdd9cb85d4ac5c1cf38] (loaded from /home/smithty/.emacs.d2/repos/ess/lisp/)
Since this doesn't actually change the value of ess-lisp-directory, and ess-dir is local to the function ess-version-string, I don't think it should break anything.
I'm a little embarrassed to raise such a trivial issue. Really I just want to make sure I'm installing ESS properly, in the event that I'm then able to contribute anything of more substance in future.
In any case, if this makes sense I could make a pull request.
Apologies for this very trivial 'issue'. It's probably only relevant to my unusual use case, where I'm 'installing' ESS (from source) into my
.emacs.d/
directory, rather than the usual places (i.e., via elpa, or in /usr/emacs/site-lisp).The variable
ess-lisp-directory
is defined iness-custom.el
:https://github.com/emacs-ess/ESS/blob/d941b25f10716c307f546bdd9cb85d4ac5c1cf38/lisp/ess-custom.el#L137-L140
Using
file-name-directory
should always return a directory, which in my case is "/home/smithty/.emacs.d2/repos/ess/lisp/" (note the trailing /).When that string is used to define
ess-dir
iness.el
:https://github.com/emacs-ess/ESS/blob/d941b25f10716c307f546bdd9cb85d4ac5c1cf38/lisp/ess.el#L87-L88
it is passed on to
file-name-directory
again. Whenfile-name-directory
receives a directory, it returns the same directory. In this case I think the intention is to return the parent directory ofess-lisp-directory
, so this is an error. The consequence is that when I calless-version
I get the following message:I think this can be corrected by coercing
ess-lisp-directory
to a directory file name:With this change, I get the correct value from
ess-version
:Since this doesn't actually change the value of
ess-lisp-directory
, andess-dir
is local to the functioness-version-string
, I don't think it should break anything.I'm a little embarrassed to raise such a trivial issue. Really I just want to make sure I'm installing ESS properly, in the event that I'm then able to contribute anything of more substance in future.
In any case, if this makes sense I could make a pull request.