From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] gnu: Add emacs-mew. Date: Thu, 02 Feb 2017 11:56:22 +0300 Message-ID: <87vastt1hl.fsf@gmail.com> References: <877f5jv66t.fsf@gmail.com> <20170201.081809.767476594793648240.post@thomasdanckaert.be> <87k29ai79x.fsf@gmail.com> <20170201.115644.1899018789878865874.post@thomasdanckaert.be> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZDIS-0007Tl-AO for guix-devel@gnu.org; Thu, 02 Feb 2017 04:03:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZDBq-0004Iw-NZ for guix-devel@gnu.org; Thu, 02 Feb 2017 03:56:30 -0500 Received: from mail-lf0-x242.google.com ([2a00:1450:4010:c07::242]:33432) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cZDBq-0004IU-Ch for guix-devel@gnu.org; Thu, 02 Feb 2017 03:56:26 -0500 Received: by mail-lf0-x242.google.com with SMTP id x1so708994lff.0 for ; Thu, 02 Feb 2017 00:56:25 -0800 (PST) In-Reply-To: <20170201.115644.1899018789878865874.post@thomasdanckaert.be> (Thomas Danckaert's message of "Wed, 01 Feb 2017 11:56:44 +0100 (CET)") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Thomas Danckaert Cc: guix-devel@gnu.org Thomas Danckaert (2017-02-01 11:56 +0100) wrote: >> 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 =E2=80=9Cfind-image=E2= =80=9D (via > =E2=80=9Ctool-bar-add-item=E2=80=9D), which looks on image-load-path, whe= reas > =E2=80=9CMew-icon.png=E2=80=9D is looked up in mew-icon-directory. OK, I see. We can just patch "mew-key.el" file by putting the following line there: (add-to-list 'image-load-path 'mew-icon-directory) WDYT? > 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 :-) I think it's rather messy having all elisp and image files in a single directory, I would prefer to modify 'image-load-path', and to put these images either in "share/mew" on in a sub-dir of the mew elisp dir. > From 175d5b859c5615157db51ab79fa059e397a7f2b9 Mon Sep 17 00:00:00 2001 > From: Thomas Danckaert > 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 =C2=A9 2016 Arun Isaac > ;;; Copyright =C2=A9 2016 John Darrington > ;;; Copyright =C2=A9 2016 Marius Bakke > +;;; Copyright =C2=A9 2017 Thomas Danckaert > ;;; > ;;; 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+))) >=20=20 > +(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 runt= ime > + (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=3D" elispdir) > + (string-append "--with-etcdir=3D" 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"))))) I insist on patching 'mew-icon-directory' instead as I suggested. Or are there any problems with it? Also you seem to overlook my comment about autoloads. My version of your patch (attached in my previous message) contains a phase to generate "mew-autoloads.el". This file is really needed to have "M-x mew" command available by default. Otherwise, a user has to put: (autoload 'mew "mew" nil t) in his/her emacs config. > + #: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") --=20 Alex