Skip to content

Multi-line code comments #46

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

Open
StormFireFox1 opened this issue Aug 11, 2020 · 3 comments
Open

Multi-line code comments #46

StormFireFox1 opened this issue Aug 11, 2020 · 3 comments

Comments

@StormFireFox1
Copy link

StormFireFox1 commented Aug 11, 2020

Hello there, thank you for this absolutely amazing package!

Is it even possible to write multi-line code comments? The idea would be to select a segment of the diff and comment on it, kind of how you can do the same on GitHub.

Perhaps this is best left after the mode support, as this functionality could be a shortcut after selecting a part of the diff.

@charignon
Copy link
Owner

Thanks for the suggestion, it would be a great feature to add and I definitely miss not having that in github-review

It would be a lot easier after the mode support indeed! If you are interested in prototyping it, I would love to take a look at what you come up with.

Right now, the package just manipulates text and is very simple which makes it compatible with a broad range of use cases. Adding support for multi line comment would be awesome and I am thinking of how to maintain the accessibility of the package while doing that (and I don't have experience with that). If you use a screen reader to access this package, feel free to reach out to me to discuss, I would want to understand if that would be a problem for you. You can DM me at https://twitter.com/lc2817.

Also if you have an opinion on this feature, feel free to comment / upvote!

@StormFireFox1
Copy link
Author

StormFireFox1 commented Sep 4, 2020

Thinking on this for a bit more time, I've realized there could be a simple method of making multi-line comments manageable, which is to add a check at the beginning of any inline comment to see if it represents a range of lines from the start of the comments, something like:

#+3
# This is a comment spanning the next 3 lines
# after the last comment line.
Lines
more lines
even more lines

I might try this out myself (My Elisp-fu is pretty bad) but if you have a better suggestion, let me know.

@magthe
Copy link

magthe commented Jan 16, 2025

@StormFireFox1 yes, that would be really nice! It might be worth considering if it should be possible to add the comment after the code too

Lines
more lines
even more lines
#-3
# This is a comment spanning the 3 lines preceding the comment.

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

No branches or pull requests

3 participants