jimeh / build-emacs-for-macos

Somewhat hacky script to automate building of Emac.app on macOS.
475 stars 51 forks source link

Add patch for alpha-background support #111

Open garyo opened 3 weeks ago

garyo commented 3 weeks ago

Here's a patch from https://github.com/jonrubens/emacs that adds support for alpha-background on MacOS (set alpha of background while leaving text opaque; it's great for doc popup frames). It would be great if you could add this as an option to your script -- I see you've got a few such options which download patches and apply them.

This patch applies OK to emacs master (a268496727, Aug 20 2024). ns-alpha-background-v2.patch

jimeh commented 3 weeks ago

Oh, that's neat :)

If possible I prefer pointing the script to a URL to fetch a patch where it's likely to be updated.

Hence my question is where you got that patch file from, and is it the same as the diff between upstream master and jonrubes' ns-alpha-background branch? I can't easily check right now as I'm on my phone.

If it is the same, I should be able to use GitHub's compare patch feature and use this URL to download the patch:

https://github.com/emacs-mirror/emacs/compare/master...jonrubens:emacs:ns-alpha-background.patch
garyo commented 3 weeks ago

Great! I agree re: downloading from a URL, for sure. (It would be great if your script had an option for users to apply patches from user-specified URLs, like "--patch " -- that would make it easy to try things out.)

What I did, to be careful, is git clone jonrubes' repo, switch to his ns-alpha-background branch, git diff vs. his repo's master, then apply that patch to current emacs master (had to add -l -F10 because things have diverged a bit), review that visually, then I did git diff to get a clean patch off master.

I did a quick test here, and yes, your github compare URL produces an identical patch to mine, when applied to current emacs-mirror master (I still have to do patch -p1 -l, ignoring whitespace, otherwise one hunk fails).