From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gabriel Newsgroups: gmane.emacs.bugs Subject: bug#59443: 29.0.50; [PATCH] Allow goto-address-at-point to use secondary browser Date: Mon, 21 Nov 2022 15:31:13 -0300 Message-ID: References: <87v8n8dze6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35482"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: 59443@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 21 19:32:24 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxBai-00095u-1y for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Nov 2022 19:32:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oxBaO-0004yo-KE; Mon, 21 Nov 2022 13:32:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxBaN-0004xO-6F for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:32:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oxBaM-0000Eb-Sq for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oxBaM-0008W0-Gf for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gabriel Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2022 18:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59443 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166905549232678 (code B ref -1); Mon, 21 Nov 2022 18:32:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Nov 2022 18:31:32 +0000 Original-Received: from localhost ([127.0.0.1]:48811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxBZr-0008Uy-FP for submit@debbugs.gnu.org; Mon, 21 Nov 2022 13:31:32 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:32988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oxBZo-0008Up-TX for submit@debbugs.gnu.org; Mon, 21 Nov 2022 13:31:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxBZn-0004qn-Oq for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:31:27 -0500 Original-Received: from mail-dm6nam11olkn2059.outbound.protection.outlook.com ([40.92.19.59] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oxBZj-00005U-NV for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 13:31:27 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VILcKcKrypjIicCotBN81ntNnl31nTaLwMm4GarUyC/w39lsqqxECm2esjSkR4yuvVYFl2EbCscx9s4Jf7yXaSd2YOrQRiG1iCt3a9QTujaBA6o5OifkTPeIs/eEnjhwwLsM1kOyj5OfMXNbNJ/xTnBnAsXEtoY6428cegY9QiJS5oH5NnH+SfiANhD/uUdovuIZS9gAWKNyvYIQSZhRWdUd+Eht3QWV4EwK3szwR5RHos/1tbx7ToO5TDxNN0IOUeH+eBDaaoFdmils6jhCKeU8r0yM3POyK+NiJrjkLrK0pcZbfOB/Fv9hSrmGVRWIwN/mA1C8+uBPvF1tggL/nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vVI0CrwWGwsh067PwIb0dfY2A5BkMoHEY2OGK2HGgh4=; b=V1fibTfnCwwYelig8JbUdtzjmP0aw2p8vc1cm9w+FwXbdyp4YjwafvxADIovSl5vrfWHjEyHY0JC0OuNrXxj472MB4/THEsbZmQhbt/LXp7uXiW15TuhQtgbEXa5jKrF9TnEtifTJnPQqZOywvBjmac4hkLKm4yJ5uSJdaPoU4dYoOnFFU7LmLlpwq0rtnObxEu86LCXMSQNvKVt9TDwnIJZI6Ck81HtF4z9NIe4AKiO2xW+C0TjULOnfUBBe6umhs51BrOdxM4c5tS/qMpTg3aVHYnud9kQHkwJc7S7QK6mb2Rfy8+Ks9OEx5bGBrhHVCT/jzpWtpXwnQdxciq/1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vVI0CrwWGwsh067PwIb0dfY2A5BkMoHEY2OGK2HGgh4=; b=UqfthVQNGTQ5DGFkbcWGIuq878ta9A8938QgjEW5htXAEnrQw/gURmqXuukB5+FYpNgw4I1yROprDRmbK/IElGuDiDzsj6tdp/eRtHOWEgb85mTvC+9qHzI4Agnf80GLzvZPx/ffr4i8UlgWnR67O042+BCNdUz28GKVCMMlAIVL5y1Qnahaaldy/lO+HyFJEO/xG7pKtEdYtEvMvPQQi++Fd4l/WGTmDBoRowPp2hk9EUEketNVgw+nk+lFX/08kNYl4056kV5jZNQ3zTVkMsZjTUm3ZYYhl2tn0H2/HqvvVA4LJQ3zFg3i8iZr1WEb0hK/rqSlkopMbeDDTciFOg== Original-Received: from SJ0PR06MB8609.namprd06.prod.outlook.com (2603:10b6:a03:40c::11) by BN6PR06MB2450.namprd06.prod.outlook.com (2603:10b6:404:2a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5857.13; Mon, 21 Nov 2022 18:31:20 +0000 Original-Received: from SJ0PR06MB8609.namprd06.prod.outlook.com ([fe80::33ae:d3a7:24ae:5c6f]) by SJ0PR06MB8609.namprd06.prod.outlook.com ([fe80::33ae:d3a7:24ae:5c6f%4]) with mapi id 15.20.5857.017; Mon, 21 Nov 2022 18:31:20 +0000 In-Reply-To: <87v8n8dze6.fsf@gmail.com> (Visuwesh's message of "Mon, 21 Nov 2022 22:21:29 +0530") X-TMN: [A0bUOgrpzB1YpsZkMyB/VXp95Zv1D25B0/AZb8sbYUS6aZGvDAOvdF6Tgq4+q4dM] X-ClientProxiedBy: CP4P284CA0015.BRAP284.PROD.OUTLOOK.COM (2603:10d6:103:128::12) To SJ0PR06MB8609.namprd06.prod.outlook.com (2603:10b6:a03:40c::11) X-Microsoft-Original-Message-ID: <87y1s488i6.fsf@hotmail.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR06MB8609:EE_|BN6PR06MB2450:EE_ X-MS-Office365-Filtering-Correlation-Id: f12974af-6f1f-469b-96b4-08dacbee9522 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g5+YfZmEX97Swcrqu34PPToh+BVdl06l0VErYuRT3kErA4CqSOosDgRj+OwY6aFqPA9PPhXrseqE6pvX0nSsTkW0n1RbMlGV48qmKcs1i+HjmXhgn5N+rNWmfDjxHzXjdFAktt4H0olisAnrg71k3TT3NzHtQEg817u0+Pl+yKskSsbMjMtosyS2py7oEy2F+5m8mNC4Xgjx7pKzotqZB3MXiniLX2TxkqLVSS71ARuE2lrZPRl+w+vNVhxO4F4esjBsv2JBhL0vXVQiFTfQiMkUqGK+HuXh3tjbFIpFxfGkWu3h2G2YKxJtZrLtFsQejUoNkOo28KJT/en+QHB2GZfwA2r8YHt4CF6fhR4BCfymgM/lY13MamXJoE/ftQzCowJ0QKShot/sdatHqEiL6TCRRONX+WNqY18/AD2MpCZvXQ8Z55rlTdATcfs9VpCnvYo3GKKZmIIVw4FMPMJD+8GKIk+v+iM6Gn2WGZA2VCuzRiSIunft/7fZYPkzXf3RMjpiXFHR5Bs0p+uDQJ9PW3YcIzbeUUOFzPIWTrMPYx6M5kWEQCnoLupnFVjwj4KdNIZyGoaK7fkrmvid0nwz7XGviGIrDpfM34vNnMCFBBEtQixxguUk4MfID5NGtV6ksDXkM8ixvpH8xjqRvsEwN0H456kWI9qtGkT1LojzXEM= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GvfwdQ554pm535R+nBn8/+uUcuXooZtGdBTHzycPxFxSjMCD3w7T07W6mg4bCMGUuu+Xq+Rf0n0brZYwbBVBHl7lYyk5ewVf0KLyGoKIZjKPO/Ro+bcYjAZcZEeGWOkaJ490xu9SSOrP0RGvKYAnWa6oZNjS3eb6NZSPc4aqJrVT5l0rsS99LL2bh4SXhcpdVOPKLtwPxK7UYzF2O84EyyRr1XYjiQzrf9mGTJnSDwj0mXaeLiq5ggpR9+3bnndgPsTycgj1Tgb7XyHt8+JfXRmS4xXbz96CJmJElVo/Kdc3/QJfttFcqbSHIBCgab1MLMh6+PpARnJ3QEiH/OcEHfqyeR6IchRmRXU29vvzMSdQPRjGpCLkFcZ39T4QtDEQwG+dyDH36M/MY+Txd2y3ftAqmFm9Ic4vk5bvdMdDGMsqAOvr6EL//JOENLR/xE+kvMerLQEdyv6oHMjyBmNKIke8GK0GAmx2Gh3xOGqQkR0R2uQuiZ7zZ6m7+iTIRgPltwpSZNYyFbJ3I+Vl//TWmrKZS5wS5RUdhg05ngnLOSwuwm561H3dO1B1+jfeRgtd7BVQCEkmsTaiZPqw/6lIYyzqICr4IdGPFo/Ltz//eHJt51NpxHVImi4LTvFPnzq560yDnz1YxL+1Kw5/7ZPVaFwj+7s5y58ePqueqJ5ucXgE4PQrMCrAmhTbeLn9jBNqWtK2SvQlsBPmLDgfLXfC/LtJeAf/4NZ7iCl3dht9WoKBGX5BTztC5G4uq8 HqUkZypTfu/mXXgkci0iFptVlyLpsCoCUEklN9NM+t7hzmYIXoOOBPMh5Dxx/FZ9Vf4B8Jp4DKjCMyCJfWuCjmz71F2gmFXTdu X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-89723.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: f12974af-6f1f-469b-96b4-08dacbee9522 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR06MB8609.namprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2022 18:31:20.3570 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR06MB2450 Received-SPF: pass client-ip=40.92.19.59; envelope-from=gabriel376@hotmail.com; helo=NAM11-DM6-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248565 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Visuwesh writes: > [=E0=AE=A4=E0=AE=BF=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B3=E0=AF=8D =E0=AE= =A8=E0=AE=B5=E0=AE=AE=E0=AF=8D=E0=AE=AA=E0=AE=B0=E0=AF=8D 21, 2022] Gabriel= wrote: > >> [...] >> From 2151f92bf5d07106d7f322ea69bfc745b0bf1d28 Mon Sep 17 00:00:00 2001 >> From: Gabriel do Nascimento Ribeiro >> Date: Mon, 21 Nov 2022 08:08:52 -0300 >> Subject: [PATCH 1/1] Allow goto-address-at-point to use secondary browse= r >> >> * lisp/net/dictionary.el (goto-address-at-point): Call > ^^^^^^^^^^^^^^^^^^^^^^ > Hmm, the patch touches lisp/net/goto-addr.el but the commit message > refers to another file. > Thanks, fixed. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Allow-goto-address-at-point-to-use-secondary-browser.patch >>From 2151f92bf5d07106d7f322ea69bfc745b0bf1d28 Mon Sep 17 00:00:00 2001 From: Gabriel do Nascimento Ribeiro Date: Mon, 21 Nov 2022 08:08:52 -0300 Subject: [PATCH 1/1] Allow goto-address-at-point to use secondary browser * lisp/net/goto-addr.el (goto-address-at-point): Call `browse-url-button-open-url', so a prefix argument uses `browse-url-secondary-browser-function'. --- lisp/net/goto-addr.el | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 86cf98004b..03e14c9268 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -222,25 +222,28 @@ goto-address-fontify-region ;;;###autoload (defun goto-address-at-point (&optional event) - "Send to the e-mail address or load the URL at point. -Send mail to address at point. See documentation for -`goto-address-find-address-at-point'. If no address is found -there, then load the URL at or before point." + "Start composing a new message to the e-mail address at point or +open URL at point. + +If no e-mail address is found at point, use the URL at or before +point. See `goto-address-find-address-at-point'. + +With prefix argument, use the secondary browser to open the URL. +See `browse-url-button-open-url'." (interactive (list last-input-event)) (save-excursion (if event (posn-set-point (event-end event))) (let ((address (save-excursion (goto-address-find-address-at-point)))) (if (and address - (save-excursion - (goto-char (previous-single-char-property-change - (point) 'goto-address nil - (line-beginning-position))) - (not (looking-at goto-address-url-regexp)))) - (compose-mail address) - (let ((url (browse-url-url-at-point))) - (if url - (browse-url url) - (error "No e-mail address or URL found"))))))) + (save-excursion + (goto-char (previous-single-char-property-change + (point) 'goto-address nil + (line-beginning-position))) + (not (looking-at goto-address-url-regexp)))) + (compose-mail address) + (if-let ((url (browse-url-url-at-point))) + (browse-url-button-open-url url) + (error "No e-mail address or URL found")))))) (defun goto-address-find-address-at-point () "Find e-mail address around or before point. -- 2.34.1 --=-=-= Content-Type: text/plain --- Gabriel --=-=-=--