Re: [R] Smart detection of wrap width?

2015-04-20 Thread Paul Domaskis
On Mon, Apr 20, 2015 at 10:59 AM, MacQueen, Don wrote: > I'm glad it's helpful! > > Defining it and then invoking it in ~/.Rprofile would work, but then > you will need to be careful about managing both ./.Rprofile and > ~/.Rprofile files. If you have one of the former, then the latter > does not

Re: [R] Smart detection of wrap width?

2015-04-20 Thread MacQueen, Don
I'm glad it's helpful! Defining it and then invoking it in ~/.Rprofile would work, but then you will need to be careful about managing both ./.Rprofile and ~/.Rprofile files. If you have one of the former, then the latter does not get sourced at startup (see ?Startup). Of course, you can put sourc

Re: [R] Smart detection of wrap width?

2015-04-20 Thread Paul
Paul Domaskis gmail.com> writes: > Yes, I found the width option in the help pages, but I was wondering > if there was automatic setting of the wrapping according to the > current window width. > > Your function works exactly as I wished. I'll probably get smarter > with time (I hope) but would

Re: [R] Smart detection of wrap width?

2015-04-20 Thread MacQueen, Don
At this point, and since we are in an X windows context, I think it might be easier to use the window manager's features and write a little macro or something that will send my setwid() command to the active window, then assign it to a simple keystroke. Then: resize the window; hit the keystroke,

Re: [R] Smart detection of wrap width?

2015-04-18 Thread Ista Zahn
I see now that the link I gave for configuring this is ESS doesn't give the whole enchilada. Here is what I currently have in my emacs config: (defun my-ess-execute-screen-options (foo) (ess-execute-screen-options)) (add-hook 'inferior-ess-mode-hook (lambda()

Re: [R] Smart detection of wrap width?

2015-04-18 Thread Peter Crowther
On Apr 17, 2015 7:37 PM, "Paul Domaskis" wrote: > I don't suppose there is a way to have it > automatically invoked when the window size/positition changes? Possibly, though it would take a little building. If you were to launch R directly when you start the xterm (loosely xterm R rather than th

Re: [R] Smart detection of wrap width?

2015-04-18 Thread Ista Zahn
For ESS see https://github.com/gaborcsardi/dot-emacs/blob/master/.emacs Best, Ista On Apr 17, 2015 7:37 PM, "Paul Domaskis" wrote: > > Yes, I found the width option in the help pages, but I was wondering > if there was automatic setting of the wrapping according to the > current window width. >

Re: [R] Smart detection of wrap width?

2015-04-17 Thread Paul Domaskis
Yes, I found the width option in the help pages, but I was wondering if there was automatic setting of the wrapping according to the current window width. Your function works exactly as I wished. I'll probably get smarter with time (I hope) but would it be reasonably good practice to stick this i

Re: [R] Smart detection of wrap width?

2015-04-17 Thread MacQueen, Don
A lot of this depends on what context you are running R in, e.g., Windows console, Mac console, or command line in a unix-alike. Or within ESS in emacs. Those are different interfaces supported by, to some extent, different people, and are based on the underlying capabilities provided by the operat

[R] Smart detection of wrap width?

2015-04-17 Thread paul
I suspect that the answer is "no", but just in case, is there a way to have R detect the window width and wrap accordingly? I don't want to set an option every time I dock a window or shrink it. In my ideal paradise, R would not only format output according to window width, but it would also me t