From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Having trouble packaging DefaultEncrypt for Emacs Date: Tue, 11 Apr 2017 00:40:09 -0700 Message-ID: <87mvbngzom.fsf@gmail.com> References: <87k26uph0r.fsf@gmail.com> <87h91wwp26.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxqPO-0008DB-0p for guix-devel@gnu.org; Tue, 11 Apr 2017 03:40:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxqPM-0002d1-Qm for guix-devel@gnu.org; Tue, 11 Apr 2017 03:40:14 -0400 Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]:33694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cxqPM-0002cW-L4 for guix-devel@gnu.org; Tue, 11 Apr 2017 03:40:12 -0400 Received: by mail-pf0-x236.google.com with SMTP id s16so44994861pfs.0 for ; Tue, 11 Apr 2017 00:40:12 -0700 (PDT) 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: Alex Kost Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Alex Kost writes: > Chris Marusich (2017-04-08 17:21 -0700) wrote: > >> Hi, >> >> I'm trying to package DefaultEncrypt: >> >> https://www.emacswiki.org/emacs/DefaultEncrypt >> >> I've made a package definition (see attached patch), and it builds >> without error. I've installed it into my user profile. Per the >> documentation, I've added the following to my ~/.emacs: >> >> (require 'jl-encrypt) > > I recommend to never do this "hard" requirement. As you can see, it > may break your .emacs. Better do it like this: > > (require 'jl-encrypt nil t) > > or if you want some warning message: > > (unless (require 'jl-encrypt nil t) > (message "Something is not good: jl-encrypt was not loaded")) I did not know this! Thank you for sharing your knowledge. I chose to use the "unless" form so I would know if it ever failed to load. > Note, however, that in most cases (not in this case) using "require" is > not needed at all! Usually it is enough to have the generated > autoloads. For example, if you install 'magit', you don't need to (and > shouldn't!) put "(require 'magit)" in your emacs config. You can use > "M-x magit-status" right away as 'magit-status' command is "autoloaded". That's good to know. I guess this module didn't do the "autoload magic" that some modules, like magit, do? >> However, when I start Emacs, I get the following warning: >> >> Warning (initialization): An error occurred while loading >> =E2=80=98/home/marusich/.emacs=E2=80=99: >> >> File error: Cannot open load file, No such file or directory, jl-encrypt >> >> >> Why is this happening? How can I fix it? I'm still a bit of an Emacs >> newbie, so maybe there's an obvious solution I'm unaware of. >> >> I've also noticed that the elisp file gets installed with the name >> "jl-encrypt.el.el", which seems weird, but I don't know if that's >> related to the preceding issue: > > This weird file name is the root of the problem: a single-package file > should have the following file name: . So try to add > 'file-name' to the origin (see below). Aha! Yes, that fixed it. I was so close! Thank you for taking the time to help me finish this up. I am now happily using jl-encrypt. It's automatically signing my email and protecting me from sending email in cleartext when I should be encrypting it otherwise! Great stuff. Patch incoming! :-) =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAljsiFkACgkQ3UCaFdgi Rp3sdg/+O56FdJAxZqy2Cu5zf29nKhwhZMCIsifjVx/4lyXNmRXLX9FW+bz0HBvD dSeJ8vSs6EdXW5Lw6JzG2WLCfDX1B35JTBVhZ7hiazoR3kKmD+e+y3PkPZgpg7xo 0GPRN4BHdxy4hn3eIvA1h+PpZJ4tKJp6IK1Xp0inKuN41B9VHR0yiT9KmQ7jsSEA BdHM2J2oq/AYzMfadvrm8S5NRPmKnhqS9+A4DMvyGclOKzqKaSQ6+BcFuCINcbqy RT5MqGOEWoRtomWEdFcW3HG9r1VJmU0wLakbirtNpQzEwpU5N5f6DymFRYGaCBOJ bP0RUF0ULS7ed0B228aTLkc969BLLIY9KyTTDuO+YgWwDjpDkTG7U9CJLCFM6Poz /JTTFpBWPhkQnaruvHKsvrmqVt26Yhr5ro+OV8ByDaj9RMiMlL0JzLIE9qGb6XnO 9MCigk1O6k0kuoETHTDVMSJlrMEaf3oqt+lELWTyRdKO2PyIb0NzMDHn31l1Pecy C3mEIJ2lE/vruP6aSRmTa9Ak3X4fOcZSNuLus5JBobm3LXQS48on17TlOlgr3Ntb saZuX4izvKr9GsloMwdKiPtbtfNREg25VbWLda4yyJSizv+991MgIfwBiUwpkxbb 6MDcrqmBcgYKXtlw/ZGUwInhHhvR5lenUD69PHHm5nimgLopSbI= =Hw7w -----END PGP SIGNATURE----- --=-=-=--