Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Stripping double signatures
@ 2002-04-17 20:13 ireneo.funes
  2002-04-17 21:51 ` Reiner Steib
  2002-04-18 11:55 ` Reiner Steib
  0 siblings, 2 replies; 3+ messages in thread
From: ireneo.funes @ 2002-04-17 20:13 UTC (permalink / raw)


On a mailing list, I get messages with signatures as follows:

| -- 
| <user signature>
| 
| 
| -- 
| To UNSUBSCRIBE, email to...

When I reply to such emails, only the latter sign gets stripped. Same
problem for what concerns proper face displaying.

Although being an elisp total beginner, I've tweaked message and
gnus-art this way:

*** message.el.old
--- message.el
***************
*** 1979,1986 ****
      (mml-quote-region start end)
      ;; Allow undoing.
      (undo-boundary)
!     (goto-char end)
!     (when (re-search-backward message-signature-separator start t)
        ;; Also peel off any blank lines before the signature.
        (forward-line -1)
        (while (looking-at "^[ \t]*$")
--- 1979,1986 ----
      (mml-quote-region start end)
      ;; Allow undoing.
      (undo-boundary)
!     (goto-char start)
!     (when (re-search-forward message-signature-separator end t)
        ;; Also peel off any blank lines before the signature.
        (forward-line -1)
        (while (looking-at "^[ \t]*$")

*** gnus-art.el.old
--- gnus-art.el
***************
*** 1925,1936 ****
    "Search the current buffer for the signature separator.
  Put point at the beginning of the signature separator."
    (let ((cur (point)))
!     (goto-char (point-max))
      (if (if (stringp gnus-signature-separator)
!           (re-search-backward gnus-signature-separator nil t)
          (let ((seps gnus-signature-separator))
            (while (and seps
!                       (not (re-search-backward (car seps) nil t)))
              (pop seps))
            seps))
        t
--- 1925,1936 ----
    "Search the current buffer for the signature separator.
  Put point at the beginning of the signature separator."
    (let ((cur (point)))
!     (goto-char (point-min))
      (if (if (stringp gnus-signature-separator)
!           (re-search-forward gnus-signature-separator nil t)
          (let ((seps gnus-signature-separator))
            (while (and seps
!                       (not (re-search-forward (car seps) nil t)))
              (pop seps))
            seps))
        t


Was there a better/easier way to do it?

It works fine, so far. Could I get some kind of side effects?


Thanks for your attention, bye!

-- 
Q: How many University of Chicago Economics professors does it take to
   change a light bulb?
A: None.  If the bulb needed fixing the market would have done it.


-- 
just in case you want to give it a try...


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

* Re: Stripping double signatures
  2002-04-17 20:13 Stripping double signatures ireneo.funes
@ 2002-04-17 21:51 ` Reiner Steib
  2002-04-18 11:55 ` Reiner Steib
  1 sibling, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2002-04-17 21:51 UTC (permalink / raw)


On Wed, Apr 17 2002, ireneo funes wrote:

> On a mailing list, I get messages with signatures as follows:
>
> | -- 
> | <user signature>
> | 
> | 
> | -- 
> | To UNSUBSCRIBE, email to...
>
> When I reply to such emails, only the latter sign gets stripped. Same
> problem for what concerns proper face displaying.

Adding `(banner . signature)' to the group parameters of this group
should do the trick. To do this, type `G p' in the Summary buffer (on
the desired group), add the above text and type `C-c C-c'. (Or use `G
c' if you prefer using Customize.)

Ciao, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/


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

* Re: Stripping double signatures
  2002-04-17 20:13 Stripping double signatures ireneo.funes
  2002-04-17 21:51 ` Reiner Steib
@ 2002-04-18 11:55 ` Reiner Steib
  1 sibling, 0 replies; 3+ messages in thread
From: Reiner Steib @ 2002-04-18 11:55 UTC (permalink / raw)


On Wed, Apr 17 2002, ireneo funes wrote:

[...]
> When I reply to such emails, only the latter sign gets stripped. Same
> problem for what concerns proper face displaying.
>
> Although being an elisp total beginner, I've tweaked message and
> gnus-art this way:
>
> *** message.el.old
> --- message.el
[...]
> !     (goto-char end)
> !     (when (re-search-backward message-signature-separator start t)
[...]
> !     (goto-char start)
> !     (when (re-search-forward message-signature-separator end t)
[...]
> Was there a better/easier way to do it?
>
> It works fine, so far. Could I get some kind of side effects?

AFAIK, some RFC (number?) says, that the _last_ part of an article
that is separated by "\n-- \n" is the signature. So your approach is
wrong. Gnus is doing the right thing. ;-)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/


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

end of thread, other threads:[~2002-04-18 11:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-17 20:13 Stripping double signatures ireneo.funes
2002-04-17 21:51 ` Reiner Steib
2002-04-18 11:55 ` Reiner Steib

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