I've tried to figure the problem myself, and will probably continue, but due to poor error reporting it's just too time consuming. So, perhaps, if anyone had encountered this problem before, please share.
What happens: after flymake-jshint encounters an error, no matter what the error is, it could be a missing semicolon for example. It will get stuck in an infinite loop. I can C-g the loop, but this is very annoying, and will happen multiple times on the same line, making it absolutely impossible to write anything.
When I then look into the *Messages* buffer, it reveals something like:
missing ; after statement [NNNN times]
i.e Flymake was requested to perform the check many times. The timer interval is set to 2 seconds, but it clearly overdoes, because it will do hundreds of checks in two seconds. Trying to increase the flymake-log-level reveals no additional information.
I have customized these variables:
(flymake-no-changes-timeout 2)
(flymake-start-syntax-check-on-newline nil)
but no more additional customizations.
EDIT:
This seems to be related to auto-complete mode. Disabling this minor mode "solved" the problem, but now I'm getting hundreds of "Invalid face reference: nil [NNNN times]" kinds of messages. sigh
I think, I finally found the problem. It was the highlight-current-line minor mode. Whenever Flymake would detect an error and needed to paint the error location it tried to read the overlay, but got confused by the overlay created by the highlight. I haven't yet gotten to trying to fix it, but simple disabling of the highlight made it at least possible to work.
Related
Suddenly, the way to analyze and display errors in vscode changed. From today it marks the entire function block as an error, which is annoying because it becomes very confusing.
I do not know if without intention I pressed a shortcut, or some combination of keys. Does anyone know how to return to the previous mode?
Thanks a lot.
Before LSP, the error range was being accidentally truncated to a single line. With LSP the complete region is used, which means you now see the actual range produced by the analyzer.
Turning off LSP is only a short-term fix as it will soon became the default (and only) option, so if you think the shorter ranges are better, please file an issue at https://github.com/dart-lang/sdk for some discussion. Thanks!
I'm using (global-linum-mode t) to present line numbers in Emacs.
This works just fine up-until I use the ctrl + up/down commands (forward-paragraph and backward-paragraph) to navigate a buffer, at which point some line numbers are rendered incorrectly (see attached image).
This occurs only when I use said commands to skip entire segments of code, and the issue immediately disappears (the line numbers are rendered correctly, that is) if I start navigating the buffer by other means.
The issue is present in both C and C++ modes (visualized), and I'm using Emacs 24.3.1 on x86-64 Fedora 19.
While the go-to-line command serves my purposes in terms of navigating compilation errors and warnings, I'd like to keep the line numbers as I find them to be helpful in terms of quickly approximating length of functions.
So far I've found no mention of this problem elsewhere, and I'm unsure of whether or not this is expected behavior of Emacs or if I'm to submit a bug report.
Has anyone encountered the issue or know anything of its origin?
Fix:
The problem may be resolved by invoking (linum-update-current), as portrayed by #lawlist in his answer below. An easy way of repeatedly doing this is to append the command to the execution of forward-paragraph, which may be done using the Emacs Lisp advice feature:
(defadvice forward-paragraph (after forward-paragraph-linum-update)
"Perform (linum-update-current) after jumping forward one
paragraph to ensure line numbers are being rendered
correctly."
(linum-update-current))
(ad-activate 'forward-paragraph)
A few of the lead members on the Emacs development team suggest that linum-mode be avoided for a variety of reasons, and instead they suggest using nlinum-mode: http://elpa.gnu.org/packages/nlinum.html
I personally use a modified version of linum-mode, and I have fixed a few bugs -- if you keep using linum-mode, you will likely need to do the same -- i.e., implement your own bug fixes as you find them. The quickest way to fix the bug you see is to follow your command with:
(linum-update-current)
When I use the slime-repl, I get this message in my minibuffer and emacs hangs for a second:
error in process filter: Wrong type argument: sequencep, :not-available
It stops happening when I turn off slime-autodoc-mode
Has anyone seen that before?
From this error report
joddie commented:
I experienced the same problem. After a cursory
investigation, it seems to be related to enabling the slime-fancy
module in slime/contrib. slime-fancy is a shortcut for enabling a
number of different slime modules, and I'm not sure which one is the
actual source of the problem, but disabling it seems to fix the
problem here at least.
(This is using the latest Git/CVS versions of slime and slime-js,
although I also tried rolling back to the 2010-02-12 version of slime
just in case; it made no difference).
ghost commented: #joddie : I just try it and remove slime-fancy, it
does work. Now I put
(slime-setup '(slime-js slime-repl))
in my .emacs. Before that I can not use auto complete in node even my
tab already bound to slime-indent-and-complete-symbol. Thanks. :)
For those of you using quicklisp and slime-helper to manage their slime setup open quicklisp/slime-helper.el to find the place where (slime-setup) is used.
I'm using an emacs-lisp script that has a minor bug which causes it to sometimes choke with an error message, and then execution proceeds without problem. The error itself does not bother me, what annoys me is that Emacs remains 10-15 seconds blocked after that and I must wait for what I believe to be some timer (designed to ensure I see the error message before it disappears) to end before I can resume my editing.
Is there a simple way to reduce this delay? I couldn't find where this timer is defined in order to change its value.
Some additional information:
I'm using Emacs 23.2, but I tried recompiling and using 23.4, it didn't change anything;
I tried Emacs 24.1 and the error disappeared, but I had a huge performance impact (the script has been designed for Emacs 23.2), so the "wait for error" is still a better option than using 24.1;
The script in question will be updated by its author sometime in the future, but I'm looking for a quick and dirty solution meanwhile.
The error message is: "error in process filter: Attempt to delete minibuffer or sole ordinary window".
as already said, it's a bug. Please report it to the maintainer.
Beside you may look into the code for a form like
(accept-process-output &optional PROCESS SECONDS
MILLISEC JUST-THIS-ONE)
Allow any pending output from subprocesses to be read by Emacs.
It is read into the process' buffers or given to their filter functions.
Non-nil arg PROCESS means do not return until some output has been received
from PROCESS.
Non-nil second arg SECONDS and third arg MILLISEC are number of seconds
and milliseconds to wait;
;;;
I'm having a problem with an Emacs lisp package that I pulled down from the ubuntu distribution. The package is JDEE, and it complains of Args out of range: "63", 0, 4 in the mini buffer and the *Messages* buffer whenever I open a file. This bug appears to have been reported last September but no action has been taken. I'm not an emacs newbie, having written some Elisp code myself, but I've never attempted to debug anything like this. I would like to stop the file load in a debugger when this error happens to at least get an idea of where the problem is coming from. I've read section 18.1.1 of the Elisp manual on "Entering the debugger on error" but trying to load the file after playing with various combinations of values for debug-on-error, debug-ignored-errors, and debug-on-signal appears to have no effect. Has anybody got any suggestions for my next step?
If debug-on-error isn't working, I'd start with the source itself. Find the keybinding/event that is causing the problem, and locate the function.
C-h k <keystrokes>
M-x find-function <function-name-from-above>
Now, once you are at the source
M-x edebug-defun
And the next time you hit the key, you should be able to step through the program. At that point, you can see which portion causes an error - and drill down that way.
You can also try setting the variable 'stack-trace-on-error to see if you can find the culprit (though 'debug-on-error usually works for me, not sure why it doesn't for you).
As a last resort (if edebug-defun doesn't work), you can redefine the routine with a call to (debug) in it, sort of does the same.
I suppose JDEE is somehow inhibiting debug-on-error. Perhaps grep through its files for the error message "Args out of range". While debugging, make sure to load the uncompiled .el files, not the byte-compiled .elc files (you will notice it in the debugger if you are running byte-compiled code) by entering commands like (load "foo.el") instead of (load "foo").
I got the same error when using find-grep after accidentally redefining (current-time-string) in one of my own scripts.
Using the M-x edebug-defun tip posted above I managed to find the issue when I stepped through the code giving the error seeing the call to (current-time-string).
Not sure how helpful this is in your case.