Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update org.eld elisp and src templates #41

Merged
merged 1 commit into from
Sep 16, 2023
Merged

Conversation

ispringle
Copy link
Contributor

Updated the elisp and src examples so that they do not use indent-according-to-tab. When the header of the source block exists but the footer does not yet exist org-mode greedily looks for the next #+end_src, even if a #+begin_src precedes it. If it ends that #+end_src it then treats all text between tempel's freshly inserted src header and that existing footer as source doe and attempts to indent and possible format it accordingly. The results will vary by the source language, but for elisp it's indenting all text and then whenever it finds a # it prepends a ,.

This change introduces no degradation to the template examples, but it does work with org-mode as is.

@ispringle
Copy link
Contributor Author

This addresses this issue in Tempel: minad/tempel#71
And this mirrors the PR I've created for the Tempel examples: minad/tempel#113

@ispringle ispringle changed the title Update org.eld elisp and src templats Update org.eld elisp and src templates Sep 15, 2023
@ispringle
Copy link
Contributor Author

It appears the checks are failing because the use of the *-ts-mode requires Emacs 29 to get access to the treesit module.

@Crandel
Copy link
Owner

Crandel commented Sep 16, 2023

I fixed actions, so you can rebase to latest main

Updated the elisp and src examples so that they do not use indent-according-to-tab. When the header of the source block exists but the footer does not yet exist org-mode greedily looks for the next #+end_src, even if a #+begin_src precedes it. If it ends that #+end_src it then treats all text between tempel's freshly inserted src header and that existing footer as source doe and attempts to indent and possible format it accordingly. The results will vary by the source language, but for elisp it's indenting all text and then whenever it finds a # it prepends a ,.

This change introduces no degradation to the template examples, but it does work with org-mode as is.
@Crandel Crandel merged commit 0e02b36 into Crandel:main Sep 16, 2023
3 checks passed
@ispringle ispringle deleted the patch-1 branch September 17, 2023 22:07
alexforsale pushed a commit to alexforsale/tempel-collection that referenced this pull request Aug 6, 2024
Updated the elisp and src examples so that they do not use indent-according-to-tab. When the header of the source block exists but the footer does not yet exist org-mode greedily looks for the next #+end_src, even if a #+begin_src precedes it. If it ends that #+end_src it then treats all text between tempel's freshly inserted src header and that existing footer as source doe and attempts to indent and possible format it accordingly. The results will vary by the source language, but for elisp it's indenting all text and then whenever it finds a # it prepends a ,.

This change introduces no degradation to the template examples, but it does work with org-mode as is.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants