when open an R script in emacs invariably an additional buffer opens up called Flymake Log with the following message
Warning [flymake DR.R]: Disabling backend flymake-proc-legacy-flymake because (error Can’t find a suitable init function)
Following this discussion I added the following line to my init.el file:
(remove-hook 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake)
but it didn't solve the problem.
Additionally, when I start an R process using M-x R an ESS buffer opens up, which says
current-prefix-arg=nil
(inferior-ess: waiting for process to start (before hook)
(inferior-ess 3): waiting for process after hook(R): inferior-ess-language-start=options(STERM='iESS', str.dendrogram.last="'", editor='emacsclient', show.error.locations=TRUE)
This happens whenever I restart my R session. It's really annoying and distracting when I constantly have to cycle through these redundant buffers. I say they are redundant, because I haven't noticed any way in which the normal R operation would be disrupted.
I'm using emacs 26.3 with ESS 18.10.3 on ubuntu 20.04 with R 3.6.3. Also, please see below my entire init.el file
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages (quote (dracula-theme ess-smart-underscore ess)))
'(pop-up-windows nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Makes *scratch* empty.
(setq initial-scratch-message "")
;; Removes *scratch* from buffer after the mode has been set.
(defun remove-scratch-buffer ()
(if (get-buffer "*scratch*")
(kill-buffer "*scratch*")))
(add-hook 'after-change-major-mode-hook 'remove-scratch-buffer)
;; Removes *messages* from the buffer.
(setq-default message-log-max nil)
(kill-buffer "*Messages*")
;; Removes *Completions* from buffer after you've opened a file.
(add-hook 'minibuffer-exit-hook
'(lambda ()
(let ((buffer "*Completions*"))
(and (get-buffer buffer)
(kill-buffer buffer)))))
;; Don't show *Buffer list* when opening multiple files at the same time.
(setq inhibit-startup-buffer-menu t)
;; Show only one active window when opening multiple files at the same time.
(add-hook 'window-setup-hook 'delete-other-windows)
;; backup in one place. flat, no tree structure
(setq backup-directory-alist '(("" . "~/.emacs.d/backup")))
;; easier switching between windows
(windmove-default-keybindings 'control)
;; color theme
(load-theme 'dracula t)
;; matching parenthesis
(show-paren-mode 1)
;; keybindings for resizing windows
(global-set-key (kbd "S-C-<left>") 'shrink-window-horizontally)
(global-set-key (kbd "S-C-<right>") 'enlarge-window-horizontally)
(global-set-key (kbd "S-C-<down>") 'shrink-window)
(global-set-key (kbd "S-C-<up>") 'enlarge-window)
;; easier switching between buffers
(ido-mode 1)
;; no menu bar
(menu-bar-mode -1)
;; no line wrapping by default
(set-default 'truncate-lines t)
;; Disable Flymake warnings
(remove-hook 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake)
;; disables ESS buffer
(setq ess-write-to-dribble t)
The last line was an attempt at permanently disabling the ESS log buffer.