Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* posting-styles not working
@ 2002-04-09  0:28 William Daffer
  2002-04-09 17:37 ` Raymond Scholz
  0 siblings, 1 reply; 2+ messages in thread
From: William Daffer @ 2002-04-09  0:28 UTC (permalink / raw)



Gents;

  I've been unable to get either gnus-posting-styles or a group
  specifc posting-styles to work.

  My setup:

  GNU Emacs 20.7.1 (i386-redhat-linux-gnu, X toolkit) 
      of Mon Jul 30 2001 on stripples.devel.redhat.com

  "Gnus v5.8.8"

  I want to be able to match a .sig file with the poster to whom I'm
  replying. I'm using the advanced random signature file generator
  adv-random.el from Raymond Scholz, it choses from the files in
  the directory indicated by the last parameter passed to the
  function.

  gnus-posting-styles is:

 (setq gnus-posting-styles
    '(
      (".*"
       (signature (adv-random-signature-no-sep "misc"))
       (name "William Daffer")
       )
      ((message-mail-p)
       (address "whdaffer@attbi.com"))
      ((message-news-p)
       (signature (adv-random-signature-no-sep "devdict"))
       (address "whdaffer@wabcmail.com"))
      ("a\.\newsgroup"
       (signature (adv-random-signature-no-sep "a-r"))
       (organization "Amateur denier debunker"))
      (header "From" ".*moran.*"
	      (signature
	       (adv-random-signature-no-sep "moran"))
      )
    )


  The problem is the 'header' matches. They don't work and I always
  end up with a default signature from 'a-r' (the poster I'm
  addressing with the `header' match posts to 'a.newsgroup', so the
  header match should have the effect of changing the directory where
  adv-random-signature-no-sep looks for a .sigfile in that newsgroup).

  I've checked in the article buffer that the regex matches the poster
  I want to target. The directory exists and has one .sigfile in it
  for testing purposes, so I won't miss a successful match.

  I've tried to discover the problem by stepping through
  gnus-confgure-posting-styles using edebug and the best that I can
  determine is that the search for the header is occuring in the reply
  buffer, which at the time of the search is empty. But even the
  headers of the reply buffer wouldn't be right, it needs to search
  against the original article. In my meandering through the nether
  regions of this code I have seen a copy of the article stuck in a
  buffer and that buffer is used on the fly, for purposes I can't
  remember, and it seems to me this should be the buffer gnus should
  be searching, but everytime I stop in gnus-configure-posting-styles
  it's the empty reply buffer that's current.


  What am I missing here?

TIA

William Daffer
-- 
LEGACY, n.  A gift from one who is legging it out of this vale of 
tears.
	-- Ambrose Bierce: _The Devil's Dictionary_


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: posting-styles not working
  2002-04-09  0:28 posting-styles not working William Daffer
@ 2002-04-09 17:37 ` Raymond Scholz
  0 siblings, 0 replies; 2+ messages in thread
From: Raymond Scholz @ 2002-04-09 17:37 UTC (permalink / raw)


William Daffer <whdaffer@wabcmail.com> writes:

>   I want to be able to match a .sig file with the poster to whom I'm
>   replying. I'm using the advanced random signature file generator
>   adv-random.el from Raymond Scholz, it choses from the files in
>   the directory indicated by the last parameter passed to the
>   function.

You might have a look at randomsig.el by Hans-Jürgen Ficker
<URL:http://www.backmes.de/scripts+programs/randomsig.el> which
can be used as a drop-in replacement for my ugly hack...

>       (header "From" ".*moran.*"
> 	      (signature
> 	       (adv-random-signature-no-sep "moran"))

Try 

             ((header "from" ".*moran.*")
              	    (signature
 	             (adv-random-signature-no-sep "moran")))

I think this was a documentation bug in Gnus which has been fixed for
the latest development version.

>   I've tried to discover the problem by stepping through
>   gnus-confgure-posting-styles using edebug and the best that I can
>   determine is that the search for the header is occuring in the reply
>   buffer, which at the time of the search is empty. 

Yes, this is a feature.  You might try header-action.el by Holger
Schauer which operates on the original article buffer instead.

Cheers, Ray
-- 
"I heard if you play the NT-4.0-CD  backwards, you get a satanic message."
  "Thats nothing, if you play it forward, it installs NT-4.0"


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-09 17:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-09  0:28 posting-styles not working William Daffer
2002-04-09 17:37 ` Raymond Scholz

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).