--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\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 2FF3B431FAF\r
+ for <notmuch@notmuchmail.org>; Thu, 6 Sep 2012 07:00:51 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\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 w0RHchRdGuxS for <notmuch@notmuchmail.org>;\r
+ Thu, 6 Sep 2012 07:00:49 -0700 (PDT)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by olra.theworths.org (Postfix) with ESMTP id A2EED431FAE\r
+ for <notmuch@notmuchmail.org>; Thu, 6 Sep 2012 07:00:49 -0700 (PDT)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 9620B1000E5;\r
+ Thu, 6 Sep 2012 17:00:55 +0300 (EEST)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2] emacs: Add customization group for replying\r
+In-Reply-To: <87y5kntjf1.fsf@steelpick.2x.cz>\r
+References: <1346919815-20397-1-git-send-email-sojkam1@fel.cvut.cz>\r
+ <m2wr07fs0y.fsf@guru.guru-group.fi>\r
+ <87y5kntjf1.fsf@steelpick.2x.cz>\r
+User-Agent: Notmuch/0.14+11~gd9bf007 (http://notmuchmail.org) Emacs/24.2.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Thu, 06 Sep 2012 17:00:55 +0300\r
+Message-ID: <m2sjavxnc8.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\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: Thu, 06 Sep 2012 14:00:51 -0000\r
+\r
+On Thu, Sep 06 2012, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+\r
+>> So far good, but...\r
+>>\r
+>> You forgot to handle the current group setting for \r
+>> notmuch-message-replied-tags -- currently notmuch-message.el has this:\r
+>>\r
+>> (defcustom notmuch-message-replied-tags '("replied")\r
+>> "Tags to be automatically added to or removed from a message when it is\r
+>> replied to.\r
+>> Any tag in the list will be added to a replied message or,\r
+>> if it is prefaced with a \"-\", removed.\r
+>>\r
+>> For example, if you wanted to add a \"replied\" tag and remove\r
+>> the \"inbox\" and \"todo\", you would set\r
+>> (\"replied\" \"-inbox\" \"-todo\"\)"\r
+>> :type 'list\r
+>> :group 'notmuch-send)\r
+>>\r
+>> If the above was changed to 'normuch-send, (require 'notmuch-lib)\r
+>> was added to the beginning of notmuch-message.el and the defgroup\r
+>> below was written as\r
+>>\r
+>> (defgroup notmuch-reply\r
+>> '((message-insertion custom-group)))\r
+>> "Replying to messages.\r
+>> ...\r
+>>\r
+>> would that work as expected ?\r
+>\r
+> Hi Tomi,\r
+>\r
+> I don't really get what are you trying to say. Do you mean that\r
+> notmuch-message-replied-tags is referenced from notmuch-lib.el without\r
+> (require 'notmuch-message)? I'm not sure whether it is required, but it\r
+> works here without problems.\r
+\r
+Ok, some sillines in my part and something I did not check well\r
+enough before replying...\r
+\r
+First, notmuch-lib.el defines notmuch-send group, yet \r
+(defcustom notmuch-message-replied-tags ...) is defined \r
+in notmuch-message.el which is not requiring notmuch-lib...\r
+and all of this works now...\r
+\r
+Actually, notmuch-lib.el defines all defgroups (except coolj).\r
+\r
+Then, I found the following: notmuch-mua-send-hook is defined \r
+both in notmuch-hooks and notmuch-send groups (having a precedent\r
+helps a bit there when choosing alternatives below)\r
+\r
+\r
+All the defgroups are defined using pattern:\r
+\r
+(defgroup notmuch-<group> nil ...)\r
+\r
+We should follow this pattern unless there is good reason not to \r
+do so here: notmuch-send is written as:\r
+\r
+ (defgroup notmuch-send nil\r
+ "Sending messages from Notmuch."\r
+ :group 'notmuch)\r
+\r
+ (custom-add-to-group 'notmuch-send 'message 'custom-group)\r
+\r
+But, as the documentation in this notmuch-reply definition references\r
+'Message insertion' group, doing\r
+\r
+ (defgroup notmuch-reply \r
+ '((message-insertion custom-group))'\r
+ "Replying to messages.\r
+\r
+ Most of the reply customization settings can be found in `Message\r
+ insertion' group. Notmuch specific settings are included directly\r
+ here."\r
+ :group 'notmuch)\r
+\r
+could be good thing to do here; definition matches doc from the beginning\r
+(just not adding any of the custom variables, yet).\r
+\r
+\r
+Now, currently notmuch-message.el defines notmuch-message-replied-tags\r
+and puts that to :group 'notmuch-send\r
+\r
+There are 2 alternatives:\r
+\r
+1) change that to :group 'notmuch-reply\r
+\r
+2) add (custom-add-to-group 'notmuch-reply 'notmuch-message-replied-tags 'custom-variable)\r
+ to notmuch-message.el (or notmuch-lib.el)\r
+\r
+2b) change :group 'notmuch-send -> :group 'notmuch-reply and\r
+ add (custom-add-to-group 'notmuch-send 'notmuch-message-replied-tags 'custom-variable)\r
+ to notmuch-message.el (or notmuch-lib.el)\r
+\r
+\r
+I personally would slightly lean to option 1 but if 2 gets more \r
+supporters then 2b (so that the spesific group is in the group definition).\r
+\r
+On other words; 1 or 2b gets LGTM from me :)\r
+\r
+Understood ? :D\r
+\r
+\r
+Tomi\r
+\r
+\r
+> Running M-x customize-variable RET notmuch-message-replied-tags RET\r
+> shows the following. Note that both groups are mentioned at the bottom.\r
+> No warning or errors are produced.\r
+\r
+Yes, I tested that missing group-thing with:\r
+\r
+(defgroup foo '((bar-group custom-group)) "test")\r
+\r
+It seems the nonexisting bar-group is created on-the-fly (but\r
+exist temporarily). No warnings nor errors :).\r
+\r
+>\r
+> -Michal\r
+\r
+Tomi\r
+\r
+>\r
+> --8<---------------cut here---------------start------------->8---\r
+> To apply changes, use the Save or Set buttons.\r
+> For details, see Saving Customizations in the Emacs manual.\r
+>\r
+> Search \r
+>\r
+> Operate on all settings in this buffer:\r
+> Set for current session Save for future sessions \r
+> Undo edits Reset to saved Erase customizations Exit \r
+>\r
+> Hide notmuch-message-replied-tags: '("replied")\r
+> State : STANDARD. (mismatch)\r
+> Tags to be automatically added to or removed from a message when it is replied to. Hide \r
+> Any tag in the list will be added to a replied message or,\r
+> if it is prefaced with a "-", removed.\r
+> \r
+> For example, if you wanted to add a "replied" tag and remove\r
+> the "inbox" and "todo", you would set\r
+> ("replied" "-inbox" "-todo")\r
+> Groups: Notmuch Send Notmuch Reply\r
+> --8<---------------cut here---------------end--------------->8---\r