Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-summary-toggle-header fails for body-less, boundary-less articles
@ 2002-02-19 19:28 Paul Jarc
  2002-02-19 20:25 ` ShengHuo ZHU
  2002-02-19 20:25 ` ShengHuo ZHU
  0 siblings, 2 replies; 6+ messages in thread
From: Paul Jarc @ 2002-02-19 19:28 UTC (permalink / raw)


For an article which has no body and no empty line marking the end of
the header, gnus-summary-toggle-header fails in two ways.  This line
finds the character position before the end of the buffer, instead of
the one at the end:
	  (setq e (1- (or (search-forward "\n\n" nil t) (point-max))))
This is easy enough to fix:
          (setq e (search-forward "\n\n" nil t)
                e (if e (1- e) (point-max)))
But it also fails to delete the header, so the added header:
	(when (search-forward "\n\n" nil t)
	  (delete-region (point-min) (1- (point))))
This doesn't try to do anything for the no-boundary case, so I'm
wondering if that's intentional.  Anyone know?  Or should it just
delete all the way to (point-max) in this case?


paul



^ permalink raw reply	[flat|nested] 6+ messages in thread
* gnus-summary-toggle-header fails for body-less, boundary-less articles
@ 2002-02-19 19:28 Paul Jarc
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Jarc @ 2002-02-19 19:28 UTC (permalink / raw)


For an article which has no body and no empty line marking the end of
the header, gnus-summary-toggle-header fails in two ways.  This line
finds the character position before the end of the buffer, instead of
the one at the end:
	  (setq e (1- (or (search-forward "\n\n" nil t) (point-max))))
This is easy enough to fix:
          (setq e (search-forward "\n\n" nil t)
                e (if e (1- e) (point-max)))
But it also fails to delete the header, so the added header:
	(when (search-forward "\n\n" nil t)
	  (delete-region (point-min) (1- (point))))
This doesn't try to do anything for the no-boundary case, so I'm
wondering if that's intentional.  Anyone know?  Or should it just
delete all the way to (point-max) in this case?


paul



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

end of thread, other threads:[~2002-02-19 20:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-19 19:28 gnus-summary-toggle-header fails for body-less, boundary-less articles Paul Jarc
2002-02-19 20:25 ` ShengHuo ZHU
2002-02-19 20:33   ` Paul Jarc
2002-02-19 20:33   ` Paul Jarc
2002-02-19 20:25 ` ShengHuo ZHU
2002-02-19 19:28 Paul Jarc

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