Re: [ESS] Displaying R plots within an Emacs buffer
I've tidied up the code for showing R plots as SVG in an Emacs buffer; it is now on melpa: https://melpa.org/#/essgd so package.el can grab it easily enough. Best wishes, Stephen On Wed, Mar 27 2024, Stephen J. Eglen wrote: I've got it now working locally so that the aspect ratio is the same size as the window that you use to view the svg. This I think is more flexible. Looking forward to that functionality :-) Version 2 is now live for testing: code: https://github.com/sje30/ess-unigd/tree/main/v2 demonstration: https://youtu.be/TrwE_80eVTw Stephen __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] ess-set-working-directory
hi Kevin, Rodney, I think the variable and setting you are looking for is: (setq ess-startup-directory 'default-directory) Best wishes, Stephen On Sun, Mar 31 2024, Kevin Coombes via ESS-help wrote: I don't know where this "feature" lives in the code. But it might help find it to know that it does the same thing in any git project or subversion project, even if it isn't an R package. Hopefully, someone can track it down, since I view it as a bug I want to remove, and not a feature. Best, Kevin On Sat, Mar 30, 2024, 11:51 AM Sparapani, Rodney via ESS-help < ess-help@r-project.org> wrote: Hi ESS-help: When I am working on an R script that is not part of an R package, then ess-set-working-directory does what would be expected, i.e., on a launch of R it does setwd() to the buffer’s default-directory. However, when I am in, say, the demo directory of an R package, then it doesn’t. It places me at the root of the R package. I can’t seem to figure out where this is taking place. It must have something to do with ess-r-package.el. But I am stumped about how to make it stop. Any advice is much appreciated. Thanks -- Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His Vice President, Wisconsin Chapter of the American Statistical Association Institute for Health and Equity, Division of Biostatistics Medical College of Wisconsin, Milwaukee Campus If this is outside of working hours, then please respond when convenient. [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help [[alternative HTML version deleted]] __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] Displaying R plots within an Emacs buffer
I've got it now working locally so that the aspect ratio is the same size as the window that you use to view the svg. This I think is more flexible. Looking forward to that functionality :-) Version 2 is now live for testing: code: https://github.com/sje30/ess-unigd/tree/main/v2 demonstration: https://youtu.be/TrwE_80eVTw Stephen __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] Displaying R plots within an Emacs buffer
- I works perfectly for me in two different machines (both running Debian and Emacs 29.2.50) Thanks for confirming. - Maybe I am not understanding https://github.com/sje30/ess-unigd#adjust-to-size-of-buffer--dynamically-update , but resize of image (on changing frame and window sizes) happens automagically for me. - The only minor thing is that, for some reason, the svg is shown in Fundamental mode (if I find-file other svgs, they are shown as images directly); I guess it is something with my setup. revert-buffer solves it. The code that you have currently just uses the default aspect ratio that httpgd() provides, i.e. 720x576 pixels. The images will rescale as you change the buffer, but the aspect ratio won't change. I've got it now working locally so that the aspect ratio is the same size as the window that you use to view the svg. This I think is more flexible. __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] Displaying R plots within an Emacs buffer
Hi Stephen: With emacs v29.2, I keep getting this error and I can.t figure out why. apply: Searching for program: Permission denied, ./check_outputs.pl I have perl and curl installed. So this what I see. hi Rodney, did you do: chmod +x ./check_outputs.pl and that the perl script is in your current directory? options(width=80, length=9) setwd('/home/rsparapa') require(httpgd) Loading required package: httpgd hgd(port=5900, token=FALSE) httpgd server running at: http://127.0.0.1:5900/live __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
[ESS] Displaying R plots within an Emacs buffer
This is an itch I've had for ESS for probably at least 10 years... how to get R plots displayed dynamically in an Emacs buffer? See code [1] and demo [2] for a proof of concept. Feedback (and any expertise with websockets) welcome! Best wishes, Stephen [1] https://github.com/sje30/ess-unigd [2] https://youtu.be/1h7UR7t9JFM __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help
Re: [ESS] How to Duplicate Previous Functionality/Workflow
> (You probably didn't do this, because Docview isn't great for > pdfs. The now abandoned package pdf-tools was a great option for > reading pdfs inside Emacs). just to add a couple of comments: 1. pdf-tools was forked about 1-2 years ago, and now active at: https://github.com/vedang/pdf-tools It can be a bit fussy to install compared to most Emacs packages, because of dependencies and the binaries it creates. However, I like it and use it regularly. 2. A non-answer to the original question, but I prefer writing Makefiles to build my documents, rather than using Emacs functionality. Emacs has a good interface to running make (e.g. through M-x compile). Use whatever is best for you, but just thought I'd mention it. Stephen __ ESS-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/ess-help