From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C2E5E4048C5 for ; Thu, 11 Mar 2010 23:49:40 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.267 X-Spam-Level: X-Spam-Status: No, score=-2.267 tagged_above=-999 required=5 tests=[AWL=0.332, BAYES_00=-2.599] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pKLvhSp3iv+A for ; Thu, 11 Mar 2010 23:49:39 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by olra.theworths.org (Postfix) with ESMTP id 6C9114048C3 for ; Thu, 11 Mar 2010 23:49:39 -0800 (PST) Received: from localhost (unknown [192.168.200.4]) by max.feld.cvut.cz (Postfix) with ESMTP id 5E63B19F35C5; Fri, 12 Mar 2010 08:49:38 +0100 (CET) X-Virus-Scanned: IMAP AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new, port 10044) with ESMTP id NvL8yYC7i2R1; Fri, 12 Mar 2010 08:49:37 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 06AB519F3627; Fri, 12 Mar 2010 08:49:36 +0100 (CET) Received: from steelpick.localdomain (k335-30.felk.cvut.cz [147.32.86.30]) (Authenticated sender: sojkam1) by imap.feld.cvut.cz (Postfix) with ESMTPSA id DF4ACFA009; Fri, 12 Mar 2010 08:49:36 +0100 (CET) Received: from wsh by steelpick.localdomain with local (Exim 4.71) (envelope-from ) id 1Npzcl-0001XE-Jj; Fri, 12 Mar 2010 08:49:35 +0100 From: Michal Sojka To: James Vasile , notmuch@notmuchmail.org In-Reply-To: <876352hccg.fsf@softwarefreedom.org> References: <87aauhp9kk.fsf@hackervisions.org> <87pr3bm2sn.fsf@steelpick.localdomain> <87fx46hq7w.fsf@hackervisions.org> <87ljdyn7zi.fsf@steelpick.localdomain> <876352hccg.fsf@softwarefreedom.org> Date: Fri, 12 Mar 2010 08:49:35 +0100 Message-ID: <87iq92m12o.fsf@steelpick.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [PATCH] Change From and Bcc when creating reply draft buffer X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2010 07:49:41 -0000 On Thu, 11 Mar 2010, James Vasile wrote: > On Thu, 11 Mar 2010 17:22:41 +0100, Michal Sojka wrote: > > thanks for clarification. It all sounds reasonable. The only problem I > > can see now is that if I create a new account on my machine and run > > emacs there, then the value of user-mail-address is @ > > which doesn't refer to existing mailbox. I think that the header should > > only be rewritten if these variables are known to have valid values. Do > > you know how to do this? > > > > I explicitly set these in my .emacs file, so I don't do any detection. > If you could define "valid" I suppose you could test for such things. > > Something like the following works for me. I run mail-profile-foo with > M-x or run it automatically with profile-guessing/setting routines. > When I get the system ironed out, I'll emit patches and a wiki entry. > > (defun message-mode-set-profile () > (save-excursion > (when (string= "message-mode" major-mode) > (goto-char (point-min)) > (when (re-search-forward "^From: " nil t) > (kill-line) > (insert (format "%s <%s>" user-full-name user-mail-address))) > > (goto-char (point-min)) > (when (re-search-forward "^Bcc: " nil t) > (kill-line) > (insert (format "%s <%s>" user-full-name user-mail-address)))))) > > (defun mail-profile-hv () > (interactive) > (setq mail-host-address "hackervisions.org" > user-full-name "James Vasile" > message-sendmail-extra-arguments '("-a" "hv") > user-mail-address "james@hackervisions.org") > (message-mode-set-profile) > user-mail-address) > (mail-profile-hv) > > Hmm, I understand. My worry about this approach is the following: Now it is very straightforward to start using notmuch. You only answer a few questions when you run notmuch for the first time and then it works. If we apply your patch, some additional configuration is needed and a novice might not know how to do it. So at least notmuch should tell the user what and where needs to be configured. Or better, provide some sane default which can be overridden in a way you want it. That's only my opinion. I personally would have no problem with additional configuration, but on the other side I like programs which do not steel my time if it is not necessary. Bye -Michal