GNU bug report logs - #59443
29.0.50; [PATCH] Allow goto-address-at-point to use secondary browser

Previous Next

Package: emacs;

Reported by: Gabriel <gabriel376 <at> hotmail.com>

Date: Mon, 21 Nov 2022 11:46:01 UTC

Severity: wishlist

Tags: patch

Found in version 29.0.50

Fixed in version 29.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59443 in the body.
You can then email your comments to 59443 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#59443; Package emacs. (Mon, 21 Nov 2022 11:46:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel <gabriel376 <at> hotmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 21 Nov 2022 11:46:01 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] Allow goto-address-at-point to use secondary browser
Date: Mon, 21 Nov 2022 08:45:26 -0300
[Message part 1 (text/plain, inline)]
Description:

When `goto-address-mode' is enabled, it's not possible to make "C-c RET"
(`goto-address-at-point') open an URL with
`browse-url-secondary-browser-function`.

Steps:
1) emacs -Q (master "6b0179f7908c658342d1e642e5444e3d2e1cd997")

2) eval
(progn
  (require 'browse-url)
  (setopt browse-url-browser-function           #'eww-browse-url
          browse-url-secondary-browser-function #'browse-url-default-browser)
  (scratch-buffer)
  (goto-address-mode))

3) Insert "https://www.gnu.org/software/emacs/" in the *scratch* buffer

4) Put point at URL and execute C-c RET (`goto-address-at-point')

Result: `browse-url-browser-function' opens the URL with the default
browser function.  It's not possible to specify the use of the
`browse-url-secondary-browser-function'.

A proposed patch is attached.  The prefix argument will not affect the
argument CONTINUE of `compose-email'.

[0001-Allow-goto-address-at-point-to-use-secondary-browser.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
---
Gabriel

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59443; Package emacs. (Mon, 21 Nov 2022 13:53:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Gabriel <gabriel376 <at> hotmail.com>, 59443 <at> debbugs.gnu.org
Subject: Re: bug#59443: 29.0.50; [PATCH] Allow goto-address-at-point to use
 secondary browser
Date: Mon, 21 Nov 2022 05:52:41 -0800
I didn't really study the patch or the issue, but here are two nits.

Gabriel <gabriel376 <at> hotmail.com> writes:

> * lisp/net/dictionary.el (goto-address-at-point): Call
>   `browse-url-button-open-url', so a prefix argument uses
>   `browse-url-secondary-browser-function'.
  ^^

We do not indent the commit message like this.  It should start at
column 0.


>  ;;;###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."
> +  "Compose a new message to the e-mail address or browse the URL at
> +point.

The first line of a docstring should be a complete sentence (for
e.g. eldoc and apropos).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59443; Package emacs. (Mon, 21 Nov 2022 15:05:01 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#59443: 29.0.50; [PATCH] Allow goto-address-at-point to use
 secondary browser
Date: Mon, 21 Nov 2022 12:03:56 -0300
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefankangas <at> gmail.com> writes:

> I didn't really study the patch or the issue, but here are two nits.
>
> Gabriel <gabriel376 <at> hotmail.com> writes:
>
>> * lisp/net/dictionary.el (goto-address-at-point): Call
>>   `browse-url-button-open-url', so a prefix argument uses
>>   `browse-url-secondary-browser-function'.
>   ^^
>
> We do not indent the commit message like this.  It should start at
> column 0.
>
>
>>  ;;;###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."
>> +  "Compose a new message to the e-mail address or browse the URL at
>> +point.
>
> The first line of a docstring should be a complete sentence (for
> e.g. eldoc and apropos).

Thanks for the quick review, Stefan.

Please find attached an updated patch.  I fixed the commit message
indent and rephrased the first line of docstring to be a complete
sentence (based on the docstring's of `compose-mail' and
`browse-url-button-open-url').

[0001-Allow-goto-address-at-point-to-use-secondary-browser.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
---
Gabriel

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59443; Package emacs. (Mon, 21 Nov 2022 16:52:02 GMT) Full text and rfc822 format available.

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

From: Visuwesh <visuweshm <at> gmail.com>
To: Gabriel <gabriel376 <at> hotmail.com>
Cc: 59443 <at> debbugs.gnu.org
Subject: Re: bug#59443: 29.0.50; [PATCH] Allow goto-address-at-point to use
 secondary browser
Date: Mon, 21 Nov 2022 22:21:29 +0530
[திங்கள் நவம்பர் 21, 2022] Gabriel wrote:

> [...]
> From 2151f92bf5d07106d7f322ea69bfc745b0bf1d28 Mon Sep 17 00:00:00 2001
> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
> Date: Mon, 21 Nov 2022 08:08:52 -0300
> Subject: [PATCH 1/1] Allow goto-address-at-point to use secondary browser
>
> * 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.

> `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
> [...]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59443; Package emacs. (Mon, 21 Nov 2022 18:32:02 GMT) Full text and rfc822 format available.

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

From: Gabriel <gabriel376 <at> hotmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 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 part 1 (text/plain, inline)]
Visuwesh <visuweshm <at> gmail.com> writes:

> [திங்கள் நவம்பர் 21, 2022] Gabriel wrote:
>
>> [...]
>> From 2151f92bf5d07106d7f322ea69bfc745b0bf1d28 Mon Sep 17 00:00:00 2001
>> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
>> Date: Mon, 21 Nov 2022 08:08:52 -0300
>> Subject: [PATCH 1/1] Allow goto-address-at-point to use secondary browser
>>
>> * 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.

[0001-Allow-goto-address-at-point-to-use-secondary-browser.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
---
Gabriel

Severity set to 'wishlist' from 'normal' Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 24 Nov 2022 18:27:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#59443; Package emacs. (Fri, 25 Nov 2022 00:35:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Gabriel <gabriel376 <at> hotmail.com>
Cc: 59443 <at> debbugs.gnu.org
Subject: Re: bug#59443: 29.0.50; [PATCH] Allow goto-address-at-point to use
 secondary browser
Date: Thu, 24 Nov 2022 16:34:24 -0800
close 59443 29.1
thanks

Gabriel <gabriel376 <at> hotmail.com> writes:

> Visuwesh <visuweshm <at> gmail.com> writes:
>
>> [திங்கள் நவம்பர் 21, 2022] Gabriel wrote:
>>
>>> [...]
>>> From 2151f92bf5d07106d7f322ea69bfc745b0bf1d28 Mon Sep 17 00:00:00 2001
>>> From: Gabriel do Nascimento Ribeiro <gabriel376 <at> hotmail.com>
>>> Date: Mon, 21 Nov 2022 08:08:52 -0300
>>> Subject: [PATCH 1/1] Allow goto-address-at-point to use secondary browser
>>>
>>> * 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.

Thanks, the commit looks good to me so I pushed it to master (commit
29a262bfa7).  See also the documentation fixes I made in a followup
patch (commit 60354fcf49).




bug marked as fixed in version 29.1, send any further explanations to 59443 <at> debbugs.gnu.org and Gabriel <gabriel376 <at> hotmail.com> Request was from Stefan Kangas <stefankangas <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 25 Nov 2022 00:35:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 23 Dec 2022 12:24:13 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 240 days ago.

Previous Next


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