reddit / emacs
I will pay you to write this plugin for me
masukomi · 2022-03-09 17:44
[edit] It's done! I'll announce the release with a new post shortly.
---
A while ago I wrote [a mini API server](https://github.com/masukomi/private_comments) in order to let me leave "private comments" on a codebase.
> Imagine being dropped into a new codebase and having the freedom to leave whatever todo items and breadcrumbs you want without cluttering the codebase. Imagine working on a client’s codebase and not having to worry about what you say, or who sees it.
I [fully documented](https://masukomi.github.io/private_comments/) what it'd take to write a plugin for your favorite editor and wrote [an example plugin for vim](https://github.com/masukomi/vim_private_comments/) ... and then I switched to emacs.
My emacs lisp chops are NOT up to writing a plugin that speaks to this API and displays the private comments inline. I'm imagining something akin to how magit shows commit messages inline.
I'm tired of not having access to this in my main editor.
If you or someone you know would be interested in writing this for me (as a public open source package, which i'll be happy to maintain) I'll happily pay you, or maybe donate the equivalent amount to help folks in Ukraine if you'd prefer. DM me here (or @masukomi on twitter) with how much you'd want.
Goator · 2022-03-09 18:08
There is a bunch of packages for this. I also have one https://github.com/thanhvg/emacs-virtual-comment
If you don't like mine then try
https://github.com/blue0513/phantom-inline-comment
https://www.emacswiki.org/emacs/InPlaceAnnotations
masukomi · 2022-03-09 18:31
I will definitely check these out. Thank you.
shitterwithaclitter · 2022-03-09 19:20
you might want to try out [org remark](https://github.com/nobiot/org-remark)
masukomi · 2022-03-09 20:04
side note: before I wrote this (and before i used emacs) I spoke to folks and basically got the reactions of "why would you want that?!" "you shouldn't be writing comments you wouldn't be ok with people seeing anyway" (not that i wanted to), and other negative stuff. I wrote it anyway because i knew it'd be useful to me.
I talk about it to emacs people and you're like "well of course, and here are 3 extant options that do essentially the same thing"
--
I'm definitely checking out the options provided. Maybe I'll end up using one of them as a starting point to interact with my API. If no-one wants to take me up on my offer. It'd certainly help with my newness to elisp.
There are 3 things mine offers that a quick skim of the linked ones hasn't revealed: works with any editor, so for those who use multiple you'd be able to see your comments in all of them, shareable amongst colleagues, and stored in such as a way that you could put it on a cloud server without violating NDAs about the code by sharing repo metadata (assuming the contents of your comments don't violate the NDA). I worked at apple and putting company data, or anything about company data, on a server they didn't control was a big no-no. This wouldn't violate that if you were careful about what you said in your comments.
hkjels · 2022-03-09 20:36
You can use bookmark+. It’s called bookmark annotations. It will give you a visual cue and you can more easily list and jump to each of them
tonicinhibition · 2022-03-09 21:32
Although I'm personally not the right choice for this and I haven't got the time, I want to encourage this kind of post. It's clear and direct, offers paid incentive in the title and comes with well-written documentation. It even has sample-code doing the same thing.
You even legitimize yourself with social media. Bravo sir.
You may have trouble finding someone because it's such a small community, but it's not for any lack on your part.
I hope more people follow suit. A little economy here would be wonderful.
masukomi · 2022-03-09 22:01
I don't think bookmarks+ is really the same thing, although it is definitely related. I think /u/goator 's virtual-comment is almost exactly what i'm looking for in terms of emacs UI. Not sure about how that handles storage, sharing, and prevention of metadata secret leaking (if sharing is a thing)... still gotta dig into that.
nnreddit-user · 2022-03-09 22:52
>A little economy here would be wonderful.
Coding is not like construction which lends itself to more hands, and whose workmanship, if shoddy, would infuriate inhabitants daily. A general contractor would pay to have his own home remodelled, but the typical programmer would balk at paying 3-4 digits USD for work he himself could approximate with an ugly stopgap. Emacs, being the hacker's sawzall, lowers that do-it-yourself threshold even further.
I've shopped a sub-market $50/hour rate here for jobs that I estimated would take me at least 15-20 hours. Prospects generally run for the hills.
masukomi · 2022-03-10 14:46
org remark is interesting. Thanks for linking it. I think, for this, i want to stick with something that can actually insert comments directly inline. Especially since i need comments to be tied to versions of the file, so if the line you commented on has been altered by someone else's commit, i want the comment to go away.
(you'd still be able to retrieve comments for a historical version of the file)
kikechan · 2022-03-10 17:01
You don't need an external program for this.
Define a org-capture template with the name of the file, the root folder, the revision, timestamp and the branch and you're done.
masukomi · 2022-03-10 17:38
things my system provides that that won't
* comments are tied to a specific commit. So if a line you have commented on changes, the comment goes away
* comments for historical commits can be viewed. The comment may have gone away but you can view the relevant comments from any point in time of the file.
* comments aren't tied to the current commit of the file but the individual commits that made up the entirety of a file. As such you can comment on a line that was introduced in a past commit, and updating the file with a new commit won't make it go away unless the line you commented on has gone away / been altered.
* file names leak sensitive data that opens your employer up to hacking. You can't put it on a 3rd party server without violating NDA / security. My system doesn't have this problem (file names are hashed) and it's a significant feature because i want off-site backups of my comments.
* branch names leak sensitive data. Mine works without them.
* My "private" comments are stored in a repo which can be shared with other people working on the same team, but again, doesn't leak secrets (beyond anything you write in a comment).
* as an aside, mine allows for encrypted comments if anyone wants to bother. Especially notable if sharing with others, using 3rd party hosting, or working on something where it's hard to make useful comments for yourself that won't violate NDA or be dangerous if exposed.
kikechan · 2022-03-11 06:46
IMO you don't know that you don't know what you don't know.
You can hash any of those things that I mentioned. You can also not include any of those. Your choice.
All these things can be stored anywhere you have access.
You can also encrypt anything I mentioned. And potentially literally anything else.
You can filter headings for the specific commits. The notes will not be deleted if you've changed the line, or the file. You can remove the "metadata" from the notes if required.
Like I said, this is a basic use-case for org-capture. I suggest you try and use it first before asking people to make packages for you.
[deleted] · 2022-03-11 09:30
If nobody else is interested and the existing alternatives don't live up to your own system, I might be able to find some time in a month or so to work on this.
masukomi · 2022-03-16 16:20
thanks for the offer.
it's actually been done. i was planning on posting an update in a day or two when i release it into the world. :D