From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: Having trouble packaging DefaultEncrypt for Emacs Date: Thu, 13 Apr 2017 00:38:58 -0700 Message-ID: <877f2orc31.fsf@gmail.com> References: <87k26uph0r.fsf@gmail.com> <87h91wwp26.fsf@gmail.com> <87mvbngzom.fsf@gmail.com> <87zifmaeyb.fsf@gmail.com> <87d1ci2h07.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]:41123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyZLL-0001KN-8O for guix-devel@gnu.org; Thu, 13 Apr 2017 03:39:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyZLK-00015X-9d for guix-devel@gnu.org; Thu, 13 Apr 2017 03:39:03 -0400 Received: from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]:32769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyZLK-00015C-33 for guix-devel@gnu.org; Thu, 13 Apr 2017 03:39:02 -0400 Received: by mail-pf0-x231.google.com with SMTP id s16so25123564pfs.0 for ; Thu, 13 Apr 2017 00:39:01 -0700 (PDT) In-Reply-To: <87d1ci2h07.fsf@gmail.com> (Alex Kost's message of "Wed, 12 Apr 2017 10:59:36 +0300") 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 Content-Transfer-Encoding: quoted-printable Alex Kost writes: > Alex Kost (2017-04-11 23:04 +0300) wrote: > >> Chris Marusich (2017-04-11 00:40 -0700) wrote: >> >>> Alex Kost writes: >>> >>>> 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? >> >> Unlike such packages as magit, this package doesn't provide any >> interactive command (thus there is no point to autoload anything), it >> just extends the existing Emacs functionality when it is loaded. It >> does so simply by adding a couple of hooks, so if you would like to >> avoid loading this package on Emacs start, you can add these hooks >> yourself: >> >> (add-hook 'gnus-message-setup-hook 'mml-secure-encrypt-if-possible) >> (add-hook 'message-send-hook 'mml-secure-check-encryption-p) > > Oops, I forgot one thing: > > (autoload 'mml-secure-encrypt-if-possible "jl-encrypt") > (autoload 'mml-secure-check-encryption-p "jl-encrypt") > >> If you add the above 2 lines to your emacs config (instead of the >> "require" line), "jl-encrypt" package will not be loaded on Emacs >> start. It will be loaded when you'll begin to write a message. Neat! I didn't know much about the "autoload" stuff. I've read the section in the manual, and thanks to these examples, it makes more sense. Thank you! =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAljvKxIACgkQ3UCaFdgi Rp2w1Q/+KpDQMHrLsb+D3phSPS6OTc5jGl7YQTQYdWQWiwo8bUM8k527qt9nxzJr WTSxZRQYf7qdx4w4PcxRK3X79jPkeNKKLRO3Hseg5hgVw/dvcFxoZ1d3hklWw/be XzuZAi9RtCegVosu3gc3Rs2kVw+zdC1C0XW3MfAobP+w7WpyKwKva4bVxXK+eZGP vZMX5wRWuHRbHBCXLJqlXsWPdvn65oB/MXWWJMR+vUE4UW/+suwLgrrchflUn/Lw 9guhoYjOnycvF2ybFE1WZwhOMoxLlgDOEn1iadr4G1ZHYREMipyGpcnUtzbAHp3F Y3jtSAlifcmSMX5b5y2fyDI5GSfawtZ2Mn/vzC3bvoKdEo7C/+PWQj8Dzqh91ndB m2O77lNHRaEKf2zI2T+MapV9Fsr6DI5O0qJyuhw59AjT79JZx9wskReNHFxA6kta cegRaGlxmv7voS/DVmCieEhp/2PffBycrPNXgUIB93kupMwdba4aH6S3LRzzuw2Z k452B0SIQaRph3uPY8M2FL2SG91y64szISalSF6wibPFrwJ5P24WvUMAv1o6QDj5 ETN2qDoeACuMbrEasoFSn5lsyJNIZywN9GIRw9vNZjxd2NTYcCvYvNceDRNHoYCa QIHexYp6ZjGplhiOGuDXMLWuXUtG5g6RvBaZ0nOG0ls95AIEnug= =Bakm -----END PGP SIGNATURE----- --=-=-=--