Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ShuguangSun opened this issue Jun 1, 2013 · 7 comments
Closed

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

ShuguangSun opened this issue Jun 1, 2013 · 7 comments

Comments

@ShuguangSun
Copy link
Contributor

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
Copy link
Member

vspinu commented Jun 2, 2013

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:
#44

@ShuguangSun
Copy link
Contributor Author

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<-" ".C__activeBindingFunction" ".__C__anova" ".__C__anova.glm" ".__C__anova.glm.null" ".__C__ANY" ".__C__aov" ".__C__array" ".__C__builtin" ".__C__call" ".__C__character" ".__C__classGeneratorFunction" ".__C__className" ".__C__classPrototypeDef" ".__C__classRepresentation" ".__C__ClassUnionRepresentation" ".__C__complex" ".__C__conditionalExtension" ".__C__data.frame" ".__C__data.frameRowLabels" ".__C__Date" ".__C__defaultBindingFunction" ".__C__density" ".__C__derivedDefaultMethod" ".__C__derivedDefaultMethodWithTrace" ".__C__dump.frames" ".__C__EmptyMethodsList" ".__C__environment" ".__C__envRefClass" ".__C__expression" ".__C__externalptr" ".__C__factor" ".__C__for" ".__C__formula" ".__C__function" ".__C__functionWithTrace" ".__C__genericFunction" ".__C__genericFunctionWithTrace" ".__C__glm" ".__C__glm.null" ".__C__groupGenericFunction" ...) ("Autoloads" nil ".Autoloaded") ("package:base" nil "-" "-.Date" "-.POSIXt" "!" "!.hexmode" "!.octmode" "!=" "$" "$.DLLInfo" "$.package_version" "$<-" "$<-.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
Copy link
Member

vspinu commented Jun 3, 2013

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
Copy link
Contributor Author

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
Copy link

dardisco commented Sep 4, 2013

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
Copy link
Member

vspinu commented Sep 4, 2013

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
Copy link
Contributor Author

Now it works well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants