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

Writing tangled file doesn't update org file #16

Closed dimt closed 3 years ago

dimt commented 3 years ago

Pushing changes from the tangled file back to the org block doesn't seem to work in my case. When I evaluate (org-tanglesync-watch-make-watchlist org-tanglesync-watch-files), it works as expected but when I run describe-variable on org-tanglesync-confmap there is no mapping between my org and tangled file.

I recorded changing the tangled file and then saving, as well as evaluating the two commands. My org-tanglesync config is on the right window.

screencast

mtekman commented 3 years ago

Hi, thanks for the report

Cheers!

dimt commented 3 years ago

Hi, thanks for the report

* Is `org-tanglesync-mode` enabled?

* Does it work if you set `org-tanglesync-watch-files` to just "test.org" ?

* Does it work if you also set the `:tangle test.el` to `:tangle /absolute/path/to/test.el` ?

Cheers!

Hi,

Yes org-tanglesync-mode is enabled. Unfortunately it isn't visible due to keycast-mode. I tried using relative and absolute paths for each file without success.

mtekman commented 3 years ago

Hmm... what version of emacs are you using?

dimt commented 3 years ago

GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, cairo version 1.17.3)

mtekman commented 3 years ago

Is there another test.el block within your org file?

dimt commented 3 years ago

No, there is no other test.el block.

However, evaluating (setq org-tanglesync-confmap (org-tanglesync-watch-make-watchlist org-tanglesync-watch-files)) fixes the problem.

dimt commented 3 years ago

My elisp knowledge is very limited. Is there a better solution than evaluating this expression in every elisp file I want to sync?

mtekman commented 3 years ago

oh whoops, its been a while since I looked at the source -- does it work if you enable org-tanglesync-watch-mode instead?

dimt commented 3 years ago

It is enabled when I open any file thanks to this hook: ((prog-mode text-mode) . org-tanglesync-watch-mode)), but it still doesn't sync to the org block.

dimt commented 3 years ago

This is embarrassing. Full path to org file was wrong. It works fine using full path.