From: Michal Sojka <sojkam1@fel.cvut.cz>
To: James Vasile <james@hackervisions.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH] Change From and Bcc when creating reply draft buffer
Date: Fri, 12 Mar 2010 08:49:35 +0100 [thread overview]
Message-ID: <87iq92m12o.fsf@steelpick.localdomain> (raw)
In-Reply-To: <876352hccg.fsf@softwarefreedom.org>
On Thu, 11 Mar 2010, James Vasile wrote:
> On Thu, 11 Mar 2010 17:22:41 +0100, Michal Sojka <sojkam1@fel.cvut.cz> 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 <login>@<hostname>
> > 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)
>
> <other mail-profile-foo functions>
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
next prev parent reply other threads:[~2010-03-12 7:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-09 19:40 [PATCH] Change From and Bcc when creating reply draft buffer James Vasile
2010-03-11 13:00 ` Michal Sojka
2010-03-11 14:45 ` James Vasile
2010-03-11 16:22 ` Michal Sojka
2010-03-11 19:45 ` James Vasile
2010-03-12 7:49 ` Michal Sojka [this message]
2010-03-12 15:01 ` James Vasile
2010-03-12 15:22 ` Jameson Rollins
2010-03-12 16:00 ` Sebastian Spaeth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iq92m12o.fsf@steelpick.localdomain \
--to=sojkam1@fel.cvut.cz \
--cc=james@hackervisions.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).