Gnus development mailing list
 help / color / mirror / Atom feed
* test: empty line missed
@ 1998-09-16 15:16 zsh
  1998-09-19 12:10 ` Lars Magne Ingebrigtsen
  1998-09-22  1:48 ` Matt Armstrong
  0 siblings, 2 replies; 9+ messages in thread
From: zsh @ 1998-09-16 15:16 UTC (permalink / raw)


test

You should find a "test" at the top of this article body.


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

* Re: test: empty line missed
  1998-09-16 15:16 test: empty line missed zsh
@ 1998-09-19 12:10 ` Lars Magne Ingebrigtsen
  1998-09-19 22:58   ` Matt Armstrong
  1998-09-22  1:48 ` Matt Armstrong
  1 sibling, 1 reply; 9+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-09-19 12:10 UTC (permalink / raw)


zsh@cs.rochester.edu writes:

> test
> 
> You should find a "test" at the top of this article body.

Yes, that's right.  Is this a bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: test: empty line missed
  1998-09-19 12:10 ` Lars Magne Ingebrigtsen
@ 1998-09-19 22:58   ` Matt Armstrong
  1998-09-21 15:29     ` Lee Willis
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Armstrong @ 1998-09-19 22:58 UTC (permalink / raw)


Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> zsh@cs.rochester.edu writes:
> 
> > test
> > 
> > You should find a "test" at the top of this article body.
> 
> Yes, that's right.  Is this a bug?

Using pgnus-0.31 I don't see "test," so it is at least a bug in 0.31.

The original message was:

> From: zsh@cs.rochester.edu
> Subject: test: empty line missed
> Message-Id: <199809161516.LAA01906@whiskey.cs.rochester.edu>
> Mime-Version: 1.0
> Content-Type: text/plain
> Content-Transfer-Encoding: base64
> User-Agent: Generated by hand for test
> Subject: test: empty line missed
> Apparently-To: ding@gnus.org
> Sender: owner-ding@hpc.uh.edu
> Precedence: list
> X-Majordomo: 1.94.jlt7
> Status: U
> 
> dGVzdAoKWW91IHNob3VsZCBmaW5kIGEgInRlc3QiIGF0IHRoZSB0b3Agb2YgdGhpcyBhcnRp
> Y2xlIGJvZHkuCg==


Which was decoded by pgnus as:

> From: zsh@cs.rochester.edu
> Subject: test: empty line missed
> Message-Id: <199809161516.LAA01906@whiskey.cs.rochester.edu>
> Mime-Version: 1.0
> Content-Type: text/plain
> Content-Transfer-Encoding: base64
> User-Agent: Generated by hand for test
> Sender: owner-ding@hpc.uh.edu
> Precedence: list
> X-Majordomo: 1.94.jlt7
> Status: U
> Lines: 4
> Xref: ultraman.geoworks.com list.ding:5301
> test
> 
> You should find a "test" at the top of this article body.


So the "test" line is not displayed.


-- 
matta



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

* Re: test: empty line missed
  1998-09-19 22:58   ` Matt Armstrong
@ 1998-09-21 15:29     ` Lee Willis
  1998-09-21 16:06       ` Vladimir Volovich
  1998-09-22  1:55       ` Matt Armstrong
  0 siblings, 2 replies; 9+ messages in thread
From: Lee Willis @ 1998-09-21 15:29 UTC (permalink / raw)


Matt Armstrong <matta@geoworks.com> writes:

> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> 
> > zsh@cs.rochester.edu writes:
> > 
> > > test
> > > 
> > > You should find a "test" at the top of this article body.
> > 
> > Yes, that's right.  Is this a bug?
> 
> Using pgnus-0.31 I don't see "test," so it is at least a bug in 0.31.

Well i'm using 0.31 as well and can see it fine ...

Something in your gnus-article-display-hook perhaps ..

I had similar problems a while ago which turned out to be due to me
having all sorts of gumph in my display-hook.  All I have now is

gnus-article-display-hook's value is 
(gnus-article-hide-headers-if-wanted
 gnus-article-hide-boring-headers
 gnus-article-hide-pgp
 gnus-article-date-lapsed
 gnus-article-treat-overstrike
 gnus-article-highlight
 gnus-article-emphasize
 gnus-article-display-x-face)

Lee.
-- 
I was doing object-oriented assembly at 1 year old ...  
For some reason my mom insists on calling it "Playing with blocks"


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

* Re: test: empty line missed
  1998-09-21 15:29     ` Lee Willis
@ 1998-09-21 16:06       ` Vladimir Volovich
  1998-09-22  8:12         ` Lee Willis
  1998-09-22  1:55       ` Matt Armstrong
  1 sibling, 1 reply; 9+ messages in thread
From: Vladimir Volovich @ 1998-09-21 16:06 UTC (permalink / raw)


"LW" == Lee Willis writes:

 >> Using pgnus-0.31 I don't see "test," so it is at least a bug in
 >> 0.31.

 LW> Well i'm using 0.31 as well and can see it fine ...

Are you sure that decoding from base64 was made by gnus? In my case,
the original message contained the following headers:

Content-Type: text/plain
User-Agent: Generated by hand for test
Subject: test: empty line missed
Apparently-To: ding@gnus.org
Sender: owner-ding@hpc.uh.edu
Precedence: list
X-Majordomo: 1.94.jlt7
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by vvv.vsu.ru id UAA12807

Note the last line, which means that my MTA converted base64 to
8bit. Perhaps, you have the similar setup. I did not try to `teach' my
sendmail to not do any reencoding, but i assume that if *gnus* will
decode from base64, then the problem will arise (i.e. the empty line
between headers and body will be missed).

	Best regards, -- Vladimir.
-- 
Remember: use logout to logout.


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

* Re: test: empty line missed
  1998-09-16 15:16 test: empty line missed zsh
  1998-09-19 12:10 ` Lars Magne Ingebrigtsen
@ 1998-09-22  1:48 ` Matt Armstrong
  1 sibling, 0 replies; 9+ messages in thread
From: Matt Armstrong @ 1998-09-22  1:48 UTC (permalink / raw)


zsh@cs.rochester.edu writes:

> test
> 
> You should find a "test" at the top of this article body.

This fixes it for me (as a patch to pgnus-0.31).

As Vladimir Volovich mentioned, others may not be seeing this problem
if their MTA automatically decodes base64 Content-Transfer-Encoding.

article-decode-charset narrows the region to the headers, then passes
the rest to mm-decode-body.  mm-decode-body assumes the entire
narrowed region is the body, so it feels free to clobber the the first
blank line.  But the first blank line separates the headers from the
body.

The fix is to just step past the blank line before narrowing so
mm-decode-body can't mess with it.  Not as obvious as a
message-narrow-to-body function, but it works.


*** gnus-art.el.orig    Mon Sep 21 18:30:55 1998
--- gnus-art.el Mon Sep 21 18:34:15 1998
***************
*** 960,1007 ****
--- 960,1008 ----
  (defun article-decode-charset (&optional prompt)
    "Decode charset-encoded text in the article.
  If PROMPT (the prefix), prompt for a coding system to use."
    (interactive "P")
    (save-excursion
      (save-restriction
        (message-narrow-to-head)
        (let* ((inhibit-point-motion-hooks t)
             (ct (message-fetch-field "Content-Type" t))
             (cte (message-fetch-field "Content-Transfer-Encoding" t))
             (ctl (and ct (condition-case ()
                              (mail-header-parse-content-type ct)
                            (error nil))))
             (charset (cond
                       (prompt
                        (mm-read-coding-system "Charset to decode: "))
                       (ctl
                        (mail-content-type-get ctl 'charset))
                       (gnus-newsgroup-name
                        (gnus-group-find-parameter
                         gnus-newsgroup-name 'charset))))
             buffer-read-only)
        (goto-char (point-max))
        (widen)
+       (forward-line 1)
        (narrow-to-region (point) (point-max))
        (when (or (not ct)
                  (equal (car ctl) "text/plain"))
          (mm-decode-body
           charset (and cte (intern (downcase
                                     (gnus-strip-whitespace cte))))))))))

-- 
matta



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

* Re: test: empty line missed
  1998-09-21 15:29     ` Lee Willis
  1998-09-21 16:06       ` Vladimir Volovich
@ 1998-09-22  1:55       ` Matt Armstrong
  1 sibling, 0 replies; 9+ messages in thread
From: Matt Armstrong @ 1998-09-22  1:55 UTC (permalink / raw)


Lee Willis <lee@gbdirect.co.uk> writes:

> Matt Armstrong <matta@geoworks.com> writes:
> 
> > Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> > 
> > > zsh@cs.rochester.edu writes:
> > > 
> > > > test
> > > > 
> > > > You should find a "test" at the top of this article body.
> > > 
> > > Yes, that's right.  Is this a bug?
> > 
> > Using pgnus-0.31 I don't see "test," so it is at least a bug in 0.31.
> 
> Well i'm using 0.31 as well and can see it fine ...
> 
> Something in your gnus-article-display-hook perhaps ..
> 
> I had similar problems a while ago which turned out to be due to me
> having all sorts of gumph in my display-hook.  All I have now is
> 
> gnus-article-display-hook's value is 
> (gnus-article-hide-headers-if-wanted
>  gnus-article-hide-boring-headers
>  gnus-article-hide-pgp
>  gnus-article-date-lapsed
>  gnus-article-treat-overstrike
>  gnus-article-highlight
>  gnus-article-emphasize
>  gnus-article-display-x-face)

I have "stock" display hooks, but in playing around with things I
found this teensy bug in mm-bodies.el.


*** mm-bodies.el.orig   Mon Sep 21 15:46:46 1998
--- mm-bodies.el        Mon Sep 21 15:50:43 1998
***************
*** 25,31 ****
  ;;; Code:

  (eval-and-compile
!   (or (fboundp  'base64-encode-region)
        (autoload 'base64-decode-region "base64" nil t)))
  (require 'mm-util)
  (require 'rfc2047)
--- 25,31 ----
  ;;; Code:

  (eval-and-compile
!   (or (fboundp  'base64-decode-region)
        (autoload 'base64-decode-region "base64" nil t)))
  (require 'mm-util)
  (require 'rfc2047) 

-- 
matta



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

* Re: test: empty line missed
  1998-09-21 16:06       ` Vladimir Volovich
@ 1998-09-22  8:12         ` Lee Willis
  1998-09-22 11:03           ` François Pinard
  0 siblings, 1 reply; 9+ messages in thread
From: Lee Willis @ 1998-09-22  8:12 UTC (permalink / raw)


Vladimir Volovich <vvv@vvv.vsu.ru> writes:

> "LW" == Lee Willis writes:
> 
>  >> Using pgnus-0.31 I don't see "test," so it is at least a bug in
>  >> 0.31.
> 
>  LW> Well i'm using 0.31 as well and can see it fine ...
> 
> Are you sure that decoding from base64 was made by gnus? In my case,
> the original message contained the following headers:
> 
> X-MIME-Autoconverted: from base64 to 8bit by vvv.vsu.ru id UAA12807

Erm yep. Good point, well made. :)

Lee.
-- 
I was doing object-oriented assembly at 1 year old ...  
For some reason my mom insists on calling it "Playing with blocks"


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

* Re: test: empty line missed
  1998-09-22  8:12         ` Lee Willis
@ 1998-09-22 11:03           ` François Pinard
  0 siblings, 0 replies; 9+ messages in thread
From: François Pinard @ 1998-09-22 11:03 UTC (permalink / raw)
  Cc: ding

Lee Willis <lee@gbdirect.co.uk> writes:

> Vladimir Volovich <vvv@vvv.vsu.ru> writes:

> > Are you sure that decoding from base64 was made by gnus? In my case,
> > the original message contained the following headers:

> > X-MIME-Autoconverted: from base64 to 8bit by vvv.vsu.ru id UAA12807

> Erm yep. Good point, well made. :)

If you decode Base64 by `procmail', say, make real sure your adjust headers
consistently, or else, you really ran for trouble (and Gnus is not guilty!).
I once used without much problems these rules:

	:0 fbw
	* ^Content-Transfer-Encoding:.*quoted-printable
	| recode /qp
	  :0 Afhw
	  | formail -i 'Content-Transfer-Encoding: 8bit'

	:0 fbw
	* ^Content-Transfer-Encoding:.*base64
	| recode /64
	  :0 Afhw
	  | formail -i 'Content-Transfer-Encoding: 8bit'

The key is to rewrite CTE when you convert the contents.  But for Gnus
users, such rules should not be needed anymore, as we may expect Gnus to
nicely do the equivalent for us, on the fly.

-- 
François Pinard                            mailto:pinard@iro.umontreal.ca
Join the free Translation Project!    http://www.iro.umontreal.ca/~pinard


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

end of thread, other threads:[~1998-09-22 11:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-09-16 15:16 test: empty line missed zsh
1998-09-19 12:10 ` Lars Magne Ingebrigtsen
1998-09-19 22:58   ` Matt Armstrong
1998-09-21 15:29     ` Lee Willis
1998-09-21 16:06       ` Vladimir Volovich
1998-09-22  8:12         ` Lee Willis
1998-09-22 11:03           ` François Pinard
1998-09-22  1:55       ` Matt Armstrong
1998-09-22  1:48 ` Matt Armstrong

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