* Bug: gnus-article-treat-body-boundary, gnus-with-article-headers
@ 2003-10-15 18:55 Reiner Steib
2003-10-15 22:08 ` Bug: gnus-article-treat-body-boundary, Karl Pflästerer
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Reiner Steib @ 2003-10-15 18:55 UTC (permalink / raw)
Hi,
when I set `gnus-treat-body-boundary' to t, the boundary isn't placed
after the headers, but after the first paragraph of the article body.
I don't know whether it's a bug in `gnus-article-treat-body-boundary',
`gnus-with-article-headers', `article-narrow-to-head' or something
else. When I add "(sit-for 3)" in `gnus-article-treat-body-boundary'
as shown below, I see that the article buffer doesn't contain the
headers (as expected), but the first paragraph of the article.
Any ideas? (I couldn't locate the code where the gnus-treat-*
functions are called.)
Bye, Reiner.
(defun gnus-article-treat-body-boundary ()
"Place a boundary line at the end of the headers."
(interactive)
(when (and gnus-body-boundary-delimiter
(> (length gnus-body-boundary-delimiter) 0))
(gnus-with-article-headers
(sit-for 3) ;; <============================================== ADDED
(goto-char (point-max))
(let ((start (point)))
(insert "X-Boundary: ")
(gnus-add-text-properties start (point) '(invisible t intangible t))
(insert (let (str)
(while (>= (1- (window-width)) (length str))
(setq str (concat str gnus-body-boundary-delimiter)))
(substring str 0 (1- (window-width))))
"\n")
(gnus-put-text-property start (point) 'gnus-decoration 'header)))))
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: gnus-article-treat-body-boundary,
2003-10-15 18:55 Bug: gnus-article-treat-body-boundary, gnus-with-article-headers Reiner Steib
@ 2003-10-15 22:08 ` Karl Pflästerer
2003-10-16 14:31 ` Karl Pflästerer
[not found] ` <hhu16a1358.fsf@blah.pl>
2 siblings, 0 replies; 5+ messages in thread
From: Karl Pflästerer @ 2003-10-15 22:08 UTC (permalink / raw)
On 15 Oct 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:
> when I set `gnus-treat-body-boundary' to t, the boundary isn't placed
> after the headers, but after the first paragraph of the article body.
Yes that's right.
> I don't know whether it's a bug in `gnus-article-treat-body-boundary',
> `gnus-with-article-headers', `article-narrow-to-head' or something
> else. When I add "(sit-for 3)" in `gnus-article-treat-body-boundary'
I'm also not sure but I think we should start with `gnus-display-mime'
There `gnus-treat-article' gets called and that function calls the
functions from the alist `gnus-treatment-function-alist'.
> as shown below, I see that the article buffer doesn't contain the
> headers (as expected), but the first paragraph of the article.
That's because of gnus-display-mime.
(save-restriction
(article-goto-body)
(narrow-to-region (point) (point-max))
(gnus-treat-article nil 1 1)
(widen)))
(unless ihandles
;; Highlight the headers.
(save-excursion
(save-restriction
(article-goto-body)
(narrow-to-region (point-min) (point))
(gnus-treat-article 'head))))))))
Before `gnus-treat-article' is called the buffer is narrowed. I'm not
sure at the moment why but it seems necessary. If I comment it out
nothing happens.
> Any ideas? (I couldn't locate the code where the gnus-treat-*
> functions are called.)
Perhaps that helps a bit. I couldn't find at the monent the bug either
but I'll try on.
KP
--
If you have nothing to say on a subject, replying with a line such as,
"I agree with this." puts you in the TO:'s for all future messages, and
establishes you as "one who really cares", if not an actual expert, on
the topic at hand. -- from the Symbolics Guidelines for Sending Mail
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: gnus-article-treat-body-boundary,
2003-10-15 18:55 Bug: gnus-article-treat-body-boundary, gnus-with-article-headers Reiner Steib
2003-10-15 22:08 ` Bug: gnus-article-treat-body-boundary, Karl Pflästerer
@ 2003-10-16 14:31 ` Karl Pflästerer
[not found] ` <hhu16a1358.fsf@blah.pl>
2 siblings, 0 replies; 5+ messages in thread
From: Karl Pflästerer @ 2003-10-16 14:31 UTC (permalink / raw)
Cc: reiner.steib
Hi,
that's my second try to answer you (the first one I send yesterday seems
to be lost in nirvana) (therefore I send a Cc to you).
On 15 Oct 2003, Reiner Steib <- 4.uce.03.r.s@nurfuerspam.de wrote:
> when I set `gnus-treat-body-boundary' to t, the boundary isn't placed
> after the headers, but after the first paragraph of the article body.
Yes that's right.
> I don't know whether it's a bug in `gnus-article-treat-body-boundary',
> `gnus-with-article-headers', `article-narrow-to-head' or something
> else. When I add "(sit-for 3)" in `gnus-article-treat-body-boundary'
I'm also not sure but I think we should start with `gnus-display-mime'
There `gnus-treat-article' gets called and that function calls the
functions from the alist `gnus-treatment-function-alist'.
> as shown below, I see that the article buffer doesn't contain the
> headers (as expected), but the first paragraph of the article.
That's because of gnus-display-mime.
(save-restriction
(article-goto-body)
(narrow-to-region (point) (point-max))
(gnus-treat-article nil 1 1)
(widen)))
(unless ihandles
;; Highlight the headers.
(save-excursion
(save-restriction
(article-goto-body)
(narrow-to-region (point-min) (point))
(gnus-treat-article 'head))))))))
Before `gnus-treat-article' is called the buffer is narrowed. I'm not
sure at the moment why but it seems necessary. If I comment it out
nothing happens.
> Any ideas? (I couldn't locate the code where the gnus-treat-*
> functions are called.)
Perhaps that helps a bit. I couldn't find at the monent the bug either
but I'll try on.
Karl
--
'Twas brillig, and the slithy toves
Did gyre and gimble in the wabe;
All mimsy were the borogoves,
And the mome raths outgrabe. "Lewis Carroll" "Jabberwocky"
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: gnus-article-treat-body-boundary,
[not found] ` <hhu16a1358.fsf@blah.pl>
@ 2003-10-16 14:56 ` Reiner Steib
2003-10-17 16:56 ` Lars Magne Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Reiner Steib @ 2003-10-16 14:56 UTC (permalink / raw)
On Thu, Oct 16 2003, Maciej Matysiak wrote:
Something stripped " gnus-with-article-headers" from the subject.
> On the 15th of October 2003 at 20:55, Reiner Steib wrote:
>
>> when I set `gnus-treat-body-boundary' to t, the boundary isn't placed
>> after the headers, but after the first paragraph of the article body.
>
> try (setq gnus-treat-body-boundary 'head) instead of "t".
That fixes it, thanks.
But the doc-string also mentions »t, `last', integer, predicate«,
whereas the manual only mentions `head'.
Should we fix this?
,----[ C-h v gnus-treat-body-boundary RET ]
| gnus-treat-body-boundary's value is head
|
| Documentation:
| Draw a boundary at the end of the headers.
| Valid values are nil, t, `head', `last', an integer or a predicate.
`----
,----[ (info "(gnus)Customizing Articles") ]
| `gnus-treat-body-boundary (head)'
| Adds a delimiter between header and body, the string used as
| delimiter is controlled by `gnus-body-boundary-delimiter'.
`----
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- PGP key available via WWW http://rsteib.home.pages.de/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Bug: gnus-article-treat-body-boundary,
2003-10-16 14:56 ` Reiner Steib
@ 2003-10-17 16:56 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2003-10-17 16:56 UTC (permalink / raw)
Reiner Steib <4.uce.03.r.s@nurfuerspam.de> writes:
> But the doc-string also mentions »t, `last', integer, predicate«,
> whereas the manual only mentions `head'.
I think it would make sense to go through all the *-treat-* variables
and fix the doc strings for the items that only apply to headers.
And set type to the head-custom-thing:
:type gnus-article-treat-head-custom
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-10-17 16:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-15 18:55 Bug: gnus-article-treat-body-boundary, gnus-with-article-headers Reiner Steib
2003-10-15 22:08 ` Bug: gnus-article-treat-body-boundary, Karl Pflästerer
2003-10-16 14:31 ` Karl Pflästerer
[not found] ` <hhu16a1358.fsf@blah.pl>
2003-10-16 14:56 ` Reiner Steib
2003-10-17 16:56 ` Lars Magne Ingebrigtsen
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).