[darcs-users] the darcs send experience

Isaac Dupree isaacdupree at charter.net
Sat Jun 14 16:27:25 UTC 2008


Eric Y. Kow wrote:
> Hi,
> 
> On Fri, Jun 13, 2008 at 15:29:33 -0400, Isaac Dupree wrote:
>> it would be nice if they were nice under Linux!  [warning: frustrated 
>> rant ahead] 
> 
> Ranting can be good!
> 
> However, not having much experience with Thunderbird or GNOME, I'm not
> sure I understand your pain.  If any of these might be darcs's fault, or
> things darcs could be smarter about, could you please file a bug report?

let's see...
If darcs just put the patch file somewhere like /tmp and never deleted 
it, then that problem with certain graphical mail programs would go 
away.  Darcs-send would say "completed" when the user would still have 
to press "send" in e.g. Thunderbird, but that's fine with me.  (and I 
wouldn't have this darcsXXXXXX file polluting my repo dir, both 
temporarily, and if darcs terminates unexpectedly, permanently -- I 
might at least prefer it in _darcs somewhere rather than the repo root 
dir, if the TMPDIR idea isn't adequate for some reason).  My current 
hack solution involves a sendmail-command shell script that invokes 
thunderbird and then waits 86400 seconds (one day) before returning 
(first printing a terminal message saying something like "press Ctrl-C 
when you're done actually sending the message").


It would help if darcs reported the same file path for the attachment as 
the name of the file it creates... my tests with darcs 1.0.9 (release) 
show definitely the opposite (should I move to darcs2?) :

 > cat ../sms
#!/bin/sh
ls -l >&2
echo "$@" >&2

 > darcs send --sendmail-command='../sms "a=%a,A=file://%A"'
Creating patch to "../dst2"...

Sat Jun 14 11:35:20 EDT 2008  Isaac Dupree <id at isaac.cedarswampstudios.org>
   * new file f
Shall I send this patch? (1/1)  [ynWvpxqadjk], or ? for help: y
What is the target email address? fgads
total 4
drwxr-xr-x 6 me me 208 2008-06-14 12:20 _darcs
-rw------- 1 me me 780 2008-06-14 12:20 darcsCDGluq
-rw-r--r-- 1 me me   0 2008-06-14 11:35 f
a=/Users/me/programming/test/dst/darcs5XZrdA,A=file://%2fUsers%2fme%2fprogramming%2ftest%2fdst%2fdarcs5XZrdA
Successfully sent patch bundle to: fgads.



If darcs could have a good mailer default... here I see by default
"darcs failed:  no mail facility (sendmail or mapi) located at configure 
time!"
First: Why, oh why does darcs depend on that at *configure* time?  It's 
quite a nuisance for distro packagers who need to decide whether it 
should depend on a mail program, and if so, which one.  Aren't they 
external programs that Darcs can support easily at runtime?  Also, 
assuming/hoping it can be configured in ~/.darcs, the message is 
confusing for people who want to do that (and also for people who just 
need to find --sendmail-command).

Next, let's look at xdg-email, which might be a decent default for 
graphical Linux (at least GNOME, KDE, and XFCE, which support 
default-application configuration).  Here's the bug I mentioned in 
relation with Thunderbird... I wonder if they'll resolve it soon:
http://bugs.freedesktop.org/show_bug.cgi?id=13435
(see http://portland.freedesktop.org/ for that xdg-utils project)

HaskellNet.SMTP (mentioned in <http://bugs.darcs.net/issue906>) looks 
like it might be sufficient to build a default interface off of, but it 
would require some design.  Aren't there any existing, simple, 
command-line mailers that put configuration in your home directory, not 
/etc, and allow for interactive setting/fixing of SMTP default settings? 
  (well, I hoped there were, but I haven't found any that I've gotten to 
work)

> Also, does this mean you get the same symptoms of I do under Windows of
> having MIME-gunk in the message body, and a weird filename for the patch
> bundle when you receive the mail?

no, my message body etc. are fine, IIRC

>> The main benefit I actually get from using 'darcs send's e-mail
>> support (rather than -o to a file) is that it fills in the target
>> e-mail address I should send to, fetched from the source repo's _darcs
>> IIRC -- anyway, something I'd rather not look up and enter myself.
> 
> Btw, you can now do darcs send -O, which generates a patch bundle name
> for you.

yeah, sometimes I do that

>> Long ago I tried various command-line email things like ssmtp, which 
>> never worked out very well: and anyway I shouldn't have to configure 
>> anything like that when I have my settings already stored in 
>> Thunderbird(which unfortunately hoards them and isn't a very 
>> well-behaved program in general)
> 
> Trent Buck submitted a feature request that you may also be interested
> in: http://bugs.darcs.net/issue906
> 



More information about the darcs-users mailing list