Hi,
For your situation (slow machine), you can do two things. Set the
semantic-idle-scheduler-max-buffer-size to something small, like 1024.
Small buffers will parse quickly. Large buffers are slower
(naturally) and would then not be reparsed in idle time.
An alternate solution is what you suggested earlier, set the idle
time to something large. If the idle time is 10 minutes or so, then
chances are you would be off getting lunch, and it would be ok for
Emacs to refresh your edits. Even a delay of 1 minute might push
things off to a point where you would not notice.
The idle timer could also be completely disabled.
It depends a bit on what aspects of semantic you want to use.
Several of the JDE functions, and all senator functions and other
semantic minor modes will request the list of tags from your buffer.
The idle scheduler is there so there is no delay when you call those
functions. If that delay (at command execution time) is preferable to
a delay during editing, then the longer timeout is the way to go.
If you were writing a program that fiddled with parsing in some way
(like the language debuggers in Semantic) then an alternate method
for disabling the idle parser is used to prevent recursive parsing.
Eric
>>> Guy Thomas <[EMAIL PROTECTED]> seems to think that:
>Hello,
>
>I read the documentation for semantic-idle-scheduler-mode, which is used
>in semantic-idle-scheduler-enabled-p.
>
>"semantic-idle-scheduler-mode is an interactive compiled Lisp function
>in `semantic-idle'.
>(semantic-idle-scheduler-mode &optional ARG)
>
>Minor mode to auto parse buffer following a change.
>When this mode is off, a buffer is only rescanned for tokens when
>some command requests the list of available tokens. When idle-scheduler
>is enabled, Emacs periodically checks to see if the buffer is out of
>date, and reparses while the user is idle (not typing.)
>
>With prefix argument ARG, turn on if positive, otherwise off. The
>minor mode can be turned on only if semantic feature is available and
>the current buffer was set up for parsing. Return non-nil if the
>minor mode is enabled."
>
>If I understand the last paragraph correctly, it must be possible to
>make the semantic feature (temporarily) unavailable and to "unset" a
>buffer for parsing.
>
>I want to be able to switch off semantic because I will be working on a
>slower machine for a couple of months and semantic's parsing constantly
>interrupts my editing (which kind of freaks me out).
>
>Guy
>
>Eric M. Ludlam wrote:
>>>>>Guy Thomas <[EMAIL PROTECTED]> seems to think that:
>>>
>>>How can I temporarily switch off semantic?
>>>
>>>Right now I do this by setting semantic-idle-scheduler-idle-time
>>>to a high value (20000), but I suppose there must be a cleaner way to do
>>>this?
>>>
>>
>>
>> Hi,
>>
>> Look at the code for semantic-idle-scheduler-enabled-p. If
>> there is some missing feature needed, that could be arranged.
>>
>> Eric
>>
>
--
Eric Ludlam: [EMAIL PROTECTED], [EMAIL PROTECTED]
Home: http://www.ludlam.net Siege: www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: www.gnu.org