Gnus development mailing list
 help / color / mirror / Atom feed
From: Hrvoje Niksic <hniksic@xemacs.org>
Subject: Two gnus-posting-styles problems
Date: Mon, 03 Jun 2002 16:55:31 +0200	[thread overview]
Message-ID: <sxs4rgk9zto.fsf@florida.munich.redhat.com> (raw)

1. It's unclear exactly what a HEADER match in fact matches.  First I
   thought it matches the header in the message buffer.  I thought
   this would work:

     ;; Use Red Hat address when responding to Red Hat people.
     ((header "to" "redhat.com")
      (address "hniksic@redhat.com"))

   But it doesn't, because it matches the "gnus article copy" buffer.

1a. Even worse, it uses the "gnus article copy" buffer even when it is
    completely unrelated to the message currently being composed.  For
    example, I pressed `a' or `m' in the Summary buffer and was trying
    to figure out why the hell it thought that the Red Hat address
    should be used.  It turned out that my old "gnus article copy"
    buffer happened addressed to a Red Hat person.

2. I tried to fix #1 by explicitly matching the stuff from the Message
   buffer, like this:

     ((and (message-fetch-field "to")
           (string-match "redhat\\.com" (message-fetch-field "to")))
      (address "hniksic@redhat.com"))

   But that didn't work because `gnus-configure-posting-styles' is
   called from `message-mode-hook', which gets run when the Message
   buffer is still completely empty.  It should be called at a later
   stage, when the buffer has already been set up.

   The code that manages various hooks in gnus-setup-message and
   gnus-configure-posting-styles appeared quite convoluted, so I
   didn't dare try the "obvious" changes.

Has anyone else stumbled upon these problems?  Am I the only one who
is trying to use `gnus-posting-styles' in this way?

As a workaround, I think I'll just revert to using a good ol' hook.



             reply	other threads:[~2002-06-03 14:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-03 14:55 Hrvoje Niksic [this message]
2002-06-03 15:04 ` Paul Jarc
2002-06-03 15:36 ` David S Goldberg
2002-06-03 17:40 ` Simon Josefsson
2002-06-03 17:49   ` Hrvoje Niksic
2002-06-03 18:23     ` Simon Josefsson
2002-06-03 19:48       ` Kai Großjohann
2002-06-04 13:48       ` Hrvoje Niksic
2002-06-04 16:07         ` Simon Josefsson
2002-06-03 19:45 ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sxs4rgk9zto.fsf@florida.munich.redhat.com \
    --to=hniksic@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).