Subject: Re: [sup-talk] Adding string to 'missing attachment detection'

From: Philipp Überbacher <[email-masked]>
Date: Thu, 06 Oct 2011 15:34:53 +0200

Excerpts from Ben Walton's message of 2011-10-06 14:55:07 +0200:
> Excerpts from Philipp Überbacher's message of Thu Oct 06 03:04:27 -0400 2011:
> 
> > but sup does this already, it should be possible to add this single Word
> > in the appropriate place and be done with this. After all, ruby is
> > an
> 
> Sure, lib/sup/modes/edit-message-mode.rb on line 473 (my version of
> sup is fairly old, but this should be close).
> 
> The hook is cleaner, but if you want to hack it in directly, that's
> where you'd do it.
> 
> Thanks
> -Ben
> --
> Ben Walton
> Systems Programmer - CHASS
> University of Toronto
> C:416.407.5610 | W:416.978.4302

Thanks,
I looked it up, it looks similar to the suggested hook line, but the
hook line was easier to modify without risking to mess stuff up.
Thanks for your help.

Regards,
Philipp

_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Philipp Überbacher <[email-masked]>
Date: Thu, 06 Oct 2011 09:04:27 +0200

Excerpts from Ben Walton's message of 2011-10-06 02:00:00 +0200:
> Excerpts from Philipp's message of Wed Oct 05 15:18:49 -0400 2011:
> 
> Hi Philipp,
> 
> > All I'd need is a way to add the word 'Anhang' to that mechanism. Can
> > you tell me where to do this? I tried a web search and looked through
> > some source files but couldn't find the right place so far.
> 
> You want to write a 'mentions-attachments' hook.  You'll get the
> variables header, and body.  Scan the body for whatever terms you
> want/need and return true/false as desired.
> 
> HTH.
> -Ben

Thanks,
but sup does this already, it should be possible to add this single Word
in the appropriate place and be done with this. After all, ruby is an
interpreted language. The sup releases are infrequent, if another one
follows at all, and thus modifying a file is no problem. I don't have
the time to dig deep enough into ruby and sup either. I see that
http://sup.rubyforge.org/wiki/wiki.pl?Hooks lists such a hook but sadly
no example.
Guess I can live without that.

---

From: Ben Walton <[email-masked]>
Date: Wed, 05 Oct 2011 20:00:00 -0400

Hi Philipp,

HTH.
-Ben

---

From: Philipp Überbacher <[email-masked]>
Date: Thu, 06 Oct 2011 15:33:29 +0200

Excerpts from Tero Tilus's message of 2011-10-06 14:17:30 +0200:
> Philipp Überbacher, 2011-10-06 10:04:
> Oh my!  Need to fix it.  My ~/.sup/hooks/mentions-attachments looks like
> 
> body.any? { |l| l =~ /^[^>]/ && l =~ /\b(attach|liite|liittee|ohessa|oheise|oheist)[^ ]*\b/i }
> 
> Not pretty but works.

Thanks, this works. I don't understand what this line is doing but it
looks very similar in the source and this line is simply easier to hack
for me, so I go with this solution.

Thanks for sharing,
Philipp

---

From: Tero Tilus <[email-masked]>
Date: Thu, 06 Oct 2011 15:17:30 +0300

Not pretty but works.

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Ben Walton <[email-masked]>
Date: Thu, 06 Oct 2011 08:55:07 -0400

Thanks
-Ben

---

From: Philipp <[email-masked]>
Date: Wed, 05 Oct 2011 21:18:49 +0200

Hi there,
I sometimes need to write mails in German and need to attach some files
to those mails. I also tend to send mails before attaching the files.
I have the 'mentioned "attachment" but it's missing'-option enabled, but
it doesn't help me in German mails. 

Regards,
Philipp