On Sat, Dec 06, 2003 at 07:14:20PM -0600, Eugene Lee wrote: > On Fri, Dec 05, 2003 at 07:28:11AM -0500, David Yitzchak Cohen wrote: > : On Thu, Dec 04, 2003 at 07:07:29PM -0600, Eugene Lee wrote: > : > On Thu, Dec 04, 2003 at 03:50:48PM +0100, Michael Tatge wrote: > : > : * On Thu, Dec 04, 2003 Eugene Lee (list-mutt@xxxxxxxx) muttered: > : > : > > : > : > send-hook . 'set from=me@xxxxxxxxxx' > : > : > send-hook '~C abuse@xxxxxxx' 'set from=me+aol@xxxxxxxxxx' > : > : > : > : use my_hdr > : > : > : > : set from = me@xxxxxxxxxx > : > : send-hook . 'unmy_hdr from' > : > : send-hook '~C abuse@xxxxxxx' 'my_hdr From: me+aol@xxxxxxxxxx' > : > > : > Michael (and Noir), thanks for your comments. I know that my_hdr works. > : > But I don't understand why "set $from" does not work in a send-hook. > : > : In plain English, changing $from in a send-hook has no effect on the > : message being composed because Mutt has already set your From: header > : before it executes the send-hook (based on what $from was then - i.e., > : before your hook was called). > > This behavior is not explained in the normal HTML documentation. You must be right. I can't find it now :-( > : my_hdr works because it simply replaces > : any existing header by the same name - in this case, the "From: " header. > : > : > The docs mention nothing. > : > : The docs specifically mention that changing $from has no effect on the > : current message from within send-hooks. > > I can't find anything in the docs that support this statement, even > though your statement is true. :-( In fact, the docs only have a > statement about using my_hdr: > > http://www.mutt.org/doc/manual/manual-3.html#send-hook > > Also note that my_hdr commands which modify recipient headers, > or the message's subject, don't have any effect on the current > message when executed from a send-hook. Yup, that's all I was able to find now trying to look through the docs. That is really annoying. . . > : > The problem is, since setting $from is unreliable while "my_hdr From:" > : > always works, what's the point of keeping this configuration variable? > : > Get rid of what's broken and keep what works. > : > : There, you have a feature request. I'd rather keep both, but fix > : evaluation of send-hooks so they happen before the "From: " header is > : constructed. The only problem is that doing so would prevent us from > : being able to match on the "From: " header in a send-hook (since the > : header wouldn't exist yet). The "correct" solution is difficult to work > : out, IMHO. There are too many overlapping feature requests, and many of > : them are incompatible by design. > > I can see how it gets complicated. Without looking into the bowels of > the source, I can't even imagine what the "correct" solution should be. > But I do know that setting $from in a send-hook seems to be a recurring > question. I think it would be very useful if the official docs would > specifically mention this caveat. ...and if they already mention it somewhere (which I _thought_ they did), could they please make that somewhere a tad easier to find??? > So what's the best way to request and correct a documentation bug? the flea program, along with a patch in the comments section, or attached If you mail me the text you want to add, I'll make a diff against the CVS docs and submit the bug report, and run after the devs to get it applied ASAP. I was under the impression that this little tidbit was already in there. > : > Just a bit confused since the docs (short of parsing the source code) > : > doesn't match behavior. Maybe I should file a bug report? > : > : You can certainly file a wishlist, but since the docs _do_ predict this > : behavior, it's not technically a "bug" as such. (It's simply a documented > : "feature" - and a rather annoying one, at that.) > > I must be blind, because I cannot find anything in the docs that even > predicts this behavior. Could you possible provide a link to the blurb > in the docs that says so? Sadly, I must be blind too :-( Sorry, - Dave -- Uncle Cosmo, why do they call this a word processor? It's simple, Skyler. You've seen what food processors do to food, right? Please visit this link: http://rotter.net/israel
Attachment:
pgpDkulRvRKEr.pgp
Description: PGP signature