Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / b4 / cea1c04402db4d079f13a5bb804f718b025c6e
1 Return-Path: <aidecoe@aidecoe.name>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id C6D3B429E26\r
6         for <notmuch@notmuchmail.org>; Tue, 25 Oct 2011 01:07:38 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id oQgW5T5ABlsn for <notmuch@notmuchmail.org>;\r
16         Tue, 25 Oct 2011 01:07:38 -0700 (PDT)\r
17 Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com\r
18         [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 109FF431FB6\r
21         for <notmuch@notmuchmail.org>; Tue, 25 Oct 2011 01:07:37 -0700 (PDT)\r
22 Received: by faai28 with SMTP id i28so277878faa.26\r
23         for <notmuch@notmuchmail.org>; Tue, 25 Oct 2011 01:07:35 -0700 (PDT)\r
24 Received: by 10.223.7.20 with SMTP id b20mr13477733fab.21.1319530055315;\r
25         Tue, 25 Oct 2011 01:07:35 -0700 (PDT)\r
26 Received: from localhost (absy23.neoplus.adsl.tpnet.pl. [83.8.144.23])\r
27         by mx.google.com with ESMTPS id u6sm47752832fan.17.2011.10.25.01.07.33\r
28         (version=TLSv1/SSLv3 cipher=OTHER);\r
29         Tue, 25 Oct 2011 01:07:34 -0700 (PDT)\r
30 From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>\r
31 To: notmuch@notmuchmail.org\r
32 Subject: [PATCH] Separate Emacs misc. files dir. from Emacs code dir.\r
33 Date: Tue, 25 Oct 2011 10:07:02 +0200\r
34 Message-Id: <1319530022-8040-1-git-send-email-aidecoe@aidecoe.name>\r
35 X-Mailer: git-send-email 1.7.7.1\r
36 In-Reply-To: <87vcrdh7df.fsf@thor.loria.fr>\r
37 References: <87vcrdh7df.fsf@thor.loria.fr>\r
38 Cc: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Tue, 25 Oct 2011 08:07:38 -0000\r
52 \r
53 New option --emacsetcdir was added, but it's set default to the same\r
54 value as --emacslispdir for backward compatibility.\r
55 ---\r
56  configure            |   15 +++++++++++++++\r
57  emacs/Makefile.local |    3 ++-\r
58  2 files changed, 17 insertions(+), 1 deletions(-)\r
59 \r
60 diff --git a/configure b/configure\r
61 index 3999ce8..e90b76f 100755\r
62 --- a/configure\r
63 +++ b/configure\r
64 @@ -97,6 +97,7 @@ Fine tuning of some installation directories is available:\r
65         --mandir=DIR            Install man pages to DIR [PREFIX/share/man]\r
66         --sysconfdir=DIR        Read-only single-machine data [PREFIX/etc]\r
67         --emacslispdir=DIR      Emacs code [PREFIX/share/emacs/site-lisp]\r
68 +       --emacsetcdir=DIR       Emacs miscellaneous files [PREFIX/share/emacs/site-lisp]\r
69         --bashcompletiondir=DIR Bash completions files [SYSCONFDIR/bash_completion.d]\r
70         --zshcompletiondir=DIR  Zsh completions files [PREFIX/share/zsh/functions/Completion/Unix]\r
71  \r
72 @@ -139,6 +140,8 @@ for option; do\r
73         SYSCONFDIR="${option#*=}"\r
74      elif [ "${option%%=*}" = '--emacslispdir' ] ; then\r
75         EMACSLISPDIR="${option#*=}"\r
76 +    elif [ "${option%%=*}" = '--emacsetcdir' ] ; then\r
77 +       EMACSETCDIR="${option#*=}"\r
78      elif [ "${option%%=*}" = '--bashcompletiondir' ] ; then\r
79         BASHCOMPLETIONDIR="${option#*=}"\r
80      elif [ "${option%%=*}" = '--zshcompletiondir' ] ; then\r
81 @@ -330,6 +333,14 @@ if [ -z "${EMACSLISPDIR}" ]; then\r
82      fi\r
83  fi\r
84  \r
85 +if [ -z "${EMACSETCDIR}" ]; then\r
86 +    if pkg-config --exists emacs; then\r
87 +       EMACSETCDIR=$(pkg-config emacs --variable sitepkglispdir)\r
88 +    else\r
89 +       EMACSETCDIR='$(prefix)/share/emacs/site-lisp'\r
90 +    fi\r
91 +fi\r
92 +\r
93  printf "Checking if emacs is available... "\r
94  if emacs --quick --batch > /dev/null 2>&1; then\r
95      printf "Yes.\n"\r
96 @@ -614,6 +625,10 @@ sysconfdir = ${SYSCONFDIR:=\$(prefix)/etc}\r
97  # The directory to which emacs lisp files should be installed\r
98  emacslispdir=${EMACSLISPDIR}\r
99  \r
100 +# The directory to which emacs miscellaneous (machine-independent) files should\r
101 +# be installed\r
102 +emacsetcdir=${EMACSETCDIR}\r
103 +\r
104  # Whether there's an emacs binary available for byte-compiling\r
105  HAVE_EMACS = ${have_emacs}\r
106  \r
107 diff --git a/emacs/Makefile.local b/emacs/Makefile.local\r
108 index ce0c3f0..0c58b82 100644\r
109 --- a/emacs/Makefile.local\r
110 +++ b/emacs/Makefile.local\r
111 @@ -38,6 +38,7 @@ install-emacs:\r
112  ifeq ($(HAVE_EMACS),1)\r
113         install -m0644 $(emacs_bytecode) "$(DESTDIR)$(emacslispdir)"\r
114  endif\r
115 -       install -m0644 $(emacs_images) "$(DESTDIR)$(emacslispdir)"\r
116 +       mkdir -p "$(DESTDIR)$(emacsetcdir)"\r
117 +       install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"\r
118  \r
119  CLEAN := $(CLEAN) $(emacs_bytecode)\r
120 -- \r
121 1.7.7.1\r
122 \r