From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "N. Jackson" Newsgroups: gmane.emacs.bugs Subject: bug#31927: 26.1; Fragment/bookmark part of URL omitted in default offered by `eww' Date: Sun, 29 Jul 2018 13:16:29 -0400 Message-ID: <87o9eqotci.fsf@moondust.localdomain> References: <87zhzo41ue.fsf@moondust.localdomain> <83po0kqgys.fsf@gnu.org> <87k1qr4twk.fsf@moondust.localdomain> <83in6bqqp6.fsf@gnu.org> <83wotnwd1d.fsf@gnu.org> <87bmaq2fxa.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1532884511 5960 195.159.176.226 (29 Jul 2018 17:15:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 29 Jul 2018 17:15:11 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31927@debbugs.gnu.org, Lars Ingebrigtsen To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 29 19:15:07 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 1fjpHe-0001Qd-Q6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jul 2018 19:15:07 +0200 Original-Received: from localhost ([::1]:49144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjpJl-0003yw-JR for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Jul 2018 13:17:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fjpJZ-0003ye-LA for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2018 13:17:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fjpJV-0001H2-Uj for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2018 13:17:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fjpJV-0001Gy-PR for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2018 13:17:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fjpJV-0002Cc-JM for bug-gnu-emacs@gnu.org; Sun, 29 Jul 2018 13:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "N. Jackson" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Jul 2018 17:17: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.15328846058442 (code B ref 31927); Sun, 29 Jul 2018 17:17:01 +0000 Original-Received: (at 31927) by debbugs.gnu.org; 29 Jul 2018 17:16:45 +0000 Original-Received: from localhost ([127.0.0.1]:34063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fjpJB-0002C2-Vj for submit@debbugs.gnu.org; Sun, 29 Jul 2018 13:16:45 -0400 Original-Received: from mail-io0-f174.google.com ([209.85.223.174]:33152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fjpJ7-0002Bl-E0 for 31927@debbugs.gnu.org; Sun, 29 Jul 2018 13:16:40 -0400 Original-Received: by mail-io0-f174.google.com with SMTP id z20-v6so7999887iol.0 for <31927@debbugs.gnu.org>; Sun, 29 Jul 2018 10:16:37 -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=uhJQBzen+HRJ42VovGLGfnB1v6TJoh1MHipQWwJCVrQ=; b=kEZYox/DGrf2lD6fViMLWTz0Ol/6zP18ovcAzNPfudt4kwusDlfie/Kya80GKn6J4g 6T9hs44L0zbwKHQ2m8FV9ixrdl9BDu9coiA7NMH8jZENda2+WA0C2QqZ5MRoMUl9kw4T F+Zp3EcmOWFcLXIaqlwwFUDqJjgUn2cxAfWTbZCFRC4IqNPZaCRk2i73VqxgZdWLBRza IyOPFJKW/BvMfoThSzA6PqeZWx3ddJfvDQTiO1FagZBmZ9k2yrUgVjme3dwJZcXMVQlO pYAN7KZ08mjRqRYzLHPZT/THqVI07avYzAcJ0gamyZ1NS9YBly0SCcOGZU6MPvU15XoH 2upQ== 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=uhJQBzen+HRJ42VovGLGfnB1v6TJoh1MHipQWwJCVrQ=; b=Pq3Y6DlnSpvSV0n068w5IiUgWPbQ49qNd2WtbZ/19jg0o59LSMy3XacnEHkVC4n5GJ gzh4i2J8tgmjnb+J6k+YOpUwfzYGDh9KzAXmXsp6yArvv+Qto1dLitTmFaePnryLUTwA BnGtj03x+nw1hI6+Ifx06SmyvSdxfIh+hAwlma0mrdCbevV4PTnFDgfPaxYeAPj2RJia q8ur6U1xqOWF+Q8VUtyBrjV9MWFIVb3yFGSQSxQCm1Slqme/1yB641qtR3rg6lZPx096 X0S5Zx2SoOlePqvZinWbKwayd7mg4iK6/Qq/XUoz+R0e8an39i6yZP0qQlNauO8+RsBB fADA== X-Gm-Message-State: AOUpUlEGZ/i5xElFnixadGRNFBOaoJljdyFilKYZDGR2RuwdNENVkKqQ 5jIEvT7rLoxXB3h7VN/aWb0MmdZO X-Google-Smtp-Source: AAOMgpeQholywNBTLMLhsSaDF0ei62/1F8nroTboMeNDQ2q+NqLs7QpE53ycFClwqG79arnAAf00jA== X-Received: by 2002:a6b:a508:: with SMTP id o8-v6mr10632309ioe.41.1532884591623; Sun, 29 Jul 2018 10:16:31 -0700 (PDT) Original-Received: from moondust.localdomain.nodomain.none (toroon474qw-lp130-08-70-26-73-61.dsl.bell.ca. [70.26.73.61]) by smtp.gmail.com with ESMTPSA id j11-v6sm5480656itj.6.2018.07.29.10.16.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Jul 2018 10:16:30 -0700 (PDT) In-Reply-To: <87bmaq2fxa.fsf@gmail.com> (Noam Postavsky's message of "Sun, 29 Jul 2018 11:57:21 -0400") 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:149057 Archived-At: At 11:57 -0400 on Sunday 2018-07-29, Noam Postavsky wrote: > Eli Zaretskii writes: > >>> From: Lars Ingebrigtsen >>> Cc: nljlistbox2@gmail.com (N. Jackson), 31927@debbugs.gnu.org >>> Date: Sun, 22 Jul 2018 15:10:42 +0200 >>> >>> >> 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? >>> > >>> > Yes, that's the question. I hope Lars (CC'ed) could comment >>> > on that. >>> >>> I think the behaviour of `url-get-url-at-point' is suboptimal >>> here. Perhaps we should just make eww use >>> `thing-at-point-url-at-point' instead? And mark >>> `url-get-url-at-point' as obsolete, as it doesn't seem very >>> actively maintained and duplicates thingatpt functionality. >> >> Probably. Unless some functionality really needs to ignore the >> parts after the hash, for some reason. > > If it's really needed, then it's probably better to parse the > url and explicitly remove unwanted parts. I notice this bug is > pretty similar to Bug#898 "ffap -> emacs-w3m dropping of > #anchor"; it seems pretty clear that dropping the part after the > hash is the wrong thing in web browsing contexts. FWIW, in the Emacs codebase at least, `url-get-url-at-point' is only used twice, both in eww.el: $ grep -rHn 'url-get-url-at-point' * ChangeLog.3:21009: * lisp/url/url-util.el (url-get-url-at-point): Add missing group lisp/loaddefs.el~:11861:(defvar eww-suggest-uris '(eww-links-at-point url-get-url-at-point eww-current-url) "\ Binary file lisp/net/eww.elc matches lisp/net/eww.el:32:(require 'url-util) ; for url-get-url-at-point --> lisp/net/eww.el:67: url-get-url-at-point --> lisp/net/eww.el:77: url-get-url-at-point Binary file lisp/url/url-util.elc matches lisp/url/url-util.el:544:(defun url-get-url-at-point (&optional pt) lisp/url/ChangeLog.1:742: (url-get-url-at-point): Don't use eval-when-compile. lisp/url/ChangeLog.1:2799: * url-util.el (url-get-url-at-point): Guard against 'url' lisp/url/ChangeLog.1:2859: * url-util.el (url-get-url-at-point): Allow URLs wrapped in lisp/url/ChangeLog.1:2977: * url-util.el (url-get-url-at-point): Re-integrated. lisp/loaddefs.el:11861:(defvar eww-suggest-uris '(eww-links-at-point url-get-url-at-point eww-current-url) "\ lisp/ldefs-boot.el:11763:(defvar eww-suggest-uris '(eww-links-at-point url-get-url-at-point eww-current-url) "\ Binary file src/emacs-master-2017-05-31 matches Binary file src/emacs matches Binary file src/emacs-25.3-2017-09-12 matches Binary file src/emacs-head-2017-12-29 matches Binary file src/emacs-27.0.50.1 matches Binary file src/emacs-master-2016-12-01 matches Binary file src/bootstrap-emacs matches