Gnus development mailing list
 help / color / mirror / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: ding@gnus.org
Subject: Re: Summary minor mode for Emacs-hacking groups?
Date: Mon, 11 May 2020 18:09:15 +0200	[thread overview]
Message-ID: <87wo5io3mc.fsf@gnu.org> (raw)
In-Reply-To: <875zd7h8jf.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Thu, 07 May 2020 12:03:32 -0700")

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

Hi Eric,

>> I did so, and it works just fine.  Things like bug#19199 are rendered
>> as links and invoking bug-reference-push-button (C-c RET by default)
>> opens the debbugs bug page in your browser.  Some adjustments could
>> be made:
>>
>>   * Tabbing through the article just recognizes Gnus buttons and not
>>     those bug-reference links so you have to navigate to them manually.
>>
>>   * Maybe you'd want to open debbugs bugs using the debbugs emacs
>>     package rather than your browser (but this is nothing Gnus-related).
>
> Looks like you've been busy! So number two now works correctly, but
> still not number one? I wonder if there's a way to get buttons and
> links to be treated the same by Gnus.

This seems to work for buttonizing bug references in articles, and
hitting RET on such a button opens the bug in debbugs (if you have it
installed):

--8<---------------cut here---------------start------------->8---
modified   lisp/gnus/gnus-art.el
@@ -7945,6 +7945,15 @@ gnus-article-add-buttons
       ;; We skip the headers.
       (article-goto-body)
       (setq beg (point))
+      ;; If bug-reference-mode is active, add an entry to buttonize bug
+      ;; references.
+      (when (and (boundp 'bug-reference-mode)
+                 bug-reference-mode)
+        (declare-function bug-reference-push-button "bug-reference"
+                          (&optional pos _use-mouse-action))
+        (push (list bug-reference-bug-regexp 0 t
+                    #'bug-reference-push-button)
+              alist))
       (while (setq entry (pop alist))
 	(setq regexp (eval (car entry)))
 	(goto-char beg)
--8<---------------cut here---------------end--------------->8---

I'm not sure if that's the right place to add that functionality.

> It would also be useful to have the bug links be accessible to "w" in
> the Summary buffer.

Well, you can use C-c RET or your custom binding of
`bug-reference-push-button' when you've enabled `bug-reference-mode'
there.

Bye,
Tassilo
-- 
Dr. Tassilo Horn
SHD Einzelhandelssoftware GmbH
Rennweg 60, 56626 Andernach, Deutschland
Telefon +49 2632 295-449
Telefax +49 2632 295-100
E-Mail: hta@shd.de, Homepage: www.shd.de
Rechtsform GmbH - Sitz Andernach
Registergericht: Amtsgericht Koblenz HRB 20741
Geschäftsführer: Stefan Hahne


  reply	other threads:[~2020-05-11 16:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-01 19:06 Eric Abrahamsen
2020-05-01 19:24 ` Andreas Schwab
2020-05-01 19:32   ` Eric Abrahamsen
2020-05-01 22:34 ` Emanuel Berg
2020-05-01 23:31   ` Eric Abrahamsen
2020-05-05  2:44     ` Emanuel Berg
2020-05-02  6:58 ` Tassilo Horn
2020-05-02  7:18   ` Tassilo Horn
2020-05-02 15:15     ` Eric Abrahamsen
2020-05-02 21:21     ` Eric Abrahamsen
2020-05-07 19:03     ` Eric Abrahamsen
2020-05-11 16:09       ` Tassilo Horn [this message]
2020-05-14  0:28         ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo5io3mc.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=ding@gnus.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).