I decided to try out Xemacs instead of Emacs in Linux (RH 7.2). After doing lots of configuration of Xemacs, I finally discovered a major problem. With Emacs, when I use R, I start Emacs twice (at least), in different viewports, once as emacs -f R and once as emacs myfile.R Then I try commands in the first one, and, when they work (which isn't very often), I cut the command with C-w, switich to the other viewport, and yank it into myfile.R with C-y. This takes very few keystrokes and does not require the mouse. Then myfile.R has something I can re-run (about 1/10 the size of .Rhistory). It seems that you can't do this in Xemacs. In particular, the kill buffer is not common to the various Xemacs processes that are running, unlike Emacs. I tried running the R process and myfile.R as bufffers in one Xemacs process, and this worked OK until I also tried help. Then I had three buffers, and it took many many keystrokes to switch from one to the other. I know that some people really like Xemacs with R. Can you give any advice? In the meantime I've gone back to Emacs. Sigh. Jon Baron -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Warnes, Gregory R
2002-Jan-07 23:44 UTC
[R] ESS with Xemacs? [vs. Emacs, slightly off topic]
Probably what is happening is that emacs is checking if it is already running and not starting separate executables. Two solutions: 1) Open a second emacs window explicitly... open xemacs once with xemacs myfile.R then do <Control>-x 5 2 or 'File'->'New Frame' to get a second window. In that one do <Meta>-X R. Or the other way around open xemacs once with xemacs -f R and then use 'File'->'Open in New Window' to open the second file. 2) Use gnuclient to open the second window... (you may need to put "(gnuserv-start)" in your .emacs file for this to work). xemacs -f R gnuclient myfile.R -Greg > -----Original Message----- > From: baron at cattell.psych.upenn.edu > [mailto:baron at cattell.psych.upenn.edu] > Sent: Monday, January 07, 2002 12:16 PM > To: r-help at stat.math.ethz.ch > Subject: [R] ESS with Xemacs? [vs. Emacs, slightly off topic] > > > I decided to try out Xemacs instead of Emacs in Linux (RH 7.2). > After doing lots of configuration of Xemacs, I finally discovered > a major problem. > > With Emacs, when I use R, I start Emacs twice (at least), in > different viewports, once as > emacs -f R > and once as > emacs myfile.R > > Then I try commands in the first one, and, when they work (which > isn't very often), I cut the command with C-w, switich to the > other viewport, and yank it into myfile.R with C-y. This takes > very few keystrokes and does not require the mouse. Then > myfile.R has something I can re-run (about 1/10 the size of > .Rhistory). > > It seems that you can't do this in Xemacs. In particular, the > kill buffer is not common to the various Xemacs processes that > are running, unlike Emacs. > > I tried running the R process and myfile.R as bufffers in one > Xemacs process, and this worked OK until I also tried help. Then > I had three buffers, and it took many many keystrokes to switch > from one to the other. > > I know that some people really like Xemacs with R. Can you give > any advice? In the meantime I've gone back to Emacs. Sigh. > > Jon Baron > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. _._ LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Warnes, Gregory R
2002-Jan-08 13:13 UTC
[R] ESS with Xemacs? [vs. Emacs, slightly off topic]
> From: Agustin Lobo [mailto:alobo at ija.csic.es]> Sent: Tuesday, January 08, 2002 7:47 AM > > Happy 2002 to everyone. > > I'm following Greg's directions (with some pain, as I'm not > an experienced (x)emacs user) and I find that I cannot use > fix() in the R session. > Before trying (x)emacs I normally had > a "raw" R session in an xterm and an editor in another window. > When I was done writing the function I run fix() and copied > and pasted > the function to the editor session that had been opened by fix(). > > I understand that, using (x)emacs I can save the function to a > text file and source() it in R, but this seems like an odd > procedure considering that both R and the function are in > windows of the same (x)emacs environment. Is there any simpler > way of passing the edited function to R? Hi Agustin, Are you using the emacs/xemacs package 'ESS'? [Highly recommended.] If you are, you can use '<Control>-<C> <Control>-<D> function-name' to bring a function in an (x)emacs buffer. To get edit/fix to work properly under (x)emacs, you need to tell R that you want it to call 'gnuclient' for editing. Do this by either setting the environment variable 'EDITOR' before starting R or by setting options(editor=...) with R. Note that setting the EDITOR environment variable will effect lots of programs... In my shell startup script I set my environment variable EDITOR to point to a small script file called 'MyEdit' that contains #!/bin/sh gnuclient $* || vi $* this first tries to open the file using 'gnuclient'. If this fails, which it will if (x)emacs is not running, it then tries to open the file using 'vi'. This works well for me. > By the way, is there an R-oriented guide or tutorial > to (x)emacs? In the ESS source directory, the doc/README.S contains a brief tutorial on using Splus/R with (x)emacs. Its not a real tutorial, but it should still be quite helpful. For a more general tutorial (x)emacs, try '<Control>-h t' It takes a while to get used to (x)emacs, but it really is a good environment for interacting with R/Splus once you've mastered it. -Greg LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Warnes, Gregory R
2002-Jan-08 13:15 UTC
[R] ESS with Xemacs? [vs. Emacs, slightly off topic]
Whoops, typo: > recommended.] If you are, you can use '<Control>-<C> > <Control>-<D> function-name' to bring a function in an should be > recommended.] If you are, you can use '<Control>-<c> > <Control>-<d> function-name' to bring a function in an (lower case 'c' and 'd') -Greg > -----Original Message----- > From: Warnes, Gregory R > Sent: Tuesday, January 08, 2002 8:13 AM > To: 'Agustin Lobo'; Warnes, Gregory R > Cc: 'baron at cattell.psych.upenn.edu'; 'r-help at stat.math.ethz.ch' > Subject: RE: [R] ESS with Xemacs? [vs. Emacs, slightly off topic] > > > > From: Agustin Lobo [mailto:alobo at ija.csic.es] > > Sent: Tuesday, January 08, 2002 7:47 AM > > > > Happy 2002 to everyone. > > > > I'm following Greg's directions (with some pain, as I'm not > > an experienced (x)emacs user) and I find that I cannot use > > fix() in the R session. > > Before trying (x)emacs I normally had > > a "raw" R session in an xterm and an editor in another window. > > When I was done writing the function I run fix() and copied > > and pasted > > the function to the editor session that had been opened > by fix(). > > > > I understand that, using (x)emacs I can save the function to a > > text file and source() it in R, but this seems like an odd > > procedure considering that both R and the function are in > > windows of the same (x)emacs environment. Is there any simpler > > way of passing the edited function to R? > > Hi Agustin, > > Are you using the emacs/xemacs package 'ESS'? [Highly > recommended.] If you are, you can use '<Control>-<C> > <Control>-<D> function-name' to bring a function in an > (x)emacs buffer. > > To get edit/fix to work properly under (x)emacs, you need > to tell R that you want it to call 'gnuclient' for editing. > Do this by either setting the environment variable > 'EDITOR' before starting R or by setting > options(editor=...) with R. Note that setting the EDITOR > environment variable will effect lots of programs... > > In my shell startup script I set my environment variable > EDITOR to point to a small script file called 'MyEdit' that contains > > #!/bin/sh > gnuclient $* || vi $* > > this first tries to open the file using 'gnuclient'. If > this fails, which it will if (x)emacs is not running, it > then tries to open the file using 'vi'. This works well for me. > > > By the way, is there an R-oriented guide or tutorial > > to (x)emacs? > > In the ESS source directory, the doc/README.S contains a > brief tutorial on using Splus/R with (x)emacs. Its not a > real tutorial, but it should still be quite helpful. > > For a more general tutorial (x)emacs, try '<Control>-h t' > > It takes a while to get used to (x)emacs, but it really is > a good environment for interacting with R/Splus once you've > mastered it. > > -Greg > LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._