Re: [PATCH] emacs: Let the user choose where to compose new mails
authorThomas Jost <schnouki@schnouki.net>
Wed, 9 Nov 2011 18:50:55 +0000 (19:50 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:02 +0000 (09:40 -0800)
ba/fac1703d46a9eec52cfa8765b00fffbf7730e1 [new file with mode: 0644]

diff --git a/ba/fac1703d46a9eec52cfa8765b00fffbf7730e1 b/ba/fac1703d46a9eec52cfa8765b00fffbf7730e1
new file mode 100644 (file)
index 0000000..8472d9d
--- /dev/null
@@ -0,0 +1,127 @@
+Return-Path: <schnouki@schnouki.net>\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 B226C431FD0\r
+       for <notmuch@notmuchmail.org>; Wed,  9 Nov 2011 10:51:02 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.1\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]\r
+       autolearn=disabled\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 uhLNE7XGZ6yN for <notmuch@notmuchmail.org>;\r
+       Wed,  9 Nov 2011 10:51:02 -0800 (PST)\r
+Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])\r
+       by olra.theworths.org (Postfix) with ESMTP id 03F3E431FB6\r
+       for <notmuch@notmuchmail.org>; Wed,  9 Nov 2011 10:51:01 -0800 (PST)\r
+Received: from odin.local (4va54-1-87-88-247-156.dsl.sta.abo.bbox.fr\r
+       [87.88.247.156])\r
+       by ks3536.kimsufi.com (Postfix) with ESMTPSA id A7FA36A0026;\r
+       Wed,  9 Nov 2011 19:50:59 +0100 (CET)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;\r
+       s=key-schnouki; t=1320864659;\r
+       bh=zNTWUuYd3mm5WkDD7NlPEHwBQpfNxtq1w2zaz+eIzm0=;\r
+       h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:\r
+       MIME-Version:Content-Type;\r
+       b=MPYMZQNzHN7cayKu8U51T8kWCSV+Tf6gc7WWB77fgllYnLMHJbEuZJV5nCpUD3Kfr\r
+       dcbe3QuYCLQbgySZ2Qk7pDv6dB5VHhmKsItG5YwNpZsWvjXP29YcSB07VooqElyQ4W\r
+       vq/mu/ew2RpblVFcws4e5MqofXEwNxpFcJS3r+1Q=\r
+From: Thomas Jost <schnouki@schnouki.net>\r
+To: Austin Clements <amdragon@mit.edu>\r
+Subject: Re: [PATCH] emacs: Let the user choose where to compose new mails\r
+In-Reply-To:\r
+ <CAH-f9WvuSFJJC+e0JRFwKD8xYtyncNYZreCXxxMDeSahpWAuRw@mail.gmail.com>\r
+References: <87pqhlh64c.fsf@thor.loria.fr>\r
+       <1319528464-22654-1-git-send-email-schnouki@schnouki.net>\r
+       <CAH-f9WvuSFJJC+e0JRFwKD8xYtyncNYZreCXxxMDeSahpWAuRw@mail.gmail.com>\r
+User-Agent: Notmuch/0.9+66~g79e6e2e (http://notmuchmail.org) Emacs/24.0.90.1\r
+       (x86_64-unknown-linux-gnu)\r
+Date: Wed, 09 Nov 2011 19:50:55 +0100\r
+Message-ID: <87ipmt8700.fsf@schnouki.net>\r
+MIME-Version: 1.0\r
+Content-Type: multipart/signed; boundary="=-=-=";\r
+       micalg=pgp-sha1; protocol="application/pgp-signature"\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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: Wed, 09 Nov 2011 18:51:02 -0000\r
+\r
+--=-=-=\r
+Content-Type: text/plain\r
+Content-Transfer-Encoding: quoted-printable\r
+\r
+On Fri, 4 Nov 2011 23:51:55 -0400, Austin Clements <amdragon@mit.edu> wrote:\r
+> This seems like a good option to have, but your approach seems\r
+> unnecessarily complicated. I'm always wary of defcustom's :set because\r
+> it means you can't just setq the variable, which defeats the\r
+> underlying beauty of the customize system.\r
+\r
+Actually I use it with setq without any problem. But yes, it's too\r
+complicated...\r
+\r
+> You could eliminate the other two variables and compute them on the\r
+> fly, or, if you really feel they may need to be controlled\r
+> independently, make the custom variable a pair or alist (which you can\r
+> hide behind a few const choices).\r
+\r
+Computing them on the fly is probably cleaner. But I'm not sure if the\r
+switch-function and dedicated flag must be independent or not. From what\r
+I've tested it's *much* more pleasant to use with the dedicated flag,\r
+but I don't know how other people feel about this...\r
+\r
+> Alternatively, it seems like the variable could instead\r
+> take a single function (basically what notmuch-mua-switch-function is\r
+> now) and you could provide two new functions that simply combine\r
+> switch-to-buffer-other-x and set-window-dedicated-p.\r
+\r
+I've tried that, but for some reason it doesn't work when forwarding a\r
+message: the dedicated flag is reset somewhere inside message-forward,\r
+but I don't know where nor why. (I haven't investigated much though.)\r
+\r
+> The defcustom would be more user-friendly if it gave a choice between\r
+> const values, rather than requiring the user to enter a symbol value\r
+> (and then possibly rejecting it on validation).  Something like\r
+>   :type '(choice (const :tag "Compose in the current window" current-wind=\r
+ow)\r
+>                  (const :tag "Compose mail in a new window"  new-window)\r
+>                  (const :tag "Compose mail in a new frame"   new-frame))\r
+\r
+Yep, that's much better. I'll try to rewrite this patch using this and\r
+on-the-fly computations of the switch-function and dedicated flag.\r
+\r
+Thank you for the review!\r
+\r
+Regards,\r
+\r
+=2D-=20\r
+Thomas/Schnouki\r
+\r
+--=-=-=\r
+Content-Type: application/pgp-signature\r
+\r
+-----BEGIN PGP SIGNATURE-----\r
+Version: GnuPG v1.4.11 (GNU/Linux)\r
+\r
+iQEcBAEBAgAGBQJOusuPAAoJEMPdciX+bh5Ib1AH/0xzI3WK64F9CxZ/gucsFPgp\r
+hmIDbEIavRe2fxcv74PiTtRvA/QgQU490jp2zMo+EySlMulRNgoONMZYS+dd/6Fz\r
+1Uz3lzqtXLLvHQI/1FKQdQLo+VoBMtsP7IetYlO5pFzoQElrCTe6ST/CIgvqsqkW\r
+4Pg5BMon8ZjzNht2SLIizrUVCRFnB6VU0YrLfYDQt0Xigbok+3reUJoVLl8UNl1w\r
+m2Ug+eyx9DiGfE4zVackd27EQdRQgwLavw92eqmJYS06EhrP71CheTFEJy++3Vxo\r
+6ko8XzGWJsYPUDBQrDHzDQdRcMmCo15kJD+NQmG5/rRvmGScBiXHqsF+7XleZBU=\r
+=RQQA\r
+-----END PGP SIGNATURE-----\r
+--=-=-=--\r