Gnus development mailing list
 help / color / mirror / Atom feed
From: wmperry@aventail.com (William M. Perry)
Subject: Re: text/html clickable links fail in p0.63+w3-4.0pre31
Date: 28 Dec 1998 16:43:29 -0500	[thread overview]
Message-ID: <8667awuem6.fsf@kramer.bp.aventail.com> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of "05 Dec 1998 17:06:51 +0100"

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

> Karl Kleinpaste <karl@justresearch.com> writes:
> 
> > A forwarded text/html article in a local newsgroup contains numerous
> > <a href>'s.  Merely passing the mouse over these links induces this
> > stack trace:
> > 
> > Signaling: (args-out-of-range #<buffer "*Summary jprc.support.linux*"> #<marker at 1068 in *Article* 0x8947334> #<marker at 1080 in *Article* 0x88e6ec4>)
> 
> [...]
> 
> > (I'm experimenting with XEmacs 21.2-b4, so if that's part of the
> > problem, I suppose this should be ignored...)
> 
> I get the same thing (XEmacs 21.2; newest w3).  The backtrace looks like
> it's trying to do a buffer-substring on the summary buffer with two marks
> from the article buffer.  Perhaps w3 looked at the selected window
> instead of the current buffer when creating the callback function
> thingies?  (Because the summary buffer is normally the selected window
> when rendering the article buffer.)

  The widget-echo stuff was not being careful about where it looked for the 
text of the link for echoing purposes.  Try this patch.

-Bill P.

Index: w3-display.el
===================================================================
RCS file: /gd/gnu/cvsroot/w3/lisp/w3-display.el,v
retrieving revision 1.7
diff -c -w -c -w -r1.7 w3-display.el
*** w3-display.el	1998/12/28 16:38:40	1.7
--- w3-display.el	1998/12/28 21:42:37
***************
*** 496,502 ****
--- 496,512 ----
  	    (setq w3-cookie-cache (cons (cons href fname) w3-cookie-cache))))
        (cookie fname st nd))))
  
+ (defun w3-widget-buffer (widget)
+   (let ((overlay (or (widget-get widget :button-overlay)
+ 		     (widget-get widget :field-overlay)))
+ 	(extent (or (widget-get widget :button-extent)
+ 		    (widget-get widget :field-extent))))
+     (or (and overlay (overlay-buffer overlay))
+ 	(and extent (extent-buffer extent)))))
+ 
  (defun w3-widget-echo (widget &rest ignore)
+   (save-excursion
+     (set-buffer (or (w3-widget-buffer widget) (current-buffer)))
      (let* ((url (widget-get widget :href))
  	   (name (widget-get widget :name))
  	   (text (buffer-substring-no-properties (widget-get widget :from)
***************
*** 516,522 ****
  	     (stringp (symbol-value (car check)))
  	     (> (length (symbol-value (car check))) 0)
  	     (throw 'exit (symbol-value (car check))))
! 	(pop check)))))
  
  (defun w3-follow-hyperlink (widget &rest ignore)
    (let* ((target (or (widget-get widget :target) w3-base-target))
--- 526,532 ----
  	       (stringp (symbol-value (car check)))
  	       (> (length (symbol-value (car check))) 0)
  	       (throw 'exit (symbol-value (car check))))
! 	  (pop check))))))
  
  (defun w3-follow-hyperlink (widget &rest ignore)
    (let* ((target (or (widget-get widget :target) w3-base-target))


  parent reply	other threads:[~1998-12-28 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-04 18:14 Karl Kleinpaste
1998-12-05 16:06 ` Lars Magne Ingebrigtsen
1998-12-12 19:50   ` William M. Perry
1998-12-28 21:43   ` William M. Perry [this message]
1999-01-03 12:51     ` Lars Magne Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8667awuem6.fsf@kramer.bp.aventail.com \
    --to=wmperry@aventail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).