3

Whenever I include a pipe (%>%) in a ESS R buffer, I start getting the following error repeatedly, with lags that make editing almost impossible:

error in process sentinel: Not enough arguments for format string

Here is a simple example. If I create a buffer with only this function:

f <- function(x) {
    x %>% sqrt
}

I get the following error backtrace when doing any edit that buffer (that's after doing M-x toggle-debug-on-error):

Debugger entered--Lisp error: (error "Not enough arguments for format string")
  format-message(" Error in cat(\"@@warning: @@\", e) : \n  argument 2 (type 'list') cannot be handled by 'cat'\nCalls: esslint ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> -> cat\nIn addition: Warning message:\nIn file(con, \"r\") : cannot open file 'f <- function(x) {\n    x %>% sqrt \n}': No such file or directory\nExecution halted\n")
  apply(format-message " Error in cat(\"@@warning: @@\", e) : \n  argument 2 (type 'list') cannot be handled by 'cat'\nCalls: esslint ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> -> cat\nIn addition: Warning message:\nIn file(con, \"r\") : cannot open file 'f <- function(x) {\n    x %>% sqrt \n}': No such file or directory\nExecution halted\n" nil)
  flymake--log-1(:warning ess-r-flymake " Error in cat(\"@@warning: @@\", e) : \n  argument 2 (type 'list') cannot be handled by 'cat'\nCalls: esslint ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> -> cat\nIn addition: Warning message:\nIn file(con, \"r\") : cannot open file 'f <- function(x) {\n    x %>% sqrt \n}': No such file or directory\nExecution halted\n")
  ess-r--flymake-check-errors()
  ess-r--flymake-parse-output(#<buffer  *ess-r-flymake*> #<buffer dummy.R> #f(compiled-function (&rest args) #<bytecode 0x45e4a775>))
  #f(compiled-function (proc event) #<bytecode 0x4307fddd>)(#<process ess-r-flymake> "exited abnormally with code 1\n")

It looks like the whole function is interpreted as a filename. Is this a bug in ESS? It seems unlikely, as this error is annoying enough that others would have reported it. Any idea on how to investigate this further?

jerome
  • 183
  • 6
  • 1
    Does `M-x toggle-debug-on-error` get you a stack trace? If so, add it to the question. – phils Dec 12 '18 at 04:35
  • This problem stopped when I disabled flycheck; I did not investigate the cause further though. – jerome Mar 12 '19 at 22:46
  • flycheck or flymake? (the stack trace references the latter). I don't use any of the features involved in this question, so I can't help much more with this. – phils Mar 12 '19 at 23:51
  • flycheck was installed; I disabled flycheck and the error related to flymake stopped occurring. – jerome Mar 13 '19 at 03:00
  • Interesting. Perhaps `ess-r-flymake` is actually intended to be agnostic towards those two alternatives, but is currently broken for flycheck. You should probably try it out with flymake (which was redesigned in Emacs 26.1) if you've not done so already. – phils Mar 13 '19 at 04:19
  • @jerome Can you report how you disabled flycheck, please? – Marius Hofert Dec 11 '19 at 14:15
  • I just uninstalled it. – jerome Dec 12 '19 at 22:04

0 Answers0