[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] I did something wrong with replcomps

From: David Levine
Subject: Re: [Nmh-workers] I did something wrong with replcomps
Date: Mon, 19 Dec 2016 15:54:43 -0500

Ken wrote:

> Hm.  Since most of the time you end up in an editor, will the user
> see the message or will it be erased by the editor when it clears the
> screen?

That could happen, but that's true of any nmh warning message that
appears before the edit.  (This isn't a problem with an editor that
pops up in its own window, but of course we can't depend on that.)

> >It isn't.  Unfortunately, that code is reached after fmt_compile()
> >is called, so it has no effect on the fmt_scan().
> I think that shouldn't matter, right?  Modifying the component values
> can happen easily after fmt_compile() is called (that's the normal
> way to do it).

It matters.  Component values can be modified, as you say.  But, a
formatting instruction (struct format) can't easily be added.

As I'm sure you'll recall :-), fmt_compile() calloc's a bunch of
struct format's, then fills some or all of them in.  They're in
contiguous memory, not a linked list.  We could look to see if
there's an unsed one at the end, and if so, copy the last one to it
and slip the new one in.  If no room, we'd have to calloc n+1, copy
all, and insert.

And that still wouldn't solve the problem of not passing an Fcc: from
a replied-to message.  Though a warning wouldn't either, I don't think
it's worth adding code that mucks around with format instructions if
we're not going to fix that.

And, there's the point that kre raised about users possibly depending
on the -form switch to disable or modify the fcc.  They might not like
the warning, but it would be accurate.  And their profile, components
files, scripts, etc., would still work.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]