unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Thomas Danckaert <post@thomasdanckaert.be>
To: alezost@gmail.com
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] gnu: Add emacs-mew.
Date: Wed, 01 Feb 2017 11:56:44 +0100 (CET)	[thread overview]
Message-ID: <20170201.115644.1899018789878865874.post@thomasdanckaert.be> (raw)
In-Reply-To: <87k29ai79x.fsf@gmail.com>

[-- Attachment #1: Type: Text/Plain, Size: 1674 bytes --]

From: Alex Kost <alezost@gmail.com>
Subject: Re: [PATCH] gnu: Add emacs-mew.
Date: Wed, 01 Feb 2017 12:34:34 +0300

>> +     #:phases (modify-phases %standard-phases
>> +                (add-after 'configure 'patch-mew-icon-path ; 
>> ensure "Mew-icon.png" is found.
>> +                           (lambda _
>> +                             (substitute* "mew-key.el"
>> +                               (("\\(expand-file-name \"etc\" 
>> path\\)") "path")))))
>
> Hm, does it work for you?  I looked at "mew-key.el" but the code
> wasn't patched, probably something with the regexp.  Anyway it is
> better to patch 'mew-icon-directory' variable instead.

Hi,

Ouch, I messed up my patch when rebasing.  I meant to also set
--with-etcdir=elispdir (see attached version).  The substitution does
work, but has no use without the updated --with-etcdir.

> Also I see that by default it puts image files into
> "share/emacs/site-lisp/mew/etc".  I don't think this is a good
> place, I would rather move them to "share/mew" as most packages do
> with various additional files.

Yes, that would be cleaner.  Is there also a clean way to add
share/mew to emacs' image-load-path?  The problem is that the package
needs various *.xpm icon's, which are opened with “find-image” (via
“tool-bar-add-item”), which looks on image-load-path, whereas
“Mew-icon.png” is looked up in mew-icon-directory.

My patch as originally intended (now attached) puts everything in
share/emacs/site-lisp/guix.d/mew, where find-image will find it, and
patches mew-key.el so it also looks in that directory.  Not clean, but
it works :-)

cheers,

Thomas

[-- Attachment #2: 0001-gnu-Add-emacs-mew.patch --]
[-- Type: Text/X-Patch, Size: 2876 bytes --]

From 175d5b859c5615157db51ab79fa059e397a7f2b9 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <thomas.danckaert@gmail.com>
Date: Tue, 24 Jan 2017 09:41:42 +0100
Subject: [PATCH] gnu: Add emacs-mew.

* gnu/packages/mail.scm (emacs-mew): New variable.
---
 gnu/packages/mail.scm | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index 2318ae9b6..80a61a141 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -20,6 +20,7 @@
 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -79,6 +80,7 @@
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gdb)
   #:use-module (gnu packages man)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages samba)
   #:use-module (gnu packages screen)
   #:use-module (gnu packages tls)
@@ -377,6 +379,42 @@ can read the same mailbox from multiple computers.  It supports IMAP as REMOTE
 repository and Maildir/IMAP as LOCAL repository.")
     (license gpl2+)))
 
+(define-public emacs-mew
+  (package
+  (name "emacs-mew")
+  (version "6.7")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (string-append "http://mew.org/Release/mew-" version ".tar.gz"))
+      (sha256
+       (base32
+        "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y"))))
+  (inputs
+   `(("emacs" ,emacs-minimal)))
+  (propagated-inputs
+   `(("ruby-sqlite3" ,ruby-sqlite3) ; optionally uses an sqlite database of messages
+     ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime
+  (build-system gnu-build-system)
+  (arguments
+   `(#:configure-flags
+     (let ((elispdir (string-append (assoc-ref %outputs "out")
+                     "/share/emacs/site-lisp/guix.d/mew")))
+       (list (string-append "--with-elispdir=" elispdir)
+             (string-append "--with-etcdir=" elispdir)))
+     #:phases (modify-phases %standard-phases
+                (add-after 'configure 'patch-mew-icon-path ; ensure "Mew-icon.png" is found.
+                           (lambda _
+                             (substitute* "mew-key.el"
+                               (("\\(expand-file-name \"etc\" path\\)") "path")))))
+     #:tests? #f))
+  (home-page "http://www.mew.org")
+  (synopsis "Emacs e-mail client")
+  (description "Mew (Messaging in the Emacs World) is a user interface
+for text messages, multimedia messages (MIME), news articles and
+security functionality including PGP, S/MIME, SSH, and SSL.")
+  (license bsd-3)))
+
 (define-public mu
   (package
     (name "mu")
-- 
2.11.0


  reply	other threads:[~2017-02-01 10:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 17:01 [PATCH] gnu: Add emacs-mew Thomas Danckaert
2017-01-24 20:08 ` Thomas Danckaert
2017-01-25  9:29   ` Alex Kost
2017-02-01  7:18     ` Thomas Danckaert
2017-02-01  9:34       ` Alex Kost
2017-02-01 10:56         ` Thomas Danckaert [this message]
2017-02-02  8:56           ` Alex Kost
2017-02-02 18:41             ` Thomas Danckaert
2017-02-03  9:39               ` Alex Kost
2017-02-03 12:22                 ` Thomas Danckaert
2017-02-03 19:54                   ` Alex Kost

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=20170201.115644.1899018789878865874.post@thomasdanckaert.be \
    --to=post@thomasdanckaert.be \
    --cc=alezost@gmail.com \
    --cc=guix-devel@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).