GNU bug report logs - #69627
30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to return the actual prefix arg

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Fri, 8 Mar 2024 06:06:01 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Jim Porter <jporterbugs <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 69627 in the body.
You can then email your comments to 69627 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#69627; Package emacs. (Fri, 08 Mar 2024 06:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jim Porter <jporterbugs <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 08 Mar 2024 06:06:01 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to return the
 actual prefix arg
Date: Thu, 7 Mar 2024 22:04:39 -0800
[Message part 1 (text/plain, inline)]
By default this shouldn't do anything different from before. However, 
with this patch, functions for 'browse-url-browser-function' can look at 
the argument (as modified by 'browse-url-new-window-flag') and do 
something special. For example, with this patch, I have a custom browser 
function that works like this:

  M-x browse-url      Open in Firefox
  C-u M-x browse-url  Open in EWW
  C-- M-x browse-url  Open in Firefox Private Browsing
[0001-Let-browse-url-interactive-arg-return-more-values-fo.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69627; Package emacs. (Fri, 08 Mar 2024 07:45:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: 69627 <at> debbugs.gnu.org
Subject: Re: bug#69627: 30.0.50;
 [PATCH] Allow 'browse-url-interactive-arg' to return the actual
 prefix arg
Date: Fri, 08 Mar 2024 09:43:42 +0200
> Date: Thu, 7 Mar 2024 22:04:39 -0800
> From: Jim Porter <jporterbugs <at> gmail.com>
> 
> By default this shouldn't do anything different from before. However, 
> with this patch, functions for 'browse-url-browser-function' can look at 
> the argument (as modified by 'browse-url-new-window-flag') and do 
> something special. For example, with this patch, I have a custom browser 
> function that works like this:
> 
>    M-x browse-url      Open in Firefox
>    C-u M-x browse-url  Open in EWW
>    C-- M-x browse-url  Open in Firefox Private Browsing

Shouldn't the effect of this change be documented in some doc string?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69627; Package emacs. (Fri, 08 Mar 2024 18:31:02 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69627 <at> debbugs.gnu.org
Subject: Re: bug#69627: 30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to
 return the actual prefix arg
Date: Fri, 8 Mar 2024 10:29:05 -0800
[Message part 1 (text/plain, inline)]
On 3/7/2024 11:43 PM, Eli Zaretskii wrote:
> Shouldn't the effect of this change be documented in some doc string?

How about this? I'm not sure if using "xor" in the docstrings is 
over-explaining things, but then I don't know if there's a better way to 
describe exactly what would happen.
[0001-Let-browse-url-interactive-arg-return-more-values-fo.patch (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69627; Package emacs. (Fri, 08 Mar 2024 19:47:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: 69627 <at> debbugs.gnu.org
Subject: Re: bug#69627: 30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to
 return the actual prefix arg
Date: Fri, 08 Mar 2024 21:46:12 +0200
> Date: Fri, 8 Mar 2024 10:29:05 -0800
> Cc: 69627 <at> debbugs.gnu.org
> From: Jim Porter <jporterbugs <at> gmail.com>
> 
> On 3/7/2024 11:43 PM, Eli Zaretskii wrote:
> > Shouldn't the effect of this change be documented in some doc string?
> 
> How about this? I'm not sure if using "xor" in the docstrings is 
> over-explaining things, but then I don't know if there's a better way to 
> describe exactly what would happen.

Just explain it in plain English, okay?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69627; Package emacs. (Fri, 08 Mar 2024 20:06:01 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69627 <at> debbugs.gnu.org
Subject: Re: bug#69627: 30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to
 return the actual prefix arg
Date: Fri, 8 Mar 2024 12:03:58 -0800
On 3/8/2024 11:46 AM, Eli Zaretskii wrote:
>> Date: Fri, 8 Mar 2024 10:29:05 -0800
>> Cc: 69627 <at> debbugs.gnu.org
>> From: Jim Porter <jporterbugs <at> gmail.com>
>>
>> On 3/7/2024 11:43 PM, Eli Zaretskii wrote:
>>> Shouldn't the effect of this change be documented in some doc string?
>>
>> How about this? I'm not sure if using "xor" in the docstrings is
>> over-explaining things, but then I don't know if there's a better way to
>> describe exactly what would happen.
> 
> Just explain it in plain English, okay?

Something like this?

"NEW-WINDOW-FLAG is the prefix arg; if `browse-url-new-window-flag' is 
non-nil, invert the prefix arg instead."

That's the conceptual idea behind 'browse-url-new-window-flag' anyway, 
and the defcustom is specified to be only a boolean, so the above should 
hopefully be enough.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69627; Package emacs. (Fri, 08 Mar 2024 20:22:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jim Porter <jporterbugs <at> gmail.com>
Cc: 69627 <at> debbugs.gnu.org
Subject: Re: bug#69627: 30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to
 return the actual prefix arg
Date: Fri, 08 Mar 2024 22:18:44 +0200
> Date: Fri, 8 Mar 2024 12:03:58 -0800
> Cc: 69627 <at> debbugs.gnu.org
> From: Jim Porter <jporterbugs <at> gmail.com>
> 
> On 3/8/2024 11:46 AM, Eli Zaretskii wrote:
> >>
> >> How about this? I'm not sure if using "xor" in the docstrings is
> >> over-explaining things, but then I don't know if there's a better way to
> >> describe exactly what would happen.
> > 
> > Just explain it in plain English, okay?
> 
> Something like this?
> 
> "NEW-WINDOW-FLAG is the prefix arg; if `browse-url-new-window-flag' is 
> non-nil, invert the prefix arg instead."

Yes, something like this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#69627; Package emacs. (Fri, 08 Mar 2024 21:05:01 GMT) Full text and rfc822 format available.

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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69627 <at> debbugs.gnu.org
Subject: Re: bug#69627: 30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to
 return the actual prefix arg
Date: Fri, 8 Mar 2024 13:02:32 -0800
[Message part 1 (text/plain, inline)]
On 3/8/2024 12:18 PM, Eli Zaretskii wrote:
> Yes, something like this.

Thanks. Updated patch attached. If no one has any other concerns, I'll 
merge this in the next day or two.
[0001-Let-browse-url-interactive-arg-return-more-values-fo.patch (text/plain, attachment)]

Reply sent to Jim Porter <jporterbugs <at> gmail.com>:
You have taken responsibility. (Sun, 10 Mar 2024 21:11:01 GMT) Full text and rfc822 format available.

Notification sent to Jim Porter <jporterbugs <at> gmail.com>:
bug acknowledged by developer. (Sun, 10 Mar 2024 21:11:01 GMT) Full text and rfc822 format available.

Message #28 received at 69627-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 69627-done <at> debbugs.gnu.org
Subject: Re: bug#69627: 30.0.50; [PATCH] Allow 'browse-url-interactive-arg' to
 return the actual prefix arg
Date: Sun, 10 Mar 2024 14:09:13 -0700
On 3/8/2024 1:02 PM, Jim Porter wrote:
> On 3/8/2024 12:18 PM, Eli Zaretskii wrote:
>> Yes, something like this.
> 
> Thanks. Updated patch attached. If no one has any other concerns, I'll 
> merge this in the next day or two.

Now merged to master as 46afc91c9f7, and closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 08 Apr 2024 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 128 days ago.

Previous Next


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