From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: [PATCH] gnu: Add emacs-mew. Date: Wed, 01 Feb 2017 12:34:34 +0300 Message-ID: <87k29ai79x.fsf@gmail.com> References: <20170124.180111.1894872533970667595.thomas.danckaert@gmail.com> <20170124.210806.158906060366823689.post@thomasdanckaert.be> <877f5jv66t.fsf@gmail.com> <20170201.081809.767476594793648240.post@thomasdanckaert.be> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cYrJH-0007a2-OD for guix-devel@gnu.org; Wed, 01 Feb 2017 04:34:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cYrJD-00032N-PQ for guix-devel@gnu.org; Wed, 01 Feb 2017 04:34:39 -0500 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:36048) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cYrJD-00032C-CB for guix-devel@gnu.org; Wed, 01 Feb 2017 04:34:35 -0500 Received: by mail-lf0-x244.google.com with SMTP id h65so35805704lfi.3 for ; Wed, 01 Feb 2017 01:34:35 -0800 (PST) In-Reply-To: <20170201.081809.767476594793648240.post@thomasdanckaert.be> (Thomas Danckaert's message of "Wed, 01 Feb 2017 08:18:09 +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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Thomas Danckaert (2017-02-01 08:18 +0100) wrote: >> This could happen if it adds itself to a sub-directory of >> "/share/emacs/site-lisp". In 'magit' package, for example, it is >> fixed >> by using "lispdir" makeflag. Since this package uses a full GNU Build >> System, there should probably be "--with-lispdir" configure flag. > > Indeed, done! > >> BTW, I can't apply this patch on the current master. > > I had edited the patch file manually. Seems like this sometimes works, > sometimes doesn't. Ouch, I think git-formatted patches are not intended to be edited manually :-) > I've attached an updated patch, which also fixes some issues with paths > to various icons. Thanks! See the comments below. > From 93118dba6e551fb66846a2b69a7bec560795ba71 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 | 36 ++++++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm > index 2318ae9b6..d985419be 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,40 @@ 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 (list > + (string-append "--with-elispdir=3D" (assoc-ref %= outputs "out") > + "/share/emacs/site-lisp/guix.d/me= w")) > + #: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. 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. > + #: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") Also it is good to generate "mew-autoloads.el" file, so that "M-x mew" command will be available for users by default. I'm attaching a modified patch to address what I mentioned. Could you test it to make sure that mew works as expected with it? --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-Add-emacs-mew.patch Content-Transfer-Encoding: quoted-printable >From 2abd51a12aeb136ddb014ec8812601b52c6ca3eb 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. Co-authored-by: Alex Kost --- gnu/packages/mail.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 51 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index b17af40..69c2467 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,55 @@ can read the same mailbox from multiple computers. It= supports IMAP as REMOTE repository and Maildir/IMAP as LOCAL repository.") (license gpl2+))) =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) ; optional for the database of messa= ges + ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runt= ime + (build-system gnu-build-system) + (arguments + (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew") + (icon-dir "/share/mew")) + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (guix build emacs-utils)) + #:imported-modules (,@%gnu-build-system-modules + (guix build emacs-utils)) + #:configure-flags + (list (string-append "--with-elispdir=3D" %output ,elisp-dir) + (string-append "--with-etcdir=3D" %output ,icon-dir)) + #:phases + (modify-phases %standard-phases + (add-after 'configure 'patch-mew-icon-directory + (lambda* (#:key outputs #:allow-other-keys) + (emacs-substitute-variables "mew-key.el" + ("mew-icon-directory" + (string-append (assoc-ref outputs "out") ,icon-dir))) + #t)) + (add-after 'install 'generate-autoloads + (lambda* (#:key outputs #:allow-other-keys) + (emacs-generate-autoloads + "mew" (string-append (assoc-ref outputs "out") ,elisp-dir)) + #t))) + #: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 2.10.2 --=-=-=--