homebrew-emacs-plus: Emacs dbus support not working even installed with option `--with-dbus`
Please make sure to follow these steps (and mark the checkboxes):
- run
brew updateand try to reproduce the issue again - run
brew doctor, fix all issues and try to reproduce your issue again - run
brew configandbrew doctorand include their output
What you were trying to do
I execute elisp code:
(notifications-notify :title "org-mode message" :body "hello" :timeout 1000 :urgency 'low)
But I got Emacs error:
Debugger entered--Lisp error: (dbus-error "No connection to bus" :session)
dbus-message-internal(1 :session "org.freedesktop.Notifications" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "Notify" dbus-call-method-handler :string "Emacs" :uint32 0 :string "/opt/homebrew/Cellar/emacs-plus@28/28.0.50/share/e..." :string "org-mode message" :string "hello" (:array) ((:dict-entry "urgency" (:variant :byte 0))) :int32 1000)
apply(dbus-message-internal 1 :session "org.freedesktop.Notifications" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "Notify" dbus-call-method-handler (:string "Emacs" :uint32 0 :string "/opt/homebrew/Cellar/emacs-plus@28/28.0.50/share/e..." :string "org-mode message" :string "hello" (:array) ((:dict-entry "urgency" (:variant :byte 0))) :int32 1000))
dbus-call-method(:session "org.freedesktop.Notifications" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "Notify" :string "Emacs" :uint32 0 :string "/opt/homebrew/Cellar/emacs-plus@28/28.0.50/share/e..." :string "org-mode message" :string "hello" (:array) ((:dict-entry "urgency" (:variant :byte 0))) :int32 1000)
notifications-notify(:title "org-mode message" :body "hello" :timeout 1000 :urgency low)
eval((notifications-notify :title "org-mode message" :body "hello" :timeout 1000 :urgency 'low) nil)
elisp--eval-last-sexp(nil)
eval-last-sexp(nil)
funcall-interactively(eval-last-sexp nil)
call-interactively(eval-last-sexp nil nil)
command-execute(eval-last-sexp)
I installed dbus support with brew install dbus dbus-glib.
my macOS version: M1 Big Sur 11.6
What happened (include command output)
$ brew install emacs-plus --with-dbus --with-xwidgets
Command output
Updating Homebrew… ==> Auto-updated Homebrew! Updated 1 tap (homebrew/cask). ==> Updated Casks Updated 6 casks.
==> Installing emacs-plus@28 from d12frosted/emacs-plus ==> Downloading https://ghcr.io/v2/homebrew/core/libvmaf/manifests/2.3.0 Already downloaded: /Users/stardiviner/Library/Caches/Homebrew/downloads/148a663e84f3db9278aed01b0fa3a565116e0c4836b1bd4ecc6326d7d6f3c7c7–libvmaf-2.3.0.bottle_manifest.json ==> Downloading https://ghcr.io/v2/homebrew/core/libvmaf/blobs/sha256:1977b1939d44b8871ef1d856203b364b761872be00c6654fdf Already downloaded: /Users/stardiviner/Library/Caches/Homebrew/downloads/eae7ee646631f6bd16c246a55001e83f912e3aaf92ce53a264015115f167f8f2–libvmaf–2.3.0.arm64_big_sur.bottle.tar.gz ==> Cloning https://github.com/emacs-mirror/emacs.git Cloning into ‘/Users/stardiviner/Library/Caches/Homebrew/emacs-plus@28–git’… ==> Checking out branch emacs-28 Already on ‘emacs-28’ Your branch is up to date with ‘origin/emacs-28’. ==> Installing dependencies for d12frosted/emacs-plus/emacs-plus@28: libvmaf ==> Installing d12frosted/emacs-plus/emacs-plus@28 dependency: libvmaf ==> Pouring libvmaf–2.3.0.arm64_big_sur.bottle.tar.gz 🍺 /opt/homebrew/Cellar/libvmaf/2.3.0: 16 files, 2.4MB ==> Installing d12frosted/emacs-plus/emacs-plus@28 --with-xwidgets --with-dbus ==> Patching ==> Applying fix-window-role.patch patching file src/nsterm.m Hunk #1 succeeded at 8602 (offset -166 lines). ==> Applying system-appearance.patch patching file src/frame.h patching file src/nsfns.m Hunk #1 succeeded at 1315 (offset 59 lines). patching file src/nsterm.m Hunk #1 succeeded at 1878 (offset -11 lines). Hunk #2 succeeded at 5389 (offset -6 lines). Hunk #3 succeeded at 5635 (offset -6 lines). Hunk #4 succeeded at 5685 (offset -6 lines). Hunk #5 succeeded at 5911 (offset -6 lines). Hunk #6 succeeded at 8935 (offset 33 lines). Hunk #7 succeeded at 10091 (offset 33 lines). ==> ImageMagick PKG_CONFIG_PATH: /opt/homebrew/opt/imagemagick/lib/pkgconfig ==> ./autogen.sh ==> ./configure --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@28/ ==> make ==> make install ==> Caveats Emacs.app was installed to: /opt/homebrew/opt/emacs-plus@28
To link the application to default Homebrew App location: ln -s /opt/homebrew/opt/emacs-plus@28/Emacs.app /Applications
To have launchd start d12frosted/emacs-plus/emacs-plus@28 now and restart at login: brew services start d12frosted/emacs-plus/emacs-plus@28 Or, if you don’t want/need a background service you can just run: emacs ==> Summary 🍺 /opt/homebrew/Cellar/emacs-plus@28/28.0.50: 4,073 files, 135.6MB, built in 5 minutes 23 seconds ==> Caveats ==> emacs-plus@28 Emacs.app was installed to: /opt/homebrew/opt/emacs-plus@28
To link the application to default Homebrew App location: ln -s /opt/homebrew/opt/emacs-plus@28/Emacs.app /Applications
To have launchd start d12frosted/emacs-plus/emacs-plus@28 now and restart at login: brew services start d12frosted/emacs-plus/emacs-plus@28 Or, if you don’t want/need a background service you can just run: emacs
❯ which emacs /opt/homebrew/bin/emacs
❯ ln -s /opt/homebrew/opt/emacs-plus@28/Emacs.app /Applications
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 17 (5 by maintainers)
@dertuxmalwieder thanks for the heads up. Closing this issue 🙃
No wait. I commented on your specific suggestion (quoted in previous message) - e.g. replacing
dbuswithdgsga/netatalk-dbus/dbusinside the formula. And explained that it’s not going to work without forcing all users of Emacs to tap thedgsga/netatalk-dbus, which I don’t like.On the other hand, @stardiviner commented on the workaround (e.g. all this mumbo-jumbo with ignoring dependencies). I have not tested it.
Hope that explains what I was talking about 😃
I tried both methods, still not working. I also executed
brew unlink dbusbeforebrew reinstall dgsga/netatalk-dbus/dbusto avoid conflict. Need more investigation. Thanks for your help.