[ESS] comma in Julia REPL (change-directory, etc)
Martin Maechler
m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Sat Mar 7 20:17:49 CET 2015
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