unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Arun Isaac <arunisaac@systemreboot.net>
To: 71658@debbugs.gnu.org
Cc: Arun Isaac <arunisaac@systemreboot.net>
Subject: [bug#71658] [PATCH] gnu: emacs-notmuch: Install desktop files.
Date: Wed, 19 Jun 2024 23:26:35 +0100	[thread overview]
Message-ID: <39aa0f75495ff2de5a1f3b8864af81a24ef36504.1718835983.git.arunisaac@systemreboot.net> (raw)

* gnu/packages/mail.scm (emacs-notmuch)[arguments]: Add install-desktop-files
phase.

Change-Id: I9f3a049acb7062807a58d95ca526813caab0d563
---
 gnu/packages/mail.scm | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index d853fab4d3..fe2135a22d 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -1512,7 +1512,23 @@ (define-public emacs-notmuch
               (let ((notmuch (search-input-file inputs "/bin/notmuch")))
                 (substitute* "notmuch-lib.el"
                   (("\"notmuch\"")
-                   (string-append "\"" notmuch "\"")))))))))
+                   (string-append "\"" notmuch "\""))))))
+          ;; Install desktop files so that mailto URIs can be opened using
+          ;; emacs-notmuch.
+          (add-after 'install 'install-desktop-files
+            (lambda* (#:key inputs #:allow-other-keys)
+              (install-file "notmuch-emacs-mua"
+                            (string-append #$output "/bin"))
+              (let ((applications (string-append #$output "/share/applications")))
+                (install-file "notmuch-emacs-mua.desktop"
+                              applications)
+                (copy-file "notmuch-emacs-mua.desktop"
+                           (string-append applications
+                                          "/notmuch-emacsclient-mua.desktop"))
+                (substitute* (string-append applications
+                                            "/notmuch-emacsclient-mua.desktop")
+                  (("Exec=notmuch-emacs-mua" all)
+                   (string-append all " --client")))))))))
     (synopsis "Run Notmuch within Emacs")
     (description
      "This package provides an Emacs-based interface to the Notmuch mail

base-commit: e32e3d0a03dc17c4c54a91aad053c9036998b601
-- 
2.45.1





             reply	other threads:[~2024-06-19 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-19 22:26 Arun Isaac [this message]
2024-06-20  2:14 ` bug#71658: [PATCH] gnu: emacs-notmuch: Install desktop files jgart via Guix-patches via

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=39aa0f75495ff2de5a1f3b8864af81a24ef36504.1718835983.git.arunisaac@systemreboot.net \
    --to=arunisaac@systemreboot.net \
    --cc=71658@debbugs.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).