Re: org code and error catching

2023-06-02 Thread Michael Heerdegen
Ihor Radchenko  writes:

> > Though, I think you didn't change the occurrence that this thread
> > started with - `org-eval'.  Does changing this one cause problems?
>
> Tests are passing.
> I originally skipped it because it did not look useful from a brief
> glance to have full backtraces there, and I was unsure if it is truly
> safe.

I don't recall either why I originally needed backtraces for it.  There
was a reason, but I don't remember.

> I see no obvious downsides though.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1cb5de621

Thanks, Ihor.


Michael.



Re: org code and error catching

2023-06-02 Thread Ihor Radchenko
Michael Heerdegen  writes:

> Michael Heerdegen  writes:
>
>> I reviewed it shortly - looks appropriate.
>
> Though, I think you didn't change the occurrence that this thread
> started with - `org-eval'.  Does changing this one cause problems?

Tests are passing.
I originally skipped it because it did not look useful from a brief
glance to have full backtraces there, and I was unsure if it is truly
safe.

I see no obvious downsides though.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=1cb5de621

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org code and error catching

2023-06-01 Thread Michael Heerdegen
Michael Heerdegen  writes:

> I reviewed it shortly - looks appropriate.

Though, I think you didn't change the occurrence that this thread
started with - `org-eval'.  Does changing this one cause problems?

Michael.



Re: org code and error catching

2023-06-01 Thread Michael Heerdegen
Ihor Radchenko  writes:

> I changed instances that appear to be safe.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5b4eebfab

I reviewed it shortly - looks appropriate.

Thank you very much!

Michael.



Re: org code and error catching

2023-06-01 Thread Ihor Radchenko
Michael Heerdegen  writes:

>> As for condition-case-unless-debug, may you create a patch?
>> But please do not replace everything blindly - I know for sure that at
>> least some `condition-case' clauses are there on purpose.
>
> I nearly never had a closer look at the org-mode code (other than
> blindly).  I would prefer to help differently (like reviewing a patch),
> honestly, unless there is really no one more appropriate to find.

I changed instances that appear to be safe.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=5b4eebfab

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org code and error catching

2023-05-16 Thread Michael Heerdegen
Ihor Radchenko  writes:

> As for condition-case-unless-debug, may you create a patch?
> But please do not replace everything blindly - I know for sure that at
> least some `condition-case' clauses are there on purpose.

I nearly never had a closer look at the org-mode code (other than
blindly).  I would prefer to help differently (like reviewing a patch),
honestly, unless there is really no one more appropriate to find.

Michael.



Re: org code and error catching

2023-05-16 Thread Ihor Radchenko
Michael Heerdegen  writes:

> Ihor Radchenko  writes:
>
>> What are those?
>> I do not have anything failing on my side.
>
> See the attached file.  I had been using an up-to-date Emacs master build.

Ah. Different locale (LANG). It is
https://list.orgmode.org/orgmode/d140fa73-9995-4467-963e-00d596448...@axelkielhorn.de/

As for condition-case-unless-debug, may you create a patch?
But please do not replace everything blindly - I know for sure that at
least some `condition-case' clauses are there on purpose.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org code and error catching

2023-05-16 Thread Michael Heerdegen
Ihor Radchenko  writes:

> What are those?
> I do not have anything failing on my side.

See the attached file.  I had been using an up-to-date Emacs master build.

Michael.

<>


Re: org code and error catching

2023-05-16 Thread Ihor Radchenko
Michael Heerdegen  writes:

> Hmm - mine gave a different result: I cloned the org-mode archive from
> https://git.savannah.gnu.org/git/emacs/org-mode.git, called "make" and
> ran the tests as described in the "testing/README".  That gave 6 failing
> tests.

What are those?
I do not have anything failing on my side.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org code and error catching

2023-05-15 Thread Michael Heerdegen
Ihor Radchenko  writes:

> In my attempts, the tests started failing for no obvious reason.
> Just from changing `condition-case' to `condition-case-unless-debug'.
>
> Though I did not investigate if it happened for every atomic change.

Hmm - mine gave a different result: I cloned the org-mode archive from
https://git.savannah.gnu.org/git/emacs/org-mode.git, called "make" and
ran the tests as described in the "testing/README".  That gave 6 failing
tests.

Then I blindly replaced every occurrence of `condition-case' with
`condition-case-unless-debug' (everywhere but not in the tests), ran
"git clean -xf", then "make" again, and ran the tests again.  Again 6
failing tests.

Not sure if I did something wrong.

Michael.



Re: org code and error catching

2023-05-15 Thread Ihor Radchenko
Michael Heerdegen  writes:

> Ihor Radchenko  writes:
>
>> This is a good idea, except that `condition-case-unless-debug' has
>> non-obvious side effects that interfere with ERT (Org testing system).
>
> What side effects are these?

In my attempts, the tests started failing for no obvious reason.
Just from changing `condition-case' to `condition-case-unless-debug'.

Though I did not investigate if it happened for every atomic change.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



Re: org code and error catching

2023-05-14 Thread Michael Heerdegen
Ihor Radchenko  writes:

> This is a good idea, except that `condition-case-unless-debug' has
> non-obvious side effects that interfere with ERT (Org testing system).

What side effects are these?

Thx,
Michael.



Re: org code and error catching

2023-05-12 Thread Ihor Radchenko
Michael Heerdegen  writes:

> I had a hard time to debug some problem with the expansion of some
> capture template because org catched the error even when I had set
> `debug-on-error'.  Would it be possible to make some functions,
> e.g. `org-eval' in my case (probably some more?), use
> `condition-case-unless-debug' instead of `condition-case'?

This is a good idea, except that `condition-case-unless-debug' has
non-obvious side effects that interfere with ERT (Org testing system).

If someone familiar with error handling in Elisp can help with this, it
would be welcome.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at 



org code and error catching

2020-10-26 Thread Michael Heerdegen
Hello,

I had a hard time to debug some problem with the expansion of some
capture template because org catched the error even when I had set
`debug-on-error'.  Would it be possible to make some functions,
e.g. `org-eval' in my case (probably some more?), use
`condition-case-unless-debug' instead of `condition-case'?

Thanks,

Michael.