From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E73D9431FAF for ; Sun, 2 Sep 2012 06:54:29 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BVoDaKNVnHuE for ; Sun, 2 Sep 2012 06:54:28 -0700 (PDT) Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id C5DED431FB6 for ; Sun, 2 Sep 2012 06:54:28 -0700 (PDT) Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net ([156.34.89.108] helo=zancas.localnet) by tesseract.cs.unb.ca with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1T8Ad1-00085J-Hh; Sun, 02 Sep 2012 10:54:23 -0300 Received: from bremner by zancas.localnet with local (Exim 4.80) (envelope-from ) id 1T8Acw-0005YK-29; Sun, 02 Sep 2012 10:54:14 -0300 From: David Bremner To: Tomi Ollila , Mark Walters , notmuch@notmuchmail.org Subject: Re: [PATCH 1/5] emacs: compile and load notmuch-pick.el if present. In-Reply-To: References: <1343164911-31589-1-git-send-email-markwalters1009@gmail.com> <1343164911-31589-2-git-send-email-markwalters1009@gmail.com> User-Agent: Notmuch/0.14 (http://notmuchmail.org) Emacs/24.1.1 (x86_64-pc-linux-gnu) Date: Sun, 02 Sep 2012 10:54:13 -0300 Message-ID: <87y5ks7coq.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain X-Spam_bar: - X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Sun, 02 Sep 2012 13:54:30 -0000 Tomi Ollila writes: > I think it would be better to provide a shell script in > notmuch-pick directory which byte-compiles and installs notmuch-pick > in case user wants to install/update notmuch-pick. Whenever notmuch-pick > is good enough to be shipped inside $(dir) above then the aboce conditional > is not needed (at all). I just tried notmuch-pick for the first time, and at least on this relatively beefy machine, it runs fine uncompiled. I'm not sure if it is worth complicating the mainline install. Which means I guess I am agreeing with Tomi. It could also be in independant Makefile rather than a script. I don't think it's crucial to install notmuch-pick into the main lisp context of (Debian) packaging I don't think that will work very well. The way org-mode works is that it ships a seperate contrib lisp directory; on Debian this is in /usr/share/org-mode/contrib. Then people who want to use a contrib piece of lisp would just add the following to their .emacs: (add-to-list 'load-path "/usr/share/notmuch/contrib/emacs-lisp") (require 'notmuch-pick) at least given the changes that Tomi proposes below. The path is obviously just an example. > (require 'notmuch-hello) > (require 'notmuch-show) > (require 'notmuch) ;; XXX ATM, as notmuch-search-mode-map is defined here > > And, at the end, before (provide 'notmuch-pick), execute the lines > what currenty are contained in (notmuch-pick-init). Yes, this sounds about right to me. require should also take care of the "only run this once" part. FWIW, I'm currently running pick from the source tree as: (add-to-list 'load-path (expand-file-name "~/blah")) (when (locate-library "notmuch-pick") (eval-after-load 'notmuch '(progn (require 'notmuch-pick) (notmuch-pick-init)))) it's a bit overengineered, but this way it doesn't crap out on machines where notmuch-pick is not installed.