I am using Emacs + ESS + Sweave to write a document. When I do multiline copy of noweb commands using M-w, switch to R buffer and execute them (C-y, RET), Emacs will sometimes freeze, forcing me to kill Emacs and start over. This also happens with C-c C-c
'ing of a text block.
EDIT: I am using Emacs 24.3.1, ESS 14.09, R 3.1.2.
EDIT: After some testing, the following file will reproduce this problem. Specifically, the first chunk will cause Emacs to hang. The only resolution is to first C-g
then switch to the R buffer and C-q C-c
to return full control.
\documentclass[10pt]{article}
\usepackage{graphicx, verbatim, geometry,amsmath,amssymb, natbib, float, enumerate, courier, underscore}
\usepackage[utf8x]{inputenc}
\geometry{margin=1in}
\setlength{\textwidth}{6.5in}
\setlength{\textheight}{9in}
\begin{document}
<<>>=
library(ggplot2)
dat <- matrix(runif(100), nrow=10)
cc <- apply(dat, 1, function(xx){
sum(cos(xx))
})
@
The quick brown fox jumps over the lazy dog.
<<>>=
bcc <- sapply(cc, function(xx){
fft(xx)
})
@
\end{document}
kill -USR2 <emacs-pid>
which will break most hangs and produce a backtrace. For extra info doM-x
profiler-start
when you start Emacs andM-x
profiler-report
after you kill. – PythonNut Feb 01 '15 at 17:03*Warnings*
buffer with a text about maximum undo steps exceeded. If that sounds familiar, I think it might make sense to file a bug to Emacs developers. – wvxvw Feb 01 '15 at 20:18send-region
instead? I think it'sC-c C-r
, which should be available from a Rnw document. – Tyler Feb 01 '15 at 20:23send-region
as well. Actually, it seems that sending\\w
apply() calls using one of {C-c C-c
,C-c C-r
,M-w C-y
} seems to be what kills it. Then it hangs atstarting evaluation
... – learner Feb 02 '15 at 12:10M-x package-install ess
. – slackline Dec 07 '18 at 14:02