Re: [O] user-error: Not at a block -- how to debug?
Eric S Fraga 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
Re: [O] user-error: Not at a block -- how to debug?
On Monday, 15 Sep 2014 at 13:35, Nicolas Goaziou wrote: > Hello, > > Eric S Fraga 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 signature.asc Description: PGP signature
Re: [O] user-error: Not at a block -- how to debug?
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 signature.asc Description: PGP signature
Re: [O] user-error: Not at a block -- how to debug?
On Monday, 15 Sep 2014 at 10:53, Andrea Rossetti wrote: > Eric S Fraga 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 signature.asc Description: PGP signature
Re: [O] user-error: Not at a block -- how to debug?
Hello, Eric S Fraga 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
Re: [O] user-error: Not at a block -- how to debug?
On Monday, 15 Sep 2014 at 12:32, Thorsten Jolitz wrote: > Eric S Fraga 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 signature.asc Description: PGP signature
Re: [O] user-error: Not at a block -- how to debug?
Eric S Fraga 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
Re: [O] user-error: Not at a block -- how to debug?
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 signature.asc Description: PGP signature
Re: [O] user-error: Not at a block -- how to debug?
Eric S Fraga 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
[O] user-error: Not at a block -- how to debug?
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 signature.asc Description: PGP signature