mtekman / org-tanglesync.el

A package to pull external changes into an org-mode source block if that block is tangled to an external file
GNU General Public License v3.0
90 stars 7 forks source link

Bug: org-tanglesync-user-edit-buffer: Wrong type argument: stringp, nil #6

Closed BonfaceKilz closed 4 years ago

BonfaceKilz commented 4 years ago

Steps to reproduce:

@mtekman I think you should add a check for seeing whether the :tangle property exists. I don't know enough elisp to do this, but I can try to hack around something after work.

BonfaceKilz commented 4 years ago

@mtekman here's a proposed solution that I've hacked around: https://github.com/mtekman/org-tanglesync.el/pull/7/commits/2c5eb0a1c97672110819f830d3b30bb83426e4cc

Could you check it out?

mtekman commented 4 years ago

user-error: Cannot modify an area being edited in a dedicated buffer, yep I see this too from time to time and I do not yet know how to reproduce it explicitly.

I think it has to do with edit hook not sending the right signal back after execution that the block is no longer being modified, but I need to dig more into the org internals to see how this is being done natively.

mtekman commented 4 years ago

Okay, I just pushed a fix that should stop the hanging uneditable buffer issue

https://github.com/mtekman/org-tanglesync.el/commit/d99181f173b4e55b4e835d99fcd415e62beb047f

Please try it and let me know if it resolves the issue

BonfaceKilz commented 4 years ago

You don't need to dig into org internals. The bug happens when you have the :tangle property missing in the src block header. I'll check out your commit when I arrive home. In the meantime, to reproduce the bug, remove the tangle property from your header and hit C-c '. Check out the solution from the PR I submitted. That fixes the problem IMO

BonfaceKilz commented 4 years ago

I've just seen your comment on the PR. I'll respond to it once I'm close to a machine.

BonfaceKilz commented 4 years ago

@mtekman I've just tested the new fix and it works just fine. It's way less hacky than what I had. Thanks for spinning that up in such a short time!