[gnu.emacs.gnus] Bug fix for a couple of 3.10 problems

karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) (11/16/88)

Two things about 3.10.

First, in the Path: header, We Believe In Domains, and we like all
host references to show up with fully-qualified domain names.

Actually, I would argue that GNUS shouldn't be messing with Path: at
all, since Path: is correctly created by whichever version of inews is
in use.  A similar thought applies to Message-Id; why does GNUS
bother, when inews builds a correct Message-Id?

Second, since inews (both NNTP and local, direct versions) include
.signature files, it seems inappropriate for GNUS to include them as
well, since it will cause doubled signature inclusions.
Per-distribution .signatures might be nice, but they rather conflict
with normal inews activities.

Context diff follows to correct these items.

These minor matters aside, I'm quite impressed and I like GNUS a lot.

--Karl

*** gnus.el.~1~ Tue Nov 15 15:56:52 1988
--- gnus.el     Wed Nov 16 09:05:47 1988
***************
*** 4823,4833 ****
        (if (file-exists-p (concat signature "-" distribution))
          (setq signature (concat signature "-" distribution)))
        ;; Insert signature.
!       (if (file-exists-p signature)
!         (progn
!           (goto-char (point-max))
!           (insert "--\n")
!           (insert-file-contents signature)))
        ;; Prepare article headers.
        (save-restriction
        (goto-char (point-min))
--- 4823,4833 ----
        (if (file-exists-p (concat signature "-" distribution))
          (setq signature (concat signature "-" distribution)))
        ;; Insert signature.
! ;;    (if (file-exists-p signature)
! ;;      (progn
! ;;        (goto-char (point-max))
! ;;        (insert "--\n")
! ;;        (insert-file-contents signature)))
        ;; Prepare article headers.
        (save-restriction
        (goto-char (point-min))
***************
*** 4926,4932 ****
           (organization (or (getenv "ORGANIZATION") gnus-your-organization)))
        ;; Insert from top of headers.
        (goto-char (point-min))
!       (insert "Path: " gnus-nntp-server "!" gnus-user-login-name "\n"
              "From: " (gnus-inews-user-name)
              (if (or (string-equal gnus-user-full-name "")
                      (string-equal gnus-user-full-name "&"))
--- 4926,4933 ----
           (organization (or (getenv "ORGANIZATION") gnus-your-organization)))
        ;; Insert from top of headers.
        (goto-char (point-min))
!       (insert "Path: " (gnus-inews-domain-name gnus-use-generic-from)
!             "!" gnus-user-login-name "\n"
              "From: " (gnus-inews-user-name)
              (if (or (string-equal gnus-user-full-name "")
                      (string-equal gnus-user-full-name "&"))
-=-
"He even writes obnoxious LISP CODE!"
	-- A local Lisp hacker and AI expert, having tried
	   (thus far unsuccessfully) to bring up Gnews 2.0.

umerin@UUNET.UU.NET (Masanobu UMEDA) (11/17/88)

   Date: 16 Nov 88 14:32:45 GMT
   From: flab!fgw!uunet!triceratops.cis.ohio-state.edu!karl  (Karl Kleinpaste)
   Organization: OSU

   First, in the Path: header, We Believe In Domains, and we like all
   host references to show up with fully-qualified domain names.

   Actually, I would argue that GNUS shouldn't be messing with Path: at
   all, since Path: is correctly created by whichever version of inews is
   in use.  A similar thought applies to Message-Id; why does GNUS
   bother, when inews builds a correct Message-Id?

RFC977 said:

** If posting is permitted, the article should be presented in the
** format specified by RFC850, and should include all required header
** lines.

RFC1036 (which obsoletes RFC850) said:

**                     The required header lines are "From", "Date",
** "Newsgroups", "Subject", "Message-ID", and "Path".

That's why GNUS does it by itself.

   Second, since inews (both NNTP and local, direct versions) include
   .signature files, it seems inappropriate for GNUS to include them as
   well, since it will cause doubled signature inclusions.
   Per-distribution .signatures might be nice, but they rather conflict
   with normal inews activities.

An NNTP inews appends .signature unconditionally. That's why you get
confused. At least, I have no problems with posting with POST command
of NNTP and real local inews.

Do I have to introduce new variable, gnus-append-signature-p or
something like that?

Masanobu UMEDA
umerin@flab.flab.Fujitsu.JUNET
umerin%flab.flab.Fujitsu.JUNET@uunet.uu.NET

karl@triceratops.cis.ohio-state.edu (Karl Kleinpaste) (11/18/88)

kddlab!photon.stars.flab.fujitsu.junet!umerin@UUNET.UU.NET writes:
   RFC977 said:
   ** If posting is permitted, the article should be presented in the
   ** format specified by RFC850, and should include all required header
   ** lines.
   RFC1036 (which obsoletes RFC850) said:
   ["required" == "From" "Date" "Newsgroups" "Subject" "Message-ID" "Path"]

   That's why GNUS does it by itself.

I think you missed my point - I was not clear.  Let me try again.

You appear to implement the NNTP connection directly when operating
with a true NNTP host.  Hence, you must of course format all the
required lines in that case, since you have taken over what is
otherwise the responsibility of an NNTP inews.

We are operating with /usr/{lib,spool}/news NFS-mounted from a server,
and use an NNTP inews for posting.  This is essentially identical to a
strictly local spool arrangement from external appearances.  So in
this case, you call inews to do the dirty work.  Both flavors of inews
will format correct headers for everything except From:, Newsgroups:,
and Subject: lines; that is, the NNTP inews (in my case) takes
responsibility for formatting everything that the NNTP server requires
except those 3 lines.  Hence, I would say that only those 3 are
necessary for GNUS to format.

One might argue that, since NNTP inews and server do not format a
Message-ID: but instead depend on the inews on the server to add it,
that the normal NNTP inews and server programs are not operating in
comformance with the RFC.  It does format the Path: correctly, though.

(Of course, it's entirely likely that I'm just a seriously confused
individual.  Please feel free to correct my misunderstandings.)

   An NNTP inews appends .signature unconditionally. That's why you get
   confused. At least, I have no problems with posting with POST command
   of NNTP and real local inews.
   Do I have to introduce new variable, gnus-append-signature-p or
   something like that?

I don't think I understand.  A real local inews would include
.signature, and your lisp code does so as well; wouldn't you get a
doubled .signature in the local case?  That is essentially what I
(appear to) have, and I very definitely got doubled .signature without
the commented-out patch I posted.

--Karl
-=-
"He even writes obnoxious LISP CODE!"
	-- A local Lisp hacker and AI expert, having tried
	   (thus far unsuccessfully) to bring up Gnews 2.0.