GNU bug report logs - #31927
26.1; Fragment/bookmark part of URL omitted in default offered by `eww'

Previous Next

Package: emacs;

Reported by: nljlistbox2 <at> gmail.com (N. Jackson)

Date: Thu, 21 Jun 2018 15:06:01 UTC

Severity: minor

Tags: fixed

Found in version 26.1

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 31927 <at> debbugs.gnu.org (full text, mbox):

From: nljlistbox2 <at> gmail.com (N. Jackson)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 31927 <at> debbugs.gnu.org
Subject: Re: bug#31927: 26.1;
 Fragment/bookmark part of URL omitted in default offered by `eww'
Date: Thu, 21 Jun 2018 19:11:23 -0400
At 18:47 +0300 on Thursday 2018-06-21, Eli Zaretskii wrote:
>
>> From: nljlistbox2 <at> gmail.com (N. Jackson)
>> 
>>   1. In scratch type https://en.wikipedia.org/wiki/Midsummer#History
>> 
>>   2. Move point back into the just-typed URL
>> 
>>   3. M-x eww RET
>> 
>> Expected result:
>> EWW offers https://en.wikipedia.org/wiki/Midsummer#History as the
>> default.
>> 
>> Actual result:
>> EWW offers https://en.wikipedia.org/wiki/Midsummer as the default.
>
> You could customize eww-suggest-uris to add, say
> thing-at-point-url-at-point. I think this should give you what you
> want.

Thank you for the suggestion. But, no, that doesn't quite help.

By default the value of `eww-suggest-uris' is `(eww-links-at-point
url-get-url-at-point eww-current-url)'.

When I add `thing-at-point-url-at-point' it's added to the end of the
list and the behaviour is unchanged presumably because
`url-get-url-at-point' comes first.

However if I set `eww-suggest-uris' to just
`(thing-at-point-url-at-point)', then I see the "correct" behaviour --
that is, the fragment/bookmark part of the URL is picked up.

So the question is, why does `thing-at-point-url-at-point' pick up the
fragment/bookmark part or the URL but `url-get-url-at-point' does not?

That is, removing EWW from the picture altogether:

  0. $ emacs -Q

  1. On a new line in scratch type https://en.wikipedia.org/wiki/Midsummer#History

  2. C-a	; Move point to beginning of the just-typed URL.

  3. M-: (thing-at-point-url-at-point) RET
  => https://en.wikipedia.org/wiki/Midsummer#History

  4. M-: (url-get-url-at-point) RET
  => https://en.wikipedia.org/wiki/Midsummer

Is it expected for these two functions to behave differently here?

(And an additional anomaly: In Step 2, if point is just moved back one
character into the just-typed URL (between the `r' and `y' in
"#History") then:

  3. M-: (thing-at-point-url-at-point) RET
  => https://en.wikipedia.org/wiki/Midsummer#History

  4. M-: (url-get-url-at-point) RET
  => nil

).




This bug report was last modified 6 years and 6 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.