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

Could not install @29 with --with-no-titlebar - Hunk #1 FAILED #433

Closed
3 tasks done
radamant opened this issue Jan 14, 2022 · 7 comments
Closed
3 tasks done

Could not install @29 with --with-no-titlebar - Hunk #1 FAILED #433

radamant opened this issue Jan 14, 2022 · 7 comments
Assignees

Comments

@radamant
Copy link

radamant commented Jan 14, 2022

Please make sure to follow these steps (and mark the checkboxes):

  • run brew update and try to reproduce the issue again
  • run brew doctor, fix all issues and try to reproduce your issue again
  • run brew config and brew doctor and include their output

What you were trying to do

Install emacs@29 with no titlebar. This works fine when --with-no-titlebar is omitted.

What happened (include command output)

$ brew reinstall emacs-plus@29 --force --with-no-titlebar --with-native-comp --with-xwidgets
Command output

==> Cloning https://github.com/emacs-mirror/emacs.git
Updating /Users/adampearson/Library/Caches/Homebrew/emacs-plus@29--git
From https://github.com/emacs-mirror/emacs
fbffe2cc30..bef9fcc999 master -> origin/master
==> Checking out branch master
Already on 'master'
Your branch is behind 'origin/master' by 39 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
HEAD is now at bef9fcc999 image-dired: Use MD5 for thumb filename generation
==> Reinstalling d12frosted/emacs-plus/emacs-plus@29 --with-no-titlebar --with-xwidgets --with-native-comp
==> Patching
==> Applying no-titlebar.patch
patching file src/nsterm.m
Hunk #1 FAILED at 433.
Hunk #2 succeeded at 8376 (offset 71 lines).
1 out of 2 hunks FAILED -- saving rejects to file src/nsterm.m.rej

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/d12frosted/homebrew-emacs-plus/issues

These open issues may also help:
Permission issues with emacs-plus running as a service #304
Need to set LIBRARY_PATH for emacs-plus@28 with --with-native-comp #378

Output of brew config

$ brew config
HOMEBREW_VERSION: 3.3.10
ORIGIN: https://github.com/Homebrew/brew
HEAD: 385892f3d27dcab0f5a1cb47c3927d9d65ed007c
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: edd69d091d0028d94c44292d44902c0f583a5daf
Core tap last commit: 43 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 13.0.0 build 1300
Git: 2.32.0 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.77.0 => /usr/bin/curl
macOS: 12.1-arm64
CLT: 13.2.0.0.1.1638488800
Xcode: 13.2.1
Rosetta 2: false

Output of brew doctor

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  ilmbase
@d12frosted
Copy link
Owner

Indeed, this was bothering me for a while. The code has changed a little bit and at this point I am actually thinking on removing this patch. First of all, it breaks quite often. Secondly, it can be achieved using Emacs Lisp instead of patching Emacs sources. Put the following line somewhere early in your initialization (for example, early-init.el):

(add-to-list 'default-frame-alist '(undecorated . t))

And you'll get the same behavior.

@zevlg
Copy link

zevlg commented Jan 31, 2022

(add-to-list 'default-frame-alist '(undecorated . t))

And you'll get the same behavior.

Works great, thanks!

@radamant
Copy link
Author

Fantastic, works for me! Thanks for the tip!

@montchr
Copy link

montchr commented Feb 2, 2022

Works for me too, thank you!

@montchr
Copy link

montchr commented Feb 2, 2022

it can be achieved using Emacs Lisp instead of patching Emacs sources

I'm curious: how long has the Emacs Lisp approach been available? Was it introduced in a recent-ish Emacs version? I'm all for removing the patch in favor of handling natively within an Emacs configuration (ideally with a note in the README about this).

@d12frosted
Copy link
Owner

@montchr can't find exact commit, but I suspect that it's available for few years already 😅

And of course I will deprecate it with proper message/communicating. Not closing this issue just as a reminder haha.

@d12frosted
Copy link
Owner

This is the error message:

Error: --with-no-titlebar is not available anymore, instead add the following in early-init.el
  (add-to-list 'default-frame-alist '(undecorated . t))

image

I will merge #434 once the build is green. And will remove the option in the beginning of the March. Preferably on 01.03.2022 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants