From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Having trouble packaging DefaultEncrypt for Emacs Date: Wed, 12 Apr 2017 10:59:36 +0300 Message-ID: <87d1ci2h07.fsf@gmail.com> References: <87k26uph0r.fsf@gmail.com> <87h91wwp26.fsf@gmail.com> <87mvbngzom.fsf@gmail.com> <87zifmaeyb.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50711) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyDBo-0006Us-Rk for guix-devel@gnu.org; Wed, 12 Apr 2017 03:59:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyDBj-0004Cs-UU for guix-devel@gnu.org; Wed, 12 Apr 2017 03:59:44 -0400 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:32837) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyDBj-0004CS-O1 for guix-devel@gnu.org; Wed, 12 Apr 2017 03:59:39 -0400 Received: by mail-lf0-x241.google.com with SMTP id r36so2133840lfi.0 for ; Wed, 12 Apr 2017 00:59:39 -0700 (PDT) In-Reply-To: <87zifmaeyb.fsf@gmail.com> (Alex Kost's message of "Tue, 11 Apr 2017 23:04:28 +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: Chris Marusich Cc: guix-devel@gnu.org 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. -- Alex