From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: nljlistbox2@gmail.com (N. Jackson) Newsgroups: gmane.emacs.bugs Subject: bug#31927: 26.1; Fragment/bookmark part of URL omitted in default offered by `eww' Date: Thu, 21 Jun 2018 19:11:23 -0400 Message-ID: <87k1qr4twk.fsf@moondust.localdomain> References: <87zhzo41ue.fsf@moondust.localdomain> <83po0kqgys.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1529622610 30867 195.159.176.226 (21 Jun 2018 23:10:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 21 Jun 2018 23:10:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 31927@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 22 01:10:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fW8iK-0007tb-Dv for geb-bug-gnu-emacs@m.gmane.org; Fri, 22 Jun 2018 01:10:04 +0200 Original-Received: from localhost ([::1]:57966 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW8kR-00067d-Ef for geb-bug-gnu-emacs@m.gmane.org; Thu, 21 Jun 2018 19:12:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fW8kJ-00067V-5h for bug-gnu-emacs@gnu.org; Thu, 21 Jun 2018 19:12:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fW8kE-0001hE-4y for bug-gnu-emacs@gnu.org; Thu, 21 Jun 2018 19:12:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51588) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fW8kE-0001h0-06 for bug-gnu-emacs@gnu.org; Thu, 21 Jun 2018 19:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fW8kD-0002w9-KC for bug-gnu-emacs@gnu.org; Thu, 21 Jun 2018 19:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: nljlistbox2@gmail.com (N. Jackson) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 21 Jun 2018 23:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31927 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31927-submit@debbugs.gnu.org id=B31927.152962269211250 (code B ref 31927); Thu, 21 Jun 2018 23:12:01 +0000 Original-Received: (at 31927) by debbugs.gnu.org; 21 Jun 2018 23:11:32 +0000 Original-Received: from localhost ([127.0.0.1]:59485 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fW8jj-0002vN-VN for submit@debbugs.gnu.org; Thu, 21 Jun 2018 19:11:32 -0400 Original-Received: from mail-qt0-f177.google.com ([209.85.216.177]:40540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fW8ji-0002vC-OZ for 31927@debbugs.gnu.org; Thu, 21 Jun 2018 19:11:31 -0400 Original-Received: by mail-qt0-f177.google.com with SMTP id q6-v6so4453662qtn.7 for <31927@debbugs.gnu.org>; Thu, 21 Jun 2018 16:11:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=LUYEjXikH5zPMzkylXAHT7FQZf/1sPnPRWVmpSVkXPg=; b=UZpYiGq9vVUWeuIq5Rb2RSTEaBr8puj5eUTNyDdJ8aUpyfMTYQw++ExhaufdRNZYtU FBSaOSXYSlmeMzCSFAFB1wW6Zm18dDn+11TNxB3vFWxcFTNZ/BrEXMBeWyAOLo0xbMky ra5e3esiOYgGqsE5wDWG4j33LZAOetyGas38pO2sUtaUX1knnnafRtmsF4rFuKIaOcHp vTXolMq0R8CnUqMT1U3WpvCgxB4+fwUUvGceqC970YfB8TNMfHoieQWLyVck2LlGOPjZ Xu02fu9JGGOXwp2RfpDPWgA6nzbvN1yzTr8BZ+HDrB20GV5bG1DOzo53Z4agIkqJ3z0+ GCUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=LUYEjXikH5zPMzkylXAHT7FQZf/1sPnPRWVmpSVkXPg=; b=VloSP3wJrP7K9PpICpY5hDp7N5I37XxHTZf+NoaRXNVkTu8MeyK1L8TdQ8eZxnQn43 4RqBOeWh8ClBupARrefVbpAYmJpmGV02AOXC8pgQLFEFm0TTFJxUwANAjWTUT7bThoW/ 8XLZ2WpDutao4Y7+AmdOhWdGmT49V3nkjieTqiSDNgR2WuneyDok8Gn/gxT+VvUj7GpK SE72FJajLsoWV5oNU5bWxvBDKAYStH5s6hZA9/peEho8+jABRbqyx5+8Q5oZOxAkIh5I F+ZvMQm8wlhyaco7dOERjdxflpnyqD2vELAA5okLS3P9Uk8lVtTtcY5SVpJoVRzNY4nY UQvg== X-Gm-Message-State: APt69E02jYON1DYxZ72QGu7YujPRu/ArQwuhYF2onu+try5I9GmC3QC6 dgh+3JbQplzC3lxVfUeh0UoJ2A== X-Google-Smtp-Source: ADUXVKL4YWe313OXOzr9Qys/MATiM3JcHVTmUXTWrTqWR3hiQOmwI4O0xNc/pMmz/5f2AmWTWrFUIQ== X-Received: by 2002:ac8:252b:: with SMTP id 40-v6mr5446852qtm.395.1529622685204; Thu, 21 Jun 2018 16:11:25 -0700 (PDT) Original-Received: from moondust.localdomain.nodomain.none (toroon474qw-lp130-03-65-95-168-97.dsl.bell.ca. [65.95.168.97]) by smtp.gmail.com with ESMTPSA id f8-v6sm3470923qkm.42.2018.06.21.16.11.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Jun 2018 16:11:24 -0700 (PDT) In-Reply-To: <83po0kqgys.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 21 Jun 2018 18:47:39 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:147716 Archived-At: At 18:47 +0300 on Thursday 2018-06-21, Eli Zaretskii wrote: > >> From: nljlistbox2@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 ).