Re: How to access HTML DOM/source of MIME part?

2020-06-16 Thread Eric Abrahamsen
Lars Ingebrigtsen  writes:

> Eric Abrahamsen  writes:
>
>> Something to be aware of is that, sometime not too long ago, Lars
>> re-implemented links in article bodies using widgets instead of buttons.
>
> The other way around -- they used to be widgets, and they're now
> buttons.

Sure enough, I didn't really know what I was talking about :) But at
least that points to a likely source of Tim's problem: he's trying to
use button commands in a version of Emacs/Gnus that is still using
widgets?


___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: How to access HTML DOM/source of MIME part?

2020-06-16 Thread Lars Ingebrigtsen
Eric Abrahamsen  writes:

> Something to be aware of is that, sometime not too long ago, Lars
> re-implemented links in article bodies using widgets instead of buttons.

The other way around -- they used to be widgets, and they're now
buttons.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: How to access HTML DOM/source of MIME part?

2020-06-16 Thread Eric Abrahamsen
Tim Landscheidt  writes:

> I wrote:
>
>> […]
>
>> *But* your pointer gave me the idea that I could iterate
>> over shr's buttons like gnus-collect-urls does, test if
>> their URLs match Item_x_Link_B's typical pattern and then
>> offer to browse them.  This would require that
>> Item_x_Link_B's pattern is (relatively) stable; I have to
>> check whether that will work reasonably well.  Thanks!
>
> It's not that simple :-(.  For starters, some of my newslet-
> ters shorten all URLs, putting them into the same format.
>
> But more importantly, with Emacs 26.3, (forward-button 1) in
> an HTML mail will always move point to the beginning of the
> *Article* buffer because (button-start button) returns
> (point-min) for some reason.  (In my use case, I can proba-
> bly work around that by calling next-button directly.)
>
> Is this a bug?  What is the best way to create a minimal re-
> producible example?

I know it's not helpful, but quick testing with Emacs master (28) seems
to work fine. If I display the html part of an article, move point into
the article buffer, and run (forward-button 1), point moves correctly to
the first button.

Something to be aware of is that, sometime not too long ago, Lars
re-implemented links in article bodies using widgets instead of buttons.
TBH I don't really know what that means, or what the implications are,
but it's probably good to know.

Eric


___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english


Re: How to access HTML DOM/source of MIME part?

2020-06-16 Thread Tim Landscheidt
I wrote:

> […]

> *But* your pointer gave me the idea that I could iterate
> over shr's buttons like gnus-collect-urls does, test if
> their URLs match Item_x_Link_B's typical pattern and then
> offer to browse them.  This would require that
> Item_x_Link_B's pattern is (relatively) stable; I have to
> check whether that will work reasonably well.  Thanks!

It's not that simple :-(.  For starters, some of my newslet-
ters shorten all URLs, putting them into the same format.

But more importantly, with Emacs 26.3, (forward-button 1) in
an HTML mail will always move point to the beginning of the
*Article* buffer because (button-start button) returns
(point-min) for some reason.  (In my use case, I can proba-
bly work around that by calling next-button directly.)

Is this a bug?  What is the best way to create a minimal re-
producible example?

Tim

___
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english