From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?iso-8859-1?Q?Vincent_Bela=EFche?= Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: =?iso-8859-1?Q?RE:_info_URL_=AB_open_at_point_=BB_patch?= Date: Wed, 27 Jun 2018 17:39:33 +0000 Message-ID: References: , <83h8lstfwh.fsf@gnu.org> , <8336xct8v0.fsf@gnu.org> , <83y3f4rpjt.fsf@gnu.org> , <83vaa7simv.fsf@gnu.org>, , <83muvhr4zp.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1530121065 1113 195.159.176.226 (27 Jun 2018 17:37:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 27 Jun 2018 17:37:45 +0000 (UTC) Cc: "emacs-orgmode@gnu.org" , "brandelune@gmail.com" , "emacs-devel@gnu.org" To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 27 19:37:41 2018 Return-path: Envelope-to: ged-emacs-devel@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 1fYENw-0000CY-Kj for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 19:37:40 +0200 Original-Received: from localhost ([::1]:60660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYEQ4-00035z-4F for ged-emacs-devel@m.gmane.org; Wed, 27 Jun 2018 13:39:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fYEPt-00035E-VQ for emacs-devel@gnu.org; Wed, 27 Jun 2018 13:39:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fYEPs-0006sW-PG for emacs-devel@gnu.org; Wed, 27 Jun 2018 13:39:41 -0400 Original-Received: from mail-oln040092072029.outbound.protection.outlook.com ([40.92.72.29]:6270 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fYEPn-0006el-P5; Wed, 27 Jun 2018 13:39:36 -0400 Original-Received: from AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com (10.152.16.54) by AM5EUR03HT216.eop-EUR03.prod.protection.outlook.com (10.152.16.221) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.906.15; Wed, 27 Jun 2018 17:39:33 +0000 Original-Received: from AM6PR10MB1957.EURPRD10.PROD.OUTLOOK.COM (10.152.16.59) by AM5EUR03FT035.mail.protection.outlook.com (10.152.16.119) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.906.15 via Frontend Transport; Wed, 27 Jun 2018 17:39:33 +0000 Original-Received: from AM6PR10MB1957.EURPRD10.PROD.OUTLOOK.COM ([fe80::dd8b:be8e:3ac9:f4f4]) by AM6PR10MB1957.EURPRD10.PROD.OUTLOOK.COM ([fe80::dd8b:be8e:3ac9:f4f4%4]) with mapi id 15.20.0884.024; Wed, 27 Jun 2018 17:39:33 +0000 Thread-Topic: =?iso-8859-1?Q?info_URL_=AB_open_at_point_=BB_patch?= Thread-Index: AQHUC4irnDfXG0kiIkiW1qZfH5sKO6RveQxYgAAlm96AAATlXoAAFMYpgAAH23+AAB0wHIAAZHKwgAHAxzeAAAE9Z4AAms80gAECtIY= In-Reply-To: <83muvhr4zp.fsf@gnu.org> Accept-Language: fr-FR, en-US Content-Language: fr-FR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-incomingtopheadermarker: OriginalChecksum:0EC67354D32FB10C1ABCCB4F5978D1505E9877D3FC26BF18E744B9215999E7D3; UpperCasedChecksum:F4995BED6576B9D9B7F65539DDC9CF8E2A8D3FA7856C11E600FF5DB24E2FE19E; SizeAsReceived:7807; Count:47 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [hsCCbYXQsV/257c1KgLyYmaUpb3DQFDb] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5EUR03HT216; 7:0PrigjbfBYVAu6pWlTlpOal78rZIdkQ0nu5tmfxB5x4BV2faY0fndrI4pzwtLqkRAkeoRtF4a012WSAMLDydncLYmYmgj+7jqbsJRuU+SdSGsC7s0pEU6wjcDAE15wE6DQal/GtyXf0/aX2zR9D+hlNJ5ZuzSceBUMxRbcqk61poNbxk/ZtH6sj2P+QIZNoSumy/P1ORkUmYVr8+gteDjFpEO4klCFPEuvzBkf5hCDlvJUkEk139rL7k4IgaJS/a x-incomingheadercount: 47 x-eopattributedmessage: 0 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1603101448)(1601125500)(1701031045); SRVR:AM5EUR03HT216; x-ms-traffictypediagnostic: AM5EUR03HT216: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(444000031); SRVR:AM5EUR03HT216; BCL:0; PCL:0; RULEID:; SRVR:AM5EUR03HT216; x-forefront-prvs: 0716E70AB6 x-forefront-antispam-report: SFV:NSPM; SFS:(7070007)(52314003)(199004)(189003)(229853002)(6246003)(2900100001)(6506007)(76176011)(33656002)(102836004)(73972006)(7696005)(6916009)(105586002)(106356001)(6436002)(305945005)(14454004)(81156014)(55016002)(5660300001)(6346003)(9686003)(26005)(86362001)(8936002)(82202002)(476003)(446003)(486006)(11346002)(97736004)(104016004)(99286004)(74316002)(54906003)(256004)(93886005)(25786009)(74482002)(4326008)(5250100002)(39060400002)(68736007); DIR:OUT; SFP:1901; SCL:1; SRVR:AM5EUR03HT216; H:AM6PR10MB1957.EURPRD10.PROD.OUTLOOK.COM; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:; received-spf: None (protection.outlook.com: hotmail.fr does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=vincent.b.1@hotmail.fr; x-microsoft-antispam-message-info: 0HHdEYPuhbb2BvmrJ6704BnVLhEaYecAKab1Dn0rPRNoOo5o2l8qO8StZYIHlWhOCWuf4ay3DTOh9diZ9cSFU2ho1GsHPsFZLkiw1jwoDHvi5Gzp+oG9Ix3/rJ4U7xa2r53rm7Q7KGAb0DiZVF1mMrb3VVP8aDf20pXd1K7vy/7zThxxcBQ6fDG7Ipp/7YputpyGeVD4ExsEwCSjH2ygXUWxdxjMWSYsXm4D3EHKYvg= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: dd759f05-a917-4aa0-a2f5-4cc35c50e0c8 X-MS-Exchange-CrossTenant-Network-Message-Id: 777f6450-abe7-47f3-bdeb-08d5dc54f1a7 X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: dd759f05-a917-4aa0-a2f5-4cc35c50e0c8 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2018 17:39:33.1348 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR03HT216 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.92.72.29 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:226789 gmane.emacs.orgmode:121017 Archived-At: Hello Eli, Concerning the patch, I understood that you agree with it provided that it is upgraded to mention the change in the etc/NEWS file. So I did that & pushed the change. Concerning your point =AB=A0Modularity doesn't mean each module must be standalone and self-contained=A0=BB, I agree, and I did not say that there would be anything wrong for e.g. browse-url.el to use a utility function defined elsewhere. Modules are supposed to interact with each other, and that implies that they cannot be fully standalone. However, modulary means that one should observe some functional split: any package, to be called a package, should have in its documentation some terms of reference saying its purpose and listing what functions it accomplishes. While the purpose of the info package is not primarily url manipulation, I had suspected that this sort function was encompassed by the package providing the browse-url function, and that is why I stated that it would be a better modularity if info was relying on a function provided elsewhere --- which indeed is the opposite statement as saying that info has to be standalone and self-contain, and as such re-invent the wheel of url manipulation by itself. Maybe my mistake was however to assume that 'elsewhere' would be best in the same package as that providing 'browse-url', but anyhow, I stand on my point that keeping some URL format specific "\\(?:f\\(?:ile\\|tp\\)\\|https?\\)://" regexp within the the Info-follow-nearest-node is not very good from a modularity point of view. BTW, the 'browse-url-url-at-point' is not documented by a docstring, so can we assume that it is usable outside browse-url ? Anyway, looking at the code I realized that the real work of grabbing the URL is delegated to the thingatpt package, so my suggestion would be that info should also use thingatpt. Probably it would be even better with something like the following construct to remove info URI from those allowed, as they would better be handled from the info browser itself: (let* ((uri-schemes (copy-sequence thing-at-point-uri-schemes)) =A0=A0=A0=A0=A0=A0 (info-uri (car-safe (member "info:" uri-schemes))) =A0=A0=A0=A0=A0=A0 (thing-at-point-uri-schemes (delq info-uri uri-schemes))= ) =A0=A0=A0=A0=A0=A0 (thing-at-point 'url t)) OK, the info browser does not directly knows about info URL, so some additional work is needed to catch them too. To me this is a real corner case scenario to refer to a document inside a Texinfo docuemnt via an info URL: that would mean the document is available only in info format, ie has not be published in Texinfo. I am not even sure that such document exists. Aren't info URL meant only to refer to info document from document written with something else than Texinfo ? =A0 V. De : Eli Zaretskii Envoy=E9 : mardi 26 juin 2018 16:34 =C0 : Vincent Bela=EFche Cc : emacs-orgmode@gnu.org; brandelune@gmail.com; emacs-devel@gnu.org Objet : Re: info URL =AB open at point =BB patch=20 =A0 > From: Vincent Bela=EFche > CC: "emacs-devel@gnu.org" > Date: Tue, 26 Jun 2018 05:47:04 +0000 >=20 > My point is that for a modular design, the same package that provides > the browse-url function, should also provide some match-url-at-point-p > predicate, e.g. There is such a function: browse-url-url-at-point. But in general, I don't agree with your assertion: there's nothing wrong for, e.g., browse-url.el to use a utility function declared somewhere else.=A0 Modularity doesn't mean each module must be standalone and self-contained.