unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Rodrigo Morales <me@rodrigomorales.site>
To: <help-guix@gnu.org>
Subject: Show notifications using Emacs' notifications-notify under Sway
Date: Tue, 16 Jan 2024 20:53:44 -0500	[thread overview]
Message-ID: <87edegohcn.fsf@rodrigomorales.site> (raw)


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	other threads:[~2024-01-17  1:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17  1:53 Rodrigo Morales [this message]
2024-01-17 17:32 ` Show notifications using Emacs' notifications-notify under Sway Fredrik Salomonsson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87edegohcn.fsf@rodrigomorales.site \
    --to=me@rodrigomorales.site \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).