Closed r2evans closed 9 months ago
Does running this in your R session fixes it?
system("stty -echo")
If so that's a deeper system issue.
Edit: Also what does system("stty")
return in a fresh ESS/R session?
Not happening in my testing. Please try it without ~/.emacs, etc. by emacs --no-init-file and manually load ESS to isolate the issue. Thanks
Good recommendations. For some reason, system("stty -echo")
(after the expression below) was the initial resolution, and I can't find where the change was introduced.
> system("stty")
system("stty")
speed 38400 baud; line = 0;
erase = <undef>; kill = <undef>;
-brkint -imaxbel
-onlcr
It may be something in the tmux/terminal side outside of emacs, because I had restarted emacs (before submitting this issue) and found the same behavior, but now that I've been playing with stty
a bunch, the symptom has gone away on restarts.
Thanks all!
I finally nailed down the culprit: keyring::key_get
has a backend_file
for storing secrets, and that uses askpass::askpass(..)
to retrieve the passphrase used to encrypt the filestore. This function explicitly calls system('stty echo')
at the end of the first time a password-protected file-store is accessed.
https://github.com/r-lib/askpass/blob/main/R/askpass.R#L71
It is not emacs/ESS, and I don't know of any awesome way in ESS to try to protect against this happening. I've reached out to those authors in https://github.com/r-lib/askpass/issues/12.
Thanks @lionel- and @rsparapa
Recent update to R-4.3.2 and updating emacs and R packages, now my ESS buffer double-prints everything.
Assuming a simple
.R
file with a single line1+1
,Even just "enter" on the console echoes another line:
Any idea how to figure out what's doing this?
Here's my ESS-related elisp:
~/.emacs.d/init.el
``` (defun my-ess-hook () "more stuff to load with ess" (setq ess-indent-level 2 comment-add 0 ess-save-silently t ;; https://github.com/emacs-ess/ESS/pull/1019, https://github.com/emacs-ess/ESS/issues/759 inferior-ess-fix-misaligned-output t) (setq eldoc-idle-delay 2 ; or something >> 1? ess-use-eldoc nil) (local-set-key (kbd "M--") 'ess-cycle-assign) ;; keep me from accidentally KILLING R (again) (define-key ess-extra-map "r" nil) (define-key ess-extra-map "\C-r" nil) (define-key ess-mode-map "\C-c\C-n" 'ess-eval-line-invisibly-and-step) (require 'company) (push (list 'company-R-args 'company-R-objects 'company-R-library :separate) company-backends) (company-mode) ) (defun my-postinit-ess () "my ess init code run after package-initialize" (require 'ess) (require 'ess-site) (setq-default ess-dialect "R" ;; ess-default-style 'RStudio inferior-R-args "--no-save " ;; mostly for Rmd files, since "trailing double spaces" is relevant ess-nuke-trailing-whitespace-p nil ess-ask-for-ess-directory nil) (add-hook 'ess-mode-hook 'my-ess-hook) (add-hook 'inferior-ess-mode-hook 'my-ess-hook) (setq comint-scroll-to-bottom-on-input t comint-scroll-to-bottom-on-output t comint-move-point-for-output nil ;; https://github.com/emacs-ess/ESS/issues/316 ;; ess-r-package-auto-activate nil ) ) (add-hook 'after-init-hook 'my-postinit-ess) ```~/.emacs.d/lisp/my-ess.el
On my laptop, this does not happen,
.el
files