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

insert blank lines when tangling #955

Closed
1 task done
rileyshahar opened this issue Jun 20, 2023 · 6 comments · Fixed by #958
Closed
1 task done

insert blank lines when tangling #955

rileyshahar opened this issue Jun 20, 2023 · 6 comments · Fixed by #958
Labels
feature Issues related to feature proposals. Please attach a module.

Comments

@rileyshahar
Copy link
Contributor

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Feature description

By default, when emacs tangles org-mode files, it inserts blank lines between code which originates in different blocks. This behavior makes for more readable output files---not the biggest deal with literate programming, but definitely useful. It's also probably good for the defaults to line up unless there's a reason for them not to.

Thanks for the great software--I'm currently trying to convert my ~2000 line config to norg so I'll probably have more issues to come. Happy to write a PR for this, doesn't seem too difficult.

Help

Yes

Implementation help

No response

@rileyshahar rileyshahar added the feature Issues related to feature proposals. Please attach a module. label Jun 20, 2023
@github-project-automation github-project-automation bot moved this to added-updated-reopened in sorting neorg issue tracker Jun 20, 2023
rileyshahar added a commit to rileyshahar/neorg that referenced this issue Jun 21, 2023
@jonathf
Copy link
Contributor

jonathf commented Jul 6, 2023

What do we think about expanding upon this idea and have closest heading in a comment as the delimiter where that makes sense?

@rileyshahar
Copy link
Contributor Author

That requires knowing something about the syntax of the target language, since we need to know what its comments look like, which definitely isn't possible in general. It might make sense as a default-off option for supported filetypes.

@jonathf
Copy link
Contributor

jonathf commented Jul 6, 2023

You are absolutely right. Limiting the support for this to supported languages makes sense, yes.

I was thinking we on demand temporarily load tangle targets into buffer memory which triggers ftplugin and sets commentstring.

@rileyshahar
Copy link
Contributor Author

Ah, I see. Yeah, seems like it would be cool!

@jonathf
Copy link
Contributor

jonathf commented Jul 6, 2023

I've pushed out an suggestion in #981 if you're interested.

Continued thought in the same direction:
Since the commentstring is available, adding a top-header to the tangled file with information about the tangle job would be nice.

@vhyrro
Copy link
Member

vhyrro commented Aug 1, 2023

I like the idea of adding information about a tangle job! @jonathf any extra behaviour with delimiters should definitely be put behind config flags where possible (most likely in the document metadata). The default behaviour should be as simple as can be :)

vhyrro pushed a commit that referenced this issue Aug 1, 2023
@github-project-automation github-project-automation bot moved this from added-updated-reopened to done in sorting neorg issue tracker Aug 1, 2023
benlubas pushed a commit to benlubas/neorg that referenced this issue Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issues related to feature proposals. Please attach a module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants