[ESS] comma in Julia REPL (change-directory, etc)

Tamas Papp tkp@pp @end|ng |rom gm@||@com
Sun Mar 8 18:53:15 CET 2015


Naturally, I would like to contribute to the ESS, especially since I
find Julia very nice as a programming language but don't want any other
environment than Emacs, so I will be using ESS.

However, Vitalie advised that I wait with pull requests until
https://github.com/emacs-ess/ESS/issues/119 is merged. Until that
happens (which I hope is very soon), I am collecting bits and pieces in
https://github.com/tpapp/ESS-julia-extensions , which I plan to convert
into a PR once 119 is merged.

Best,

Tamas

On Sat, Mar 07 2015, Martin Maechler <maechler using stat.math.ethz.ch> wrote:

> And "of course", Tamas,  we (ESS core) will/would be happy if could
> make your changes available,
> ideally via 'git pull request', or then via a "diff" patch file.. or similar.
>
> Best regards,
> Martin
>
> On Thu, Mar 5, 2015 at 10:31 PM, Vitalie Spinu <spinuvit using gmail.com> wrote:
>>  >>> Tamas Papp on Wed, 04 Mar 2015 17:10:52 +0100 wrote:
>>
>>  > I would like to implement them, can someone please suggest another
>>  > language used by ESS that I could use as an example? Perhaps not R,
>>
>> It's called ess-smart-comma and is bound to "," in repl. You have to
>> redefine `ess-handy-commands` for julia. That's all. Just remove
>> vignettes and other not needed stuff from there.
>>
>> Most of those functions are intended to be generic. You have to look at
>> the code of each of them. For example ess-change-directory is defined as
>>
>> ╭──────── #3259 ─ /home/vspinu/VC/ESS/lisp/ess-inf.el ──
>> │ (defun ess-set-working-directory (path &optional no-error)
>> │   "Set the current working directory to PATH for both ESS
>> │ subprocess and Emacs buffer `default-directory'."
>> │   (interactive "DChange working directory to: ")
>> │   (if ess-setwd-command
>> │       (let* ((remote (file-remote-p path))
>> │              (path (if remote
>> │                        (tramp-sh-handle-expand-file-name path)
>> │                      path))
>> │              (lpath (if remote
>> │                         (with-parsed-tramp-file-name path v v-localname)
>> │                       path)))
>> │         (ess-eval-linewise (format ess-setwd-command lpath))
>> │         ;; use file-name-as-directory to ensure it has trailing /
>> │         (setq default-directory (file-name-as-directory path)))
>> │     (unless no-error
>> │       (error "Not implemented for dialect %s" ess-dialect))))
>> ╰──────── #3275 ─
>>
>> You can immediately see from the definition of the error that the only
>> local variable that you need to define is `ess-setwd-command`. Put it in
>> `julia-customize-alist` and you are done. Same for other commands.
>>
>>
>>   Vitalie
>>
>> ______________________________________________
>> ESS-help using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help




More information about the ESS-help mailing list