-
Notifications
You must be signed in to change notification settings - Fork 162
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
Emacs *shell*: the current directory is often not tracked; M-[Enter] may hang #508
Comments
Do you upgrade ESS often? Does 1-2 weeks correspond to such an ESS update? The last big change to the package mode was #470. The parent commit is b439eb3, try to checkout this commit and see if that fixes it. Then see try 157a3a9 to see if that's indeed the cause of the bug. If not please bisect until you find the faulty commit.
(setq ess-r-package-auto-activate nil)
I think it would be premature to take this decision as we don't know what is going on. The package mode has been enabled by default since ESS 16.04. |
I have had a look at this and I am afraid the only place this could come from is the repeated calls to If you have polymode on your machine there is a handy function First do I don't see any when I operate with shell buffer, so it must be your local setup which only you could investigate. |
This is the regexp tracing function: (defun pm-debug-trace-background-1 (fn)
(interactive (trace--read-args "Trace function in background: "))
(unless (symbolp fn)
(error "can trace symbols only"))
(unless (get fn 'cl--class)
(trace-function-background fn nil
'(lambda ()
(format " [buf:%s pos:%s type:%s (%f)]"
(current-buffer) (point)
(get-text-property (point) :pm-span-type)
(float-time))))))
(defun pm-debug-trace-functions-by-regexp (regexp)
"Trace all functions whose name matched REGEXP."
(cl-loop for sym being the symbols
when (and (fboundp sym)
(not (eq sym 'pm-debug-trace-background-1)))
when (string-match regexp (symbol-name sym))
do (pm-debug-trace-background-1 sym))) |
We are back to this (or have always been). Again, I find myself in a long running emacs with several shell buffers (each in comint), and Consequence: In a shell buffer I do
and emacs prompts me for files in a wrong directory/folder. This really inhibits efficiently working in Emacs for me.... and I think we agreed that anyway ESS should not at all ever take control over |
I can't get this to reproduce. I'm doing:
and I get prompted for files in As for the slowness, it might be helpful if you shared the output of the CPU profiler. |
Thank you Alex, to reproduce you do need some R activity with ESS, probably even need open *.R files in a package and possibly even send code from there to the Loading the emacs lisp code of ESS is not a problem, it's the "package active" part of ESS which "takes over some / all (?) inferior |
Martin, it is not clear ESS is at fault. Please provide more information, e.g. |
Fair point @lionel- . The problem appears (or aggravates) after a while of working only, so I have not found time yet to create ReprEx.. but next time (when I have time), I hope to remember |
I'm still // again severely suffering from ESS slowing down my emacs |
I've noticed for a year or so that after using ESS for a while, Emacs stops accepting process outputs automatically. When this happens, the stdout pipes fill up and this blocks all processes sending outputs to Emacs, such as Is it possible we are observing the same thing? In that case it may not be related to ESS, I also observe this while coding in C with |
Do you observe complete blocks? I usually get things going but still very slowly with C-g or C-c C-c etc... but still with lots of timeout. Yes, complete restart of emacs does help. |
I think what I'm observing is that all processes block completely but when I do some actions like scrolling in a window it gets unblocked for a while. This may give the appearance of being slow. How is your CPU usage when you're observing slowness? If it's low, we may be observing the same issue. If the usage is high, a profiler report might be useful. |
Does running the profiler produce any helpful information? Or setting
toggle-debug-on-quit?
…On Tue, Nov 26, 2019, 3:28 AM Lionel Henry ***@***.***> wrote:
I *think* what I'm observing is that all processes block completely but
when I do some actions like scrolling in a window it gets unblocked for a
while. This may give the appearance of being slow.
How is your CPU usage when you're observing slowness? If it's low, we may
be observing the same issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#508?email_source=notifications&email_token=AC24ZCLTW7IP2IVLL7A7UDTQVTM27A5CNFSM4EWNGKNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFFFBRQ#issuecomment-558518470>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC24ZCMVZ4MLM3HW6OIGSKLQVTM27ANCNFSM4EWNGKNA>
.
|
FWIW, I don't see any of these. @lionel- how sure you are your problem is ESS related? @mmaechler I think I asked you before, are any remotes involved in your workflow? Please try what @jabranham suggested 1) M-x profiler-start 2) do a few slow operations with shell 3) profiler-stop 4) profiler-report. |
@vspinu My assumption is that it's an Emacs problem, not an ESS problem. |
FWIW I think you need to switch steps 3 and 4 in the profiler in Emacs<27.
I.e. profiler-report before profiler-stop.
…On Wed, Dec 4, 2019, 7:44 AM Lionel Henry ***@***.***> wrote:
@vspinu <https://github.com/vspinu> My assumption is that it's an Emacs
problem, not an ESS problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#508?email_source=notifications&email_token=AC24ZCP4QRTIRD7J7HDWUBLQW6Q3HA5CNFSM4EWNGKNKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEF44DVI#issuecomment-561627605>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC24ZCIZSLCVUZUHHT35EPDQW6Q3HANCNFSM4EWNGKNA>
.
|
M-x shell and
*shell*
buffers (several of them often) is what I use a lot in Emacs.In shell-mode,
M-[Enter]
(akaM-RET
(translated from<M-return>
) runs the commanddirs
found in(shell-mode-map)
, which is an alias forshell-resync-dirs
inshell.el
)makes sure that the stack of directories (I create and use via
pushd
,popd
, etc) is kept in sync between the shell and emacs, notably emacs' own very importantdefault-directory
variable (which is buffer local in shell).Since about 1-2 weeks now, this behaves erratically and slowish basically as soon as I have once opened and *.R script in a package .. which now automatically turns 'package development mode' for that buffer --- which is very convenient and nice.
What I cannot bear is that I basically can no longer work in may not so small stack of directories in
*shell*
where almost always only one of the directories is related to the package whose /R/*.R buffer I had opened previously.Please tell us
The text was updated successfully, but these errors were encountered: