Re: [notmuch] [PATCH] New function notmuch-show-kill-ring-save-message-id.
authorCarl Worth <cworth@cworth.org>
Sat, 28 Nov 2009 05:54:11 +0000 (21:54 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:46 +0000 (09:35 -0800)
1f/c54f5c30bd96772d51a2725e8923076635f5bb [new file with mode: 0644]

diff --git a/1f/c54f5c30bd96772d51a2725e8923076635f5bb b/1f/c54f5c30bd96772d51a2725e8923076635f5bb
new file mode 100644 (file)
index 0000000..8ea2805
--- /dev/null
@@ -0,0 +1,129 @@
+Return-Path: <cworth@cworth.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8C930431FBC;\r
+       Fri, 27 Nov 2009 21:54:27 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 3Nfo-u+gAxl2; Fri, 27 Nov 2009 21:54:26 -0800 (PST)\r
+Received: from cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 46638431FAE;\r
+       Fri, 27 Nov 2009 21:54:26 -0800 (PST)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Jed Brown <jed@59A2.org>, notmuch@notmuchmail.org\r
+In-Reply-To: <87tywgdpag.fsf@59A2.org>\r
+References: <1259094131-32405-1-git-send-email-jed@59A2.org>\r
+       <1259087712-18844-1-git-send-email-jed@59A2.org>\r
+       <87my2bfyyj.fsf@59A2.org>\r
+       <87bpioqe3r.fsf@yoom.home.cworth.org> <87tywgdpag.fsf@59A2.org>\r
+Date: Fri, 27 Nov 2009 21:54:11 -0800\r
+Message-ID: <87638vtcsc.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Subject: Re: [notmuch] [PATCH] New function\r
+       notmuch-show-kill-ring-save-message-id.\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 28 Nov 2009 05:54:27 -0000\r
+\r
+--=-=-=\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Fri, 27 Nov 2009 15:18:31 +0100, Jed Brown <jed@59A2.org> wrote:\r
+> On Fri, 27 Nov 2009 05:41:44 -0800, Carl Worth <cworth@cworth.org> wrote:\r
+> > Thanks for the patch, Jed, I almost pushed it, but noticed that it's\r
+> > calling `called-interactively-p' with an argument even though that\r
+> > function does not accept an argument.\r
+>=20\r
+> My docs say it does take an argument:\r
+\r
+Ah. So we have our first case of emacs-lisp portability issues. This is\r
+what I get:\r
+\r
+    called-interactively-p is a built-in function in `C source code'.\r
+\r
+    (called-interactively-p)\r
+\r
+    Return t if the function using this was called with\r
+    `call-interactively'.  This is used for implementing advice and\r
+    other function-modifying features of Emacs.\r
+\r
+    The cleanest way to test whether your function was called with\r
+    `call-interactively' is by adding an extra optional argument, and\r
+    making the `interactive' spec specify non-nil unconditionally for\r
+    that argument.  (`p' is a good way to do this.)\r
+\r
+> I thought my usage fell precisely under "in deciding whether to display\r
+> a helpful message, or how to display it".  This message is just noise if\r
+> executed inside a macro.  As further evidence, see copy-region-as-kill\r
+> (simple.el):\r
+\r
+Here's what I see for that:\r
+\r
+(defun copy-region-as-kill (beg end)\r
+  "Save the region as if killed, but don't kill it.\r
+In Transient Mark mode, deactivate the mark.\r
+If `interprogram-cut-function' is non-nil, also save the text for a window\r
+system cut and paste.\r
+\r
+This command's old key binding has been given to `kill-ring-save'."\r
+  (interactive "r")\r
+  (if (eq last-command 'kill-region)\r
+      (kill-append (filter-buffer-substring beg end) (< end beg))\r
+    (kill-new (filter-buffer-substring beg end)))\r
+  (setq deactivate-mark t)\r
+  nil)\r
+\r
+No called-interactively anywhere.\r
+\r
+> Let me know if you still want me to change it.\r
+\r
+I can't apply the patch as it since it just results in an error.\r
+\r
+I'm using "GNU emacs 23.1.1" currently, for what it's worth.\r
+\r
+> > So for passing the thread ID to notmuch users, the "id:" prefix is\r
+> > convenient. For passing it not non-notmuch-based consumers it won't be\r
+> > desired. And that's hard to fix.\r
+>=20\r
+> I'm thinking of having a prefix determine whether it is stripped or not.\r
+> Do you have a preference about which is the non-prefix behavior?\r
+\r
+Not a strong preference either way. It's just a few characters after\r
+all.\r
+\r
+> > I think long-term, a good solution would be to switch from "id:foo" to\r
+> > "<foo>" as the syntax for message-ID-based search strings. That's then a\r
+> > syntax that almost any consumer of a message ID should be prepared to\r
+> > accept.\r
+>=20\r
+> Downside is that it requires shell escapes when pasting into a terminal.\r
+\r
+Yeah, there is that.\r
+\r
+=2DCarl\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.10 (GNU/Linux)\r
+\r
+iD8DBQFLELsD6JDdNq8qSWgRArhFAJ9YMNIHAl9rFi2rwOGZym+91IcjlQCgixBc\r
+2pRE78eAZGGSnw04TVKj3/g=\r
+=+vSS\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r