bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16804: 24.3.50; [PATCH] fix with-silent-modifications


From: Leo Liu
Subject: bug#16804: 24.3.50; [PATCH] fix with-silent-modifications
Date: Thu, 20 Feb 2014 08:33:54 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (OS X 10.9.1)

On 2014-02-20 02:30 +0800, Stefan Monnier wrote:
> Sounds like there's a bug in js2-mode which causes it to run
> eldoc-documentation-function from within a with-silent-modifications
> (maybe because of a sit-for within a with-silent-modifications?).
> This would be a bug regardless of whether we change
> with-silent-modifications.

Steve Yegge tried very hard to keep js2-mode performant. It seems his
strategy is to pause every few statements. (see js2-parse-statement). If
js2 find a way to disable all timers while parsing, it might for
example, cause dropping connections in rcirc. We already have Gnus doing
that.

> Again, a backtrace would be much more useful.

There is no backtrace. In my case the type inference engine for
javascript is implemented in js and the only efficient way to
communicate with it is to tell it the file and ask for information. you
could send the whole buffer over and give it a fake filename, but then
it will have to do a re-parse in full every time i.e. inefficient for
large buffers. So when buffer-file-name is nil the engine gives you no
information and thus eldoc prints nothing. This is what I meant by `not
working' without the true value of buffer-file-name.

All the above information is only remotely related because I think the
real bug is in with-silent-modifications and nxml will have similar
issues.

So to sum up:

1. buffer-file-name has many uses and disable it makes other uses
   impossible
2. what if the body in with-silent-modifications change buffers

Sorry if I fail to articulate the case. For now I have worked around it
by saving buffer-file-name to another variable.

Leo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]