emacs-ess / ESS

Emacs Speaks Statistics: ESS
https://ess.r-project.org/
GNU General Public License v3.0
622 stars 162 forks source link

ess-display-help-on-object on lme4 will stop emacs #44

Closed ShuguangSun closed 11 years ago

ShuguangSun commented 11 years ago

emacs version 24.3.50.1 ess version 13.05

In R, when load library 'lme4', and run ess-display-help-on-object (C-c C-v) will hung emacs. with message: Forming completions for .GlobalEnv...done Forming completions for package:longpower...done Forming completions for package:nlme...done Forming completions for package:lme4...

vspinu commented 11 years ago

I cannot reproduce this. It probably has something to do with other packages installed. Can you reproduce by only loading package lme4 in clean R session? Do you set options(error=recover)?

ShuguangSun notifications@github.com on Sat, 01 Jun 2013 07:56:16 -0700 wrote:

emacs version 24.3.50.1 ess version 13.05

In R, when load library 'lme4', and run ess-display-help-on-object (C-c C-v) will hung emacs. with message: Forming completions for .GlobalEnv...done Forming completions for package:longpower...done Forming completions for package:nlme...done Forming completions for package:lme4...


Reply to this email directly or view it on GitHub: https://github.com/emacs-ess/ESS/issues/44

ShuguangSun commented 11 years ago

thanks. when i remove '(ess-use-auto-complete (quote script-only)) from my dot emacs file. It works well.

But if i remove '(ess-use-auto-complete (quote script-only)) from my dot emacs file, I'll get another error:

  1. open a R session
  2. library(lme4)
  3. type "lme4" then TAB which will call auto-complete (make sure auto-complete works)
  4. an error with raised with error message : Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) mouse-avoidance-point-position() mouse-avoidance-too-close-p((#<frame R 039e0210> 56 . 2)) mouse-avoidance-fancy() apply(mouse-avoidance-fancy nil) byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4) timer-event-handler([t 0 0 100000 t mouse-avoidance-fancy nil idle 0]) accept-process-output(# 0.001) ess-wait-for-process(# nil nil nil) ess-command("tryCatch(base::print(base::names(.GlobalEnv), max=1e6), error=function(e){})\n" #<buffer ess-get-words> sleep nil nil) ess-get-words-from-vector("tryCatch(base::print(base::names(.GlobalEnv), max=1e6), error=function(e){})\n") ess-object-names(".GlobalEnv" 1) ess-extract-onames-from-alist(((".GlobalEnv" nil) ("package:stats" nil ".checkMFClasses" ".getXlevels" ".MFclass" "acf" "acf2AR" "add.scope" "add1" "addmargins" "aggregate" "aggregate.data.frame" "aggregate.default" "aggregate.ts" "AIC" "alias" "anova" "anova.glm" "anova.glmlist" "anova.lm" "anova.lmlist" "anova.mlm" "ansari.test" "aov" "approx" "approxfun" "ar" "ar.burg" "ar.mle" "ar.ols" "ar.yw" "arima" "arima.sim" "arima0" "arima0.diag" "ARMAacf" "ARMAtoMA" "as.dendrogram" "as.dist" "as.formula" "as.hclust" "as.stepfun" "as.ts" "asOneSidedFormula" "ave" "bandwidth.kernel" "bartlett.test" "BIC" "binom.test" "binomial" ...) ("package:graphics" nil ".filled.contour" "abline" "arrows" "assocplot" "axis" "Axis" "axis.Date" "axis.POSIXct" "axTicks" "barplot" "barplot.default" "box" "boxplot" "boxplot.default" "boxplot.matrix" "bxp" "cdplot" "clip" "close.screen" "co.intervals" "contour" "contour.default" "coplot" "curve" "dotchart" "erase.screen" "filled.contour" "fourfoldplot" "frame" "grconvertX" "grconvertY" "grid" "hist" "hist.default" "identify" "image" "image.default" "layout" "layout.show" "lcm" "legend" "lines" "lines.default" "locator" "matlines" "matplot" "matpoints" "mosaicplot" ...) ("package:grDevices" nil ".axisPars" "adjustcolor" "as.graphicsAnnot" "as.raster" "axisTicks" "bitmap" "blues9" "bmp" "boxplot.stats" "bringToTop" "cairo_pdf" "cairo_ps" "check.options" "chull" "CIDFont" "cm" "cm.colors" "col2rgb" "colorConverter" "colorRamp" "colorRampPalette" "colors" "colorspaces" "colours" "contourLines" "convertColor" "densCols" "dev.capabilities" "dev.capture" "dev.control" "dev.copy" "dev.copy2eps" "dev.copy2pdf" "dev.cur" "dev.flush" "dev.hold" "dev.interactive" "dev.list" "dev.new" "dev.next" "dev.off" "dev.prev" "dev.print" "dev.set" "dev.size" "dev2bitmap" "devAskNewPage" "deviceIsInteractive" ...) ("ESSR" nil) ("package:utils" nil ".DollarNames" "?" "adist" "alarm" "apropos" "aregexec" "argsAnywhere" "arrangeWindows" "as.person" "as.personList" "as.relistable" "as.roman" "aspell" "aspell_package_C_files" "aspell_package_R_files" "aspell_package_Rd_files" "aspell_package_vignettes" "aspell_write_personal_dictionary_file" "assignInMyNamespace" "assignInNamespace" "available.packages" "bibentry" "browseEnv" "browseURL" "browseVignettes" "bug.report" "capture.output" "checkCRAN" "choose.dir" "choose.files" "chooseBioCmirror" "chooseCRANmirror" "citation" "cite" "citeNatbib" "citEntry" "citFooter" "citHeader" "close.socket" "combn" "compareVersion" "contrib.url" "count.fields" "CRAN.packages" "create.post" "data" "data.entry" "dataentry" ...) ("package:datasets" nil "ability.cov" "airmiles" "AirPassengers" "airquality" "anscombe" "attenu" "attitude" "austres" "beaver1" "beaver2" "BJsales" "BJsales.lead" "BOD" "cars" "ChickWeight" "chickwts" "co2" "CO2" "crimtab" "discoveries" "DNase" "esoph" "euro" "euro.cross" "eurodist" "EuStockMarkets" "faithful" "fdeaths" "Formaldehyde" "freeny" "freeny.x" "freeny.y" "HairEyeColor" "Harman23.cor" "Harman74.cor" "Indometh" "infert" "InsectSprays" "iris" "iris3" "islands" "JohnsonJohnson" "LakeHuron" "ldeaths" "lh" "LifeCycleSavings" "Loblolly" "longley" ...) ("package:methods" nil ".C(" ".C.environment" ".C.externalptr" ".C.name" ".C.NULL" ".C.Other" ".C{" ".C<-" ".*CactiveBindingFunction" ".Canova" ".Canova.glm" ".Canova.glm.null" ".CANY" ".Caov" ".Carray" ".Cbuiltin" ".Ccall" ".Ccharacter" ".CclassGeneratorFunction" ".CclassName" ".CclassPrototypeDef" ".CclassRepresentation" ".CClassUnionRepresentation" ".Ccomplex" ".CconditionalExtension" ".Cdata.frame" ".Cdata.frameRowLabels" ".CDate" ".CdefaultBindingFunction" ".Cdensity" ".CderivedDefaultMethod" ".CderivedDefaultMethodWithTrace" ".Cdump.frames" ".CEmptyMethodsList" ".Cenvironment" ".CenvRefClass" ".Cexpression" ".Cexternalptr" ".Cfactor" ".Cfor" ".Cformula" ".Cfunction" ".CfunctionWithTrace" ".CgenericFunction" ".CgenericFunctionWithTrace" ".Cglm" ".Cglm.null" ".C__groupGenericFunction" ...) ("Autoloads" nil ".Autoloaded") ("package:base" nil "-" "-.Date" "-.POSIXt" "!" "!.hexmode" "!.octmode" "!=" "$" "$.DLLInfo" "$.packageversion" "$<-" "$<-.data.frame" "%%" "%%" "%/%" "%in%" "%o%" "%x%" "&" "&&" "&.hexmode" "&.octmode" "(" "_" ".difftime" ".__H.cbind" ".H.rbind" ".S3MethodsTable**." ".amatch_bounds" ".amatch_costs" ".ArgsEnv" ".AutoloadEnv" ".BaseNamespaceEnv" ".bincode" ".C" ".C_R_addTaskCallback" ".C_R_getTaskCallbackNames" ".C_R_removeTaskCallback" ".cache_class" ".Call" ".Call.graphics" ".colMeans" ".colSums" ".decode_numeric_version" ".Defunct" ".deparseOpts" ".Deprecated" ".detach" ...)) 1 force) ess-ac-objects() ess-ac-candidates() ac-candidates-1(((prefix . ess-ac-start) (candidates . ess-ac-candidates) (document . ess-ac-help))) ac-candidates() ac-update(nil) ac-update-greedy() apply(ac-update-greedy nil) byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4) timer-event-handler([t 0 0 100000 0.1 ac-update-greedy nil idle 0])
  5. type "q" to quit the error window
  6. emacs hanging and with message: Forming completions for package:lme4...
vspinu commented 11 years ago

This problem is caused by mouse-avoidance-point-position function in the timer. So it is not related directly to ESS.

This looks like an emacs bug to me. I activated mouse-avoidance mode but cannot reproduce your error with emacs 24.3.50.1. What is the exact configuration for mouse-avoidance in your .emacs?

ShuguangSun commented 11 years ago

R version 3.0.0 (2013-04-03) -- "Masked Marvel" auto-complete: ac-version "1.4.0"

1) When I set ess-use-auto-complete to nil and mouse-avoidance-mode to nil, there will be no problem. 2) When I set ess-use-auto-complete to nil and mouse-avoidance-mode to animate, there will be only the error message about timer again and again, but will not hang emacs. 3) When I set ess-use-auto-complete to t and mouse-avoidance-mode to nil, it will hang emacs when lme4 loaded and type some command like "lme" and TAB. 4) When I set ess-use-auto-complete to script-only, and run ess-display-help-on-object (C-c C-v) before I load lme4, then it will be ok and no issues.

I think it may be related to the auto-complete.

dardisco commented 11 years ago

I've been having the same problem for around 6 months now. Didn't want to submit it as a new bug.

ESS 12.09.2, EMACS 24.1.1. As above, it works OK with (setq ess-use-auto-complete 'script-only) but hangs every time with (setq ess-use-auto-complete 't)

This is the only package I've found with this problem. Thanks!

vspinu commented 11 years ago

Please upgrade. There will be soon 13.09 release. It's quite a big difference.

chris notifications@github.com on Tue, 03 Sep 2013 17:49:29 -0700 wrote:

I've been having the same problem for around 6 months now. Didn't want to submit it as a new bug.

ESS 12.09.2, EMACS 24.1.1. As above, it works OK with (setq ess-use-auto-complete 'script-only) but hangs every time with (setq ess-use-auto-complete 't)

This is the only package I've found with this problem. Thanks!

— Reply to this email directly or view it on GitHub.

ShuguangSun commented 11 years ago

Now it works well.