From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.help Subject: Re: A few questions about debbugs Date: Sat, 31 Aug 2024 19:21:43 +0200 Message-ID: <877cbwliag.fsf@gmx.de> References: <871q2uelx6.fsf@thaodan.de> <87r0as992a.fsf@gmx.de> <87msl83hbe.fsf@gmx.de> <874j7e2rlg.fsf@gmx.de> <87ttfc3h7d.fsf@gmx.de> <87frqolvqj.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32041"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Monnier via Users list for the GNU Emacs text editor , Stefan Monnier To: =?utf-8?Q?Bj=C3=B6rn?= Bidar Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 31 19:22:29 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1skRnx-0008E7-3L for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 31 Aug 2024 19:22:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skRnU-0003Rh-08; Sat, 31 Aug 2024 13:22:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skRnS-0003RR-LX for help-gnu-emacs@gnu.org; Sat, 31 Aug 2024 13:21:58 -0400 Original-Received: from mout.gmx.net ([212.227.15.15]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1skRnQ-0004ae-Gy for help-gnu-emacs@gnu.org; Sat, 31 Aug 2024 13:21:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1725124905; x=1725729705; i=michael.albinus@gmx.de; bh=EI0gQ/9rApVzwGqfal1lEe6bnNOY7lNRn/f7UCmFC8s=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:cc: content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=cB3rZ9Cz0RRBUQwB+xdMQ88YL6uJRH3t8l1gmtpA9sd50quBa5XlDHTaUAb3iAoR qICL3XeMzRmwOo9Xh3knnhtnVjp49A84vjV0FaNLpOwgL/Etm6eWzzkD25B7dPU4R uFNfN7p1ylb7GjXYbgDI5vaomH/CM0iFHToV9hPI+Afl5/sNmmibmwQLAECsH/Ngk PT3VQymS1BwS8FEdLrj083JcI+UQCvY8MTNLIGh9U9lRMhrqFwgKPGlkdp0bjeXlY d/VCmyjAPUMoWufwDqfExAj4FoPjua6hjCZYld+COn76Q51HiF38eOlz/UYpbkXLg S2baD7OSNUY9usrjyA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from gandalf.gmx.de ([185.89.38.155]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MqJm5-1sEyr546JX-00l7pO; Sat, 31 Aug 2024 19:21:45 +0200 In-Reply-To: <87a5gsn2j9.fsf@> (=?utf-8?Q?=22Bj=C3=B6rn?= Bidar"'s message of "Sat, 31 Aug 2024 18:19:06 +0300") X-Provags-ID: V03:K1:htZui8x9EJcYZEa+YQAjmArGU0k0sQEZihn3hv3Fcp1mC0i/Rm5 dWxXLjEO7qYNwvv/HyD+yAPVRrreH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out.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147866 Archived-At: Bj=C3=B6rn Bidar writes: Hi Bj=C3=B6rn, >> 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 appreci= ated. > > 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-resu= lt]"))))) > > 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =E2=80=98.emacs=E2=80=99 file, like (keymap-global-set "" 'debbugs-gnu-show-last-result) -- User Option: debbugs-gnu-use-threads The user option =E2=80=98debbugs-gnu-use-threads=E2=80=99, when set to= =E2=80=98nil=E2=80=99, 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 =E2=80=98debbugs-gnu-use-threads-lower-li= mit=E2=80=99. --8<---------------cut here---------------end--------------->8--- Feedback welcome! Best regards, Michael.