Re: Semantic "Sticky" in python mode
Eric Ludlam <[email protected]> Fri, 27 Feb 2015 21:04:30 -0500
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <[email protected]> |
On 02/27/2015 12:23 PM, RJD wrote: > I believe that in the C/C++ mode even when semantic is busy you can press > up/down and the response is real time and it is interrupted and move about, > where as in Python mode it seems like the interrupt of up/down does not > register until it has finished "doing" something. Lots of random questions in this thread. I'll see what I can do. > 1. how to disable semantic for all python files? Something better than > running (semantic-mode) [[ which does not work anyway ]]. Remove python-mode from `semantic-new-buffer-setup-functions'. > 2. OR, how to fix the issue where emacs sticks for 2/3 seconds when I move > the cursor to a large function. I typically use: M-x toggle-debug-on-quit and press C-g when something is hung to see what is going on. I tried your sample from later in this thread with the trick of putting a block of code in an array and did not repro the issue. (I don't use python, so only have the one test file in CEDET. > 3. And, as a bonus - where to find information about what I can use a > frontend equivalent to what I do for c++ with ia-complete-symbol-menu. I can't quite parse this question. I usually visit emacswiki to look up random Emacs tools. As a reminder, all the -ia- functions I wrote as "simple" examples on how to use the semantic analysis tools, and they keep growing more complex as little bugs get fixed. > I can also say that when emacs does not know the location of the python > executable then I can load up the file (that is, after attempting to load it > once then being hit with a "Permission Denied" message because the py exe > cannot be found, and then loading it a second time which then loads up > successfully) and it runs at a quick speed. This probably points at how the system include path is setup, which is via the python program being queried. If you path is super long, perhaps it is looking up include files. (Imports?). I have no idea what big arrays have to do with imports though. > I believe that in the C/C++ mode even when semantic is busy you can press > up/down and the response is real time and it is interrupted and move about, > where as in Python mode it seems like the interrupt of up/down does not > register until it has finished "doing" something. Correct. The parser is interruptible in between toplevel tokens. Since the parsers are iterative, in between each token it checks for user input, and bails if there is any. Thus, this implies it is either not in the parser, or the array takes a long time to parse as a single token. I hope this helps. Eric ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/