help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Show notifications using Emacs' notifications-notify under Sway


From: Rodrigo Morales
Subject: Show notifications using Emacs' notifications-notify under Sway
Date: Tue, 16 Jan 2024 20:53:44 -0500

I'm using Sway as my windows manager under Guix SD

I can show notifications using =dunstify=

#+BEGIN_SRC sh
dunstify 'Title of the notification' 'Body of the notification'
#+END_SRC

When I try to show notifications using Emacs through the
=notifications-notify= function (see first code block below), I get the
following error (see second code block below)

#+BEGIN_SRC elisp
(notifications-notify
 :timeout 3000
 :title "title"
 :body "body")
#+END_SRC

#+CAPTION: Buffer *Backtrace*
#+BEGIN_SRC text
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 
"/gnu/store/9k0c9iija60rax5fwcss6v7ywzzzg438-emacs-..." :string "title" :string 
"body" (:array) (:array :signature "{sv}") :int32 3000)
  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 
"/gnu/store/9k0c9iija60rax5fwcss6v7ywzzzg438-emacs-..." :string "title" :string 
"body" (:array) (:array :signature "{sv}") :int32 3000))
  dbus-call-method(:session "org.freedesktop.Notifications" 
"/org/freedesktop/Notifications" "org.freedesktop.Notifications" "Notify" 
:string "Emacs" :uint32 0 :string 
"/gnu/store/9k0c9iija60rax5fwcss6v7ywzzzg438-emacs-..." :string "title" :string 
"body" (:array) (:array :signature "{sv}") :int32 3000)
  notifications-notify(:timeout 3000 :title "title" :body "body")
  (let ((print-level nil) (print-length nil)) (notifications-notify :timeout 
3000 :title "title" :body "body"))
  (setq elisp--eval-defun-result (let ((print-level nil) (print-length nil)) 
(notifications-notify :timeout 3000 :title "title" :body "body")))
  elisp--eval-defun()
  #<subr eval-defun>(nil)
  edebug--eval-defun(#<subr eval-defun> nil)
  apply(edebug--eval-defun #<subr eval-defun> nil)
  eval-defun(nil)
  funcall-interactively(eval-defun nil)
  command-execute(eval-defun)
#+END_SRC

I have 2 questions:

1. Does anyone know how to troubleshoot this error?
2. Are you able to notifications through Emacs using notifications-notify
   under Sway?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]