From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45102 Path: main.gmane.org!not-for-mail From: Hrvoje Niksic Newsgroups: gmane.emacs.gnus.general Subject: Re: Two gnus-posting-styles problems Date: Tue, 04 Jun 2002 15:48:40 +0200 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1023198636 26547 127.0.0.1 (4 Jun 2002 13:50:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 4 Jun 2002 13:50:36 +0000 (UTC) Cc: ding@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17FEho-0006u3-00 for ; Tue, 04 Jun 2002 15:50:36 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17FEgh-0003YI-00; Tue, 04 Jun 2002 08:49:27 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 04 Jun 2002 08:49:42 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id IAA02862 for ; Tue, 4 Jun 2002 08:49:30 -0500 (CDT) Original-Received: (qmail 7856 invoked by alias); 4 Jun 2002 13:49:09 -0000 Original-Received: (qmail 7846 invoked from network); 4 Jun 2002 13:49:08 -0000 Original-Received: from unknown (HELO florida.munich.redhat.com) (212.84.246.77) by gnus.org with SMTP; 4 Jun 2002 13:49:08 -0000 Original-Received: from hniksic by florida.munich.redhat.com with local (Exim 3.35 #1 (Debian)) id 17FEfw-0007xY-00; Tue, 04 Jun 2002 15:48:40 +0200 Original-To: bugs@gnus.org (The Gnus Bugfixing Girls + Boys) X-Attribution: Hrvoje X-Face: &{dT~)Pu6V<0y?>3p$;@vh\`C7xB~A0T-J%Og)J,@-1%q6Q+, gs<-9M#&`I8cJp2b1{vPE|~+JE+gx;a7%BG{}nY^ehK1"q#rG O,Rn1A_Cy%t]V=Brv7h (Simon Josefsson's message of "Mon, 03 Jun 2002 20:23:25 +0200") Original-Lines: 57 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i686-pc-linux) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45102 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45102 Simon Josefsson writes: >> I have yet to try your patch. Can you explain what it is supposed >> to do? I'm not sure I understand the intention from reading the >> patch. > > I see now that the patch accidently included an unrelated patch. > The point of the patch was simply to bind gnus-article-copy to nil > in all places where you aren't following up or replying to an > article -- e.g., when pressing `a' or `m'. If the variable is nil, > the posting styles code won't use the last viewed buffer. I see. That should work, yes. But I won't test it for some time simply because I really need the functionality to test the message buffer. If that can't be done with the posting styles, then I'll just use a hook. Perhaps I'm simply not the right target audience for posting styles. >>> There's a dependency problem here, not all functions that use >>> information from the message buffer and modify the contents of the >>> message buffer can be called last. I think the ordering has changed >>> several times, but it won't ever satisfy everyone. I think the >>> approach should be that you shouldn't count on information being >>> available in the message buffers unless... err, it is available. >> >> I'm not sure I understand this. Why can't it satisfy everyone? What >> is the position opposite to mine? > > There are alot of hooks and functions that people use to populate > message buffers: message-mode-hook, message-setup-hook, > gnus-message-setup-hook, gnus-posting-styles, making user-mail-address > context sensitive, defadvice etc. If we change the ordering the way > you want, the posting style is applied last, which makes it possible > to extract To/From etc from the newly composed message. But the same > change will affect code added to, say, message-setup-hook, since it no > longer can extract the fields added by the posting styles code. I suppose the posting styles could be applied before the message-setup-hook is run. But Kai has a good point: doing what I want might seriously clash with `message-generate-headers-first'. I do not see a way to resolve that, so I'll just keep my hook. At least the `m'/`a' thing, which was a genuine bug, should now be fixed, so something good came out of my report. Thanks for the fix. > That said, perhaps changing it to apply posting styles last is good, > but it seems difficult to tell what harm to people's customizations > it will generate. Leaving it as is doesn't hurt anything, Well. There *could* be a variable that controls when `gnus-posting-styles' are applied. It could default to applying it in the empty message buffer, which would make sure that existing customizations keep working.