Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Update sync method to utilise existing org framework #12

Open
mtekman opened this issue Jan 13, 2020 · 1 comment
Open

Update sync method to utilise existing org framework #12

mtekman opened this issue Jan 13, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@mtekman
Copy link
Owner

mtekman commented Jan 13, 2020

There should be an easy way during watch-mode to convert a buffer to an org-edit-src-mode buffer and set the tangle source to the right conf file and tangle block.

The user could then do C-c ' to exit the buffer and go back to the conf, or save as normal (though killing the buffer might present some issues...)

Right now, the method literally copies and pastes, but this is not elegant.

If I want to get this functionality later merged into org-mode, I need to use the existing framework.

@mtekman
Copy link
Owner Author

mtekman commented Jan 13, 2020

Some specifics that might be of interest when the org-edit-src-mode is activated in a tangled buffer:

  • org-src--beg-marker - a #<marker> type that has the character just inside the block at the top
  • org-src--end-marker - a #<marker> type that has the character just inside the block at the bottom
  • org-src--from-org-mode - is set to "org-mode"
  • org-src--src-type - is set to "src-block
  • org-src--overlay - is set to #<overlay at posX and posY in File > where posX is equal to the beg-marker, and posY is the end-marker, and File is the name of the source org file.
  • org-src--babel-info - is the original contents of the buffer before modification along with header arguments
  • org-src--allow-write-back - is set to t when called within the org-buffer and #[0 "Àed\"�" [org-escape-code-in-region] 3] inside the src-mode, which I have no idea about....

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant