Gnus development mailing list
 help / color / mirror / Atom feed
* Small bug in gnus-group-display-picons in 0.73
@ 1999-01-25  6:09 Lloyd Zusman
  1999-01-25  6:25 ` Hrvoje Niksic
  0 siblings, 1 reply; 3+ messages in thread
From: Lloyd Zusman @ 1999-01-25  6:09 UTC (permalink / raw)


I found a small bug in the `gnus-group-display-picons' routine in
version 0.73.  A call to `(backward-char 1)' fails for me because the
point is currently at the beginning of the buffer when that call is
being made.  The following patch fixes this, although I'm not sure if
this is actually the proper way to correct it, or if instead, it just
masks a different problem.

Anyway, here's the patch ...

*** gnus-picon.el.orig  Mon Jan 25 01:04:11 1999
--- gnus-picon.el       Mon Jan 25 01:03:43 1999
***************
*** 375,381 ****
                   (match-beginning 0) (match-end 0)
                   'invisible t)
                (article-goto-body)
!               (backward-char 1))))
          (if (null gnus-picons-piconsearch-url)
              (gnus-picons-display-pairs
               (gnus-picons-lookup-pairs
--- 375,382 ----
                   (match-beginning 0) (match-end 0)
                   'invisible t)
                (article-goto-body)
!               (when (> (point) (point-min))
!                 (backward-char 1)))))
          (if (null gnus-picons-piconsearch-url)
              (gnus-picons-display-pairs
               (gnus-picons-lookup-pairs

-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Small bug in gnus-group-display-picons in 0.73
  1999-01-25  6:09 Small bug in gnus-group-display-picons in 0.73 Lloyd Zusman
@ 1999-01-25  6:25 ` Hrvoje Niksic
  1999-01-25 11:10   ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Hrvoje Niksic @ 1999-01-25  6:25 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

>                 (article-goto-body)
> !               (backward-char 1))))
>           (if (null gnus-picons-piconsearch-url)
>               (gnus-picons-display-pairs
>                (gnus-picons-lookup-pairs
> --- 375,382 ----
>                    (match-beginning 0) (match-end 0)
>                    'invisible t)
>                 (article-goto-body)
> !               (when (> (point) (point-min))
> !                 (backward-char 1)))))
>           (if (null gnus-picons-piconsearch-url)

I think a correct patch should delete `backward-char' altogether.  I
suspect backing up was necessary when the "goto body" functionality
was implemented using (search "\n\n").  Now that `article-goto-body'
already places the point at the right position (which may be at
point-min), backward-char is no longer needed or desired.

This is only speculation, though.


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

* Re: Small bug in gnus-group-display-picons in 0.73
  1999-01-25  6:25 ` Hrvoje Niksic
@ 1999-01-25 11:10   ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-01-25 11:10 UTC (permalink / raw)


Hrvoje Niksic <hniksic@srce.hr> writes:

> I think a correct patch should delete `backward-char' altogether.  I
> suspect backing up was necessary when the "goto body" functionality
> was implemented using (search "\n\n").  Now that `article-goto-body'
> already places the point at the right position (which may be at
> point-min), backward-char is no longer needed or desired.

In this particular instance, we don't want to go to the body, but to
the line before the body.  (Because we want to put the picons on that
blank line.)  So the backward-char is necessary, but we should check
whether we can do that, first.

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


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

end of thread, other threads:[~1999-01-25 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-25  6:09 Small bug in gnus-group-display-picons in 0.73 Lloyd Zusman
1999-01-25  6:25 ` Hrvoje Niksic
1999-01-25 11:10   ` 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).