Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4027F6DE1226 for ; Sat, 24 Oct 2015 08:53:50 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.059 X-Spam-Level: X-Spam-Status: No, score=-0.059 tagged_above=-999 required=5 tests=[AWL=0.511, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3DImRrCJ_t6o for ; Sat, 24 Oct 2015 08:53:48 -0700 (PDT) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by arlo.cworth.org (Postfix) with ESMTPS id 130E36DE0C5F for ; Sat, 24 Oct 2015 08:53:48 -0700 (PDT) Received: by wikq8 with SMTP id q8so112359247wik.1 for ; Sat, 24 Oct 2015 08:53:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=g0NCoYnYHgSuntnQKB7AP5yiPNTmgAsJKJE9xfOITnc=; b=ZGgDxJALbGTqqtNysqmx0hPg//xQ5aJvwcUM232XTqsuT7EuUa0s9YL1JBwV1nxqC2 H1+oviUas/4c/CaLe7paQBrb3t7mNSZ9kG/WmHM4wVU6XbVKyZIc/pZmjZyVXwvjji0l BK2WnNxUrquIRiVoPj+qPAawDZbMG9uLYx6l//Y812C+m3W/IutRyiTShs6zjZ4klJBG baxHeB6U59JY+CMC/M1lPtem+U3ua4oXfUm/zCgrn6NrA4jM7BkLQeGNoEZ1GXyOQkLC e+LtA5UGEFDo813bk0NE7jOqblA7tuV/+xeKlxKJzUvBgrzfJW5T5FTFbLQuBvXQZ8Q7 c9hA== X-Received: by 10.194.84.4 with SMTP id u4mr9530710wjy.149.1445702023931; Sat, 24 Oct 2015 08:53:43 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id ki7sm28780830wjc.28.2015.10.24.08.53.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Oct 2015 08:53:43 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] autoload notmuch-company if we have company Date: Sat, 24 Oct 2015 16:53:39 +0100 Message-Id: <1445702019-10638-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1445646037-25994-4-git-send-email-david@tethera.net> References: <1445646037-25994-4-git-send-email-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Oct 2015 15:53:50 -0000 --- Does this work for people with company installed (on top of the first 3 patches in the series)? I hope it should autoload notmuch-company if the user has company. I don't on this computer (and am still running emacs 23) so haven't tested. Best wishes Mark emacs/notmuch-address.el | 5 +++++ emacs/notmuch-company.el | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index d54a8bb..4a3fc23 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -22,6 +22,11 @@ (require 'message) (require 'notmuch-parser) +;; Only load notmuch-company if we have company (but we don't want an +;; error if we don't have company +(when (require 'company nil 't) + (require 'notmuch-company)) + ;; (defcustom notmuch-address-command nil diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el index f34aec4..9a44cf5 100644 --- a/emacs/notmuch-company.el +++ b/emacs/notmuch-company.el @@ -33,7 +33,6 @@ ;;; Code: -(require 'company) (require 'message) (require 'notmuch-address) (require 'cl-lib) -- 2.1.4