0

I am new to Emacs and one thing I really like about it is the "tramp". I use R with ESS and usually "tramp" to my work computer from home. We also have an HPC server and I am wondering whether it is possible to open a "tramp" to the HPC server, call an interactive session using "qrsh" and open an ESS based R process. I've done this just by "tramping" to a terminal then called "qrsh" and ran an R process inside the terminal. I could send commands from my script to the shell-based R process but obviously this is not the same as having ESS's inferior R mode.

Thanks.

Edit: I've tried

(add-to-list 'tramp-methods                                                                                                                                                                                        
  '("qrsh"                                                                                                                                                                                                         
    (tramp-login-program        "qrsh")                                                                                                                                                                            
    (tramp-login-args           (("-V -cwd -l inter -l short"))) ; other options here?                                                                                                                             
    ;; Local $SHELL could be a nasty one, like zsh or fish.  Let's override it.                                                                                                                                    
    (tramp-login-env            (("SHELL") ("/bin/sh")))                                                                                                                                                           
    (tramp-remote-shell         "/bin/sh")                                                                                                                                                                         
    (tramp-remote-shell-args    ("-c"))                                                                                                                                                                            
    (tramp-connection-timeout   10)))    

Then after M-x R RET /ssh:myserver|qrsh:myserver:TempDir RET

Stefan
  • 26,154
  • 3
  • 46
  • 84
Arktik
  • 932
  • 4
  • 15
  • Have you tried the proposal in ? – Michael Albinus Oct 03 '17 at 14:34
  • I've tried the method proposed in that post. After M-x R, ESS asks for directory to launch R, I've tried /ssh:myserver|qrsh:myserver:TempDir with appropriate modifications to .emacs file. It seems that it didn't work. – Arktik Oct 03 '17 at 15:26
  • Before trying it with `M-x R`, you'll probably want to try `C-x C-f /ssh:myserver|qrsh:myserver:TempDir RET`. But in any cse you need to clarify what you mean by "t didn't work", e.g. by looking to see if you got some error message or if it's hanging, .... – Stefan Oct 03 '17 at 18:04
  • I've tried the C-x C-f suggestion - nothing happened. From the terminal I usually run "qrsh -V -cwd -l inter -l short bash" or "-l short R". I've tried adding "-l short bash" or "-l short sh" to the end of the "tramp-login-args", it didn't work - Emacs just hangs using all CPU. I tried to get the trace output, the only thing I get is a lot of lines with "tramp-completion-file-name-handler: "/usr/" (different variation of these line). As I said, I am fairly new to Emacs and for most of these things is copy/paste or just a stab in the dark. I just thought someone must have done this. – Arktik Oct 03 '17 at 18:54

0 Answers0