0

As an aid, let me show you a video: https://streamable.com/c2bnko, though it's not needed to follow this question.

I'm going to edebug org-id-alist-to-hash (0:13 in video). First I verify that the variable being passed in is a list (namely org-id-locations). Which is shown true in edebug too...but then on the next edebug step, point is still on the same symbol, and now the echo area shows it as a hash table. Which then crashes the function, of course, since it expects a list.

What could be going on? Why would it satisfy listp, but change its mind and be a hash table before org-id-alist-to-hash can do anything with it?

I cannot make code to reproduce, since it's intermittent or depends on very particular circumstances.

6
  • 1
    I couldn't tell from the video when you started debugging, but I can see (when (listp org-id-locations) (setq org-id-locations (org-id-alist-to-hash org-id-locations))) which sounds exactly like the "started as a list, now it's a hash" symptom. So... can you explain more clearly what the issue is? Commented Jul 25, 2024 at 13:39
  • Video is not good for StackExchange anyway since it will disappear. I think my question describes the issue adequately on its own. But if you want to check again, you see me doing M-x edebug-defun at 0:13, and only after that do I go and eval. The odd behavior can be observed at 0:21-0:25. Commented Jul 26, 2024 at 20:33
  • I also realize it's confusing that the thing I want to do is exactly to convert it to a hash table. :-) The only issue is I can't, because it already becomes a hash table as it's being passed into the function that's supposed to do the conversion. Commented Jul 26, 2024 at 20:37
  • Well the video isn't there anymore. I suggest you instead update the question with code that other people can copy/run/debug to reproduce the problem. Commented Jul 27, 2024 at 0:04
  • I cannot make such code. If I could, I'd probably solve the problem, which is intermittent... Refreshed video link, but really, the question just boils down to: why might edebug step twice on the same variable? Commented Jul 27, 2024 at 13:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.