* bug#36916: 27.0.50; bug-reference: Make push button action customizable
@ 2019-08-04 2:30 Michael Heerdegen
2019-08-04 11:06 ` Michael Albinus
0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2019-08-04 2:30 UTC (permalink / raw)
To: 36916
Hi,
`bug-reference-push-button' hardcodes `browse-url' - I have to
redefine/override the complete function definition if I want to, say,
call `debbugs-gnu-bugs' instead of opening a browser when I click on the
bug button. There is even only a url present in the button data, so I
have to parse out the button number from that url string. Would be nice
if it would be easier to change the default behavior.
TIA, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36916: 27.0.50; bug-reference: Make push button action customizable
2019-08-04 2:30 bug#36916: 27.0.50; bug-reference: Make push button action customizable Michael Heerdegen
@ 2019-08-04 11:06 ` Michael Albinus
2019-08-04 12:03 ` Michael Heerdegen
0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2019-08-04 11:06 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: 36916
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Hi,
Hi Michael.
> `bug-reference-push-button' hardcodes `browse-url' - I have to
> redefine/override the complete function definition if I want to, say,
> call `debbugs-gnu-bugs' instead of opening a browser when I click on the
> bug button. There is even only a url present in the button data, so I
> have to parse out the button number from that url string. Would be nice
> if it would be easier to change the default behavior.
There is the minor mode `debbugs-browse-mode'. Enable it, that's it.
See also (info "(debbugs-ug) Minor Mode")
> TIA, Michael.
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36916: 27.0.50; bug-reference: Make push button action customizable
2019-08-04 11:06 ` Michael Albinus
@ 2019-08-04 12:03 ` Michael Heerdegen
2019-08-04 14:49 ` Michael Albinus
0 siblings, 1 reply; 6+ messages in thread
From: Michael Heerdegen @ 2019-08-04 12:03 UTC (permalink / raw)
To: Michael Albinus; +Cc: 36916
Michael Albinus <michael.albinus@gmx.de> writes:
> There is the minor mode `debbugs-browse-mode'. Enable it, that's it.
Hmm, ok. But it's only a minor mode, so instead of having a global
setting, I have to add that minor mode to any place where it's needed.
So, why this does what I want, it's a bit disappointing: bug-reference
hardcodes browse-url, and browse-url can't be changed to handle new
types of urls specially, so the only thing we can do is to hijack
browse-url-browser-function buffer-locally. Can't this even have side
effects? What if the Magit revision buffer includes real links? Oh -
no, I see, that works because the minor mode uses an :before-until
advice. But it will break if something else binds or sets
browse-url-browser-function, right?
Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36916: 27.0.50; bug-reference: Make push button action customizable
2019-08-04 12:03 ` Michael Heerdegen
@ 2019-08-04 14:49 ` Michael Albinus
2019-08-14 11:24 ` Michael Albinus
0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2019-08-04 14:49 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: 36916
Michael Heerdegen <michael_heerdegen@web.de> writes:
Hi Michael.
>> There is the minor mode `debbugs-browse-mode'. Enable it, that's it.
>
> Hmm, ok. But it's only a minor mode, so instead of having a global
> setting, I have to add that minor mode to any place where it's needed.
I have in my .emacs
(add-hook 'bug-reference-mode-hook 'debbugs-browse-mode)
(add-hook 'bug-reference-prog-mode-hook 'debbugs-browse-mode)
> But it will break if something else binds or sets
> browse-url-browser-function, right?
Perhaps. Do we have this request from somebody?
> Michael.
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36916: 27.0.50; bug-reference: Make push button action customizable
2019-08-04 14:49 ` Michael Albinus
@ 2019-08-14 11:24 ` Michael Albinus
2019-08-15 18:14 ` Michael Heerdegen
0 siblings, 1 reply; 6+ messages in thread
From: Michael Albinus @ 2019-08-14 11:24 UTC (permalink / raw)
To: Michael Heerdegen; +Cc: 36916
Michael Albinus <michael.albinus@gmx.de> writes:
Hi Michael.
>>> There is the minor mode `debbugs-browse-mode'. Enable it, that's it.
>>
>> Hmm, ok. But it's only a minor mode, so instead of having a global
>> setting, I have to add that minor mode to any place where it's needed.
>
> I have in my .emacs
>
> (add-hook 'bug-reference-mode-hook 'debbugs-browse-mode)
> (add-hook 'bug-reference-prog-mode-hook 'debbugs-browse-mode)
>
>> But it will break if something else binds or sets
>> browse-url-browser-function, right?
>
> Perhaps. Do we have this request from somebody?
I believe we can close this request. There's nothing else to do.
>> Michael.
Best regards, Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36916: 27.0.50; bug-reference: Make push button action customizable
2019-08-14 11:24 ` Michael Albinus
@ 2019-08-15 18:14 ` Michael Heerdegen
0 siblings, 0 replies; 6+ messages in thread
From: Michael Heerdegen @ 2019-08-15 18:14 UTC (permalink / raw)
To: Michael Albinus; +Cc: 36916-done
Michael Albinus <michael.albinus@gmx.de> writes:
> I believe we can close this request. There's nothing else to do.
Ok, closing. Thanks for discussing the issue.
Michael.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-15 18:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-04 2:30 bug#36916: 27.0.50; bug-reference: Make push button action customizable Michael Heerdegen
2019-08-04 11:06 ` Michael Albinus
2019-08-04 12:03 ` Michael Heerdegen
2019-08-04 14:49 ` Michael Albinus
2019-08-14 11:24 ` Michael Albinus
2019-08-15 18:14 ` Michael Heerdegen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).