all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: "Björn Bidar" <bjorn.bidar@thaodan.de>
Cc: Stefan Monnier via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>,
	 Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: A few questions about debbugs
Date: Sat, 31 Aug 2024 19:21:43 +0200	[thread overview]
Message-ID: <877cbwliag.fsf@gmx.de> (raw)
In-Reply-To: <87a5gsn2j9.fsf@> ("Björn Bidar"'s message of "Sat, 31 Aug 2024 18:19:06 +0300")

Björn Bidar <bjorn.bidar@thaodan.de> writes:

Hi Björn,

>> I've assembled a proof-of-concept for debbugs-gnu-search, see appended
>> patch. It is on top of the ELPA git repository, but it might apply also
>> on the last distributed debbugs release (didn't check). Feedback appreciated.
>
> Could you next time create a branch with the patch in debbugs git so
> it's easier to test the patch if already using debbugs from git?

Debbugs lives in the elpa git, as branch. Adding another branch to a
branch seems to be overkill to me.

I've pushed everything to the elps repo (this is much more but the last
patch I've sent, covering almost all debbugs-gnu-* and debbugs-org-*
commands). You can install this WIP as special development elpa
package. Add the following:

--8<---------------cut here---------------start------------->8---
(add-to-list 'package-archives
             '("devel" . "https://elpa.gnu.org/devel/"))
--8<---------------cut here---------------end--------------->8---

After refreshing your package list, you wil see package debbugs
0.40.0.20240812.95045. Install it, and play with it :-)

> To bad Debbugs-gnus-apply-patch only works for Emacs :D
> Applying a patch with Gnus was harder than it should be, I have to
> somehow integrate diff-mode and then magit-apply-patch better in Gnus.
> But that's OT anyway.

You don't need all of this. Emacs has built-in patch support, for
example via Menu Bar -> Tools -> Apply Patch -> To a File

>>    ;; Do the search.
>> -  (debbugs-gnu severities packages archivedp)
>> -  (message "Search finished"))
>> +  (make-thread
>> +   (lambda ()
>> +     (debbugs-gnu severities packages archivedp)
>> +     (message
>> +      (substitute-command-keys
>> +       "Search finished, visit buffer via \\[debbugs-gnu-show-last-result]")))))
>
> I think it would also be an option to have a flag to open the search
> results by default after they are found. For searches that should not
> take long this is the expected behavior especially for new users.

But then we have the problem of interrupting the user, again. A user
doesn't know in advance, how long a search will run.

>> +;;;###autoload
>> +(defun debbugs-gnu-show-last-result ()
>> +  "Switch to buffer with the recent retrieved bugs"
>> +  (interactive)
>> +  (when (ignore-errors (get-buffer debbugs-gnu-current-buffer))
>> +    (pop-to-buffer-same-window debbugs-gnu-current-buffer)))
>
> What's the reason for pop-to-buffer-same-window, shouldn't the user be
> able to choose where the search results are opened? Personally I would
> use display-buffer and than customize if the buffer should be opened in
> the same buffer.

Well, this was discussed in bug#36917. Since I'm not familiar with the
display-buffer machinery, I've simply followed the recommendation. They
say that one could use display-buffer-alist for configuration then.

I've also updated the debbugs-ug manual. There is a new section, saying

--8<---------------cut here---------------start------------->8---
1.1 Asynchronous Work
=====================

The access to the GNU Debbugs server happens via a SOAP interface.
This can be slow, especially, when a large number of bugs must be
retrieved, or an extensive search is applied.  If Emacs is compiled
with threading support, this work is performed by a thread.  During
the bug retrieval, it is still possible to continue the work with
Emacs then.

   After the bug retrieval is finished, a respective message will
appear in the minibuffer.

 -- Command: debbugs-gnu-show-last-result

     This command switches the current buffer to the recent buffer
     containing bug reports.  It is useful to bind this command to a
     function key in your ‘.emacs’ file, like

          (keymap-global-set "<f5>" 'debbugs-gnu-show-last-result)

 -- User Option: debbugs-gnu-use-threads

     The user option ‘debbugs-gnu-use-threads’, when set to ‘nil’,
     disables threaded bug retrieval, and synchronous bug retrieval is
     performed.  Threaded bug retrieval is also suppressed if the
     number of bugs to be retrieved is known in advance, and it is
     smaller than the user option ‘debbugs-gnu-use-threads-lower-limit’.
--8<---------------cut here---------------end--------------->8---

Feedback welcome!

Best regards, Michael.



  parent reply	other threads:[~2024-08-31 17:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-11 22:26 A few questions about debbugs Björn Bidar
2024-08-13  7:27 ` Michael Albinus
2024-08-19  9:26   ` Björn Bidar
     [not found]   ` <871q2krhgh.fsf@>
2024-08-19 11:03     ` Michael Albinus
2024-08-20 10:38       ` Björn Bidar
     [not found]       ` <87a5h7o4wu.fsf@>
2024-08-21  8:43         ` Michael Albinus
2024-08-21 13:24           ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-08-23  8:00             ` Michael Albinus
2024-08-28 11:42               ` Michael Albinus
2024-08-31 15:19                 ` Björn Bidar
     [not found]                 ` <87a5gsn2j9.fsf@>
2024-08-31 17:21                   ` Michael Albinus [this message]
2024-08-23  4:18           ` Björn Bidar
     [not found]           ` <87seuvg9ck.fsf@>
2024-08-23  8:23             ` Michael Albinus
2024-08-23  8:31               ` Michael Albinus

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=877cbwliag.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=bjorn.bidar@thaodan.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.