Open spwhitton opened 7 years ago
Hum, it also fails with the Emacs 26.bundled org-mode. This looks difficult to solve, might have to give up on some org-mode integration.
Hum, it also fails with the Emacs 26.bundled org-mode. This looks difficult to solve, might have to give up on some org-mode integration.
@npostavs , can you explain summarily why this "looks difficult to solve"?
My vague recollection is that org-mode changed around the timing of how text gets moved into the source-block buffer, such that it's no longer feasible for yasnippet to catch it. I think we need to get some hooks added to org-mode so we can get notified about it.
Has this issue been brought up on the org-mode mailing list? If so, could someone post a link to the thread? It would be great to see it progress!
Has this issue been brought up on the org-mode mailing list?
No, I don't think so. I've been looking at this a bit yesterday, and even though the test passes in Emacs 25, trying to do something similar interactively fails with some error in the post-command hook (i.e., the test case is not entirely representative). This org-mode integration is just a huge mess, I'm afraid. :(
My vague recollection is that org-mode changed around the timing of how text gets moved into the source-block buffer, such that it's no longer feasible for yasnippet to catch it.
This was mostly wrong. The actual problem seems to be that org
stopped doing the fontification step where it's not needed, as is the
case for text-mode
, hence this test failure.
Additionally I left a bunch of garbage code in yasnippet's org-mode handling, which prevented it from working even for fontified modes. That should now be fixed.
I think we need to get some hooks added to org-mode so we can get notified about it.
This is still needed for text-mode
src blocks, and
forward-compatibility in case org-mode internals change.
If I have Org 9.0.9 installed on my system (using a distribution package), the following test fails. Otherwise, using the version of Org bundled with Emacs 25.2.2, it passes. Thanks!