Skip to content

Add setup instructions for BSD users#85

Merged
jacksonrayhamilton merged 1 commit intoprettier:masterfrom
jacksonrayhamilton:diff-command-documentation
Jun 25, 2025
Merged

Add setup instructions for BSD users#85
jacksonrayhamilton merged 1 commit intoprettier:masterfrom
jacksonrayhamilton:diff-command-documentation

Conversation

@jacksonrayhamilton
Copy link
Collaborator

Follow-up to: #56

I thought it would be helpful to provide setup instructions for BSD users. Even though we provided that config option to help them, setup still wouldn't be plug-and-play for them. They'd need to dig through closed issues and find that thread.

Disclaimer: I haven't used BSD, but I believe I found the right packages:

Maybe @sirn can confirm if these instructions look correct?

As mentioned here, a more portable alternative would be to remove the dependency and diff in elisp. Not sure of the scope on that though.

@sirn
Copy link
Contributor

sirn commented Jun 25, 2025

Hi, the instruction also looks good to me. Thank you for this!

@jacksonrayhamilton
Copy link
Collaborator Author

I decided to research the scope of generating the RCS Patch Format in pure ELisp today.

What I found was that core packages like ediff also shell out to the diff command. Similar user packages, like Apheleia, take the same approach. My assumption is that, if you use Emacs, you're using tools like ediff, especially if you use Magit since they integrate so well. If the diff dependency was tolerable for those popular tools, then it follows that it's tolerable for this one too.

(As an aside, say that we wanted to implement it anyway! The diff-lisp package seems like it could be a good place to start. That package has an implementation of the Myers diff algorithm in ELisp. It has a function called diff-lisp-emit-diff, which could potentially be refactored to output a diff in the RCS Patch Format rather than the "unified format." For fun, I cloned the repo, gave the RCS spec to an LLM, and asked it to modify diff-lisp to output the diff in that format. I iterated for a bit, but wasn't able to exactly match the output of diff -n; probably possible with more work. In any case, I feel like I'd still trust diff over a new implementation in ELisp, now that I've had a taste for the complexity of these algorithms.)

@jacksonrayhamilton jacksonrayhamilton merged commit 6dc6309 into prettier:master Jun 25, 2025
12 checks passed
This was referenced Jul 3, 2025
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.

3 participants