* user-error: Not at a block -- how to debug?
@ 2014-09-15 9:44 Eric S Fraga
2014-09-15 10:32 ` Thorsten Jolitz
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Eric S Fraga @ 2014-09-15 9:44 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 653 bytes --]
Hello,
all of a sudden, for one of my (rather large) org files, I get an error:
user-error: Not at a block
I note that this error message appears in three places in
org.el. However, I cannot figure out why this is being incurred and
debug-on-error does not get invoked when this error occurs.
Can anybody please suggest how to debug this? I have tried going
through the file but nothing is obviously wrong with the
structure. Annoyingly, this error stops org-mode-hook from executing so
my environment is not what I expect.
Thanks,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-360-ge17ee8
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 9:44 user-error: Not at a block -- how to debug? Eric S Fraga
@ 2014-09-15 10:32 ` Thorsten Jolitz
2014-09-15 10:45 ` Eric S Fraga
2014-09-15 10:36 ` Eric S Fraga, Eric S Fraga
2014-09-15 10:53 ` Andrea Rossetti
2 siblings, 1 reply; 10+ messages in thread
From: Thorsten Jolitz @ 2014-09-15 10:32 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
Hello,
> all of a sudden, for one of my (rather large) org files, I get an error:
>
> user-error: Not at a block
>
> I note that this error message appears in three places in
> org.el. However, I cannot figure out why this is being incurred and
> debug-on-error does not get invoked when this error occurs.
>
> Can anybody please suggest how to debug this? I have tried going
> through the file but nothing is obviously wrong with the
> structure. Annoyingly, this error stops org-mode-hook from executing so
> my environment is not what I expect.
Just guessing: you do some visibility cycling when opening up the
org-buffer (open in overview or so)?
Maybe edebug `org-hide-block-toggle`? Seems the most likely candidate
for me ...
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 9:44 user-error: Not at a block -- how to debug? Eric S Fraga
2014-09-15 10:32 ` Thorsten Jolitz
@ 2014-09-15 10:36 ` Eric S Fraga, Eric S Fraga
2014-09-15 10:53 ` Andrea Rossetti
2 siblings, 0 replies; 10+ messages in thread
From: Eric S Fraga, Eric S Fraga @ 2014-09-15 10:36 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]
A quick follow-up: if I remove the line
#+startup: hideblocks
From the file, I can at least open the file as normal. There must be
something wrong in one of my blocks but the file is 0.5MB in size. I've
tried bisecting but haven't tracked it down yet.
It would be great if the user-error message would indicate a line number
or a headline or something to help debug!
thanks,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-360-ge17ee8
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 10:32 ` Thorsten Jolitz
@ 2014-09-15 10:45 ` Eric S Fraga
2014-09-15 11:35 ` Nicolas Goaziou
0 siblings, 1 reply; 10+ messages in thread
From: Eric S Fraga @ 2014-09-15 10:45 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
On Monday, 15 Sep 2014 at 12:32, Thorsten Jolitz wrote:
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
[...]
> Just guessing: you do some visibility cycling when opening up the
> org-buffer (open in overview or so)?
Spot on!
> Maybe edebug `org-hide-block-toggle`? Seems the most likely candidate
> for me ...
Luckily, even though the file is large, the number of "blocks" is
relatively small so I have narrowed down the problem: column view blocks
are not understood by org any longer! Removing them (I had three)
removes the problem.
Thanks,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-360-ge17ee8
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 9:44 user-error: Not at a block -- how to debug? Eric S Fraga
2014-09-15 10:32 ` Thorsten Jolitz
2014-09-15 10:36 ` Eric S Fraga, Eric S Fraga
@ 2014-09-15 10:53 ` Andrea Rossetti
2014-09-15 16:03 ` Eric S Fraga
2 siblings, 1 reply; 10+ messages in thread
From: Andrea Rossetti @ 2014-09-15 10:53 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga <at> ucl.ac.uk> writes:
>
> user-error: Not at a block
> ...
>
> Can anybody please suggest how to debug this?
Does this work?
M-x debug-on-entry RET user-error RET
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 10:45 ` Eric S Fraga
@ 2014-09-15 11:35 ` Nicolas Goaziou
2014-09-15 16:02 ` Eric S Fraga
2014-09-15 16:09 ` Eric S Fraga
0 siblings, 2 replies; 10+ messages in thread
From: Nicolas Goaziou @ 2014-09-15 11:35 UTC (permalink / raw)
To: Thorsten Jolitz; +Cc: emacs-orgmode
Hello,
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Luckily, even though the file is large, the number of "blocks" is
> relatively small so I have narrowed down the problem: column view blocks
> are not understood by org any longer! Removing them (I had three)
> removes the problem.
This should be fixed. Thank you for reporting it.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 11:35 ` Nicolas Goaziou
@ 2014-09-15 16:02 ` Eric S Fraga
2014-09-15 16:09 ` Eric S Fraga
1 sibling, 0 replies; 10+ messages in thread
From: Eric S Fraga @ 2014-09-15 16:02 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Monday, 15 Sep 2014 at 13:35, Nicolas Goaziou wrote:
> Hello,
>
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> Luckily, even though the file is large, the number of "blocks" is
>> relatively small so I have narrowed down the problem: column view blocks
>> are not understood by org any longer! Removing them (I had three)
>> removes the problem.
>
> This should be fixed. Thank you for reporting it.
Thanks!
Is there any chance of improving the error reporting to give some
minimal context?
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-265-g7cf7e4
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 10:53 ` Andrea Rossetti
@ 2014-09-15 16:03 ` Eric S Fraga
0 siblings, 0 replies; 10+ messages in thread
From: Eric S Fraga @ 2014-09-15 16:03 UTC (permalink / raw)
To: Andrea Rossetti; +Cc: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
On Monday, 15 Sep 2014 at 10:53, Andrea Rossetti wrote:
> Eric S Fraga <e.fraga <at> ucl.ac.uk> writes:
>>
>> user-error: Not at a block
>
>> ...
>>
>> Can anybody please suggest how to debug this?
> Does this work?
>
> M-x debug-on-entry RET user-error RET
Thanks for the suggestion. Next time!
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-265-g7cf7e4
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 11:35 ` Nicolas Goaziou
2014-09-15 16:02 ` Eric S Fraga
@ 2014-09-15 16:09 ` Eric S Fraga
2014-09-15 18:28 ` Nicolas Goaziou
1 sibling, 1 reply; 10+ messages in thread
From: Eric S Fraga @ 2014-09-15 16:09 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 737 bytes --]
Nicolas,
again, thanks for fixing this bug but I wonder if you would mind
thinking about the approach to error handling. The user error handling
was short-circuiting the normal file handling, in particular some of the
hooks and other processing that would have been expected to be
invoked. In this case, I had used recentf to visit the file. Because
of the user error, the buffer wouldn't appear at all. Likewise,
projectile processing was being terminated. Both aspects caused me some
confusion, to say the least...
Is there an alternative means of raising an error or warning without
terminating normal processing?
thanks,
eric
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-265-g7cf7e4
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 180 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: user-error: Not at a block -- how to debug?
2014-09-15 16:09 ` Eric S Fraga
@ 2014-09-15 18:28 ` Nicolas Goaziou
0 siblings, 0 replies; 10+ messages in thread
From: Nicolas Goaziou @ 2014-09-15 18:28 UTC (permalink / raw)
To: emacs-orgmode
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> Is there an alternative means of raising an error or warning without
> terminating normal processing?
In this case, no error should be thrown.
"hideblocks" startup options triggers `org-hide-block-all', which, in
turn, calls `org-hide-block-toggle-maybe', which is the safe version of
`org-hide-block-toggle'.
Unfortunately, `org-hide-block-toggle-maybe' wasn't very safe. I fixed
it too.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-09-15 18:28 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15 9:44 user-error: Not at a block -- how to debug? Eric S Fraga
2014-09-15 10:32 ` Thorsten Jolitz
2014-09-15 10:45 ` Eric S Fraga
2014-09-15 11:35 ` Nicolas Goaziou
2014-09-15 16:02 ` Eric S Fraga
2014-09-15 16:09 ` Eric S Fraga
2014-09-15 18:28 ` Nicolas Goaziou
2014-09-15 10:36 ` Eric S Fraga, Eric S Fraga
2014-09-15 10:53 ` Andrea Rossetti
2014-09-15 16:03 ` Eric S Fraga
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.