* Backtrace and message buffer tell me different things
@ 2010-12-18 0:48 Lennart Borgman
2010-12-18 8:38 ` Andreas Schwab
2010-12-18 16:04 ` Stefan Monnier
0 siblings, 2 replies; 9+ messages in thread
From: Lennart Borgman @ 2010-12-18 0:48 UTC (permalink / raw
To: Emacs-Devel devel
I get a strange error from mumamo. The backtrace looks like this:
Debugger entered--Lisp error: (error "Selecting deleted buffer")
byte-code("..." [buffer table set-syntax-table] 2)
#[(body) [strange stuff here...]
mumamo-fetch-major-mode-setup(mumamo-bad-mode nil)
mumamo-get-major-mode-setup(html-mode)
mumamo-new-create-chunk(((1 192 html-mode nil nil nil
(mumamo-chunk-xml-pi mumamo-chunk-alt-php mumamo-chunk-alt-php=
mumamo-chunk-inlined-style mumamo-chunk-inlined-script
mumamo-chunk-style= mumamo-chunk-onjs=) nil nil t) (nil nil nil 0
nil)))
mumamo-find-chunks-1(192 "mumamo-get-chunk-save-buffer-state")
mumamo-find-chunks(192 "mumamo-get-chunk-save-buffer-state")
mumamo-get-chunk-save-buffer-state(192)
mumamo-turn-on-actions(lisp-interaction-mode)
html-mumamo-mode()
call-interactively(html-mumamo-mode t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
However in the message buffer I have this:
MU:returning from mumamo-fetch-major-mode-setup
MU:after mumamo-fetch-major-mode-setup B
Making parse-sexp-lookup-properties local to *scratch* while let-bound!
Entering debugger...
It looks like the debugger think I have not exited
mumamo-fetch-major-mode-setup while the message in the message buffer
says I have done so.
Anyone has any idea of what might be going on here?
This is with my patched version, but I can't see I have any changes
that could be involved here. (I had some before in buffer.c and eval.c
but not any more.) The checkout is from 2010-10-19.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 0:48 Backtrace and message buffer tell me different things Lennart Borgman
@ 2010-12-18 8:38 ` Andreas Schwab
2010-12-18 9:25 ` Lennart Borgman
2010-12-18 16:04 ` Stefan Monnier
1 sibling, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2010-12-18 8:38 UTC (permalink / raw
To: Lennart Borgman; +Cc: Emacs-Devel devel
Lennart Borgman <lennart.borgman@gmail.com> writes:
> I get a strange error from mumamo. The backtrace looks like this:
>
> Debugger entered--Lisp error: (error "Selecting deleted buffer")
> byte-code("..." [buffer table set-syntax-table] 2)
> #[(body) [strange stuff here...]
> mumamo-fetch-major-mode-setup(mumamo-bad-mode nil)
> mumamo-get-major-mode-setup(html-mode)
> mumamo-new-create-chunk(((1 192 html-mode nil nil nil
> (mumamo-chunk-xml-pi mumamo-chunk-alt-php mumamo-chunk-alt-php=
> mumamo-chunk-inlined-style mumamo-chunk-inlined-script
> mumamo-chunk-style= mumamo-chunk-onjs=) nil nil t) (nil nil nil 0
> nil)))
> mumamo-find-chunks-1(192 "mumamo-get-chunk-save-buffer-state")
> mumamo-find-chunks(192 "mumamo-get-chunk-save-buffer-state")
> mumamo-get-chunk-save-buffer-state(192)
> mumamo-turn-on-actions(lisp-interaction-mode)
> html-mumamo-mode()
> call-interactively(html-mumamo-mode t nil)
> execute-extended-command(nil)
> call-interactively(execute-extended-command nil nil)
>
> However in the message buffer I have this:
>
> MU:returning from mumamo-fetch-major-mode-setup
> MU:after mumamo-fetch-major-mode-setup B
Where is the message on entering?
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 8:38 ` Andreas Schwab
@ 2010-12-18 9:25 ` Lennart Borgman
2010-12-18 9:32 ` Andreas Schwab
0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman @ 2010-12-18 9:25 UTC (permalink / raw
To: Andreas Schwab; +Cc: Emacs-Devel devel
On Sat, Dec 18, 2010 at 9:38 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> I get a strange error from mumamo. The backtrace looks like this:
>>
>> Debugger entered--Lisp error: (error "Selecting deleted buffer")
>> byte-code("..." [buffer table set-syntax-table] 2)
>> #[(body) [strange stuff here...]
>> mumamo-fetch-major-mode-setup(mumamo-bad-mode nil)
>> mumamo-get-major-mode-setup(html-mode)
>> mumamo-new-create-chunk(((1 192 html-mode nil nil nil
>> (mumamo-chunk-xml-pi mumamo-chunk-alt-php mumamo-chunk-alt-php=
>> mumamo-chunk-inlined-style mumamo-chunk-inlined-script
>> mumamo-chunk-style= mumamo-chunk-onjs=) nil nil t) (nil nil nil 0
>> nil)))
>> mumamo-find-chunks-1(192 "mumamo-get-chunk-save-buffer-state")
>> mumamo-find-chunks(192 "mumamo-get-chunk-save-buffer-state")
>> mumamo-get-chunk-save-buffer-state(192)
>> mumamo-turn-on-actions(lisp-interaction-mode)
>> html-mumamo-mode()
>> call-interactively(html-mumamo-mode t nil)
>> execute-extended-command(nil)
>> call-interactively(execute-extended-command nil nil)
>>
>> However in the message buffer I have this:
>>
>> MU:returning from mumamo-fetch-major-mode-setup
>> MU:after mumamo-fetch-major-mode-setup B
>
> Where is the message on entering?
They are before the messages above, just where one would expect them to be.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 9:25 ` Lennart Borgman
@ 2010-12-18 9:32 ` Andreas Schwab
2010-12-18 10:51 ` Lennart Borgman
0 siblings, 1 reply; 9+ messages in thread
From: Andreas Schwab @ 2010-12-18 9:32 UTC (permalink / raw
To: Lennart Borgman; +Cc: Emacs-Devel devel
Lennart Borgman <lennart.borgman@gmail.com> writes:
> On Sat, Dec 18, 2010 at 9:38 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Lennart Borgman <lennart.borgman@gmail.com> writes:
>>
>>> I get a strange error from mumamo. The backtrace looks like this:
>>>
>>> Debugger entered--Lisp error: (error "Selecting deleted buffer")
>>> byte-code("..." [buffer table set-syntax-table] 2)
>>> #[(body) [strange stuff here...]
>>> mumamo-fetch-major-mode-setup(mumamo-bad-mode nil)
>>> mumamo-get-major-mode-setup(html-mode)
>>> mumamo-new-create-chunk(((1 192 html-mode nil nil nil
>>> (mumamo-chunk-xml-pi mumamo-chunk-alt-php mumamo-chunk-alt-php=
>>> mumamo-chunk-inlined-style mumamo-chunk-inlined-script
>>> mumamo-chunk-style= mumamo-chunk-onjs=) nil nil t) (nil nil nil 0
>>> nil)))
>>> mumamo-find-chunks-1(192 "mumamo-get-chunk-save-buffer-state")
>>> mumamo-find-chunks(192 "mumamo-get-chunk-save-buffer-state")
>>> mumamo-get-chunk-save-buffer-state(192)
>>> mumamo-turn-on-actions(lisp-interaction-mode)
>>> html-mumamo-mode()
>>> call-interactively(html-mumamo-mode t nil)
>>> execute-extended-command(nil)
>>> call-interactively(execute-extended-command nil nil)
>>>
>>> However in the message buffer I have this:
>>>
>>> MU:returning from mumamo-fetch-major-mode-setup
>>> MU:after mumamo-fetch-major-mode-setup B
>>
>> Where is the message on entering?
>
> They are before the messages above, just where one would expect them to be.
So the error occured before the enter message was reached.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 9:32 ` Andreas Schwab
@ 2010-12-18 10:51 ` Lennart Borgman
0 siblings, 0 replies; 9+ messages in thread
From: Lennart Borgman @ 2010-12-18 10:51 UTC (permalink / raw
To: Andreas Schwab; +Cc: Emacs-Devel devel
On Sat, Dec 18, 2010 at 10:32 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Lennart Borgman <lennart.borgman@gmail.com> writes:
>
>> On Sat, Dec 18, 2010 at 9:38 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
>>> Lennart Borgman <lennart.borgman@gmail.com> writes:
>>>
>>>> I get a strange error from mumamo. The backtrace looks like this:
>>>>
>>>> Debugger entered--Lisp error: (error "Selecting deleted buffer")
>>>> byte-code("..." [buffer table set-syntax-table] 2)
>>>> #[(body) [strange stuff here...]
>>>> mumamo-fetch-major-mode-setup(mumamo-bad-mode nil)
>>>> mumamo-get-major-mode-setup(html-mode)
>>>> mumamo-new-create-chunk(((1 192 html-mode nil nil nil
>>>> (mumamo-chunk-xml-pi mumamo-chunk-alt-php mumamo-chunk-alt-php=
>>>> mumamo-chunk-inlined-style mumamo-chunk-inlined-script
>>>> mumamo-chunk-style= mumamo-chunk-onjs=) nil nil t) (nil nil nil 0
>>>> nil)))
>>>> mumamo-find-chunks-1(192 "mumamo-get-chunk-save-buffer-state")
>>>> mumamo-find-chunks(192 "mumamo-get-chunk-save-buffer-state")
>>>> mumamo-get-chunk-save-buffer-state(192)
>>>> mumamo-turn-on-actions(lisp-interaction-mode)
>>>> html-mumamo-mode()
>>>> call-interactively(html-mumamo-mode t nil)
>>>> execute-extended-command(nil)
>>>> call-interactively(execute-extended-command nil nil)
>>>>
>>>> However in the message buffer I have this:
>>>>
>>>> MU:returning from mumamo-fetch-major-mode-setup
>>>> MU:after mumamo-fetch-major-mode-setup B
>>>
>>> Where is the message on entering?
>>
>> They are before the messages above, just where one would expect them to be.
>
> So the error occured before the enter message was reached.
Thanks Andreas, your questions made me look at it a different way. I
had assumed that mumamo-fetch-major-mode-setup could not be called
from within itself, but that was not true. (This is not the first time
I have been hit by bad assumptions I have made regarding how font-lock
works.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 0:48 Backtrace and message buffer tell me different things Lennart Borgman
2010-12-18 8:38 ` Andreas Schwab
@ 2010-12-18 16:04 ` Stefan Monnier
2010-12-18 19:58 ` Lennart Borgman
1 sibling, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2010-12-18 16:04 UTC (permalink / raw
To: Lennart Borgman; +Cc: Emacs-Devel devel
> Making parse-sexp-lookup-properties local to *scratch* while let-bound!
BTW, this is usually a source of problems, so you'll want to try and
avoid doing that.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 16:04 ` Stefan Monnier
@ 2010-12-18 19:58 ` Lennart Borgman
2010-12-18 22:00 ` Lennart Borgman
0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman @ 2010-12-18 19:58 UTC (permalink / raw
To: Stefan Monnier; +Cc: Emacs-Devel devel
On Sat, Dec 18, 2010 at 5:04 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> Making parse-sexp-lookup-properties local to *scratch* while let-bound!
>
> BTW, this is usually a source of problems, so you'll want to try and
> avoid doing that.
Yes, thanks, I am cleaning up such things when I have time.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 19:58 ` Lennart Borgman
@ 2010-12-18 22:00 ` Lennart Borgman
2010-12-19 13:51 ` Stefan Monnier
0 siblings, 1 reply; 9+ messages in thread
From: Lennart Borgman @ 2010-12-18 22:00 UTC (permalink / raw
To: Stefan Monnier; +Cc: Emacs-Devel devel
On Sat, Dec 18, 2010 at 8:58 PM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
> On Sat, Dec 18, 2010 at 5:04 PM, Stefan Monnier
> <monnier@iro.umontreal.ca> wrote:
>>> Making parse-sexp-lookup-properties local to *scratch* while let-bound!
>>
>> BTW, this is usually a source of problems, so you'll want to try and
>> avoid doing that.
>
> Yes, thanks, I am cleaning up such things when I have time.
Though looking at this particular case I do not know what to do. The
situation is this:
- Fontification variables are let-bound by mumamo in the function it
creates to do the fontification. It is done this way to override the
buffer local variables as fast as possible.
- This particular variable is not buffer local by default so it is set
with make-local-variable somewhere.
(Maybe you want to avoid make-variable-buffer-local to catch conflicts
like this?)
There are some (possible) troubles here:
1) I do not know where make-local-variable happens. A minor problem
perhaps but a bit irritating.
2) I am not sure if there is any real problem here. I hope (set
(make-local-variable 'parse-sexp-lookup-properties) WHATEVERITISSETTO)
is setting the let-bound variable and that the real buffer local
variable is left as it was. Is that what is happening?
My excuses for having forgotten the details here. Maybe the warning
message could give more information? Perhaps point to some part of the
manual that explains more? And maybe it could give a hint where the
problematic call to make-local-variable happens? (If that is
interesting.)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Backtrace and message buffer tell me different things
2010-12-18 22:00 ` Lennart Borgman
@ 2010-12-19 13:51 ` Stefan Monnier
0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2010-12-19 13:51 UTC (permalink / raw
To: Lennart Borgman; +Cc: Emacs-Devel devel
> - Fontification variables are let-bound by mumamo in the function it
> creates to do the fontification. It is done this way to override the
> buffer local variables as fast as possible.
Not sure why it let-binds these vars, but that's OK, it might indeed be
the best solution to your problem.
> - This particular variable is not buffer local by default so it is set
> with make-local-variable somewhere.
> (Maybe you want to avoid make-variable-buffer-local to catch conflicts
> like this?)
I think having it make-variable-buffer-local would not help (tho it
might happen to silence the warning because the check is not done well
enough).
What you want then is to explicitly (make-local-variable <var>) before
let-binding those vars.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-12-19 13:51 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-18 0:48 Backtrace and message buffer tell me different things Lennart Borgman
2010-12-18 8:38 ` Andreas Schwab
2010-12-18 9:25 ` Lennart Borgman
2010-12-18 9:32 ` Andreas Schwab
2010-12-18 10:51 ` Lennart Borgman
2010-12-18 16:04 ` Stefan Monnier
2010-12-18 19:58 ` Lennart Borgman
2010-12-18 22:00 ` Lennart Borgman
2010-12-19 13:51 ` Stefan Monnier
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.