1 Return-Path: <five9a2@gmail.com>
\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 1360F431FC2
\r
6 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 06:18:03 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id ksDh7tW27pby for <notmuch@notmuchmail.org>;
\r
11 Fri, 27 Nov 2009 06:18:01 -0800 (PST)
\r
12 Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com
\r
14 by olra.theworths.org (Postfix) with ESMTP id 58078431FAE
\r
15 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 06:18:01 -0800 (PST)
\r
16 Received: by bwz24 with SMTP id 24so1228361bwz.30
\r
17 for <notmuch@notmuchmail.org>; Fri, 27 Nov 2009 06:18:00 -0800 (PST)
\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
19 h=domainkey-signature:received:received:sender:from:to:subject
\r
20 :in-reply-to:references:date:message-id:mime-version:content-type;
\r
21 bh=3skrouN9G9eu534fpbIKKdLlBQ+FNeNpUSCfCH/7+DA=;
\r
22 b=u2ZsvivdPxBfgRAA/ROABYzhoteAxiIod+rZ+WphxVzLQpl7yy6ePi7XNWO0F+5yhs
\r
23 lECfhTrTU+nG5pNP4R7y/mjOMWeJ+fuz2SnlNHPeMxg04YrRAmA01gTcnXZsfvUZq72b
\r
24 gWm4eg6xFSRO6FlgSlO18wjs9xoBsUlUWEyiQ=
\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
26 h=sender:from:to:subject:in-reply-to:references:date:message-id
\r
27 :mime-version:content-type;
\r
28 b=E4K/EoXrUX97toViEAn+qPAr5rpztFD99dVkydIjYd3UoiZ97g9MbIWcgxc+dq1TL+
\r
29 2zTCgSyzCHlQ4mY4ZMFf97HBDHtQmUKBGuDSmJXDj5OCcuAK7ghAw6H0uSGdn+/F3jkx
\r
30 onBQxpZDFhJniRnbP+LXsf5XJ3xodlbwhvffI=
\r
31 Received: by 10.204.3.211 with SMTP id 19mr1105668bko.153.1259331480081;
\r
32 Fri, 27 Nov 2009 06:18:00 -0800 (PST)
\r
33 Received: from kunyang (vawpc43.ethz.ch [129.132.59.11])
\r
34 by mx.google.com with ESMTPS id y15sm2078987fkd.26.2009.11.27.06.17.58
\r
35 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
36 Fri, 27 Nov 2009 06:17:58 -0800 (PST)
\r
37 Sender: Jed Brown <five9a2@gmail.com>
\r
38 From: Jed Brown <jed@59A2.org>
\r
39 To: Carl Worth <cworth@cworth.org>, notmuch@notmuchmail.org
\r
40 In-Reply-To: <87bpioqe3r.fsf@yoom.home.cworth.org>
\r
41 References: <1259094131-32405-1-git-send-email-jed@59A2.org>
\r
42 <1259087712-18844-1-git-send-email-jed@59A2.org>
\r
43 <87my2bfyyj.fsf@59A2.org> <87bpioqe3r.fsf@yoom.home.cworth.org>
\r
44 Date: Fri, 27 Nov 2009 15:18:31 +0100
\r
45 Message-ID: <87tywgdpag.fsf@59A2.org>
\r
47 Content-Type: multipart/signed; boundary="=-=-=";
\r
48 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
49 Subject: Re: [notmuch] [PATCH] New function
\r
50 notmuch-show-kill-ring-save-message-id.
\r
51 X-BeenThere: notmuch@notmuchmail.org
\r
52 X-Mailman-Version: 2.1.12
\r
54 List-Id: "Use and development of the notmuch mail system."
\r
55 <notmuch.notmuchmail.org>
\r
56 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
57 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
58 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
59 List-Post: <mailto:notmuch@notmuchmail.org>
\r
60 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
61 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
63 X-List-Received-Date: Fri, 27 Nov 2009 14:18:03 -0000
\r
66 Content-Transfer-Encoding: quoted-printable
\r
68 On Fri, 27 Nov 2009 05:41:44 -0800, Carl Worth <cworth@cworth.org> wrote:
\r
69 > Thanks for the patch, Jed, I almost pushed it, but noticed that it's
\r
70 > calling `called-interactively-p' with an argument even though that
\r
71 > function does not accept an argument.
\r
73 My docs say it does take an argument:
\r
75 called-interactively-p is a built-in function in `C source code'.
\r
77 (called-interactively-p KIND)
\r
79 Return t if the containing function was called by `call-interactively'.
\r
80 If KIND is `interactive', then only return t if the call was made
\r
81 interactively by the user, i.e. not in `noninteractive' mode nor
\r
82 when `executing-kbd-macro'.
\r
83 If KIND is `any', on the other hand, it will return t for any kind of
\r
84 interactive call, including being called as the binding of a key, or
\r
85 from a keyboard macro, or in `noninteractive' mode.
\r
87 The only known proper use of `interactive' for KIND is in deciding
\r
88 whether to display a helpful message, or how to display it. If you're
\r
89 thinking of using it for any other purpose, it is quite likely that
\r
90 you're making a mistake. Think: what do you want to do when the
\r
91 command is called from a keyboard macro?
\r
93 This function is meant for implementing advice and other
\r
94 function-modifying features. Instead of using this, it is sometimes
\r
95 cleaner to give your function an extra optional argument whose
\r
96 `interactive' spec specifies non-nil unconditionally ("p" is a good
\r
97 way to do this), or via (not (or executing-kbd-macro noninteractive)).
\r
99 > Meanwhile, the documentation of called-interactively-p suggests that
\r
100 > using (interactive "p") is an easier way to check whether the function
\r
101 > is called interactively.
\r
103 I thought my usage fell precisely under "in deciding whether to display
\r
104 a helpful message, or how to display it". This message is just noise if
\r
105 executed inside a macro. As further evidence, see copy-region-as-kill
\r
108 ;; This use of called-interactively-p is correct
\r
109 ;; because the code it controls just gives the user visual feedback.
\r
110 (if (called-interactively-p 'interactive)
\r
112 Let me know if you still want me to change it.
\r
114 > No, "git send-email" wouldn't strip that since it's a custom thing for
\r
117 Of course, I was just sloppy when pasting it into my shell, which rubbed
\r
118 this issue in my face:
\r
120 > So for passing the thread ID to notmuch users, the "id:" prefix is
\r
121 > convenient. For passing it not non-notmuch-based consumers it won't be
\r
122 > desired. And that's hard to fix.
\r
124 I'm thinking of having a prefix determine whether it is stripped or not.
\r
125 Do you have a preference about which is the non-prefix behavior?
\r
127 > I think long-term, a good solution would be to switch from "id:foo" to
\r
128 > "<foo>" as the syntax for message-ID-based search strings. That's then a
\r
129 > syntax that almost any consumer of a message ID should be prepared to
\r
132 Downside is that it requires shell escapes when pasting into a terminal.
\r
137 Content-Type: application/pgp-signature
\r
139 -----BEGIN PGP SIGNATURE-----
\r
140 Version: GnuPG v1.4.10 (GNU/Linux)
\r
142 iEYEARECAAYFAksP37cACgkQU7Rz1O1Q6otDFgCgrggpYHTKhp7Ijvtbk/ZW+XtK
\r
143 xdYAnAkqz/UY/jMYBO19b6Lrt7pDGAND
\r
145 -----END PGP SIGNATURE-----
\r