[patch] spellcheck subject line in mutt - Mutt

This is a discussion on [patch] spellcheck subject line in mutt - Mutt ; Hi, I've written a patch for mutt that allows one to spell-check the subject line of a message. With the feature enabled, pressing "i" will first spell-check the subject, then spell-check the body of the letter. The patch doesn't contain ...

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

[patch] spellcheck subject line in mutt

  1. Default [patch] spellcheck subject line in mutt

    Hi,

    I've written a patch for mutt that allows one to spell-check the subject
    line of a message. With the feature enabled, pressing "i" will first
    spell-check the subject, then spell-check the body of the letter.

    The patch doesn't contain updates to the documentation; I'll plan to do
    that later. First, I'd appreciate it if some people could take a look
    and let me know what they think.

    Any feedback greatly appreciated!

    Mike

    diff -u -r mutt-1.5.11-orig/compose.c mutt-1.5.11-checksubj/compose.c
    --- mutt-1.5.11-orig/compose.c 2005-08-11 14:37:23.000000000 -0500
    +++ mutt-1.5.11-checksubj/compose.c 2006-03-12 17:35:16.000000000 -0600
    @@ -1178,6 +1178,61 @@

    case OP_COMPOSE_ISPELL:
    endwin ();
    +/*#ifdef MTH_SUBJECT_SPELLCHECK_HACK*/
    + if (option (OPTSPELLCHECKSUBJECT))
    + {
    + FILE * spellfp;
    + char spellfile[_POSIX_PATH_MAX];
    + size_t subjectlen;
    +
    + subjectlen = strlen ( msg->env->subject);
    + if (subjectlen > 0) /* no susbject, no spellcheck */
    + {
    + mutt_mktemp (spellfile);
    +
    + /* put subject in a file by itself, ispell the file, rewrite the subject in memory */
    + if (!(spellfp = fopen (spellfile, "w")))
    + {
    + mutt_error (_("Can't create file %s"), spellfile);
    + continue;
    + }
    +
    + fputs(msg->env->subject,spellfp);
    + fclose(spellfp);
    +
    + snprintf (buf, sizeof (buf), "%s -x %s", NONULL(Ispell), spellfile);
    + if (mutt_system (buf) == -1)
    + mutt_error (_("Error running \"%s\"!"), buf);
    +
    + if (!(spellfp = fopen (spellfile, "r")))
    + {
    + mutt_error (_("Can't open file %s"), spellfile);
    + continue;
    + }
    +
    + subjectlen = fread(buf, 1, LONG_STRING, spellfp );
    + fclose(spellfp);
    + mutt_unlink (spellfile);
    +
    + /*truncate the subject to LONG_STRING of what we got back from ispell*/
    + if (subjectlen < LONG_STRING)
    + buf[subjectlen] = '\0';
    + else
    + buf[LONG_STRING-1] = '\0';
    +
    + mutt_str_replace(&msg->env->subject, buf);
    + mutt_update_encoding (msg->content);
    + menu->redraw |= REDRAW_STATUS; /*TODO Remove? */
    + mutt_str_replace (&msg->env->subject, buf);
    + move (HDR_SUBJECT, HDR_XOFFSET);
    + clrtoeol ();
    + if (msg->env->subject)
    + mutt_paddstr (W, msg->env->subject);
    +
    + /*#endif MTH_SUBJECT_SPELLCHECK_HACK*/
    + }
    + }
    +
    snprintf (buf, sizeof (buf), "%s -x %s", NONULL(Ispell), msg->content->filename);
    if (mutt_system (buf) == -1)
    mutt_error (_("Error running \"%s\"!"), buf);

    diff -u -r mutt-1.5.11-orig/init.h mutt-1.5.11-checksubj/init.h
    --- mutt-1.5.11-orig/init.h 2005-09-15 09:19:54.000000000 -0500
    +++ mutt-1.5.11-checksubj/init.h 2006-03-12 17:13:50.000000000 -0600
    @@ -2690,6 +2690,13 @@
    ** ``$$sort_re'' for a less drastic way of controlling this
    ** behaviour.
    */
    + { "spellcheck_subject", DT_BOOL, R_NONE, OPTSPELLCHECKSUBJECT , 0 },
    + /*
    + ** .pp
    + ** When set, mutt also spellchecks the subject line of a message by
    + ** writing it out to a temp file and envoking the spell check, then
    + ** continues the standard spellcheck as usual
    + */
    { "suspend", DT_BOOL, R_NONE, OPTSUSPEND, 1 },
    /*
    ** .pp

    diff -u -r mutt-1.5.11-orig/mutt.h mutt-1.5.11-checksubj/mutt.h
    --- mutt-1.5.11-orig/mutt.h 2005-09-07 03:19:43.000000000 -0500
    +++ mutt-1.5.11-checksubj/mutt.h 2006-03-12 14:13:48.000000000 -0600
    @@ -419,6 +419,7 @@
    OPTSIGONTOP,
    OPTSORTRE,
    OPTSPAMSEP,
    + OPTSPELLCHECKSUBJECT,
    OPTSTATUSONTOP,
    OPTSTRICTTHREADS,
    OPTSUSPEND,

  2. Default Re: [patch] spellcheck subject line in mutt

    On comp.mail.mutt, in <slrne1utdg.rjc.mhunter@thirtyseven.lusars.net>, "Mike Hunter" wrote:
    > Path: newsspool2.news.pas.earthlink.net!stamper.news.pas.earthlink.net!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
    > From: Mike Hunter <mhunter@lusArs.net>
    > Newsgroups: comp.mail.mutt
    > Subject: [patch] spellcheck subject line in mutt
    > Date: Mon, 20 Mar 2006 21:40:32 -0600
    > Lines: 109
    > Message-ID: <slrne1utdg.rjc.mhunter@thirtyseven.lusars.net>
    > Reply-To: mhunter@lusArs.net
    > X-Trace: individual.net MMWCRHunktaWHnXaCCuVPw3XarbxxzrQgPIekYAHzH+mrydpA=
    > X-Orig-Path: news.lusars.net!not-for-mail
    > User-Agent: slrn/0.9.8.0 (Linux)
    > Xref: news.earthlink.net comp.mail.mutt:26508
    > X-Received-Date: Mon, 20 Mar 2006 20:00:23 PST (newsspool2.news.pas.earthlink.net)
    >


    >
    >
    > Hi,
    >
    > I've written a patch for mutt that allows one to spell-check
    > the subject line of a message. With the feature enabled,
    > pressing "i" will first spell-check the subject, then
    > spell-check the body of the letter.


    You are funny. You are using a common name for an alias and
    posting through individual.net (a favorite of trolls because
    it hides the identity of the poster) and are using an email
    address at

    $ whois 65.98.21.108

    OrgName: Pegasus Web Technologies

    Which has a website at http://lusars.net that has nothing
    on it.

    You must think that people are really stupid.

    That's a throwaway domain about as useful for identifying
    someone as a gmail address.

    And you think that people are just going to install the
    software you publish?

    I'd guess that you are used to the mindless consumers
    from the Windows world.

    Alan

    --
    http://home.earthlink.net/~alanconnor/contact.html
    Other URLs of possible interest in my headers.

  3. Default Re: [patch] spellcheck subject line in mutt

    On comp.mail.mutt, in <slrne1vbkp.181.i3x9mdw@b29x3m.invalid>, "Alan Connor" wrote:
    >
    >
    > On comp.mail.mutt, in <slrne1utdg.rjc.mhunter@thirtyseven.lusars.net>, "Mike Hunter" wrote:
    >> Path: newsspool2.news.pas.earthlink.net!stamper.news.pas.earthlink.net!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
    >> From: Mike Hunter <mhunter@lusArs.net>
    >> Newsgroups: comp.mail.mutt
    >> Subject: [patch] spellcheck subject line in mutt
    >> Date: Mon, 20 Mar 2006 21:40:32 -0600
    >> Lines: 109
    >> Message-ID: <slrne1utdg.rjc.mhunter@thirtyseven.lusars.net>
    >> Reply-To: mhunter@lusArs.net
    >> X-Trace: individual.net MMWCRHunktaWHnXaCCuVPw3XarbxxzrQgPIekYAHzH+mrydpA=
    >> X-Orig-Path: news.lusars.net!not-for-mail
    >> User-Agent: slrn/0.9.8.0 (Linux)
    >> Xref: news.earthlink.net comp.mail.mutt:26508
    >> X-Received-Date: Mon, 20 Mar 2006 20:00:23 PST (newsspool2.news.pas.earthlink.net)
    >>

    >
    >>
    >>
    >> Hi,
    >>
    >> I've written a patch for mutt that allows one to spell-check
    >> the subject line of a message. With the feature enabled,
    >> pressing "i" will first spell-check the subject, then
    >> spell-check the body of the letter.

    >
    > You are funny. You are using a common name for an alias and
    > posting through individual.net (a favorite of trolls because
    > it hides the identity of the poster) and are using an email
    > address at
    >
    > $ whois 65.98.21.108
    >
    > OrgName: Pegasus Web Technologies
    >
    > Which has a website at http://lusars.net that has nothing
    > on it.
    >
    > You must think that people are really stupid.
    >
    > That's a throwaway domain about as useful for identifying
    > someone as a gmail address.
    >
    > And you think that people are just going to install the
    > software you publish?
    >
    > I'd guess that you are used to the mindless consumers
    > from the Windows world.


    Just to be thorough: This fellow should have sent the patch
    to mutt.org for them to check out. If it was worthy and safe,
    they'd put it up on the website.

    http://groups.google.com/advanced_group_search
    Mike Hunter
    Results 1 - 100 of 1,400 posts in the last year
    1 ZeeMail
    2 alt.autos
    13 alt.autos.ford
    14 alt.autos.gm
    1 alt.autos.pontiac
    4 alt.autos.studebaker
    53 alt.autos.toyota
    1 comp.mail.mutt
    1 fa.openbsd.www
    1 lucky.freebsd.ports
    1 mailing.freebsd.mobile
    1 mailing.freebsd.ports
    1 mailing.freebsd.security
    1 mailing.freebsd.stable
    1 muc.lists.freebsd.hackers <<<<<<
    1 muc.lists.freebsd.ports
    1 rec.autos.4x4
    1 rec.autos.driving
    1 uk.rec.photo.misc

    A used car salesman and a hacker?

    The last time he posted here, he had a different email address:

    From: Mike Hunter <mhunter+usenet@lusArs.net>
    Newsgroups: comp.mail.mutt
    Subject: Desperate to spell-check Subject line
    Date: Mon, 06 Feb 2006 23:44:56 -0600
    Message-ID: <slrndugcuo.iqu.mhunter@thirtyseven.lusars.net>

    Why? And why the empty website for at least 6 weeks? In a parent
    domain devoted to web publishing?

    To use their mailserver, would be my guess. (If they entire
    parent domain isn't his) Bet ya that mail from it does not
    any posting IP but lusars.net.

    He may have good intentions in _this_ case, but I don't trust him
    enough to install that patch.

    He could vanish like he never existed. I was wrong in my first
    post here. That domain (lusars.net) could vanish like it never
    was in a blink. Gmail can't.

    Nor will I believe any possible sockpuppets that show up
    vouching for him or the software.

    Alan

    --
    http://home.earthlink.net/~alanconnor/contact.html
    Other URLs of possible interest in my headers.

  4. Default Re: [patch] spellcheck subject line in mutt

    On comp.mail.mutt, in <slrne1vcjv.1bf.i3x9mdw@b29x3m.invalid>, "Alan Connor" wrote:

    <snip>

    This fellow has got to be a spammer: He doesn't need to
    spellcheck the body of the mail, because he didn't write it. It
    came from some business that has hired him to spam for them.

    Just the subject line, which is all that he writes.

    He said that he didn't want to spellcheck with the editor that
    Mutt calls, which certainly suggests that he doesn't have that
    capability.

    Spammer.

    Bet he spams the people that post on those auto groups, just
    for starters. And probably the groups themselves, using
    different aliases and newsservers.

    I'd guess that he only connects to the Internet from a laptop
    through various free wireless connections offered by businesses
    all over the place. While he sits in a car or van.

    AC

    --
    http://home.earthlink.net/~alanconnor/contact.html
    see also: links.html and newsfilter.html
    Other URLs of possible interest in my headers.

  5. Default Re: [patch] spellcheck subject line in mutt

    On Mon, 20 Mar 2006 21:40:32 -0600, Mike Hunter wrote:

    > The patch doesn't contain updates to the documentation; I'll plan to do
    > that later. First, I'd appreciate it if some people could take a look and
    > let me know what they think.


    You might be better off sending the patch to mutt-dev for the developers to
    take a look at it - I don't know how actively any of them read this
    newsgroup. You can find the link on the mutt.org website.

    --
    Paul

    Could have been worse, I think a "kvorkian drive" would be quite useful
    sometimes, insert CD-ROM, drive kills you. Simple really.
    -- Andre Renaud, a.s.r.

  6. Default Re: [patch] spellcheck subject line in mutt

    On Tue, 21 Mar 2006 07:43:24 GMT, Alan Connor wrote:
    > On comp.mail.mutt, in <slrne1utdg.rjc.mhunter@thirtyseven.lusars.net>, "Mike Hunter" wrote:
    > > Path: newsspool2.news.pas.earthlink.net!stamper.news.pas.earthlink.net!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
    > > From: Mike Hunter <mhunter@lusArs.net>
    > > Newsgroups: comp.mail.mutt
    > > Subject: [patch] spellcheck subject line in mutt
    > > Date: Mon, 20 Mar 2006 21:40:32 -0600
    > > Lines: 109
    > > Message-ID: <slrne1utdg.rjc.mhunter@thirtyseven.lusars.net>
    > > Reply-To: mhunter@lusArs.net
    > > X-Trace: individual.net MMWCRHunktaWHnXaCCuVPw3XarbxxzrQgPIekYAHzH+mrydpA=
    > > X-Orig-Path: news.lusars.net!not-for-mail
    > > User-Agent: slrn/0.9.8.0 (Linux)
    > > Xref: news.earthlink.net comp.mail.mutt:26508
    > > X-Received-Date: Mon, 20 Mar 2006 20:00:23 PST (newsspool2.news.pas.earthlink.net)
    > >

    >
    > > I've written a patch for mutt that allows one to spell-check
    > > the subject line of a message. With the feature enabled,
    > > pressing "i" will first spell-check the subject, then
    > > spell-check the body of the letter.

    >
    > You are funny. You are using a common name for an alias and
    > posting through individual.net (a favorite of trolls because
    > it hides the identity of the poster) and are using an email
    > address at
    >
    > $ whois 65.98.21.108


    I post through my unix shell account; I don't know how the sys-admin has
    news set up.

    > OrgName: Pegasus Web Technologies
    >
    > Which has a website at http://lusars.net that has nothing
    > on it.


    A google search for Mike Hunter will reveal to you my lusArs.net
    homepage.

    > You must think that people are really stupid.
    >
    > That's a throwaway domain about as useful for identifying
    > someone as a gmail address.
    >
    > And you think that people are just going to install the
    > software you publish?


    I was hoping that tech-savvy people would review it and send me their
    comments. I think it's good to be careful about what software you run;
    in the case of this modest patch, it's small enough for people to do a
    reasonably thorough review of the code.

    > I'd guess that you are used to the mindless consumers
    > from the Windows world.


    [text from your other posts:]

    > Just to be thorough: This fellow should have sent the patch
    > to mutt.org for them to check out. If it was worthy and safe,
    > they'd put it up on the website.


    I'm planning to do that, I was hoping to get some feedback from some
    people first.

    > http://groups.google.com/advanced_group_search
    > Mike Hunter
    > Results 1 - 100 of 1,400 posts in the last year
    > 1 ZeeMail
    > 2 alt.autos
    > 13 alt.autos.ford
    > 14 alt.autos.gm
    > 1 alt.autos.pontiac
    > 4 alt.autos.studebaker
    > 53 alt.autos.toyota
    > 53 alt.autos.toyota
    > 1 comp.mail.mutt
    > 1 fa.openbsd.www
    > 1 lucky.freebsd.ports
    > 1 mailing.freebsd.mobile
    > 1 mailing.freebsd.ports
    > 1 mailing.freebsd.security
    > 1 mailing.freebsd.stable
    > 1 muc.lists.freebsd.hackers <<<<<<
    > 1 muc.lists.freebsd.ports
    > 1 rec.autos.4x4
    > 1 rec.autos.driving
    > 1 uk.rec.photo.misc
    >
    > A used car salesman and a hacker?


    freebsd.hackers is a technical mailing list about FreeBSD, and it uses
    the term hacker in the classic sense.

    > The last time he posted here, he had a different email address:
    >
    > From: Mike Hunter <mhunter+usenet@lusArs.net>
    > Newsgroups: comp.mail.mutt
    > Subject: Desperate to spell-check Subject line
    > Date: Mon, 06 Feb 2006 23:44:56 -0600
    > Message-ID: <slrndugcuo.iqu.mhunter@thirtyseven.lusars.net>


    Look up the term "plussed detail addressing"

    > Why? And why the empty website for at least 6 weeks? In a parent
    > domain devoted to web publishing?
    >
    > To use their mailserver, would be my guess. (If they entire
    > parent domain isn't his) Bet ya that mail from it does not
    > any posting IP but lusars.net.
    >
    > He may have good intentions in _this_ case, but I don't trust him
    > enough to install that patch.


    I don't expect anybody to trust me, I expect you to read the code. If
    you can't audit it and/or aren't interested in it, then don't install it.

    > He could vanish like he never existed. I was wrong in my first
    > post here. That domain (lusars.net) could vanish like it never
    > was in a blink. Gmail can't.
    >
    > Nor will I believe any possible sockpuppets that show up
    > vouching for him or the software.
    >
    > <snip>
    >
    > This fellow has got to be a spammer: He doesn't need to
    > spellcheck the body of the mail, because he didn't write it. It
    > came from some business that has hired him to spam for them.
    >
    > Just the subject line, which is all that he writes.
    >
    > He said that he didn't want to spellcheck with the editor that
    > Mutt calls, which certainly suggests that he doesn't have that
    > capability.
    >
    > Spammer.


    I'm starting to think I'm being trolled. Why would I use Mutt to spam
    with?

    > Bet he spams the people that post on those auto groups, just
    > for starters. And probably the groups themselves, using
    > different aliases and newsservers.
    >
    > I'd guess that he only connects to the Internet from a laptop
    > through various free wireless connections offered by businesses
    > all over the place. While he sits in a car or van.


    I have been trolled. Fuck.

    I guess people on usenet are smart enough to use killfiles to weed out
    they stuff that you post, but I must say that you're doing a disservice
    to this Mutt group or any technical discussion group by spewing your
    conspiracy-theory crapola all over the place. In all seriousness, if
    you cared about Mutt, you'd go bother a more receptive newsgroup.

    Mike

  7. Default Re: [patch] spellcheck subject line in mutt

    On 2006-03-21, Alan Connor <i3x9mdw@j9n35c.invalid> wrote:
    > On comp.mail.mutt, in <slrne1utdg.rjc.mhunter@thirtyseven.lusars.net>, "Mike Hunter" wrote:
    >>
    >> I've written a patch for mutt that allows one to spell-check
    >> the subject line of a message. With the feature enabled,
    >> pressing "i" will first spell-check the subject, then
    >> spell-check the body of the letter.

    >
    > You are funny. You are using a common name for an alias and
    > posting through individual.net (a favorite of trolls because
    > it hides the identity of the poster)


    Individual.net would seem a poor choice for trolls since
    they charge 10 EUR up front for a year's access and all
    they need is the (public) Message-ID to disable the account
    of a troll for AUP violation. In addition, they run a fairly
    aggressive [Cleanfeed][1] system.

    And surely all reputable Usenet service providers allow
    customers to decide whether or not to reveal their true
    identity when posting?

    [1]: http://www.exit109.com/~jeremy/news/cleanfeed/

    Ian

    --
    Ian Gregory
    http://www.zenatode.org.uk/ian/

  8. Default Re: spellcheck subject line in mutt

    You have mush in your head. It's 30 lines of code. READ IT. Mike
    Hunter may be a used car salesman hacker...but more likely a geek that
    drives a toyota.

    Oh...and count me a sock puppet, it just so happens that I've known him
    since I was 12...and he's been a lusAr almost as long.

    -me


  9. Default Re: [patch] spellcheck subject line in mutt

    On Tue, 21 Mar 2006 22:58:24 -0600, Mike Hunter wrote:

    > I guess people on usenet are smart enough to use killfiles to weed out
    > they stuff that you post, but I must say that you're doing a disservice to
    > this Mutt group or any technical discussion group by spewing your
    > conspiracy-theory crapola all over the place. In all seriousness, if you
    > cared about Mutt, you'd go bother a more receptive newsgroup.


    We seem to have acquired a resident weirdo, unfortunately. He does
    occasionally contribute something useful, though often it unnecessarily
    involves procmail for some reason.

    But he's best ignored when he starts wibbling about from addresses
    (particularly since his is invalid) and posting Google groups histories
    (which are usually wrong).

    --
    Paul

    If someone comes at you with a sword, run if you can. Kung Fu
    doesn't always work. -- Bruce Lee

  10. Default Re: [patch] spellcheck subject line in mutt

    "Alan"posted the following on 2006-03-21:

    > On comp.mail.mutt, in <slrne1vcjv.1bf.i3x9mdw@b29x3m.invalid>, "Alan Connor" wrote:
    >
    ><snip>
    >
    > This fellow has got to be a spammer: He doesn't need to
    > spellcheck the body of the mail, because he didn't write it. It
    > came from some business that has hired him to spam for them.
    >


    Lets see : this guy posts a patch for his favorite email
    client. Arguably to the wrong place : certainly other places would
    benefit too. You, on the other hand, post about 5 posts calling him a
    spammer and basically talking through your ass. Hmm. I wonder who
    people believe?


    > Just the subject line, which is all that he writes.
    >
    > He said that he didn't want to spellcheck with the editor that
    > Mutt calls, which certainly suggests that he doesn't have that
    > capability.
    >
    > Spammer.
    >
    > Bet he spams the people that post on those auto groups, just
    > for starters. And probably the groups themselves, using
    > different aliases and newsservers.
    >
    > I'd guess that he only connects to the Internet from a laptop
    > through various free wireless connections offered by businesses
    > all over the place. While he sits in a car or van.
    >
    > AC



    Now I get it : you're a parody of a a disturbed advocate. Hehe. Very,
    very well done.


    >



+ Reply to Thread
Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 05-02-2006, 09:25 PM
  2. When reading an e-mail in Mutt, how can I scroll line by line?
    By Application Development in forum Mutt
    Replies: 7
    Last Post: 07-22-2005, 04:10 PM
  3. Mutt appends a strange <tab> to Subject header with accents
    By Application Development in forum Mutt
    Replies: 12
    Last Post: 04-25-2005, 11:36 AM
  4. Subject Line Spellcheck?
    By Application Development in forum Mutt
    Replies: 2
    Last Post: 09-23-2004, 06:27 PM
  5. Mutt adds a subject line when replying
    By Application Development in forum Mutt
    Replies: 3
    Last Post: 07-16-2004, 08:21 AM