[elpa] externals/debbugs df27b618d5 1/2: * debbugs-gnu.el (debbugs-gnu-find-contributor): Make regex more specific.

2024-08-11 Thread Michael Albinus via
branch: externals/debbugs
commit df27b618d57538acde2f0348181ded536728275a
Author: Morgan Smith 
Commit: Michael Albinus 

* debbugs-gnu.el (debbugs-gnu-find-contributor): Make regex more specific.
---
 debbugs-gnu.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 3f5a9aebc8..6b6dd4992b 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -2702,7 +2702,7 @@ If SELECTIVELY, query the user before applying the patch."
   (let ((found 0)
(match (concat "^[0-9].*" string)))
 (dolist (file (directory-files-recursively
-  debbugs-gnu-current-directory "ChangeLog\\(.[0-9]+\\)?$"))
+  debbugs-gnu-current-directory 
"ChangeLog\\(\\.[0-9]+\\)?\\'"))
   (with-temp-buffer
(when (file-exists-p file)
  (insert-file-contents file))



[elpa] externals/debbugs updated (822c5d4cb3 -> 0d29984c14)

2024-08-11 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  822c5d4cb3 Fix tags in debbugs-cache-expiry
   new  df27b618d5 * debbugs-gnu.el (debbugs-gnu-find-contributor): Make 
regex more specific.
   new  0d29984c14 Fix various warnings


Summary of changes:
 debbugs-browse.el |  3 ++-
 debbugs-compat.el |  3 +++
 debbugs-gnu.el| 24 
 debbugs-org.el|  7 ---
 debbugs.el| 12 +++-
 5 files changed, 28 insertions(+), 21 deletions(-)



[elpa] externals/debbugs 0d29984c14 2/2: Fix various warnings

2024-08-11 Thread Michael Albinus via
branch: externals/debbugs
commit 0d29984c1485ba5b1547922984881184e7a44087
Author: Morgan Smith 
Commit: Michael Albinus 

Fix various warnings

* debbugs-browse.el:
* debbugs-compat.el:
* debbugs-gnu.el:
* debbugs-org.el:
* debbugs.el: Fix various warnings and checkdoc warnings.
---
 debbugs-browse.el |  3 ++-
 debbugs-compat.el |  3 +++
 debbugs-gnu.el| 22 +++---
 debbugs-org.el|  7 ---
 debbugs.el| 12 +++-
 5 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/debbugs-browse.el b/debbugs-browse.el
index 3b439b08b5..900adec818 100644
--- a/debbugs-browse.el
+++ b/debbugs-browse.el
@@ -54,6 +54,7 @@ This can be either `debbugs-gnu-bugs' or `debbugs-org-bugs'."
 
 ;;;###autoload
 (defun debbugs-browse-url (url &optional _new-window)
+  "Browse bug at URL using debbugs."
   (when (and (stringp url)
 (string-match debbugs-browse-url-regexp url))
 (funcall debbugs-browse-function (string-to-number (match-string 3 url)))
@@ -67,7 +68,7 @@ This can be either `debbugs-gnu-bugs' or `debbugs-org-bugs'."
 
 ;;;###autoload
 (define-minor-mode debbugs-browse-mode
-  "Browse GNU Debbugs bug URLs with debbugs-gnu or debbugs-org.
+  "Browse GNU Debbugs bug URLs with `debbugs-gnu' or `debbugs-org'.
 With a prefix argument ARG, enable Debbugs Browse mode if ARG is
 positive, and disable it otherwise.  If called from Lisp, enable
 the mode if ARG is omitted or nil.
diff --git a/debbugs-compat.el b/debbugs-compat.el
index 29509fa6d2..96628a1921 100644
--- a/debbugs-compat.el
+++ b/debbugs-compat.el
@@ -21,6 +21,9 @@
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs.  If not, see .
 
+;;; Commentary:
+;;; Code:
+
 ;; Function `string-replace' is new in Emacs 28.1.
 (defalias 'debbugs-compat-string-replace
   (if (fboundp 'string-replace)
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 6b6dd4992b..68599cff7f 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -33,7 +33,7 @@
 ;;
 ;;   M-x debbugs-gnu
 
-;; It asks for the severities, for which bugs shall be shown. This can
+;; It asks for the severities, for which bugs shall be shown.  This can
 ;; be either just one severity, or a list of severities, separated by
 ;; comma.  Valid severities are "serious", "important", "normal",
 ;; "minor" or "wishlist".  Severities "critical" and "grave" are not
@@ -243,7 +243,7 @@
 (defvar debbugs-gnu-limit)
 
 (defgroup debbugs-gnu ()
-  "UI for the debbugs.gnu.org bug tracker."
+  "UI for the debbugs bug tracker."
   :group 'debbugs
   :version "24.1")
 
@@ -426,7 +426,7 @@ They haven't been touched more than a week.")
 
 (defvar debbugs-gnu-persistency-file
   (expand-file-name (locate-user-emacs-file "debbugs"))
-  "File name of a persistency store for debbugs variables")
+  "File name of a persistency store for debbugs variables.")
 
 (defun debbugs-gnu-dump-persistency-file ()
   "Function to store debbugs variables persistently."
@@ -698,7 +698,7 @@ depend on PHRASE being a string, or nil.  See Info node
 
 ;;;###autoload
 (defun debbugs-gnu-package (&optional packages)
-  "List the bug reports of default packages, divided by severity."
+  "List the bug reports of PACKAGES or default packages, divided by severity."
   (interactive
  (list
   (if current-prefix-arg
@@ -2548,7 +2548,7 @@ If given a prefix, patch in the branch directory instead.
 If SELECTIVELY, query the user before applying the patch."
   (interactive "P")
   (unless (eq debbugs-gnu-mail-backend 'gnus)
-(error "This function only works with Gnus."))
+(error "This function only works with Gnus"))
   (add-hook 'diff-mode-hook #'debbugs-gnu-diff-mode)
   (debbugs-gnu-init-current-directory branch)
   (let ((rej (expand-file-name "debbugs-gnu.rej" temporary-file-directory))
@@ -2695,12 +2695,12 @@ If SELECTIVELY, query the user before applying the 
patch."
   nil t)))
 (forward-line 2)))
 
-(defun debbugs-gnu-find-contributor (string)
-  "Search through ChangeLogs to find contributors."
+(defun debbugs-gnu-find-contributor (contributor)
+  "Search through ChangeLogs to find CONTRIBUTOR."
   (interactive "sContributor match: ")
   (debbugs-gnu-init-current-directory)
   (let ((found 0)
-   (match (concat "^[0-9].*" string)))
+   (match (concat "^[0-9].*" contributor)))
 (dolist (file (directory-files-recursively
   debbugs-gnu-current-directory 
"ChangeLog\\(\\.[0-9]+\\)?\\'"))
   (with-temp-buffer
@@ -2710,7 +2710,7 @@ If SELECTIVELY, query the user before applying the patch."
(while (and (re-search-forward match nil t)
(not (looking-at ".*tiny change")))
  (cl-incf found
-(message "%s is a contributor %d times" string found)
+(message "%s is a contributor %d times" contributor found)
 found))
 
 (defvar debbugs-gnu-patch-subject nil)
@@ -2719,7 +2719,7 @@ If SELECTIVELY, que

[elpa] externals/debbugs updated (0d29984c14 -> a978cdf56e)

2024-08-12 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  0d29984c14 Fix various warnings
   new  e7c6633204 Add tests
   new  a978cdf56e Fix some minor nits from last commit


Summary of changes:
 Makefile  |  22 
 test/debbugs-tests.el | 138 ++
 2 files changed, 160 insertions(+)
 create mode 100644 Makefile
 create mode 100644 test/debbugs-tests.el



[elpa] externals/debbugs e7c6633204 1/2: Add tests

2024-08-12 Thread Michael Albinus via
branch: externals/debbugs
commit e7c6633204850f81fcea67f8cb01423c23fe8f85
Author: Morgan Smith 
Commit: Michael Albinus 

Add tests

* Makefile: New file.
* test/test-debbugs.el: New file.
---
 Makefile  |  20 
 test/debbugs-tests.el | 132 ++
 2 files changed, 152 insertions(+)

diff --git a/Makefile b/Makefile
new file mode 100644
index 00..86cc575a2b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+EMACS ?= emacs
+
+SOURCE=$(wildcard *.el)
+TESTSOURCE=$(wildcard test/*.el)
+TARGET=$(patsubst %.el,%.elc,$(SOURCE))
+TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
+
+.PHONY: check clean
+.PRECIOUS: %.elc
+
+%.elc: %.el
+   @$(EMACS) -Q -batch -L . -f batch-byte-compile $<
+
+build: $(TARGET)
+
+check: build $(TESTTARGET)
+   emacs -Q --batch -L . -l $(TESTSOURCE) -f ert-run-tests-batch-and-exit
+
+clean:
+   -rm -f $(TARGET) $(TESTTARGET)
diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el
new file mode 100644
index 00..e22aadc14d
--- /dev/null
+++ b/test/debbugs-tests.el
@@ -0,0 +1,132 @@
+;;; debbugs-tests.el --- tests for debbugs.el -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2024 Free Software Foundation, Inc.
+
+;; Author: Morgan Smith 
+;; Package: debbugs
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
+;; Please ensure tests don't actually make network calls.
+
+;;; Code:
+
+(require 'debbugs)
+
+;;; Helper Data:
+
+;; Generated using this:
+;; (soap-invoke debbugs-wsdl debbugs-port "get_status" [64064])
+(defconst debbugs-test--bug-status-soap-return
+  '(((item
+  (key . 64064)
+  (value
+   (package . "emacs") (found_date) (last_modified . 1689593050)
+   (affects) (date . 1686745022) (fixed_versions)
+   (originator . "Morgan Smith ")
+   (blocks) (archived . 1) (found) (unarchived) (tags . "patch")
+   (severity . "normal") (location . "archive") (owner) (fixed)
+   (blockedby) (pending . "done") (keywords . "patch") (id . 64064)
+   (found_versions) (mergedwith) (summary) (forwarded)
+   (log_modified . 1689593050)
+   (done . "Michael Albinus ")
+   (source . "unknown")
+   (msgid
+. 
"")
+   (bug_num . 64064) (subject . "[PATCH 0/4] debbugs improvements")
+   (fixed_date))
+
+;; Generated using this:
+;; (debbugs-get-status 64064)
+(defconst debbugs-test--bug-status
+  '(((cache_time . 5000) (source . "unknown") (unarchived)
+ (keywords "patch") (blocks) (pending . "done") (severity . "normal")
+ (done . "Michael Albinus ") (location . "archive")
+ (log_modified . 1689593050) (subject . "[PATCH 0/4] debbugs improvements")
+ (last_modified . 1689593050) (found) (tags "patch") (package "emacs")
+ (originator . "Morgan Smith ") (archived . t)
+ (blockedby) (affects) (mergedwith) (summary) (date . 1686745022)
+ (fixed_versions) (id . 64064) (fixed) (found_date) (forwarded)
+ (msgid
+  . 
"")
+ (owner) (found_versions) (fixed_date) (bug_num . 64064
+
+;;; Helper Functions:
+
+(defvar debbugs-test--soap-operation-name nil)
+(defvar debbugs-test--soap-parameters nil)
+(defun debbugs-test--soap-invoke-internal (callback _cbargs _wsdl _service
+operation-name
+&rest parameters)
+  "Over-ride for testing"
+  (setq debbugs-test--soap-operation-name operation-name)
+  (setq debbugs-test--soap-parameters parameters)
+  (let ((return
+ (cond ((string-equal operation-name "get_status")
+debbugs-test--bug-status-soap-return)
+   ((string-equal operation-name "get_usertag")
+'(((hi
+   (t '((0))
+(if callback
+(progn
+  (funcall callback return)
+  nil)
+  return)))
+
+(add-function
+ :override (symbol-function #'soap-invoke-internal)
+ #'debbugs-test--soap-invoke-internal)
+
+;;; Tests:
+
+(ert-deftest debbugs-test-get-bugs ()
+  (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
+(debbugs-get-bugs
+ :tag "patch"
+ :severity "critical"
+ :status "open"
+ :status "forwarded")
+(should (string-equal debbugs-test--soap-operation-name "get_bugs"))
+(should (equal debbugs-

[elpa] externals/debbugs a978cdf56e 2/2: Fix some minor nits from last commit

2024-08-12 Thread Michael Albinus via
branch: externals/debbugs
commit a978cdf56efb9138f82b4326998ce87ab50bb207
Author: Michael Albinus 
Commit: Michael Albinus 

Fix some minor nits from last commit

* Makefile (all): New target.
(.PHONY): Add all and build.
(check): Use @$(EMACS).

* test/debbugs-tests.el (debbugs-test--bug-status-soap-return)
(debbugs-test--bug-status, debbugs-test-get-bugs)
(debbugs-test-newest-bugs, debbugs-test-get-status)
(debbugs-test-get-usertag): Add docstring.
(debbugs-test--soap-invoke-internal): Fix docstring.
---
 Makefile  |  6 --
 test/debbugs-tests.el | 18 --
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 86cc575a2b..7d2975dedc 100644
--- a/Makefile
+++ b/Makefile
@@ -5,16 +5,18 @@ TESTSOURCE=$(wildcard test/*.el)
 TARGET=$(patsubst %.el,%.elc,$(SOURCE))
 TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
 
-.PHONY: check clean
+.PHONY: all build check clean
 .PRECIOUS: %.elc
 
 %.elc: %.el
@$(EMACS) -Q -batch -L . -f batch-byte-compile $<
 
+all: build
+
 build: $(TARGET)
 
 check: build $(TESTTARGET)
-   emacs -Q --batch -L . -l $(TESTSOURCE) -f ert-run-tests-batch-and-exit
+   @$(EMACS) -Q --batch -L . -l $(TESTSOURCE) -f 
ert-run-tests-batch-and-exit
 
 clean:
-rm -f $(TARGET) $(TESTTARGET)
diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el
index e22aadc14d..b4ac9a69c4 100644
--- a/test/debbugs-tests.el
+++ b/test/debbugs-tests.el
@@ -49,7 +49,8 @@
(msgid
 . 
"")
(bug_num . 64064) (subject . "[PATCH 0/4] debbugs improvements")
-   (fixed_date))
+   (fixed_date)
+  "Mock result from `soap-invoke' for bug 64064.")
 
 ;; Generated using this:
 ;; (debbugs-get-status 64064)
@@ -64,16 +65,16 @@
  (fixed_versions) (id . 64064) (fixed) (found_date) (forwarded)
  (msgid
   . 
"")
- (owner) (found_versions) (fixed_date) (bug_num . 64064
+ (owner) (found_versions) (fixed_date) (bug_num . 64064)))
+  "Mock result from `debbugs-get-status' for bug 64064.")
 
 ;;; Helper Functions:
 
 (defvar debbugs-test--soap-operation-name nil)
 (defvar debbugs-test--soap-parameters nil)
-(defun debbugs-test--soap-invoke-internal (callback _cbargs _wsdl _service
-operation-name
-&rest parameters)
-  "Over-ride for testing"
+(defun debbugs-test--soap-invoke-internal
+(callback _cbargs _wsdl _service operation-name &rest parameters)
+  "Over-ride for testing."
   (setq debbugs-test--soap-operation-name operation-name)
   (setq debbugs-test--soap-parameters parameters)
   (let ((return
@@ -95,6 +96,7 @@
 ;;; Tests:
 
 (ert-deftest debbugs-test-get-bugs ()
+  "Test \"get_bugs\"."
   (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
 (debbugs-get-bugs
  :tag "patch"
@@ -107,12 +109,14 @@
   "status" "open" "status" "forwarded"])
 
 (ert-deftest debbugs-test-newest-bugs ()
+  "Test \"newest_bugs\"."
   (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
 (debbugs-newest-bugs 4)
 (should (string-equal debbugs-test--soap-operation-name "newest_bugs"))
 (should (equal debbugs-test--soap-parameters '(4)
 
 (ert-deftest debbugs-test-get-status ()
+  "Test \"get_status\"."
   (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
 (cl-letf (((symbol-function #'float-time)
(lambda (&optional _specified-time) 5000)))
@@ -123,10 +127,12 @@
   (should (equal debbugs-test--soap-parameters '([64064]))
 
 (ert-deftest debbugs-test-get-usertag ()
+  "Test \"get_usertag\"."
   (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
 (should (equal (debbugs-get-usertag :user "emacs") '("hi")))
 (should (string-equal debbugs-test--soap-operation-name "get_usertag"))
 (should (equal debbugs-test--soap-parameters '("emacs")
 
 (provide 'debbugs-tests)
+
 ;;; debbugs-tests.el ends here



[elpa] externals/debbugs 0c42004727: Use threads

2024-08-31 Thread Michael Albinus via
branch: externals/debbugs
commit 0c42004727833e9d84bae0b6590262169acdfac7
Author: Michael Albinus 
Commit: Michael Albinus 

Use threads

* debbugs-gnu.el (debbugs-gnu-current-buffer)
(debbugs-gnu-current-message): New defvars.
(debbugs-gnu-search, debbugs-gnu-bugs):
Set `debbugs-gnu-current-message'.
(debbugs-gnu-default-show-reports-function): New defconst.
(debbugs-gnu-show-reports-function): Use it.
(debbugs-gnu-use-threads, debbugs-gnu-use-threads-lower-limit):
New defcustom.
(debbugs-gnu): Use a thread.
(debbugs-gnu-show-last-result): New defun.
(debbugs-gnu-get-bugs): Implement MAX and SKIP.
(debbugs-gnu-show-reports): Adapt for the thread case.
(debbugs-gnu-branch-directory): Adapt.

* debbugs-guix.el (debbugs-org-guix-search):
* debbugs-org.el (debbugs-org-search, debbugs-org-patches)
(debbugs-org-tagged, debbugs-org)
(debbugs-org-emacs-release-blocking-reports, debbugs-org-bugs)
(debbugs-org-my-open-bugs): Use `setq' for global
variables, let-binding doesn't work in threads.
(debbugs-org-show-reports): Use a thread.

* debbugs-ug.texi (Retrieving Bugs): New section "Asynchronous
Work".  Explain effect of debbugs-gnu-use-threads-lower-limit for
selected commands.  No progress report in the asnyhronous case.
(Searching Bugs): Fix HyperEstraier URL.
---
 debbugs-gnu.el  | 213 +++-
 debbugs-guix.el |   6 +-
 debbugs-org.el  |  37 ++
 debbugs-ug.texi |  63 +++--
 4 files changed, 231 insertions(+), 88 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 68599cff7f..c713bfa889 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -457,6 +457,12 @@ a date, value is the cons cell (BEFORE . AFTER).")
 The specification which bugs shall be suppressed is taken from
   `debbugs-gnu-default-suppress-bugs'.")
 
+(defvar debbugs-gnu-current-buffer nil
+  "The current buffer results are presented in.")
+
+(defvar debbugs-gnu-current-message nil
+  "The message to be shown after getting the bugs.")
+
 (defvar debbugs-gnu-current-print-function #'tabulated-list-print
   "Which function to apply printing the tabulated list..
 See `debbugs-gnu-package' for an alternative.")
@@ -680,8 +686,8 @@ depend on PHRASE being a string, or nil.  See Info node
  elt))
 
   ;; Do the search.
-  (debbugs-gnu severities packages archivedp)
-  (message "Search finished"))
+  (setq debbugs-gnu-current-message "Search finished")
+  (debbugs-gnu severities packages archivedp))
 
 ;;;###autoload
 (defun debbugs-gnu-patches ()
@@ -777,10 +783,27 @@ depend on PHRASE being a string, or nil.  See Info node
   (format "GNU bug reports: package(s) %s\n" (string-join packages ","))
   'face 'debbugs-gnu-title
 
-(defvar debbugs-gnu-show-reports-function #'debbugs-gnu-show-reports
+(defconst debbugs-gnu-default-show-reports-function #'debbugs-gnu-show-reports
+  "Which function to apply showing bug reports.")
+
+(defvar debbugs-gnu-show-reports-function
+  debbugs-gnu-default-show-reports-function
   "Which function to apply showing bug reports.
 Shall be bound in `debbugs-org-*' functions.")
 
+(defcustom debbugs-gnu-use-threads (and main-thread t)
+  "Whether to use threads when retrieving bugs.
+This doesn't when Emacs is compiled without threading support."
+  :type 'boolean
+  :version "30.1")
+
+(defcustom debbugs-gnu-use-threads-lower-limit 100
+  "Lower limit of bugs to be expected when using threads.
+This is taken into account only when the number of bugs is a fixed
+value, like in `debbugs-gnu-get-bugs' or `debbubgs-gnu-tagged'."
+  :type 'integer
+  :version "30.1")
+
 ;;;###autoload
 (defun debbugs-gnu (severities &optional packages archivedp suppress tags)
   "List all outstanding bugs."
@@ -805,48 +828,87 @@ Shall be bound in `debbugs-org-*' functions.")
   (when (member "tagged" severities)
(split-string (read-string "User tag(s): ") "," t)
 
-  (unwind-protect
-  (progn
-   ;; Initialize variables.
-   (when (and (file-exists-p debbugs-gnu-persistency-file)
-  (not debbugs-gnu-local-tags))
- (with-temp-buffer
-   (insert-file-contents debbugs-gnu-persistency-file)
-   (eval (read (current-buffer)) t)))
-   ;; Per default, we suppress retrieved unwanted bugs.
-   (when (and (called-interactively-p 'any)
-  debbugs-gnu-suppress-closed)
- (setq debbugs-gnu-current-suppress t))
-
-   ;; Add queries.
-   (dolist (severity (if (consp severities) severities (list severities)))
- (when (not (zerop (length severity)))
-   (when (string-equal severity "tagged")
- (setq debbugs-gnu-current-suppress nil))
-   (add-to-list 'debbugs-gnu-current-query (cons 'severity severity
-   (dolist (package (if (consp packages) packages (list packages)))
- (when (not (zerop (length package

[elpa] externals/debbugs 01ca46fd92: Fix some nits

2024-09-02 Thread Michael Albinus via
branch: externals/debbugs
commit 01ca46fd92849e932d689b0ad28dec5014e56409
Author: Michael Albinus 
Commit: Michael Albinus 

Fix some nits

* Makefile (TARGET): Filter-out debbugs-pkg.elc.

* debbugs-compat.el (main-thread): Define if it doesn't exist.
(url-http-create-request): Add an advice.

* debbugs-gnu.el (debbugs-gnu-use-threads): Fix docstring.
(debbugs-gnu-show-last-result): Print thread error if any.
(debbugs-gnu-show-reports): Use `debbugs-gnu-local-print-function'
as before.

* debbugs-org.el (debbugs-org-use-threads): Add variable alias.

* debbugs-ug.texi (Retrieving Bugs): Mention debbugs-org-use-threads.
---
 Makefile  |  3 ++-
 debbugs-compat.el | 13 +
 debbugs-gnu.el| 14 --
 debbugs-org.el|  6 ++
 debbugs-ug.texi   |  3 +++
 5 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 7d2975dedc..3d54c2c7b6 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,10 @@ EMACS ?= emacs
 
 SOURCE=$(wildcard *.el)
 TESTSOURCE=$(wildcard test/*.el)
-TARGET=$(patsubst %.el,%.elc,$(SOURCE))
+TARGET=$(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
 TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
 
+
 .PHONY: all build check clean
 .PRECIOUS: %.elc
 
diff --git a/debbugs-compat.el b/debbugs-compat.el
index 96628a1921..49de171584 100644
--- a/debbugs-compat.el
+++ b/debbugs-compat.el
@@ -24,6 +24,10 @@
 ;;; Commentary:
 ;;; Code:
 
+;; `main-thread' has been added in Emacs 27.1.
+(unless (boundp 'main-thread)
+  (defconst main-thread nil))
+
 ;; Function `string-replace' is new in Emacs 28.1.
 (defalias 'debbugs-compat-string-replace
   (if (fboundp 'string-replace)
@@ -33,6 +37,15 @@
 (replace-regexp-in-string
  (regexp-quote from-string) to-string in-string t t)
 
+;; `soap-invoke-internal' let-binds `url-http-attempt-keepalives' to
+;; t, which is not thread-safe.  We override this setting.
+(defvar url-http-attempt-keepalives)
+(advice-add
+ 'url-http-create-request :around
+ (lambda (orig-fun)
+   (with-no-warnings (setq url-http-attempt-keepalives nil))
+   (funcall orig-fun)))
+
 (provide 'debbugs-compat)
 
 ;;; debbugs-compat.el ends here
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index c713bfa889..8f71c853ea 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -29,6 +29,10 @@
 ;; show and manipulate bug reports from Emacs, but it could be used
 ;; also for other GNU projects which use the same bug tracker.
 
+;; Retrieving bugs is performed in a separate thread.  This is
+;; controlled by user option `debbugs-gnu-use-threads'.  Set it to nil
+;; if you want to change this behavior.
+
 ;; The bug tracker is called interactively by
 ;;
 ;;   M-x debbugs-gnu
@@ -793,7 +797,7 @@ Shall be bound in `debbugs-org-*' functions.")
 
 (defcustom debbugs-gnu-use-threads (and main-thread t)
   "Whether to use threads when retrieving bugs.
-This doesn't when Emacs is compiled without threading support."
+This doesn't apply when Emacs is compiled without threading support."
   :type 'boolean
   :version "30.1")
 
@@ -921,6 +925,12 @@ This function assumes the variable `user-mail-address' is 
defined."
 (defun debbugs-gnu-show-last-result ()
   "Switch to buffer with the recent retrieved bugs"
   (interactive)
+  ;; `thread-last-error' has an argument since Emacs 27.1.  This
+  ;; doesn't matter, because in Emacs 26 we don't use threads.
+  (when-let ((err
+  (ignore-errors
+(with-no-warnings (funcall 'thread-last-error 'cleanup)
+(message "debbugs-gnu-show-last-result: %S" err))
   (when (ignore-errors (get-buffer debbugs-gnu-current-buffer))
 (pop-to-buffer-same-window debbugs-gnu-current-buffer)))
 
@@ -1140,7 +1150,7 @@ are taken from the cache instead."
   'append
 
 (tabulated-list-init-header)
-(funcall debbugs-gnu-current-print-function)
+(funcall debbugs-gnu-local-print-function)
 
 (set-buffer-modified-p nil)
 (goto-char (point-min
diff --git a/debbugs-org.el b/debbugs-org.el
index ebd3e24df8..629f7247cb 100644
--- a/debbugs-org.el
+++ b/debbugs-org.el
@@ -27,6 +27,10 @@
 ;; on the GNU bug tracker debbugs.gnu.org.  Its main purpose is to
 ;; show and manipulate bug reports as org-mode TODO items.
 
+;; Retrieving bugs is performed in a separate thread.  This is
+;; controlled by user option `debbugs-org-use-threads'.  Set it to nil
+;; if you want to change this behavior.
+
 ;; The bug tracker is called interactively by
 ;;
 ;;   M-x debbugs-org
@@ -132,6 +136,8 @@
 (defvar debbugs-gnu-local-query)
 (defvar debbugs-gnu-local-filter)
 
+(defvaralias 'debbugs-org-use-threads 'debbugs-gnu-use-threads)
+
 (defconst debbugs-org-severity-priority
   (let ((priority ?A))
 (mapcar
diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index 9110efe132..ee7ede19e1 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -108,6 +108,9 @@ The user option @code{debbugs-gnu-use-thread

[elpa] externals/debbugs d48e354d58: Improve handling of skip and max in searching

2024-09-03 Thread Michael Albinus via
branch: externals/debbugs
commit d48e354d586fd6b9f59c7bf0fa303b597ab9a469
Author: Michael Albinus 
Commit: Michael Albinus 

Improve handling of skip and max in searching

* debbugs-gnu.el (debbugs-gnu-search, debbugs-gnu-get-bugs):
Handle `skip' and `max' properly.

* debbugs-ug.texi (Searching Bugs): Describe skip and max.
---
 debbugs-gnu.el  | 35 ++-
 debbugs-ug.texi | 12 ++--
 2 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 8f71c853ea..744ec0bc9c 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -526,13 +526,13 @@ depend on PHRASE being a string, or nil.  See Info node
   (interactive
(let ((date-format
  (eval-when-compile
-   (concat"\\([[:digit:]]\\{4\\}\\)-"
-  "\\([[:digit:]]\\{1,2\\}\\)-"
-  "\\([[:digit:]]\\{1,2\\}\\)")))
+   (concat "\\([[:digit:]]\\{4\\}\\)-"
+   "\\([[:digit:]]\\{1,2\\}\\)-"
+   "\\([[:digit:]]\\{1,2\\}\\)")))
 key val1 val2 phrase query severities packages archivedp)
 
  ;; Check for the phrase.
- (setq phrase (read-string debbugs-gnu-phrase-prompt))
+ (setq phrase (string-trim (read-string debbugs-gnu-phrase-prompt)))
  (when (zerop (length phrase))
(setq phrase nil))
 
@@ -544,7 +544,8 @@ depend on PHRASE being a string, or nil.  See Info node
(if phrase
(append
 '("severity" "package" "tags"
-  "author" "date" "subject")
+  "author" "date" "subject"
+   "skip" "max")
 ;; Client-side filters.
 (mapcar
  (lambda (key)
@@ -598,6 +599,11 @@ depend on PHRASE being a string, or nil.  See Info node
  (cons (intern (if (equal key "author") "@author" key)) val1)
  query)))
 
+ ((member key '("skip" "max"))
+  (setq val1 (read-number (format "Enter %s: " key)))
+  (when (natnump val1)
+(push (cons (intern key) val1) query)))
+
  ;; Client-side filters.
  ((equal key "status")
   (setq
@@ -940,8 +946,12 @@ This function assumes the variable `user-mail-address' is 
defined."
 (tags (and (member '(severity . "tagged") query) (assq 'tag query)))
 (local-tags (and (member '(severity . "tagged") query) (not tags)))
 (phrase (assq 'phrase query))
+(skip (assq 'skip query))
+(max (assq 'max query))
 args)
 ;; Compile query arguments.
+(setq query (delete skip query)
+  query (delete max query))
 (unless (or query tags)
   (dolist (elt debbugs-gnu-default-packages)
(setq args (append args (list :package elt)
@@ -953,18 +963,9 @@ This function assumes the variable `user-mail-address' is 
defined."
   (if phrase
   (cond
((eq (car elt) 'phrase)
- (let ((str (cdr elt))
-   res)
-   (while (string-match
-   (rx (1+ space) (group (or "MAX" "SKIP"))
-   (1+ space) (group (1+ digit)) eol)
-   str)
- (push (string-to-number (match-string 2 str)) res)
- (push
-  (intern (concat ":" (downcase (match-string 1 str
-  res)
- (setq str (replace-match "" nil nil str)))
-  (list (append (list :phrase str) res
+(list (append (list :phrase (cdr phrase))
+   (when skip (list :skip (cdr skip)))
+   (when max (list :max (cdr max))
((memq (car elt) '(date @cdate))
 (list (list (intern (concat ":" (symbol-name (car elt
 (cddr elt) (cadr elt)
diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index ee7ede19e1..5dc6ccbfc9 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -333,12 +333,6 @@ Several wildcards must be separated by the operators 
explained above.
 While the words to be searched for are case insensitive, the operators
 must be specified in upper case.
 
-@ignore
-For test purposes, we have added the operators "MAX " and "SKIP
-" at the end of a phrase.  Since this is internal only, we don't
-document it here.
-@end ignore
-
 While the search for the phrase is performed only in the bodies of the
 messages belonging to a bug report, it is also possible to restrict
 the search using further bug attributes.  The commands ask for such
@@ -346,6 +340,12 @@ attribute-value pairs, until an empty attribute is 
returned.  Possible
 attributes are
 
 @table @samp
+@item skip
+How many hits are skipp

[elpa] externals/debbugs 993f85df2b: Make revert buffer thread-safe

2024-09-04 Thread Michael Albinus via
branch: externals/debbugs
commit 993f85df2b6306389cb8d63588a4ae0680e5216a
Author: Michael Albinus 
Commit: Michael Albinus 

Make revert buffer thread-safe

* debbugs-gnu.el (debbugs-gnu-current-id): New defvar.
(debbugs-gnu): Set it.
(debbugs-gnu-rescan): Make it thread-safe.
(debbugs-gnu-mode): Reset `tabulated-list-entries'.

* debbugs-ug.texi (Searching Bugs): Move items.
---
 debbugs-gnu.el  | 28 +++-
 debbugs-ug.texi | 15 ---
 2 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 744ec0bc9c..f15fbb43ee 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -464,6 +464,9 @@ The specification which bugs shall be suppressed is taken 
from
 (defvar debbugs-gnu-current-buffer nil
   "The current buffer results are presented in.")
 
+(defvar debbugs-gnu-current-id nil
+  "The saved position in a debbugs buffer.")
+
 (defvar debbugs-gnu-current-message nil
   "The message to be shown after getting the bugs.")
 
@@ -891,6 +894,8 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
  (let (debbugs-show-progress)
(unwind-protect
   (funcall debbugs-gnu-show-reports-function)
+ (when debbugs-gnu-current-id
+   (debbugs-gnu-goto debbugs-gnu-current-id))
  ;; Indicate result.
  (if debbugs-gnu-current-message
  (message
@@ -904,18 +909,22 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
  (setq debbugs-gnu-current-query nil
   debbugs-gnu-current-filter nil
   debbugs-gnu-current-suppress nil
+   debbugs-gnu-current-id nil
debbugs-gnu-current-message nil
debbugs-gnu-show-reports-function
debbugs-gnu-default-show-reports-function)
 
 (unwind-protect
(funcall debbugs-gnu-show-reports-function)
+  (when debbugs-gnu-current-id
+(debbugs-gnu-goto debbugs-gnu-current-id))
   (when debbugs-gnu-current-message
 (message "%s" debbugs-gnu-current-message))
   ;; Reset query, filter, suppress and message.
   (setq debbugs-gnu-current-query nil
debbugs-gnu-current-filter nil
debbugs-gnu-current-suppress nil
+debbugs-gnu-current-id nil
 debbugs-gnu-current-message nil
 debbugs-gnu-show-reports-function
 debbugs-gnu-default-show-reports-function
@@ -1308,15 +1317,15 @@ If NOCACHE is non-nil, bug information is retrieved 
from the debbugs server.
 Interactively, it is non-nil with the prefix argument."
   (interactive
(list current-prefix-arg))
-  (let ((id (debbugs-gnu-current-id t))
-   (debbugs-gnu-current-query debbugs-gnu-local-query)
-   (debbugs-gnu-current-filter debbugs-gnu-local-filter)
-   (debbugs-gnu-current-suppress debbugs-gnu-local-suppress)
-   (debbugs-gnu-current-print-function debbugs-gnu-local-print-function)
-   (debbugs-cache-expiry (if nocache t debbugs-cache-expiry)))
-(funcall debbugs-gnu-show-reports-function)
-(when id
-  (debbugs-gnu-goto id
+  (setq debbugs-gnu-current-query debbugs-gnu-local-query
+   debbugs-gnu-current-filter debbugs-gnu-local-filter
+   debbugs-gnu-current-suppress debbugs-gnu-local-suppress
+debbugs-gnu-current-id (debbugs-gnu-current-id t)
+   debbugs-gnu-current-print-function debbugs-gnu-local-print-function
+   debbugs-cache-expiry (if nocache t debbugs-cache-expiry)
+debbugs-gnu-current-message "Reverting finished")
+  (message "Reverting buffer")
+  (debbugs-gnu nil))
 
 (define-derived-mode debbugs-gnu-mode tabulated-list-mode "Debbugs"
   "Major mode for listing bug reports.
@@ -1335,6 +1344,7 @@ modified on the debbugs server, consider typing \\`C-u g'.
debbugs-gnu-current-suppress)
   (set (make-local-variable 'debbugs-gnu-local-print-function)
debbugs-gnu-current-print-function)
+  (set (make-local-variable 'tabulated-list-entries) nil)
   (setq tabulated-list-format [("Id" 5 debbugs-gnu-sort-id)
   ("State" 10 debbugs-gnu-sort-state)
   ("Submitter" 18 debbugs-gnu-sort-submitter)
diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index 5dc6ccbfc9..269b6d3fb5 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -340,12 +340,6 @@ attribute-value pairs, until an empty attribute is 
returned.  Possible
 attributes are
 
 @table @samp
-@item skip
-How many hits are skipped (default 0).
-
-@item max
-How many maximal hits are returned.
-
 @item severity
 A comma-separated list of bug severities, @xref{Retrieving Bugs}.
 
@@ -366,10 +360,17 @@ modified.
 @item subject
 Word(s) contained in the subject of the bug report.
 
+@c This is queried with the attribute "pending".
 @item status
 The status of the bug report.  Valid values are "pending

[elpa] externals/debbugs b0d2f90878: Fix NOCACHE handling

2024-09-05 Thread Michael Albinus via
branch: externals/debbugs
commit b0d2f90878e5c444c931fc4b5b6b961e8e99e8c5
Author: Michael Albinus 
Commit: Michael Albinus 

Fix NOCACHE handling

* debbugs-gnu.el (debbugs-gnu-current-nocache): New defvar.
(debbugs-gnu, debbugs-gnu-show-reports, debbugs-gnu-rescan): Use it.
---
 debbugs-gnu.el | 15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index f15fbb43ee..d0d1154574 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -470,6 +470,9 @@ The specification which bugs shall be suppressed is taken 
from
 (defvar debbugs-gnu-current-message nil
   "The message to be shown after getting the bugs.")
 
+(defvar debbugs-gnu-current-nocache nil
+  "Whether `debbugs-gnu-rescan' has been called with NOCACHE.")
+
 (defvar debbugs-gnu-current-print-function #'tabulated-list-print
   "Which function to apply printing the tabulated list..
 See `debbugs-gnu-package' for an alternative.")
@@ -911,6 +914,7 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
   debbugs-gnu-current-suppress nil
debbugs-gnu-current-id nil
debbugs-gnu-current-message nil
+   debbugs-gnu-current-nocache nil
debbugs-gnu-show-reports-function
debbugs-gnu-default-show-reports-function)
 
@@ -926,6 +930,7 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
debbugs-gnu-current-suppress nil
 debbugs-gnu-current-id nil
 debbugs-gnu-current-message nil
+debbugs-gnu-current-nocache nil
 debbugs-gnu-show-reports-function
 debbugs-gnu-default-show-reports-function
 
@@ -1040,7 +1045,9 @@ are taken from the cache instead."
 ;; Print bug reports.
 (dolist (status
 (sort
- (let ((debbugs-cache-expiry (if offline nil debbugs-cache-expiry))
+ (let ((debbugs-cache-expiry
+ (if offline nil
+   (or debbugs-gnu-current-nocache debbugs-cache-expiry)))
ids)
(apply #'debbugs-get-status
   (if offline
@@ -1321,9 +1328,9 @@ Interactively, it is non-nil with the prefix argument."
debbugs-gnu-current-filter debbugs-gnu-local-filter
debbugs-gnu-current-suppress debbugs-gnu-local-suppress
 debbugs-gnu-current-id (debbugs-gnu-current-id t)
-   debbugs-gnu-current-print-function debbugs-gnu-local-print-function
-   debbugs-cache-expiry (if nocache t debbugs-cache-expiry)
-debbugs-gnu-current-message "Reverting finished")
+debbugs-gnu-current-message "Reverting finished"
+   debbugs-gnu-current-nocache (and nocache t)
+   debbugs-gnu-current-print-function debbugs-gnu-local-print-function)
   (message "Reverting buffer")
   (debbugs-gnu nil))
 



[elpa] externals/debbugs c168b73c85: Fix HyperEstraier URL

2024-09-12 Thread Michael Albinus via
branch: externals/debbugs
commit c168b73c8570e9fc3719055cf10212aaf7a6fff7
Author: Michael Albinus 
Commit: Michael Albinus 

Fix HyperEstraier URL

* debbugs.el (debbugs-search-est):
* debbugs.texi (Searching bugs): Fix HyperEstraier URL.  (Bug#73185)
---
 debbugs.el   | 2 +-
 debbugs.texi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debbugs.el b/debbugs.el
index 627cdf163d..514b28b2b2 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -683,7 +683,7 @@ VALUE]*
 
 Every sublist of the QUERY forms a hyperestraier condition.  A
 detailed description of hyperestraier conditions can be found at
-URL `https://fallabs.com/hyperestraier/uguide-en.html#searchcond'.
+URL `https://dbmx.net/hyperestraier/uguide-en.html#searchcond'.
 
 The following conditions are possible:
 
diff --git a/debbugs.texi b/debbugs.texi
index 37faf28330..5ea45eed27 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -472,7 +472,7 @@ values are strings or numbers, i.e.@: @var{:keyword} 
@var{value}
 
 Every sublist of the @var{query} forms a hyperestraier condition.  A
 detailed description of hyperestraier conditions can be found at
-@uref{https://fallabs.com/hyperestraier/uguide-en.html#searchcond}.
+@uref{https://dbmx.net/hyperestraier/uguide-en.html#searchcond}.
 
 The following conditions are possible:
 



[elpa] externals/debbugs b8c84dbe4b: Improve needed advice

2024-09-12 Thread Michael Albinus via
branch: externals/debbugs
commit b8c84dbe4b49651b1fe74cb34ca11deb877395da
Author: Michael Albinus 
Commit: Michael Albinus 

Improve needed advice

* debbugs-compat.el (debbugs-compat-url-http-attempt-keepalives):
New defvar.
(debbugs-compat-add-debbugs-advice)
(debbugs-compat-remove-debbugs-advice): New defuns.

* debbugs.el ( debbugs-compat): Require.
(debbugs-soap-invoke): New defun.
(debbugs-soap-invoke-async): Adapt for advice.
(debbugs-get-bugs, debbugs-newest-bugs, debbugs-get-usertag)
(debbugs-get-bug-log, debbugs-search-est): Use `debbugs-soap-invoke'
instead of `soap-invoke'.
(debbugs-get-status): Use `delq' instead of `delete'.
---
 debbugs-compat.el | 25 -
 debbugs.el| 33 +++--
 2 files changed, 43 insertions(+), 15 deletions(-)

diff --git a/debbugs-compat.el b/debbugs-compat.el
index 49de171584..c73110f2aa 100644
--- a/debbugs-compat.el
+++ b/debbugs-compat.el
@@ -37,14 +37,29 @@
 (replace-regexp-in-string
  (regexp-quote from-string) to-string in-string t t)
 
+;; This is needed for Bug#73199.
 ;; `soap-invoke-internal' let-binds `url-http-attempt-keepalives' to
 ;; t, which is not thread-safe.  We override this setting.
 (defvar url-http-attempt-keepalives)
-(advice-add
- 'url-http-create-request :around
- (lambda (orig-fun)
-   (with-no-warnings (setq url-http-attempt-keepalives nil))
-   (funcall orig-fun)))
+(defvar debbugs-compat-url-http-attempt-keepalives nil
+  "Temporary storage for `'.")
+(defun debbugs-compat-add-debbugs-advice ()
+  (with-no-warnings
+(setq debbugs-compat-url-http-attempt-keepalives
+  url-http-attempt-keepalives))
+  (advice-add
+   'url-http-create-request :around
+   (lambda (orig-fun)
+ "Set `url-http-attempt-keepalives' to nil."
+ (with-no-warnings (setq url-http-attempt-keepalives nil))
+ (funcall orig-fun))
+   '(name debbugs-advice)))
+
+(defun debbugs-compat-remove-debbugs-advice ()
+  (advice-remove 'url-http-create-request 'debbugs-advice)
+  (with-no-warnings
+(setq url-http-attempt-keepalives
+  debbugs-compat-url-http-attempt-keepalives)))
 
 (provide 'debbugs-compat)
 
diff --git a/debbugs.el b/debbugs.el
index 514b28b2b2..876443e270 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -38,6 +38,7 @@
 
 ;;; Code:
 
+(require 'debbugs-compat)
 (require 'subr-x)
 ;(setq soap-debug t url-debug t message-log-max t)
 (require 'soap-client)
@@ -117,18 +118,27 @@ t or 0 disables caching, nil disables expiring."
 (const :tag "Forever" nil)
 (integer :tag "Seconds")))
 
+(defun debbugs-soap-invoke (operation-name &rest parameters)
+  "Invoke the SOAP connection.
+OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
+  (debbugs-compat-add-debbugs-advice)
+  (prog1
+  (apply #'soap-invoke operation-name parameters)
+(debbugs-compat-remove-debbugs-advice)))
+
 (defvar debbugs-soap-invoke-async-object nil
   "The object manipulated by `debbugs-soap-invoke-async'.")
 
 (defun debbugs-soap-invoke-async (operation-name &rest parameters)
   "Invoke the SOAP connection asynchronously.
-
 OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
+  (debbugs-compat-add-debbugs-advice)
   (apply
#'soap-invoke-async
(lambda (response &rest _args)
  (setq debbugs-soap-invoke-async-object
-  (append debbugs-soap-invoke-async-object (car response
+  (append debbugs-soap-invoke-async-object (car response)))
+ (debbugs-compat-remove-debbugs-advice))
nil debbugs-wsdl debbugs-port operation-name parameters))
 
 (defcustom debbugs-show-progress t
@@ -304,7 +314,8 @@ patch:
 (unless (null query)
   (error "Unknown key: %s" (car query)))
 (prog1
-   (sort (car (soap-invoke debbugs-wsdl debbugs-port "get_bugs" vec)) #'<)
+   (sort (car (debbugs-soap-invoke
+debbugs-wsdl debbugs-port "get_bugs" vec)) #'<)
   (when debbugs-show-progress
(remove-function
 (symbol-function debbugs-url-display-message-or-percentage-function)
@@ -340,7 +351,7 @@ patch:
(cons 'cache_time (float-time))
(cons 'newest_bug
  (caar
-  (soap-invoke
+  (debbugs-soap-invoke
debbugs-wsdl debbugs-port "newest_bugs" amount)
 
  ;; Cache it.
@@ -351,7 +362,8 @@ patch:
(list (alist-get 'newest_bug status)))
 
 (sort
- (car (soap-invoke debbugs-wsdl debbugs-port "newest_bugs" amount)) #'<)))
+ (car (debbugs-soap-invoke
+   debbugs-wsdl debbugs-port "newest_bugs" amount)) #'<)))
 
 (defun debbugs-convert-soap-value-to-string (string-value)
   "If STRING-VALUE is unibyte, decode its contents as a UTF-8 string.
@@ -461,8 +473,7 @@ Example:
 ;; Check for cached bugs.
 (setq bug-numbers (delete-dups bug-numbers)
  bug-numbers
- (delete
-  nil
+

[elpa] externals/debbugs 9b1c3c9495: Release debbugs 0.39

2024-02-08 Thread Michael Albinus via
branch: externals/debbugs
commit 9b1c3c94957b662e752f150452f6e916f61c507d
Author: Michael Albinus 
Commit: Michael Albinus 

Release debbugs 0.39

* debbugs-browse.el: Use lexical binding.
(debbugs-gnu-bugs, debbugs-org-bugs): Autoload.

* debbugs-gnu.el (debbugs-gnu-default-packages): Add "mumi".

* debbugs.el: Bump version to 0.39.
---
 debbugs-browse.el | 5 -
 debbugs-gnu.el| 1 +
 debbugs.el| 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/debbugs-browse.el b/debbugs-browse.el
index cb622ac596..3b439b08b5 100644
--- a/debbugs-browse.el
+++ b/debbugs-browse.el
@@ -1,4 +1,4 @@
-;; debbugs-browse.el --- browse bug URLs with debbugs-gnu or debbugs-org
+;; debbugs-browse.el --- browse bug URLs with debbugs-gnu or debbugs-org  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2015-2024 Free Software Foundation, Inc.
 
@@ -28,6 +28,9 @@
 
 ;;; Code:
 
+(autoload 'debbugs-gnu-bugs "debbugs-gnu")
+(autoload 'debbugs-org-bugs "debbugs-org")
+
 (defcustom debbugs-browse-function #'debbugs-gnu-bugs
   "The debbugs function used for showing bugs.
 This can be either `debbugs-gnu-bugs' or `debbugs-org-bugs'."
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 7faf4e2db7..a5453334cd 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -324,6 +324,7 @@ If nil, the value of `send-mail-function' is used instead."
  (const "idutils")
  (const "libtool")
  (const "mh-e")
+ (const "mumi")
  (const "oo-browser")
  (const "org-mode")
  (const "parted")
diff --git a/debbugs.el b/debbugs.el
index 95a37f4787..419ca305a4 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -5,7 +5,7 @@
 ;; Author: Michael Albinus 
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.38
+;; Version: 0.39
 ;; Package-Requires: ((emacs "26.1") (soap-client "3.1.5"))
 
 ;; This file is not part of GNU Emacs.



[elpa] externals/debbugs 1ccbbe0930 1/2: * debbugs-gnu.el (pp-default-function): Declare.

2024-03-12 Thread Michael Albinus via
branch: externals/debbugs
commit 1ccbbe0930b28c5facf0264873a2c7b7ec4036dd
Author: Michael Albinus 
Commit: Michael Albinus 

* debbugs-gnu.el (pp-default-function): Declare.
---
 debbugs-gnu.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index a5453334cd..1595e9ea12 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -228,6 +228,7 @@
 (defvar mail-extr-ignore-realname-equals-mailbox-name)
 (defvar mail-extr-ignore-single-names)
 (defvar message-sent-message-via)
+(defvar pp-default-function)
 (defvar rmail-current-message)
 (defvar rmail-mode-map)
 (defvar rmail-summary-mode-map)



[elpa] externals/debbugs 5bc4ec9dbd 2/2: Merge branch 'externals/debbugs' of git.sv.gnu.org:/srv/git/emacs/elpa into externals/debbugs

2024-03-12 Thread Michael Albinus via
branch: externals/debbugs
commit 5bc4ec9dbde38f0a142fd81e7f54e309069b24b4
Merge: 1ccbbe0930 e06d335153
Author: Michael Albinus 
Commit: Michael Albinus 

Merge branch 'externals/debbugs' of git.sv.gnu.org:/srv/git/emacs/elpa into 
externals/debbugs
---
 debbugs-gnu.el  | 32 ++--
 debbugs-ug.texi |  6 ++
 debbugs.el  |  2 +-
 3 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 1595e9ea12..fcdea8d347 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -277,8 +277,10 @@ If nil, the value of `send-mail-function' is used instead."
 
 (defcustom debbugs-gnu-compile-command "make -k"
   "Command to run to compile Emacs."
-  :type 'string
-  :version "28.1")
+  :type '(choice
+  (const :tag "Do not compile automatically" nil)
+  (string :tag "Compile command"))
+  :version "30.1")
 
 (defcustom debbugs-gnu-suppress-closed t
   "If non-nil, don't show closed bugs."
@@ -1573,7 +1575,7 @@ interesting to you."
 (debbugs-gnu-current-status)))
   (switch-to-buffer "*Bug Status*")
   (let ((inhibit-read-only t)
-(pp-default-function 'pp-29))
+(pp-default-function #'pp-29))
 (erase-buffer)
 (when query
   (insert ";; Query\n")
@@ -2613,12 +2615,13 @@ If SELECTIVELY, query the user before applying the 
patch."
   (insert-file-contents-literally rej))
 (goto-char (point-max))
 (save-some-buffers t)
-(require 'compile)
-(mapc #'kill-process compilation-in-progress)
-(compile
- (format "cd %s; %s"
-debbugs-gnu-current-directory
-debbugs-gnu-compile-command))
+(when debbugs-gnu-compile-command
+  (require 'compile)
+  (mapc #'kill-process compilation-in-progress)
+  (compile
+   (format "cd %s; %s"
+  debbugs-gnu-current-directory
+  debbugs-gnu-compile-command)))
 (let (buf)
   (if (debbugs-gnu-apply-patch-prefers-magit)
   (progn
@@ -2638,11 +2641,12 @@ If SELECTIVELY, query the user before applying the 
patch."
   (delete-other-windows)
   (switch-to-buffer output-buffer)
   (split-window)
-  (split-window)
-  (other-window 1)
-  (switch-to-buffer "*compilation*")
-  (goto-char (point-max))
-  (other-window 1)
+  (when debbugs-gnu-compile-command
+   (split-window)
+   (other-window 1)
+   (switch-to-buffer "*compilation*")
+   (goto-char (point-max))
+   (other-window 1))
   (switch-to-buffer buf)
   (goto-char (point-min)
 
diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index d5663121d1..b949d750b6 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -789,6 +789,11 @@ included in the message, applies them, runs @command{make 
-k} in the
 @file{lisp} subdirectory, and shows a @samp{*vc-dir*} buffer of the
 Emacs repository with the changed file(s).
 
+@vindex debbugs-gnu-compile-command
+The exact make command used is controlled by the user option
+@code{debbugs-gnu-compile-command}.  This option can also be set to
+@code{nil} to skip the compilation step.
+
 @vindex debbugs-gnu-trunk-directory
 @vindex debbugs-gnu-branch-directory
 The Emacs repository is determined via the user options
@@ -804,6 +809,7 @@ creates a ChangeLog entry with all needed information.  A 
final
 @kbd{M-m} in the @samp{ChangeLog} buffer commits the patch via
 @samp{*vc-log*}.
 
+@vindex debbugs-gnu-apply-patch-prefers-magit
   If the user option @code{debbugs-gnu-apply-patch-prefers-magit} is
 non-@code{nil}, the third-party package Magit will be used instead of
 VC when you hit @kbd{M-m} in the GNUS ephemeral group.  Note that the
diff --git a/debbugs.el b/debbugs.el
index 419ca305a4..d359aa0a23 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -5,7 +5,7 @@
 ;; Author: Michael Albinus 
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.39
+;; Version: 0.40
 ;; Package-Requires: ((emacs "26.1") (soap-client "3.1.5"))
 
 ;; This file is not part of GNU Emacs.



[elpa] externals/debbugs 918b358289 4/5: * debbugs.el (debbugs-get-bugs): Fix docstring for :affects.

2024-03-18 Thread Michael Albinus via
branch: externals/debbugs
commit 918b358289b12a3ca58b78b219a68d2556e9d7ca
Author: Felix Lechner 
Commit: Michael Albinus 

* debbugs.el (debbugs-get-bugs): Fix docstring for :affects.

Copyright-paperwork-exempt: yes
---
 debbugs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debbugs.el b/debbugs.el
index 2e24c0660a..f83daf7c54 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -233,7 +233,7 @@ Valid keywords are:
   :affects -- With this keyword it is possible to find bugs which
   affect the package with the given name.  The bugs are chosen by
   the value of field `affects' in bug's status.  The returned bugs
-  do not necessary belong to this package.
+  usually do not belong to this package.
 
   :status -- Status of bug.  Valid values are \"open\",
   \"forwarded\" and \"done\".



[elpa] externals/debbugs 579b02b430 1/5: Fix compilation warning

2024-03-18 Thread Michael Albinus via
branch: externals/debbugs
commit 579b02b4305355d23267cf1286e3b04db0a4f664
Author: Michael Albinus 
Commit: Michael Albinus 

Fix compilation warning

* debbugs-gnu.el (debbugs-gnu-display-status): Don't use #' read
function syntax gor `pp-29', it isn't know during compilation.
---
 debbugs-gnu.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index fcdea8d347..de6aeebe77 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1575,7 +1575,7 @@ interesting to you."
 (debbugs-gnu-current-status)))
   (switch-to-buffer "*Bug Status*")
   (let ((inhibit-read-only t)
-(pp-default-function #'pp-29))
+(pp-default-function 'pp-29))
 (erase-buffer)
 (when query
   (insert ";; Query\n")



[elpa] externals/debbugs 0e6cba9863 2/5: * debbugs.el: Enforce standard line length of 80 characters.

2024-03-18 Thread Michael Albinus via
branch: externals/debbugs
commit 0e6cba98635c2faa5f3daa64fe325008fb1d16ea
Author: Felix Lechner 
Commit: Michael Albinus 

* debbugs.el: Enforce standard line length of 80 characters.

Copyright-paperwork-exempt: yes
---
 debbugs.el | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/debbugs.el b/debbugs.el
index d359aa0a23..2e24c0660a 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -259,7 +259,8 @@ patch:
debbugs-progress-reporter-buffers url-show-status vec kw key val)
 (when debbugs-show-progress
   (add-function
-   :override (symbol-function 
debbugs-url-display-message-or-percentage-function)
+   :override
+   (symbol-function debbugs-url-display-message-or-percentage-function)
#'debbugs-url-display-message-or-percentage
'((name . "debbugs-url-display-message-or-percentage"
 
@@ -488,7 +489,8 @@ Example:
debbugs-progress-reporter-buffers url-show-status results res)
(when debbugs-show-progress
  (add-function
-  :override (symbol-function 
debbugs-url-display-message-or-percentage-function)
+  :override
+   (symbol-function debbugs-url-display-message-or-percentage-function)
   #'debbugs-url-display-message-or-percentage
   '((name . "debbugs-url-display-message-or-percentage"
 
@@ -805,7 +807,8 @@ Examples:
 (when debbugs-create-progress-reporter
   (setq debbugs-progress-reporter (make-progress-reporter "Query bugs..."))
   (add-function
-   :override (symbol-function 
debbugs-url-display-message-or-percentage-function)
+   :override
+   (symbol-function debbugs-url-display-message-or-percentage-function)
#'debbugs-url-display-message-or-percentage
'((name . "debbugs-url-display-message-or-percentage"
 
@@ -976,7 +979,8 @@ BUG-OR-MESSAGE must be list element returned by either
 Example: Return the originator of last submitted bug.
 
 \(debbugs-get-attribute
-  \(car \(apply #\\='debbugs-get-status \(debbugs-newest-bugs 1))) 
\\='originator)"
+  \(car \(apply #\\='debbugs-get-status \(debbugs-newest-bugs 1)))
+  \\='originator)"
   (alist-get attribute bug-or-message))
 
 (defun debbugs-get-message-numbers (messages)



[elpa] externals/debbugs c922b4837e 5/5: * debbugs.el (debbugs-port): Fix description in docstring for debbugs-ports.

2024-03-18 Thread Michael Albinus via
branch: externals/debbugs
commit c922b4837efe5f75b547b824a460af35969e3ad7
Author: Felix Lechner 
Commit: Michael Albinus 

* debbugs.el (debbugs-port): Fix description in docstring for debbugs-ports.

Copyright-paperwork-exempt: yes
---
 debbugs.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debbugs.el b/debbugs.el
index f83daf7c54..eac798b334 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -82,7 +82,7 @@ servers: \"gnu.org\" and \"debian.org\"."
   (string :tag "Bugreport URL")))
 
 (defcustom debbugs-port "gnu.org"
-  "The port instance to be applied from `debbugs-wsdl'.
+  "The port instance to be applied from `debbugs-servers'.
 This corresponds to the Debbugs server to be accessed, either
 \"gnu.org\", or \"debian.org\", or user defined port name."
   ;; Maybe we should create an own group?



[elpa] externals/debbugs updated (5bc4ec9dbd -> c922b4837e)

2024-03-18 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  5bc4ec9dbd Merge branch 'externals/debbugs' of 
git.sv.gnu.org:/srv/git/emacs/elpa into externals/debbugs
   new  579b02b430 Fix compilation warning
   new  0e6cba9863 * debbugs.el: Enforce standard line length of 80 
characters.
   new  d854f7ffc8 Don't hardcode gnu.org as debbugs-port for Gnus interface
   new  918b358289 * debbugs.el (debbugs-get-bugs): Fix docstring for 
:affects.
   new  c922b4837e * debbugs.el (debbugs-port): Fix description in 
docstring for debbugs-ports.


Summary of changes:
 debbugs-gnu.el |  6 ++
 debbugs.el | 16 ++--
 2 files changed, 12 insertions(+), 10 deletions(-)



[elpa] externals/debbugs d854f7ffc8 3/5: Don't hardcode gnu.org as debbugs-port for Gnus interface

2024-03-18 Thread Michael Albinus via
branch: externals/debbugs
commit d854f7ffc884e4c72d4be90edc067f36046ef48a
Author: Felix Lechner 
Commit: Michael Albinus 

Don't hardcode gnu.org as debbugs-port for Gnus interface

* debbugs-gnu.el (debbugs-gnu-get-bugs, debbugs-gnu-usertags):
Don't hardcode gnu.org as debbugs-port for Gnus interface.

Copyright-paperwork-exempt: yes
---
 debbugs-gnu.el | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index de6aeebe77..3f5a9aebc8 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -857,8 +857,7 @@ This function assumes the variable `user-mail-address' is 
defined."
 
 (defun debbugs-gnu-get-bugs (query)
   "Retrieve bug numbers from debbugs.gnu.org according search criteria."
-  (let* ((debbugs-port "gnu.org")
-(bugs (assq 'bugs query))
+  (let* ((bugs (assq 'bugs query))
 (tags (and (member '(severity . "tagged") query) (assq 'tag query)))
 (local-tags (and (member '(severity . "tagged") query) (not tags)))
 (phrase (assq 'phrase query))
@@ -2419,7 +2418,6 @@ successfully sent."
  debbugs-gnu-default-packages))
 
   (let ((inhibit-read-only t)
-   (debbugs-port "gnu.org")
(buffer-name "*Emacs User Tags*")
(user-tab-length
 (1+ (apply #'max (length "User") (mapcar #'length users)



[elpa] externals/debbugs 822c5d4cb3: Fix tags in debbugs-cache-expiry

2024-03-18 Thread Michael Albinus via
branch: externals/debbugs
commit 822c5d4cb359526a2918d019373b4558480c59f2
Author: Felix Lechner 
Commit: Michael Albinus 

Fix tags in debbugs-cache-expiry

* debbugs.el (debbugs-cache-expiry): Bring labels for
debbugs-cache-expiry in line with docstring.

Copyright-paperwork-exempt: yes
---
 debbugs.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debbugs.el b/debbugs.el
index eac798b334..c90fb1008c 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -113,8 +113,8 @@ This corresponds to the Debbugs server to be accessed, 
either
 (defcustom debbugs-cache-expiry (* 60 60)
   "How many seconds debbugs query results are cached.
 t or 0 disables caching, nil disables expiring."
-  :type '(choice (const :tag "Always" t)
-(const :tag "Never" nil)
+  :type '(choice (const :tag "Never" t)
+(const :tag "Forever" nil)
 (integer :tag "Seconds")))
 
 (defvar debbugs-soap-invoke-async-object nil



[elpa] main f88876eb08: * elpa-packages (tramp): Use tramp.texi as doc.

2023-12-30 Thread Michael Albinus via
branch: main
commit f88876eb08e8b1cb82b451a94607cd20a51f946e
Author: Michael Albinus 
Commit: Michael Albinus 

* elpa-packages (tramp): Use tramp.texi as doc.
---
 elpa-packages | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index f2c60cac5d..4659c81c50 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -705,7 +705,7 @@
   :branch "externals/tramp"
   :main-file "trampver.el"
   :make ("autoloads" "info")
-  :doc "tramp.info")
+  :doc "tramp.texi")
  (tramp-nspawn :url "https://github.com/bjc/tramp-nspawn";
   :ignored-files ("COPYING"))
  (tramp-theme  :url nil)



[elpa] main 16949d62d0: ; Fix last change

2023-12-30 Thread Michael Albinus via
branch: main
commit 16949d62d0bf0068010441a543e4ee27c4aa440a
Author: Michael Albinus 
Commit: Michael Albinus 

; Fix last change
---
 elpa-packages | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index 4659c81c50..ada5f01f28 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -705,7 +705,7 @@
   :branch "externals/tramp"
   :main-file "trampver.el"
   :make ("autoloads" "info")
-  :doc "tramp.texi")
+  :doc "texi/tramp.texi")
  (tramp-nspawn :url "https://github.com/bjc/tramp-nspawn";
   :ignored-files ("COPYING"))
  (tramp-theme  :url nil)



[elpa] externals/debbugs 6c2e2d892d: Release debbugs 0.38. Adapt copyright years.

2024-01-16 Thread Michael Albinus via
branch: externals/debbugs
commit 6c2e2d892d96a44cefc0fef4408087f054eb09ca
Author: Michael Albinus 
Commit: Michael Albinus 

Release debbugs 0.38.  Adapt copyright years.

* debbugs-gnu.el (debbugs-gnu-default-packages): Add autoconf and elpa.

* debbugs.el: Bump version to 0.38.
---
 Debbugs.wsdl  | 2 +-
 debbugs-browse.el | 2 +-
 debbugs-compat.el | 2 +-
 debbugs-gnu.el| 7 ---
 debbugs-guix.el   | 2 +-
 debbugs-org.el| 2 +-
 debbugs-ug.texi   | 2 +-
 debbugs.el| 4 ++--
 debbugs.texi  | 2 +-
 9 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/Debbugs.wsdl b/Debbugs.wsdl
index 899f452877..c25cf2f2ed 100644
--- a/Debbugs.wsdl
+++ b/Debbugs.wsdl
@@ -1,6 +1,6 @@
 
 
-

[elpa] externals/debbugs a79cfc08e8: Don't advice in Emacs 31+

2024-10-11 Thread Michael Albinus via
branch: externals/debbugs
commit a79cfc08e8c3fa683e2782a7373acb6ef45e50b6
Author: Michael Albinus 
Commit: Michael Albinus 

Don't advice in Emacs 31+

* debbugs-compat.el (debbugs-compat-add-debbugs-advice)
(debbugs-compat-remove-debbugs-advice): Check for Emacs version.

* debbugs-gnu.el (current-thread, make-thread): Declare.
(debbugs-gnu, debbugs-gnu-show-reports): Don't use `funcall'.

* debbugs-org.el (current-thread): Declare.
(debbugs-org-show-reports): Don't use `funcall'.
---
 debbugs-compat.el | 7 ---
 debbugs-gnu.el| 6 --
 debbugs-org.el| 4 +++-
 3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/debbugs-compat.el b/debbugs-compat.el
index 0e95d8605b..60ffece0db 100644
--- a/debbugs-compat.el
+++ b/debbugs-compat.el
@@ -39,7 +39,8 @@
 
 ;; This is needed for Bug#73199.
 ;; `soap-invoke-internal' let-binds `url-http-attempt-keepalives' to
-;; t, which is not thread-safe.  We override this setting.
+;; t, which is not thread-safe.  We override this setting.  It is
+;; fixed in Emacs 31.1.
 (defvar url-http-attempt-keepalives)
 (defvar debbugs-gnu-use-threads)
 (defvar debbugs-compat-url-http-attempt-keepalives nil
@@ -51,7 +52,7 @@
 
 (defun debbugs-compat-add-debbugs-advice ()
   "Activate advice for Bug#73199."
-  (when debbugs-gnu-use-threads
+  (when (and debbugs-gnu-use-threads (< emacs-major-version 31))
 (setq debbugs-compat-url-http-attempt-keepalives
   url-http-attempt-keepalives)
 (advice-add
@@ -59,7 +60,7 @@
 
 (defun debbugs-compat-remove-debbugs-advice ()
   "Deactivate advice for Bug#73199."
-  (when debbugs-gnu-use-threads
+  (when (and debbugs-gnu-use-threads (< emacs-major-version 31))
 (setq url-http-attempt-keepalives
   debbugs-compat-url-http-attempt-keepalives)
 (advice-remove 'url-http-create-request  #'debbugs-compat-debbugs-advice)))
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index be744d924f..b5f07ad3cd 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -221,6 +221,8 @@
 (declare-function log-view-current-tag "log-view" (&optional pos))
 (declare-function magit-status-setup-buffer "magit" (&optional directory))
 (declare-function magit-refresh "magit" ())
+(declare-function current-thread "thread.c" ())
+(declare-function make-thread "thread.c" (function &optional NAME))
 
 (defvar compilation-in-progress)
 (defvar diff-file-header-re)
@@ -892,7 +894,7 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
(> (length debbugs-gnu-local-tags)
   (1- debbugs-gnu-use-threads-lower-limit))
  t))
-  (funcall 'make-thread
+  (make-thread
(lambda ()
  (let (debbugs-show-progress)
(unwind-protect
@@ -1038,7 +1040,7 @@ are taken from the cache instead."
   ;; When we are retrieving the bugs asynchronously (we're not in the
   ;; main thread), the buffer shall not be shown to the user yet.
   (funcall
-   (if (or (not main-thread) (eq main-thread (funcall 'current-thread)))
+   (if (or (not main-thread) (eq main-thread (current-thread)))
#'pop-to-buffer-same-window #'set-buffer)
(get-buffer-create debbugs-gnu-current-buffer))
   (let ((inhibit-read-only t))
diff --git a/debbugs-org.el b/debbugs-org.el
index 17fa8a39b5..e7a7b2892c 100644
--- a/debbugs-org.el
+++ b/debbugs-org.el
@@ -132,6 +132,8 @@
 (require 'org)
 (eval-when-compile (require 'cl-lib))
 
+(declare-function current-thread "thread.c" ())
+
 ;; Buffer-local variables.
 (defvar debbugs-gnu-local-query)
 (defvar debbugs-gnu-local-filter)
@@ -204,7 +206,7 @@ marked as \"client-side filter\"."
 ;; the main thread), the buffer shall not be shown to the user
 ;; yet.
 (funcall
- (if  (or (not main-thread) (eq main-thread (funcall 'current-thread)))
+ (if  (or (not main-thread) (eq main-thread (current-thread)))
  #'pop-to-buffer-same-window #'set-buffer)
  (get-buffer-create debbugs-org-buffer-name))
 (org-mode)



[elpa] externals/debbugs 3ca6aba128: Release debbugs 0.41

2024-09-20 Thread Michael Albinus via
branch: externals/debbugs
commit 3ca6aba1288caa8ed575b4ae48120ca739fc978a
Author: Michael Albinus 
Commit: Michael Albinus 

Release debbugs 0.41

* debbugs.el: Bump version to 0.41.

* debbugs-compat.el (debbugs-gnu-use-threads): Declare.
(debbugs-compat-url-http-attempt-keepalives): Fix docstring.
(debbugs-compat-debbugs-advice): New defun.
(debbugs-compat-add-debbugs-advice)
(debbugs-compat-remove-debbugs-advice): Add docstring.  Use new function.

* debbugs-gnu.el (debbugs-gnu): Propagate an error to main-thread.
Rearrange messages.  Give the thread a name.
(debbugs-gnu-show-last-result): Fix docstring.  Don't handle an
error, this ia done already in the threa.
(debbugs-gnu-display-status): Mark "cache_time" as client-side
attribute.

* debbugs-org.el (debbugs-org-show-last-result): New defalias.

* debbugs-ug.texi (Retrieving Bugs): Add debbugs-org-show-last-result.
Fix typo.
---
 debbugs-compat.el | 29 -
 debbugs-gnu.el| 36 
 debbugs-org.el|  1 +
 debbugs-ug.texi   |  5 -
 debbugs.el|  2 +-
 5 files changed, 46 insertions(+), 27 deletions(-)

diff --git a/debbugs-compat.el b/debbugs-compat.el
index c73110f2aa..0e95d8605b 100644
--- a/debbugs-compat.el
+++ b/debbugs-compat.el
@@ -41,25 +41,28 @@
 ;; `soap-invoke-internal' let-binds `url-http-attempt-keepalives' to
 ;; t, which is not thread-safe.  We override this setting.
 (defvar url-http-attempt-keepalives)
+(defvar debbugs-gnu-use-threads)
 (defvar debbugs-compat-url-http-attempt-keepalives nil
-  "Temporary storage for `'.")
+  "Temporary storage for `url-http-attempt-keepalives'.")
+
+(defun debbugs-compat-debbugs-advice ()
+  "Set `url-http-attempt-keepalives' to nil."
+  (setq url-http-attempt-keepalives nil))
+
 (defun debbugs-compat-add-debbugs-advice ()
-  (with-no-warnings
+  "Activate advice for Bug#73199."
+  (when debbugs-gnu-use-threads
 (setq debbugs-compat-url-http-attempt-keepalives
-  url-http-attempt-keepalives))
-  (advice-add
-   'url-http-create-request :around
-   (lambda (orig-fun)
- "Set `url-http-attempt-keepalives' to nil."
- (with-no-warnings (setq url-http-attempt-keepalives nil))
- (funcall orig-fun))
-   '(name debbugs-advice)))
+  url-http-attempt-keepalives)
+(advice-add
+ 'url-http-create-request :before #'debbugs-compat-debbugs-advice)))
 
 (defun debbugs-compat-remove-debbugs-advice ()
-  (advice-remove 'url-http-create-request 'debbugs-advice)
-  (with-no-warnings
+  "Deactivate advice for Bug#73199."
+  (when debbugs-gnu-use-threads
 (setq url-http-attempt-keepalives
-  debbugs-compat-url-http-attempt-keepalives)))
+  debbugs-compat-url-http-attempt-keepalives)
+(advice-remove 'url-http-create-request  #'debbugs-compat-debbugs-advice)))
 
 (provide 'debbugs-compat)
 
diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index d0d1154574..be744d924f 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -896,18 +896,25 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
(lambda ()
  (let (debbugs-show-progress)
(unwind-protect
-  (funcall debbugs-gnu-show-reports-function)
+   (condition-case err
+   (funcall debbugs-gnu-show-reports-function)
+ ;; `thread-signal' exists since Emacs 27.1.  This
+ ;; doesn't matter, because in Emacs 26 we don't use
+ ;; threads.
+ (error (apply 'thread-signal main-thread err)))
  (when debbugs-gnu-current-id
(debbugs-gnu-goto debbugs-gnu-current-id))
  ;; Indicate result.
  (if debbugs-gnu-current-message
  (message
+  "%s, visit buffer via %s"
+  debbugs-gnu-current-message
   (substitute-command-keys
-   "%s, visit buffer via \\[debbugs-gnu-show-last-result]")
-  debbugs-gnu-current-message)
+   "\\[debbugs-gnu-show-last-result]"))
(message
+"Visit buffer via %s"
 (substitute-command-keys
- "Visit buffer via \\[debbugs-gnu-show-last-result]")))
+ "\\[debbugs-gnu-show-last-result]")))
  ;; Reset query, filter, suppress and message.
  (setq debbugs-gnu-current-query nil
   debbugs-gnu-current-filter nil
@@ -916,7 +923,8 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
debbugs-gnu-current-message nil
debbugs-gnu-current-nocache nil
debbugs-gnu-show-reports-function
-   debbugs-gnu-default-show-reports-function)
+   debbugs-gnu-default-show-reports-function
+   "debbugs")
 
 (unwind-protect
(funcall debbugs-g

[elpa] externals/debbugs 333fdeb5de: Improve handling of gnus-posting-styles

2024-11-06 Thread Michael Albinus via
branch: externals/debbugs
commit 333fdeb5dea31d3a6bf155adcca8584862d220be
Author: Michael Albinus 
Commit: Michael Albinus 

Improve handling of gnus-posting-styles

* debbugs-gnu.el: Use consequently `when-let*', `if-let*' and
`when-let*'.
(debbugs-gnu-summary-keep-posting-styles): New defcustom.
(debbugs-gnu-summary-mode): Use it.  (Bug#74083)

* debbugs-ug.texi (Tabulated Lists):
Add debbugs-gnu-summary-keep-posting-styles.
---
 debbugs-gnu.el  | 87 +++--
 debbugs-ug.texi |  5 
 2 files changed, 52 insertions(+), 40 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index b5f07ad3cd..a906fc3e5a 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -770,14 +770,14 @@ depend on PHRASE being a string, or nil.  See Info node
  (widen
 
 (when (member "emacs" packages)
-  (when-let ((blockers
- (alist-get
-  'blockedby
-  (car
-   (debbugs-get-status
-(alist-get
- debbugs-gnu-emacs-current-release
- debbugs-gnu-emacs-blocking-reports nil nil #'equal))
+  (when-let* ((blockers
+  (alist-get
+   'blockedby
+   (car
+(debbugs-get-status
+ (alist-get
+  debbugs-gnu-emacs-current-release
+  debbugs-gnu-emacs-blocking-reports nil nil #'equal))
(setq tabulated-list-entries
  (delq nil
(mapcar
@@ -884,7 +884,7 @@ value, like in `debbugs-gnu-get-bugs' or 
`debbubgs-gnu-tagged'."
   (if (and debbugs-gnu-use-threads main-thread
;; If there is a bugs query, there shall be a sufficient
;; number of bugs.
-   (if-let ((bugs (alist-get 'bugs debbugs-gnu-current-query)))
+   (if-let* ((bugs (alist-get 'bugs debbugs-gnu-current-query)))
(> (length bugs) (1- debbugs-gnu-use-threads-lower-limit))
  t)
;; If there is a request for tagged bugs, there shall be a
@@ -1028,9 +1028,9 @@ If OFFLINE is non-nil, the query is not sent to the 
server.  Bugs
 are taken from the cache instead."
   (setq debbugs-gnu-current-buffer
(cond
-((when-let ((string (alist-get 'phrase debbugs-gnu-current-query)))
+((when-let* ((string (alist-get 'phrase debbugs-gnu-current-query)))
(format "*%S Bugs*" string)))
-((when-let ((string (alist-get 'package debbugs-gnu-current-query)))
+((when-let* ((string (alist-get 'package debbugs-gnu-current-query)))
(format "*%s Bugs*" (capitalize string
 (t "*Bugs*")))
   ;; The tabulated mode sets several local variables.  We must get rid
@@ -1603,8 +1603,8 @@ interest to you."
 (if (memq id debbugs-gnu-local-tags)
(setq debbugs-gnu-local-tags (delq id debbugs-gnu-local-tags))
   (add-to-list 'debbugs-gnu-local-tags id))
-(when-let ((entry (debbugs-gnu--update-tag-mark-face id))
-  (inhibit-read-only t))
+(when-let* ((entry (debbugs-gnu--update-tag-mark-face id))
+   (inhibit-read-only t))
   (delete-region (line-beginning-position) (progn (forward-line 1) 
(point)))
   (apply #'debbugs-gnu-print-entry entry))
 (when id
@@ -1653,8 +1653,8 @@ interesting to you."
 (if (memq id debbugs-gnu-local-marks)
(setq debbugs-gnu-local-marks (delq id debbugs-gnu-local-marks))
   (add-to-list 'debbugs-gnu-local-marks id))
-(when-let ((entry (debbugs-gnu--update-tag-mark-face id))
-  (inhibit-read-only t))
+(when-let* ((entry (debbugs-gnu--update-tag-mark-face id))
+   (inhibit-read-only t))
   (delete-region (line-beginning-position) (progn (forward-line 1) 
(point)))
   (apply #'debbugs-gnu-print-entry entry))
 (when id
@@ -1897,6 +1897,11 @@ MERGED is the list of bugs merged with this one."
   :version "29.1"
   :type 'regexp)
 
+(defcustom debbugs-gnu-summary-keep-posting-styles nil
+  "Whether to keep the user's `gnus-posting-styles'."
+  :version "30.1"
+  :type 'boolean)
+
 (defvar debbugs-gnu-summary-mode-map
   (let ((map (make-sparse-keymap)))
 (define-key map "C" #'debbugs-gnu-send-control-message)
@@ -1910,7 +1915,11 @@ MERGED is the list of bugs merged with this one."
 \\{debbugs-gnu-summary-mode-map}"
   :lighter " Debbugs" :keymap debbugs-gnu-summary-mode-map
   (set (make-local-variable 'gnus-posting-styles)
-   `((".*"
+   `(;; We apply them first, because we want to keep our own
+ ;; posting-styles prior the others.
+ ,@(and debbugs-gnu-summary-keep-posting-styles
+(default-value 'gnus-posting-styles))
+ (".*"
  (eval
   (when (buffer-live-p gnus-article-copy)
 (with-current-buffer gnus-article-copy
@@ -2061,13 +2070,11 @@ removed instead."
  

[elpa] externals/debbugs 7de261af1c: Make column widths customizable

2024-11-07 Thread Michael Albinus via
branch: externals/debbugs
commit 7de261af1c2d20afb4d126aed83fb05d1b4959aa
Author: Michael Albinus 
Commit: Michael Albinus 

Make column widths customizable

* debbugs-gnu.el (debbugs-gnu-width-id, debbugs-gnu-width-state)
(debbugs-gnu-width-submitter, debbugs-gnu-width-title): New defcustoms.
(debbugs-gnu-mode): Use them.  (Bug#74162)

* debbugs-ug.texi (Tabulated Lists): Mention debbugs-gnu-width-id,
debbugs-gnu-width-state, debbugs-gnu-width-submitter, and
debbugs-gnu-width-title.

* debbugs.el: Bump version to 0.42.
---
 debbugs-gnu.el  | 29 +
 debbugs-ug.texi |  5 +
 debbugs.el  |  2 +-
 3 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index a906fc3e5a..f8cfcdc2c8 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1338,6 +1338,26 @@ Interactively, it is non-nil with the prefix argument."
   (message "Reverting buffer")
   (debbugs-gnu nil))
 
+(defcustom debbugs-gnu-width-id 5
+  "The width of the \"Id\" column in the tabulated list"
+  :type 'integer
+  :version "30.1")
+
+(defcustom debbugs-gnu-width-state 10
+  "The width of the \"State\" column in the tabulated list"
+  :type 'integer
+  :version "30.1")
+
+(defcustom debbugs-gnu-width-submitter 18
+  "The width of the \"Submitter\" column in the tabulated list"
+  :type 'integer
+  :version "30.1")
+
+(defcustom debbugs-gnu-width-title 10
+  "The width of the \"Title\" column in the tabulated list"
+  :type 'integer
+  :version "30.1")
+
 (define-derived-mode debbugs-gnu-mode tabulated-list-mode "Debbugs"
   "Major mode for listing bug reports.
 The bugs are taken from the cache when the list is refreshed.
@@ -1356,10 +1376,11 @@ modified on the debbugs server, consider typing \\`C-u 
g'.
   (set (make-local-variable 'debbugs-gnu-local-print-function)
debbugs-gnu-current-print-function)
   (set (make-local-variable 'tabulated-list-entries) nil)
-  (setq tabulated-list-format [("Id" 5 debbugs-gnu-sort-id)
-  ("State" 10 debbugs-gnu-sort-state)
-  ("Submitter" 18 debbugs-gnu-sort-submitter)
-  ("Title" 10 debbugs-gnu-sort-title)])
+  (setq tabulated-list-format
+`[("Id" ,debbugs-gnu-width-id debbugs-gnu-sort-id)
+ ("State" ,debbugs-gnu-width-state debbugs-gnu-sort-state)
+ ("Submitter" ,debbugs-gnu-width-submitter debbugs-gnu-sort-submitter)
+ ("Title" ,debbugs-gnu-width-title debbugs-gnu-sort-title)])
   (setq tabulated-list-sort-key (cons "Id" nil))
   (setq tabulated-list-printer #'debbugs-gnu-print-entry)
   (add-hook 'tabulated-list-revert-hook #'debbugs-gnu-rescan nil t)
diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index a00a6e6b93..7a8b7cca14 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -475,6 +475,11 @@ entry: @code{Id} (the bug number), @code{State} (some bug 
attributes),
 (the bug subject).  By default the bugs are sorted descending by
 @code{Id}; this can be changed by clicking in the headline.
 
+The width of the columns in the tabulated list are specified by the
+user options @code{debbugs-gnu-width-id},
+@code{debbugs-gnu-width-state}, @code{debbugs-gnu-width-submitter},
+and @code{debbugs-gnu-width-title}, respectively.
+
 Different foreground colors represent further information on the bug
 report.  If the bug number uses a red color
 (@code{debbugs-gnu-tagged}), the bug has been tagged locally.  The
diff --git a/debbugs.el b/debbugs.el
index 6f2ea226b3..ce01f4f247 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -5,7 +5,7 @@
 ;; Author: Michael Albinus 
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.41
+;; Version: 0.42
 ;; Package-Requires: ((emacs "26.1") (soap-client "3.1.5"))
 
 ;; This file is not part of GNU Emacs.



[elpa] externals/debbugs updated (af445940e3 -> c2f34b2379)

2025-02-11 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  af445940e3 Refine the debbugs-gnu-summary-keep-subject regexp, 
again.
   new  b1432d4f1a tests: Call new setup and teardown functions in tests
   new  d014e21f9e Factor cache accesses into dedicated functions
   new  c2f34b2379 Use consequently `when-let*' and `if-let*


Summary of changes:
 debbugs-gnu.el| 150 +-
 debbugs.el| 113 ++---
 test/debbugs-tests.el | 132 
 3 files changed, 228 insertions(+), 167 deletions(-)



[elpa] externals/debbugs c2f34b2379 3/3: Use consequently `when-let*' and `if-let*

2025-02-11 Thread Michael Albinus via
branch: externals/debbugs
commit c2f34b23793310c17a77bd2555488af28737a93b
Author: Michael Albinus 
Commit: Michael Albinus 

Use consequently `when-let*' and `if-let*

* debbugs.el:
* debbugs-gnu.el: Use consequently `when-let*' and `if-let*.
---
 debbugs-gnu.el | 150 -
 debbugs.el |  20 
 2 files changed, 84 insertions(+), 86 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index a75274c17e..75003a092c 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1181,39 +1181,40 @@ are taken from the cache instead."
 (defun debbugs-gnu-print-entry (list-id cols)
   "Insert a debbugs entry at point.
 Used instead of `tabulated-list-print-entry'."
-  (let ((case-fold-search t))
-(when (and
-  ;; We may have a narrowing in effect.
-  (or (not debbugs-gnu-limit)
-  (memq (alist-get 'id list-id) debbugs-gnu-limit))
-  ;; Filter suppressed bugs.
-  (or (not debbugs-gnu-local-suppress)
-  (not (catch :suppress
- (dolist (check debbugs-gnu-default-suppress-bugs)
-   (when (string-match
-  (cdr check) (alist-get (car check) list-id ""))
- (throw :suppress t))
-  ;; Filter search list.
-  (not (catch :suppress
- (dolist (check debbugs-gnu-local-filter)
-   (let ((val (alist-get (car check) list-id)))
- (if (stringp (cdr check))
- ;; Regular expression.
- (when (not (string-match (cdr check) (or val "")))
-   (throw :suppress t))
-   ;; Time value.
-   (when (or (and (numberp (cadr check))
-  (< (cadr check) val))
- (and (numberp (cddr check))
-  (> (cddr check) val)))
- (throw :suppress t
-
-  (tabulated-list-print-entry list-id cols)
-
-  ;; Add properties.
-  (add-text-properties
-   (line-beginning-position 0) (line-end-position 0)
-   '(mouse-face highlight)
+  (when-let* ((case-fold-search t)
+  ;; We may have a narrowing in effect.
+ ((or (not debbugs-gnu-limit)
+  (memq (alist-get 'id list-id) debbugs-gnu-limit)))
+ ;; Filter suppressed bugs.
+ ((or (not debbugs-gnu-local-suppress)
+  (not (catch :suppress
+ (dolist (check debbugs-gnu-default-suppress-bugs)
+   (when
+(string-match
+(cdr check) (alist-get (car check) list-id ""))
+ (throw :suppress t)))
+ ;; Filter search list.
+ ((not (catch :suppress
+ (dolist (check debbugs-gnu-local-filter)
+   (let ((val (alist-get (car check) list-id)))
+ (if (stringp (cdr check))
+ ;; Regular expression.
+ (when
+  (not (string-match (cdr check) (or val "")))
+   (throw :suppress t))
+   ;; Time value.
+   (when (or (and (numberp (cadr check))
+  (< (cadr check) val))
+ (and (numberp (cddr check))
+  (> (cddr check) val)))
+ (throw :suppress t)
+
+(tabulated-list-print-entry list-id cols)
+
+;; Add properties.
+(add-text-properties
+ (line-beginning-position 0) (line-end-position 0)
+ '(mouse-face highlight
 
 (defun debbugs-gnu-menu-map-emacs-enabled ()
   "Whether \"Show Release Blocking Bugs\" is enabled in the menu."
@@ -1518,20 +1519,20 @@ modified on the debbugs server, consider typing \\`C-u 
g'.
 (defun debbugs-gnu-show-blocked-by-reports ()
   "Display all bug reports this report is blocked by."
   (interactive)
-  (let ((id (debbugs-gnu-current-id))
-   (status (debbugs-gnu-current-status)))
-(if (null (alist-get 'blockedby status))
-   (message "Bug %d is not blocked by any other bug" id)
-  (apply #'debbugs-gnu-bugs (alist-get 'blockedby status)
+  (if-let* ((id (debbugs-gnu-current-id))
+   (status (debbugs-gnu-current-status))
+((null (alist-get 'blockedby status
+  (message "Bug %d is not blocked by any other bug" id)
+(apply #'debbugs-gnu-bugs (alist-get 'blockedby status
 
 (defun debbugs-gnu-show-blocking-reports ()
   "Display all bug reports this report is blocking."
   (interactive)
-  (let ((id (debbugs-gnu-current-id))
-   (status (debbugs-gnu-current-status)))
-(if (null 

[elpa] externals/debbugs d014e21f9e 2/3: Factor cache accesses into dedicated functions

2025-02-11 Thread Michael Albinus via
branch: externals/debbugs
commit d014e21f9e6bd058ef5722abcd0679a83f57c4db
Author: Morgan Smith 
Commit: Michael Albinus 

Factor cache accesses into dedicated functions

* debbugs.el (debbugs-get-cache, debbugs-put-cache): New functions.
(debbugs-newest-bugs, debbugs-get-status): Use new functions.

* test/debbugs-tests.el: Use advice to set the `cache_time' around
the new functions.  (Bug#75789)
(debbugs-test-newest-bug-cached): New test.
(debbugs-test-get-status): Add test for caching behavior.
---
 debbugs.el| 107 ++
 test/debbugs-tests.el |  57 ++-
 2 files changed, 103 insertions(+), 61 deletions(-)

diff --git a/debbugs.el b/debbugs.el
index 5ab1dfc4ba..dd9b6dc09f 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -118,6 +118,33 @@ t or 0 disables caching, nil disables expiring."
 (const :tag "Forever" nil)
 (integer :tag "Seconds")))
 
+(defun debbugs-get-cache (bug-number)
+  "Return the cached status entry for the bug identified by BUG-NUMBER."
+  (let ((status (gethash bug-number debbugs-cache-data)))
+(when (and status
+   (or (null debbugs-cache-expiry)
+   (and
+(natnump debbugs-cache-expiry)
+(> (alist-get 'cache_time status)
+   (- (float-time) debbugs-cache-expiry)
+  status)))
+
+(defun debbugs-put-cache (bug-number status &optional ttl)
+  "Put the STATUS entry for the bug BUG-NUMBER in the cache.
+Return STATUS."
+  (if (or (null debbugs-cache-expiry)
+  (and (natnump debbugs-cache-expiry)
+   (not (zerop debbugs-cache-expiry
+  (let ((cache-time (float-time)))
+;; Kind of a hack for TTL that assume that `debbugs-cache-expiry'
+;; doesn't change
+(when (and ttl (natnump debbugs-cache-expiry))
+  (setq cache-time (+ ttl (- cache-time debbugs-cache-expiry
+(puthash bug-number
+ (cons (cons 'cache_time cache-time) status)
+ debbugs-cache-data))
+status))
+
 (defun debbugs-soap-invoke (operation-name &rest parameters)
   "Invoke the SOAP connection.
 OPERATION-NAME and PARAMETERS are as described in `soap-invoke'."
@@ -325,41 +352,29 @@ patch:
 (defun debbugs-newest-bugs (amount)
   "Return the list of bug numbers, according to AMOUNT (a number) latest bugs."
   (if (= amount 1)
-  ;; We cache it as bug "0" in `debbugs-cache-data'.
-  (let ((status (gethash 0 debbugs-cache-data)))
-   (unless (and
-status
-(or
- (null debbugs-cache-expiry)
- (and
-  (natnump debbugs-cache-expiry)
-  (> (alist-get 'cache_time status)
- (- (float-time) debbugs-cache-expiry)
- ;; Due to `debbugs-gnu-completion-table', this function
- ;; could be called in rapid sequence.  We cache temporarily
- ;; the value nil, therefore.
- (when (natnump debbugs-cache-expiry)
-   (puthash
-0
-(list (cons 'cache_time (1+ (- (float-time) debbugs-cache-expiry)))
-  (list 'newest_bug))
-debbugs-cache-data))
- ;; Compute the value.
- (setq
-  status
-  (list
-   (cons 'cache_time (float-time))
-   (cons 'newest_bug
- (caar
-  (debbugs-soap-invoke
-   debbugs-wsdl debbugs-port "newest_bugs" amount)
-
- ;; Cache it.
- (when (or (null debbugs-cache-expiry) (natnump debbugs-cache-expiry))
-   (puthash 0 status debbugs-cache-data)))
-
-   ;; Return the value, as list.
-   (list (alist-get 'newest_bug status)))
+  ;; We cache it as bug "0"
+  (let ((status (debbugs-get-cache 0)))
+(unless status
+  ;; Due to `debbugs-gnu-completion-table', this function
+  ;; could be called in rapid sequence.  We cache temporarily
+  ;; the value nil, therefore.
+  (when (natnump debbugs-cache-expiry)
+(debbugs-put-cache 0 (list 'newest_bug) 1))
+
+  ;; Compute the value.
+  (setq
+   status
+   (list
+(cons 'newest_bug
+  (caar
+   (debbugs-soap-invoke
+debbugs-wsdl debbugs-port "newest_bugs" amount)
+
+  ;; Cache it.
+  (debbugs-put-cache 0 status))
+
+;; Return the value, as list.
+(list (alist-get 'newest_bug status)))
 
 (sort
  (car (debbugs-soap-invoke
@@ -477,15 +492,8 @@ Example:
  (delq nil
   (mapcar
(lambda (bug)
- (let ((status (gethash bug debbugs-cache-data)))
-   (if (and
-status
-(or
- (null debbugs-cache-expiry)
-

[elpa] externals/debbugs b1432d4f1a 1/3: tests: Call new setup and teardown functions in tests

2025-02-11 Thread Michael Albinus via
branch: externals/debbugs
commit b1432d4f1a9d873b711c1edb650fe8bb3d514ed8
Author: Morgan Smith 
Commit: Michael Albinus 

tests: Call new setup and teardown functions in tests

* test/debbugs-tests.el: (Bug#75789)
Create new functions `debbugs-test--setup' and `debbugs-test--teardown' to 
be
run before and after each test.
Create new macro `ert-deftest--debbugs' to automatically call the new
functions.
Adjust tests to use the new macro.
---
 test/debbugs-tests.el | 91 +++
 1 file changed, 56 insertions(+), 35 deletions(-)

diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el
index ce6489ca39..8402a4fff9 100644
--- a/test/debbugs-tests.el
+++ b/test/debbugs-tests.el
@@ -89,49 +89,70 @@
   nil)
   return)))
 
-(add-function
- :override (symbol-function #'soap-invoke-internal)
- #'debbugs-test--soap-invoke-internal)
+(defun debbugs-test--setup ()
+  "Mock network and time functions.
+These mock functions are needed to make the tests reproducible."
+  (setq debbugs-test--soap-operation-name nil)
+  (setq debbugs-test--soap-parameters nil)
+
+  (add-function
+   :override (symbol-function #'soap-invoke-internal)
+   #'debbugs-test--soap-invoke-internal))
+
+(defun debbugs-test--teardown ()
+  "Restore functions to as they where before."
+  (setq debbugs-test--soap-operation-name nil)
+  (setq debbugs-test--soap-parameters nil)
+
+  (remove-function
+   (symbol-function #'soap-invoke-internal)
+   #'debbugs-test--soap-invoke-internal))
+
+(defmacro ert-deftest--debbugs (name args docstring &rest body)
+  "The same as `ert-deftest' but runs setup and teardown functions."
+  (declare
+   (doc-string 3)
+   (indent 2))
+  `(ert-deftest ,name ,args ,docstring
+(debbugs-test--setup)
+,@body
+(debbugs-test--teardown)))
 
 ;;; Tests:
 
-(ert-deftest debbugs-test-get-bugs ()
+(ert-deftest--debbugs debbugs-test-get-bugs ()
   "Test \"get_bugs\"."
-  (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
-(debbugs-get-bugs
- :tag "patch"
- :severity "critical"
- :status "open"
- :status "forwarded")
-(should (string-equal debbugs-test--soap-operation-name "get_bugs"))
-(should (equal debbugs-test--soap-parameters
-   '(["tag" "patch" "severity" "critical"
-  "status" "open" "status" "forwarded"])
-
-(ert-deftest debbugs-test-newest-bugs ()
+  (debbugs-get-bugs
+   :tag "patch"
+   :severity "critical"
+   :status "open"
+   :status "forwarded")
+  (should (string-equal debbugs-test--soap-operation-name "get_bugs"))
+  (should (equal debbugs-test--soap-parameters
+ '(["tag" "patch" "severity" "critical"
+"status" "open" "status" "forwarded"]
+
+(ert-deftest--debbugs debbugs-test-newest-bugs ()
   "Test \"newest_bugs\"."
-  (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
-(debbugs-newest-bugs 4)
-(should (string-equal debbugs-test--soap-operation-name "newest_bugs"))
-(should (equal debbugs-test--soap-parameters '(4)
+  (debbugs-newest-bugs 4)
+  (should (string-equal debbugs-test--soap-operation-name "newest_bugs"))
+  (should (equal debbugs-test--soap-parameters '(4
 
-(ert-deftest debbugs-test-get-status ()
+(ert-deftest--debbugs debbugs-test-get-status ()
   "Test \"get_status\"."
-  (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
-(cl-letf (((symbol-function #'float-time)
-   (lambda (&optional _specified-time) 5000)))
-  (should (= (float-time) 5000))
-  (should (equal (sort (car (debbugs-get-status 64064)))
- (sort (car debbugs-test--bug-status
-  (should (string-equal debbugs-test--soap-operation-name "get_status"))
-  (should (equal debbugs-test--soap-parameters '([64064]))
-
-(ert-deftest debbugs-test-get-usertag ()
+  (cl-letf (((symbol-function #'float-time)
+ (lambda (&optional _specified-time) 5000)))
+(should (= (float-time) 5000))
+(should (equal (sort (car (debbugs-get-status 64064)))
+   (sort (car debbugs-test--bug-status
+(should (string-equal debbugs-test--soap-operation-name "get_status"))
+(should (equal debbugs-test--soap-parameters '([64064])
+
+(ert-deftest--debbugs debbugs-test-get-usertag ()
   "Test \"get_usertag\"."
-  (let (debbugs-test--soap-operation-name debbugs-test--soap-parameters)
-(should (equal (debbugs-get-usertag :user "emacs") '("hi")))
-(should (string-equal debbugs-test--soap-operation-name "get_usertag"))
-(should (equal debbugs-test--soap-parameters '("emacs")
+  (should (equal (debbugs-get-usertag :user "emacs") '("hi")))
+  (should (string-equal debbugs-test--soap-operation-name "get_usertag"))
+  (should (equal debbugs-test--soap-parameters '("emacs"
 
 (provide 'debbugs-tests)
 



[elpa] externals/debbugs d8e47dddd3: Make debbugs-compat.el more robust

2025-01-27 Thread Michael Albinus via
branch: externals/debbugs
commit d8e473b9f288ae5f0b7899b642e3174afc0f
Author: Michael Albinus 
Commit: Michael Albinus 

Make debbugs-compat.el more robust

* debbugs-compat.el (debbugs-gnu-use-threads): Don't declare.
(debbugs-compat-add-debbugs-advice)
(debbugs-compat-remove-debbugs-advice): Use `bound-and-true-p', it
isn't guaranteed that debbugs-gnu.el is loaded.
---
 debbugs-compat.el | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/debbugs-compat.el b/debbugs-compat.el
index cedbb386c9..d97c589532 100644
--- a/debbugs-compat.el
+++ b/debbugs-compat.el
@@ -42,7 +42,6 @@
 ;; t, which is not thread-safe.  We override this setting.  It is
 ;; fixed in Emacs 31.1.
 (defvar url-http-attempt-keepalives)
-(defvar debbugs-gnu-use-threads)
 (defvar debbugs-compat-url-http-attempt-keepalives nil
   "Temporary storage for `url-http-attempt-keepalives'.")
 
@@ -52,7 +51,8 @@
 
 (defun debbugs-compat-add-debbugs-advice ()
   "Activate advice for Bug#73199."
-  (when (and debbugs-gnu-use-threads (< emacs-major-version 31))
+  (when (and (bound-and-true-p debbugs-gnu-use-threads)
+ (< emacs-major-version 31))
 (setq debbugs-compat-url-http-attempt-keepalives
   url-http-attempt-keepalives)
 (advice-add
@@ -60,7 +60,8 @@
 
 (defun debbugs-compat-remove-debbugs-advice ()
   "Deactivate advice for Bug#73199."
-  (when (and debbugs-gnu-use-threads (< emacs-major-version 31))
+  (when (and (bound-and-true-p debbugs-gnu-use-threads)
+ (< emacs-major-version 31))
 (setq url-http-attempt-keepalives
   debbugs-compat-url-http-attempt-keepalives)
 (advice-remove 'url-http-create-request  #'debbugs-compat-debbugs-advice)))



[elpa] externals/debbugs 87ee7dd7cd 1/2: Refine the debbugs-gnu-summary-keep-subject regexp

2025-01-28 Thread Michael Albinus via
branch: externals/debbugs
commit 87ee7dd7cd1c962670b680ad6b20ede921c5a7f5
Author: Maxim Cournoyer 
Commit: Michael Albinus 

Refine the debbugs-gnu-summary-keep-subject regexp

This allows matching more variations of the 'git format-patch'
prepared messages that should have their title retains in Debbugs to
ease review.

* debbugs-gnu.el (debbugs-gnu-summary-keep-subject): Refine regexp
and add comments.
---
 debbugs-gnu.el | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 63905b20d6..b2c22e58f9 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1915,7 +1915,16 @@ MERGED is the list of bugs merged with this one."
 (debbugs-gnu-summary-mode 1)))
 
 (defcustom debbugs-gnu-summary-keep-subject
-  (rx "[PATCH" (? (0+ (not (any digit "/]"))) (1+ digit) "/" (1+ digit)) "]")
+  ;; This intends to match the message subject as prepared by 'git
+  ;; format-patch', including optional use of
+  ;; --subject-prefix='leading-prefix PATCH' or
+  ;; --subject-prefix='PATCH trailing-prefix' as well as
+  ;; --reroll-count=n.
+  (rx "[" (? (1+ (not space)) space);leading prefix?
+  "PATCH "
+  (? (1+ (not space)) space);trailing prefix?
+  (? "v" (1+ digit) space)  ;optional reroll count
+  (1+ digit) "/" (1+ digit) "]");patch number
   "Regular expression which keeps the original message subject in replies."
   :version "29.1"
   :type 'regexp)



[elpa] externals/debbugs 71d3ab1e24 2/2: * debbugs-gnu.el (debbugs-gnu-summary-keep-subject): Adapt :version.

2025-01-28 Thread Michael Albinus via
branch: externals/debbugs
commit 71d3ab1e248a035e68f2a7907c1424417884b8c6
Author: Michael Albinus 
Commit: Michael Albinus 

* debbugs-gnu.el (debbugs-gnu-summary-keep-subject): Adapt :version.
---
 debbugs-gnu.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index b2c22e58f9..3046243dc3 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1926,7 +1926,7 @@ MERGED is the list of bugs merged with this one."
   (? "v" (1+ digit) space)  ;optional reroll count
   (1+ digit) "/" (1+ digit) "]");patch number
   "Regular expression which keeps the original message subject in replies."
-  :version "29.1"
+  :version "30.1"
   :type 'regexp)
 
 (defcustom debbugs-gnu-summary-keep-posting-styles nil



[elpa] externals/debbugs updated (d8e47dddd3 -> 71d3ab1e24)

2025-01-28 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  d8e473 Make debbugs-compat.el more robust
   new  87ee7dd7cd Refine the debbugs-gnu-summary-keep-subject regexp
   new  71d3ab1e24 * debbugs-gnu.el (debbugs-gnu-summary-keep-subject): 
Adapt :version.


Summary of changes:
 debbugs-gnu.el | 13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)



[elpa] externals/debbugs 268a377e48 2/2: * debbugs-gnu.el (debbugs-gnu-use-threads): Set it to nil on

2025-01-02 Thread Michael Albinus via
branch: externals/debbugs
commit 268a377e48709b8dae88f773277215472581beaf
Author: Michael Albinus 
Commit: Michael Albinus 

* debbugs-gnu.el (debbugs-gnu-use-threads): Set it to nil on
macOS.  (Bug#75280)

* debbugs.el: Bump version to 0.43.

Update copyright years
---
 Debbugs.wsdl  | 2 +-
 debbugs-browse.el | 2 +-
 debbugs-compat.el | 2 +-
 debbugs-gnu.el| 6 --
 debbugs-guix.el   | 2 +-
 debbugs-org.el| 2 +-
 debbugs-ug.texi   | 2 +-
 debbugs.el| 4 ++--
 debbugs.texi  | 2 +-
 test/debbugs-tests.el | 2 +-
 10 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/Debbugs.wsdl b/Debbugs.wsdl
index c25cf2f2ed..2ec0d22bd3 100644
--- a/Debbugs.wsdl
+++ b/Debbugs.wsdl
@@ -1,6 +1,6 @@
 
 
-

[elpa] externals/debbugs updated (7de261af1c -> 268a377e48)

2025-01-02 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  7de261af1c Make column widths customizable
   new  f70d5528c8 Minor cleanup in debbugs
   new  268a377e48 * debbugs-gnu.el (debbugs-gnu-use-threads): Set it to 
nil on macOS.  (Bug#75280)


Summary of changes:
 Debbugs.wsdl  |  2 +-
 debbugs-browse.el |  2 +-
 debbugs-compat.el |  2 +-
 debbugs-gnu.el| 22 --
 debbugs-guix.el   |  2 +-
 debbugs-org.el|  2 +-
 debbugs-ug.texi   |  2 +-
 debbugs.el|  4 ++--
 debbugs.texi  |  2 +-
 test/debbugs-tests.el |  2 +-
 10 files changed, 22 insertions(+), 20 deletions(-)



[elpa] externals/debbugs f70d5528c8 1/2: Minor cleanup in debbugs

2025-01-02 Thread Michael Albinus via
branch: externals/debbugs
commit f70d5528c8db895a1a009d5cf3e44a729bc6d364
Author: Michael Albinus 
Commit: Michael Albinus 

Minor cleanup in debbugs

* debbugs-gnu.el (debbugs-gnu-width-id, debbugs-gnu-width-state)
(debbugs-gnu-width-submitter, debbugs-gnu-width-title):
Fix docstring and :type.
---
 debbugs-gnu.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index f8cfcdc2c8..401851294d 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1339,23 +1339,23 @@ Interactively, it is non-nil with the prefix argument."
   (debbugs-gnu nil))
 
 (defcustom debbugs-gnu-width-id 5
-  "The width of the \"Id\" column in the tabulated list"
-  :type 'integer
+  "The width of the \"Id\" column in the tabulated list."
+  :type 'natnum
   :version "30.1")
 
 (defcustom debbugs-gnu-width-state 10
-  "The width of the \"State\" column in the tabulated list"
-  :type 'integer
+  "The width of the \"State\" column in the tabulated list."
+  :type 'natnum
   :version "30.1")
 
 (defcustom debbugs-gnu-width-submitter 18
-  "The width of the \"Submitter\" column in the tabulated list"
-  :type 'integer
+  "The width of the \"Submitter\" column in the tabulated list."
+  :type 'natnum
   :version "30.1")
 
 (defcustom debbugs-gnu-width-title 10
-  "The width of the \"Title\" column in the tabulated list"
-  :type 'integer
+  "The width of the \"Title\" column in the tabulated list."
+  :type 'natnum
   :version "30.1")
 
 (define-derived-mode debbugs-gnu-mode tabulated-list-mode "Debbugs"



[elpa] externals/debbugs af445940e3: Refine the debbugs-gnu-summary-keep-subject regexp, again.

2025-02-08 Thread Michael Albinus via
branch: externals/debbugs
commit af445940e35a7d60799832a907b9d24197d4a996
Author: Maxim Cournoyer 
Commit: Michael Albinus 

Refine the debbugs-gnu-summary-keep-subject regexp, again.

Modify the regexp so that lines containing just "[PATCH]" are also
matched.

* debbugs-gnu.el (debbugs-gnu-summary-keep-subject): Refine regexp
and comments.
---
 debbugs-gnu.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 3046243dc3..a75274c17e 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -1921,10 +1921,10 @@ MERGED is the list of bugs merged with this one."
   ;; --subject-prefix='PATCH trailing-prefix' as well as
   ;; --reroll-count=n.
   (rx "[" (? (1+ (not space)) space);leading prefix?
-  "PATCH "
+  "PATCH" (? space)
   (? (1+ (not space)) space);trailing prefix?
   (? "v" (1+ digit) space)  ;optional reroll count
-  (1+ digit) "/" (1+ digit) "]");patch number
+  (? (1+ digit) "/" (1+ digit)) "]") ;optional patch number
   "Regular expression which keeps the original message subject in replies."
   :version "30.1"
   :type 'regexp)



[elpa] externals/debbugs 69f4dc14e8 2/2: doc: Update manual names in the directory node

2025-02-15 Thread Michael Albinus via
branch: externals/debbugs
commit 69f4dc14e8cbffbada422fe4e2d5640692a63425
Author: Morgan Smith 
Commit: Michael Albinus 

doc: Update manual names in the directory node

This should help the user select the correct manual from the name
alone (such as when using `Info-menu' to select the node).

* debbugs-ug.texi: Debbugs UG -> Debbugs User Guide
* debbugs.texi: Debbugs UG -> Debbugs Library
---
 debbugs-ug.texi | 2 +-
 debbugs.texi| 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index 0cd89177ce..ef2f20b081 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -4,7 +4,7 @@
 
 @dircategory Emacs
 @direntry
-* Debbugs UG: (debbugs-ug).  Debbugs User Interface in Emacs.
+* Debbugs User Guide: (debbugs-ug).  Debbugs User Interface in Emacs.
 @end direntry
 
 @copying
diff --git a/debbugs.texi b/debbugs.texi
index d682077ee0..f5024c5c36 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -4,7 +4,7 @@
 
 @dircategory Emacs
 @direntry
-* Debbugs: (debbugs).  A library for communication with Debbugs.
+* Debbugs Library: (debbugs).  A library for communication with Debbugs.
 @end direntry
 
 @copying



[elpa] externals/debbugs updated (c2f34b2379 -> 69f4dc14e8)

2025-02-15 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  c2f34b2379 Use consequently `when-let*' and `if-let*
   new  7f0e390dd5 Makefile: Add build targets for info manuals
   new  69f4dc14e8 doc: Update manual names in the directory node


Summary of changes:
 Makefile| 11 +--
 debbugs-ug.texi |  2 +-
 debbugs.texi|  2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)



[elpa] externals/debbugs 7f0e390dd5 1/2: Makefile: Add build targets for info manuals

2025-02-15 Thread Michael Albinus via
branch: externals/debbugs
commit 7f0e390dd56adf651c1d7329314a01f7c84101e5
Author: Morgan Smith 
Commit: Michael Albinus 

Makefile: Add build targets for info manuals

* Makefile: Add built targets for debbugs.info and debbugs-ug.info.
---
 Makefile | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 3d54c2c7b6..a7b6b0c7f3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
 EMACS ?= emacs
+MAKEINFO ?= makeinfo
 
 SOURCE=$(wildcard *.el)
 TESTSOURCE=$(wildcard test/*.el)
 TARGET=$(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
 TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
 
+INFOMANUALS=debbugs.info debbugs-ug.info
 
 .PHONY: all build check clean
 .PRECIOUS: %.elc
@@ -12,7 +14,12 @@ TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
 %.elc: %.el
@$(EMACS) -Q -batch -L . -f batch-byte-compile $<
 
-all: build
+%.info: %.texi
+   $(MAKEINFO) --error-limit=0 --no-split $< -o $@
+
+all: build doc
+
+doc: $(INFOMANUALS)
 
 build: $(TARGET)
 
@@ -20,4 +27,4 @@ check: build $(TESTTARGET)
@$(EMACS) -Q --batch -L . -l $(TESTSOURCE) -f 
ert-run-tests-batch-and-exit
 
 clean:
-   -rm -f $(TARGET) $(TESTTARGET)
+   -rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS)



[elpa] externals/debbugs 89fe82ac28 2/3: Improve keep-subject handling

2025-03-07 Thread Michael Albinus via
branch: externals/debbugs
commit 89fe82ac283685f8f8a478accb5f35a1f6c5f304
Author: Michael Albinus 
Commit: Michael Albinus 

Improve keep-subject handling

* debbugs-gnu.el (message-simplify-subject, gnus-article-copy)
(gnus-summary-buffer): Declare.
(debbugs-gnu-keep-subject): New function.
(debbugs-gnu-summary-mode): Use it.
(debbugs-gnu-make-control-message): Fix decstring.
---
 debbugs-gnu.el | 28 +++-
 1 file changed, 23 insertions(+), 5 deletions(-)

diff --git a/debbugs-gnu.el b/debbugs-gnu.el
index 75003a092c..b0f20e14c6 100644
--- a/debbugs-gnu.el
+++ b/debbugs-gnu.el
@@ -221,15 +221,19 @@
 (declare-function log-view-current-tag "log-view" (&optional pos))
 (declare-function magit-status-setup-buffer "magit" (&optional directory))
 (declare-function magit-refresh "magit" ())
+(declare-function
+ message-simplify-subject "message" (subject &optional functions))
 (declare-function current-thread "thread.c" ())
 (declare-function make-thread "thread.c" (function &optional NAME))
 
 (defvar compilation-in-progress)
 (defvar diff-file-header-re)
 (defvar gnus-article-buffer)
+(defvar gnus-article-copy)
 (defvar gnus-bug-group-download-format-alist)
 (defvar gnus-posting-styles)
 (defvar gnus-save-duplicate-list)
+(defvar gnus-summary-buffer)
 (defvar gnus-suppress-duplicates)
 (defvar mail-extr-ignore-realname-equals-mailbox-name)
 (defvar mail-extr-ignore-single-names)
@@ -1942,6 +1946,20 @@ MERGED is the list of bugs merged with this one."
 (define-key map [(meta m)] #'debbugs-gnu-apply-patch)
 map))
 
+(defun debbugs-gnu-keep-subject ()
+  "Keep original subject in replies.
+This is checked against `debbugs-gnu-summary-keep-subject'."
+  (concat
+   "Re: "
+   (message-simplify-subject
+(if-let* (((stringp debbugs-gnu-summary-keep-subject))
+  (orig-subject
+   (with-current-buffer gnus-article-copy
+ (or (message-fetch-field "subject") "none")))
+  ((string-match-p debbugs-gnu-summary-keep-subject orig-subject)))
+orig-subject
+  (buffer-local-value 'debbugs-gnu-subject gnus-summary-buffer)
+
 (define-minor-mode debbugs-gnu-summary-mode
   "Minor mode for providing a debbugs interface in Gnus summary buffers.
 
@@ -1969,10 +1987,8 @@ MERGED is the list of bugs merged with this one."
 (match-string 1 (car address)
(cons new new))
address))
- ,@(and debbugs-gnu-subject
- (not (string-match-p debbugs-gnu-summary-keep-subject
-  debbugs-gnu-subject))
-`((subject ,debbugs-gnu-subject)))
+ ,@(and (stringp debbugs-gnu-subject)
+'((subject debbugs-gnu-keep-subject)))
 
 (defun debbugs-gnu-guess-current-id ()
   "Guess the ID based on \"#23\".
@@ -2112,7 +2128,7 @@ removed instead."
 (defun debbugs-gnu-make-control-message
 (message bugid &optional reverse buffer noversion)
   "Make a control message for the current bug report.
-The message is inserted into BUFFER, and mail headers are adjust
+The message is inserted into BUFFER, and mail headers are adjusted
 so that it will be sent to cont...@debbugs.gnu.org (via Bcc if
 there is already a To address).  If BUFFER omitted, create and
 display a new buffer.  If optional NOVERSION is non-nil, suppress
@@ -3061,6 +3077,8 @@ If SELECTIVELY, query the user before applying the patch."
 
 ;;; TODO:
 
+;; * Unarchive archived bugs prior an action.
+
 ;; * Extend SOAP interface to get all bugs modified in a given timeframe.
 
 ;; * Extend SOAP interface to get existing package names on the



[elpa] externals/debbugs 4fde9fbcbd 3/3: Release debbugs 0.44

2025-03-07 Thread Michael Albinus via
branch: externals/debbugs
commit 4fde9fbcbd872b8c30f2e95c8c6513ae7578bdea
Author: Michael Albinus 
Commit: Michael Albinus 

Release debbugs 0.44

* Makefile (TESTS): List of *-tests.el files.
(SELECTOR): New variable.
(check): Depend on $(TESTS).
(%-tests): New target, running a test per file.  Use $(SELECTOR).

* debbugs.el: Bump version to 0.44.
---
 Makefile   | 57 +++--
 debbugs.el |  2 +-
 2 files changed, 48 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index da0764ea36..258d553ae1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,48 @@
+# Copyright (C) 2024-2025 Free Software Foundation, Inc.
+
+# Author: Morgan Smith 
+# Package: debbugs
+# Keywords: comm, hypermedia, maint
+
+# This file is free software: you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with GNU Emacs.  If not, see .
+
+### Commentary:
+
+## Some  test targets:
+##
+## check: re-run all tests.
+## filename-tests: re-run tests from test/filename-tests.el(c).
+
+## SELECTOR discrimination (see ERT manual for more possibilities):
+##
+## SELECTOR='"regexp"': Run all tests which name match "regexp"
+## SELECTOR='test-name': Run test with name test-name
+
+### Code:
+
 EMACS ?= emacs
 MAKEINFO ?= makeinfo
 
-# regex of tests to run
-TESTS=.*
+SOURCE = $(wildcard *.el)
+TESTSOURCE = $(wildcard test/*.el)
+TARGET = $(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
+TESTTARGET = $(patsubst %.el,%.elc,$(TESTSOURCE))
 
-SOURCE=$(wildcard *.el)
-TESTSOURCE=$(wildcard test/*.el)
-TARGET=$(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
-TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
+TESTS = $(patsubst test/%.el,%,$(wildcard test/*-tests.el))
+SELECTOR ?= (not (tag :unstable))
 
-INFOMANUALS=debbugs.info debbugs-ug.info
+INFOMANUALS = debbugs.info debbugs-ug.info
 
 .PHONY: all build check clean checkdoc
 .PRECIOUS: %.elc
@@ -30,10 +63,14 @@ doc: $(INFOMANUALS)
 build: $(TARGET)
 
 checkdoc: $(SOURCE) $(TESTSOURCE)
-   @$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el $(foreach 
file,$^,"--eval=(checkdoc-file \"$(file)\")")
+   @$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el \
+ $(foreach file,$^,"--eval=(checkdoc-file \"$(file)\")")
+
+check: $(TESTS)
 
-check: build $(TESTTARGET)
-   @$(EMACS) -Q --batch -L . -L ./test $(foreach file,$(TESTSOURCE), -l 
$(file)) --eval '(ert-run-tests-batch-and-exit "$(TESTS)")'
+%-tests: build $(TESTTARGET)
+   @$(EMACS) -Q --batch -L . -L ./test -l $@ \
+ --eval '(ert-run-tests-batch-and-exit (quote ${SELECTOR}))'
 
 clean:
-rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS)
diff --git a/debbugs.el b/debbugs.el
index 510465a467..eaffe6d715 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -5,7 +5,7 @@
 ;; Author: Michael Albinus 
 ;; Keywords: comm, hypermedia
 ;; Package: debbugs
-;; Version: 0.43
+;; Version: 0.44
 ;; Package-Requires: ((emacs "26.1") (soap-client "3.1.5"))
 
 ;; This file is not part of GNU Emacs.



[elpa] externals/debbugs updated (0f5c925024 -> 4fde9fbcbd)

2025-03-07 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  0f5c925024 * dir: Adapt entries to new name.  (Bug#76530)
   new  4d62aac48b Add comment in *.texi
   new  89fe82ac28 Improve keep-subject handling
   new  4fde9fbcbd Release debbugs 0.44


Summary of changes:
 Makefile| 57 +++--
 debbugs-gnu.el  | 28 +++-
 debbugs-ug.texi |  1 +
 debbugs.el  |  2 +-
 debbugs.texi|  1 +
 5 files changed, 73 insertions(+), 16 deletions(-)



[elpa] externals/debbugs 4d62aac48b 1/3: Add comment in *.texi

2025-03-07 Thread Michael Albinus via
branch: externals/debbugs
commit 4d62aac48b34bcb625d05e01b76e3354d194a6c0
Author: Michael Albinus 
Commit: Michael Albinus 

Add comment in *.texi
---
 debbugs-ug.texi | 1 +
 debbugs.texi| 1 +
 2 files changed, 2 insertions(+)

diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index ef2f20b081..506d48ef02 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -4,6 +4,7 @@
 
 @dircategory Emacs
 @direntry
+@c If you change this, you must also change file "dir" in this directory.
 * Debbugs User Guide: (debbugs-ug).  Debbugs User Interface in Emacs.
 @end direntry
 
diff --git a/debbugs.texi b/debbugs.texi
index f5024c5c36..7a1de829d1 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -4,6 +4,7 @@
 
 @dircategory Emacs
 @direntry
+@c If you change this, you must also change file "dir" in this directory.
 * Debbugs Library: (debbugs).  A library for communication with Debbugs.
 @end direntry
 



[elpa] externals/debbugs 85490bdfad: Remove dir, it is generated locally now

2025-03-11 Thread Michael Albinus via
branch: externals/debbugs
commit 85490bdfaddf108cf62b959671da9f0f3fa0b833
Author: Michael Albinus 
Commit: Michael Albinus 

Remove dir, it is generated locally now

* .gitignore: Add dir.

* Makefile (INSTALL_INFO): New variable.
(%.info): Update also dir.

* dir: Remove from git.
---
 .gitignore |  1 +
 Makefile   |  6 --
 dir| 29 +
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/.gitignore b/.gitignore
index 6d1bcee653..0b5a8a9404 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
 *.info
 *~
 ChangeLog
+dir
diff --git a/Makefile b/Makefile
index 258d553ae1..3f2ee7a554 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@
 
 EMACS ?= emacs
 MAKEINFO ?= makeinfo
+INSTALL_INFO ?= install-info --quiet
 
 SOURCE = $(wildcard *.el)
 TESTSOURCE = $(wildcard test/*.el)
@@ -54,7 +55,8 @@ test/%.elc: test/%.el
@$(EMACS) -Q -batch -L . -L ./test -f batch-byte-compile $<
 
 %.info: %.texi
-   $(MAKEINFO) --error-limit=0 --no-split $< -o $@
+   @$(MAKEINFO) --error-limit=0 --no-split $< -o $@
+   @$(INSTALL_INFO) --dir-file=dir $@
 
 all: build doc
 
@@ -73,4 +75,4 @@ check: $(TESTS)
  --eval '(ert-run-tests-batch-and-exit (quote ${SELECTOR}))'
 
 clean:
-   -rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS)
+   -rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS) dir
diff --git a/dir b/dir
index 1fda51a0f9..7605689a95 100644
--- a/dir
+++ b/dir
@@ -1,23 +1,20 @@
--*- Text -*-
-This is the file .../info/dir, which contains the topmost node of the
-Info hierarchy.  The first time you invoke Info you start off
-looking at that node, which is (dir)Top.
+This is the file .../info/dir, which contains the
+topmost node of the Info hierarchy, called (dir)Top.
+The first time you invoke Info you start off looking at this node.
 
-File: dir  Node: Top   This is the top of the INFO tree
+File: dir, Node: Top   This is the top of the INFO tree
 
-The Info Directory
-**
+  This (the Directory node) gives a menu of major topics.
+  Typing "q" exits, "H" lists all Info commands, "d" returns here,
+  "h" gives a primer for first-timers,
+  "mEmacs" visits the Emacs manual, etc.
 
-  The Info Directory is the top-level menu of major Info topics.
-  Type "d" in Info to return to the Info Directory.  Type "q" to exit Info.
-  Type "?" for a list of Info commands, or "h" to visit an Info tutorial.
-  Type "m" to choose a menu item--for instance,
-"mEmacs" visits the Emacs manual.
-  In Emacs Info, you can click mouse button 2 on a menu item
-  or cross reference to follow it to its target.
+  In Emacs, you can click mouse button 2 on a menu item or cross reference
+  to select it.
 
-* Menu: Each line that starts with a * is a topic you can select with "m".
+* Menu:
 
 Emacs
 * Debbugs Library: (debbugs).   A library for communication with Debbugs.
-* Debbugs User Guide: (debbugs-ug).  Debbugs User Interface in Emacs.
+* Debbugs User Guide: (debbugs-ug).
+Debbugs User Interface in Emacs.



[elpa] externals/debbugs 5191da510c: * dir: Remove from git. (Bug#76530)

2025-03-11 Thread Michael Albinus via
branch: externals/debbugs
commit 5191da510cb0152f2f34346ba9c6fdff9b904917
Author: Michael Albinus 
Commit: Michael Albinus 

* dir: Remove from git.  (Bug#76530)
---
 dir | 20 
 1 file changed, 20 deletions(-)

diff --git a/dir b/dir
deleted file mode 100644
index 7605689a95..00
--- a/dir
+++ /dev/null
@@ -1,20 +0,0 @@
-This is the file .../info/dir, which contains the
-topmost node of the Info hierarchy, called (dir)Top.
-The first time you invoke Info you start off looking at this node.
-
-File: dir, Node: Top   This is the top of the INFO tree
-
-  This (the Directory node) gives a menu of major topics.
-  Typing "q" exits, "H" lists all Info commands, "d" returns here,
-  "h" gives a primer for first-timers,
-  "mEmacs" visits the Emacs manual, etc.
-
-  In Emacs, you can click mouse button 2 on a menu item or cross reference
-  to select it.
-
-* Menu:
-
-Emacs
-* Debbugs Library: (debbugs).   A library for communication with Debbugs.
-* Debbugs User Guide: (debbugs-ug).
-Debbugs User Interface in Emacs.



[elpa] externals/debbugs 6d77745a60: ; Minor cleanup

2025-03-11 Thread Michael Albinus via
branch: externals/debbugs
commit 6d77745a6012ff5cd69b812227cdd52c3ced8642
Author: Michael Albinus 
Commit: Michael Albinus 

; Minor cleanup

* Makefile (.PHONY): Add doc.

* debbugs-ug.texi:
* debbugs.texi: Remove comment.
---
 Makefile| 2 +-
 debbugs-ug.texi | 1 -
 debbugs.texi| 1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 3f2ee7a554..9e6c682476 100644
--- a/Makefile
+++ b/Makefile
@@ -45,7 +45,7 @@ SELECTOR ?= (not (tag :unstable))
 
 INFOMANUALS = debbugs.info debbugs-ug.info
 
-.PHONY: all build check clean checkdoc
+.PHONY: all build check checkdoc clean doc
 .PRECIOUS: %.elc
 
 %.elc: %.el
diff --git a/debbugs-ug.texi b/debbugs-ug.texi
index 506d48ef02..ef2f20b081 100644
--- a/debbugs-ug.texi
+++ b/debbugs-ug.texi
@@ -4,7 +4,6 @@
 
 @dircategory Emacs
 @direntry
-@c If you change this, you must also change file "dir" in this directory.
 * Debbugs User Guide: (debbugs-ug).  Debbugs User Interface in Emacs.
 @end direntry
 
diff --git a/debbugs.texi b/debbugs.texi
index 7a1de829d1..f5024c5c36 100644
--- a/debbugs.texi
+++ b/debbugs.texi
@@ -4,7 +4,6 @@
 
 @dircategory Emacs
 @direntry
-@c If you change this, you must also change file "dir" in this directory.
 * Debbugs Library: (debbugs).  A library for communication with Debbugs.
 @end direntry
 



[elpa] main 96c93502f9 2/2: Merge branch 'main' of git.sv.gnu.org:/srv/git/emacs/elpa

2025-03-11 Thread Michael Albinus via
branch: main
commit 96c93502f9664baf71caefec9dde8898d5b1c9f6
Merge: 2f87279592 8cc6433c20
Author: Michael Albinus 
Commit: Michael Albinus 

Merge branch 'main' of git.sv.gnu.org:/srv/git/emacs/elpa
---
 .mailmap| 14 +++
 README  |  2 +-
 elpa-packages   | 78 ++---
 html/layout.css | 17 -
 4 files changed, 78 insertions(+), 33 deletions(-)

diff --git a/.mailmap b/.mailmap
new file mode 100644
index 00..cfa274cf7b
--- /dev/null
+++ b/.mailmap
@@ -0,0 +1,14 @@
+#
+# This list is used to fix a few misspelled names in various git
+# listings (e.g., "git log").  This can be used to fix incorrect
+# attribution, poor display, or names showing up more than once.
+# It also allows updating an old email addresses to a new one.
+#
+# See "man git-shortlog" for more information on the format.
+#
+# Keep file sorted using `M-x sort-lines'.
+#
+Ian Dunn 
+João Távora 
+Stefan Kangas  
+Stefan Monnier  monnier <>
diff --git a/README b/README
index b151cf77f3..74c7e91a31 100644
--- a/README
+++ b/README
@@ -63,7 +63,7 @@ the ones you want.
 ** Check out all packages
 
 If you wish to check out all the packages into the =packages=
-directory, you can run the command:
+directory, having done the above steps, you can run the command:
 
 #+begin_src shell
make worktrees
diff --git a/elpa-packages b/elpa-packages
index e369c41d3b..6007e343db 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -1,6 +1,6 @@
 ;; -*- lisp-data -*-
 
-;; Copyright (C) 2020-2024 Free Software Foundation, Inc.
+;; Copyright (C) 2020-2025 Free Software Foundation, Inc.
 
 ;; List of packages that are maintained externally.
 ;; The list is made of elements of the form (NAME KIND URL OPTS...).
@@ -33,7 +33,10 @@
 ;; some manual intervention (typically, because the two branches have
 ;; diverged).
 
-((ace-window   :url "https://github.com/abo-abo/ace-window";)
+((a68-mode :url "https://git.sr.ht/~jemarch/a68-mode";
+  :readme "README.md"
+  :ignored-files ("COPYING"))
+ (ace-window   :url "https://github.com/abo-abo/ace-window";)
  (ack  :url "https://github.com/leoliu/ack-el";)
  (activities   :url 
"https://github.com/alphapapa/activities.el.git";
:release-branch "stable"
@@ -78,11 +81,13 @@
  (auctex-cont-latexmk  :url 
"https://github.com/ultronozm/auctex-cont-latexmk.el";)
  (auctex-label-numbers :url 
"https://github.com/ultronozm/auctex-label-numbers.el";)
  (aumix-mode   :url nil)
+ (auth-source-xoauth2-plugin   :url 
"https://gitlab.com/manphiz/auth-source-xoauth2-plugin";)
  (auto-correct :url nil)
- (auto-header   :url "https://git.sr.ht/~pkal/auto-header";)
+ (auto-header   :url "https://codeberg.org/pkal/auto-header.el";)
  (auto-overlays:url nil 
;"http://www.dr-qubit.org/git/predictive.git";
   :doc "docs/auto-overlay-manual.texinfo")
- (autocrypt :url "https://git.sr.ht/~pkal/autocrypt";)
+ (autocrypt :url "https://codeberg.org/pkal/autocrypt.el";)
+ (autorevert-tail-truncate  :url 
"https://github.com/shipmints/autorevert-tail-truncate.el";)
  (avy  :url "https://github.com/abo-abo/avy";
   ;; FIXME: Avy diverged https://github.com/abo-abo/avy/issues/344
   :merge t)
@@ -170,6 +175,7 @@
  (company-statistics   :url 
"https://github.com/company-mode/company-statistics";)
  (compat   :url "https://github.com/emacs-compat/compat";
   :doc "compat.texi")
+ (cond-star :core "lisp/emacs-lisp/cond-star.el")
  (constants :url "https://github.com/cdominik/constants-for-Emacs";)
  (consult  :url "https://github.com/minad/consult";
   :doc "README.org"
@@ -183,6 +189,7 @@
   :ignored-files ("LICENSE"))
  (consult-recoll   :url "https://codeberg.org/jao/consult-recoll";
   :ignored-files ("license")
+  :news "changelog.org"
   :readme "readme.org")
  ;; FIXME: https://github.com/jacksonrayhamilton/context-coloring/issues/9
  (context-coloring :url 
"https://github.com/jacksonrayhamilton/context-coloring.git";)
@@ -209,9 +216,10 @@
   :doc "README.org"
   :news "CHANGELOG.org"
   :ignored-files ("COPYING" "doclicense.texi"))
+ (cus-abbrev:url "https://gitlab.com/mauroaranda/cus-abbrev";)
  (cycle-quotes :url nil)
  (dape  :url "https://github.com/svaante/dape";)
- (darkroom :url "https://github.com/capitaomorte/darkroom.git";)
+ (darkroom :url "https://github.com/joaotavora/darkroom";)
  (dash :url "https://github.com/magnars/dash.el.git";
   :doc "dash.texi"
   :news "NEWS.md")
@@ -226,12 +234,19 @@
  (denote-menu  :url "https://github.com/namilus/denote-menu";
   :readme "README.org"
   :ignored-files ("COPYING"))
+ (denote-search:url "https://github.com/lmq-10/denote-search";
+  :ignored-files ("COPYING" "doclicense.texi")
+  :readme "REA

[elpa] main 2f87279592 1/2: * elpa-packages (tramp): Remove :main-file.

2025-03-11 Thread Michael Albinus via
branch: main
commit 2f87279592bbe9e77e65084790e461a82aa4c048
Author: Michael Albinus 
Commit: Michael Albinus 

* elpa-packages (tramp): Remove :main-file.
---
 elpa-packages | 1 -
 1 file changed, 1 deletion(-)

diff --git a/elpa-packages b/elpa-packages
index 5d34bea1d4..e369c41d3b 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -776,7 +776,6 @@
  (track-changes:core "lisp/emacs-lisp/track-changes.el")
  (tramp:url 
"https://git.savannah.gnu.org/git/tramp.git";
   :branch "externals/tramp"
-  :main-file "trampver.el"
   :make ("autoloads" "info")
   :doc "texi/tramp.texi")
  (tramp-nspawn :url "https://github.com/bjc/tramp-nspawn";



[elpa] externals/debbugs e096436712 1/6: tests: Move helper and wrapper functions into their own file

2025-02-24 Thread Michael Albinus via
branch: externals/debbugs
commit e09643671277c316aad1cc55599a3a2e8a8df01f
Author: Morgan Smith 
Commit: Michael Albinus 

tests: Move helper and wrapper functions into their own file

* Makefile (check): Load all files in the test directory.

* test/debbugs-test-helpers.el: New file.

* test/debbugs-tests.el: Move test helper and wrapper functions into the new
file and require it.
---
 Makefile   |   8 +-
 test/{debbugs-tests.el => debbugs-test-helpers.el} |  58 +--
 test/debbugs-tests.el  | 113 +
 3 files changed, 11 insertions(+), 168 deletions(-)

diff --git a/Makefile b/Makefile
index a7b6b0c7f3..81d7b5d2f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,9 @@
 EMACS ?= emacs
 MAKEINFO ?= makeinfo
 
+# regex of tests to run
+TESTS=.*
+
 SOURCE=$(wildcard *.el)
 TESTSOURCE=$(wildcard test/*.el)
 TARGET=$(filter-out debbugs-pkg.elc,$(patsubst %.el,%.elc,$(SOURCE)))
@@ -14,6 +17,9 @@ INFOMANUALS=debbugs.info debbugs-ug.info
 %.elc: %.el
@$(EMACS) -Q -batch -L . -f batch-byte-compile $<
 
+test/%.elc: test/%.el
+   @$(EMACS) -Q -batch -L . -L ./test -f batch-byte-compile $<
+
 %.info: %.texi
$(MAKEINFO) --error-limit=0 --no-split $< -o $@
 
@@ -24,7 +30,7 @@ doc: $(INFOMANUALS)
 build: $(TARGET)
 
 check: build $(TESTTARGET)
-   @$(EMACS) -Q --batch -L . -l $(TESTSOURCE) -f 
ert-run-tests-batch-and-exit
+   @$(EMACS) -Q --batch -L . -L ./test $(foreach file,$(TESTSOURCE), -l 
$(file)) --eval '(ert-run-tests-batch-and-exit "$(TESTS)")'
 
 clean:
-rm -f $(TARGET) $(TESTTARGET) $(INFOMANUALS)
diff --git a/test/debbugs-tests.el b/test/debbugs-test-helpers.el
similarity index 69%
copy from test/debbugs-tests.el
copy to test/debbugs-test-helpers.el
index f3abea2837..f98bab40ed 100644
--- a/test/debbugs-tests.el
+++ b/test/debbugs-test-helpers.el
@@ -1,4 +1,4 @@
-;;; debbugs-tests.el --- tests for debbugs.el -*- lexical-binding: t; -*-
+;;; debbugs-test-helpers.el --- Helpers for testing debbugs -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
 
@@ -140,59 +140,7 @@ These mock functions are needed to make the tests 
reproducible."
 ,@body
 (debbugs-test--teardown)))
 
-;;; Tests:
-
-(ert-deftest--debbugs debbugs-test-get-bugs ()
-  "Test \"get_bugs\"."
-  (debbugs-get-bugs
-   :tag "patch"
-   :severity "critical"
-   :status "open"
-   :status "forwarded")
-  (should (string-equal debbugs-test--soap-operation-name "get_bugs"))
-  (should (equal debbugs-test--soap-parameters
- '(["tag" "patch" "severity" "critical"
-"status" "open" "status" "forwarded"]
-
-(ert-deftest--debbugs debbugs-test-newest-bugs ()
-  "Test \"newest_bugs\"."
-  (debbugs-newest-bugs 4)
-  (should (string-equal debbugs-test--soap-operation-name "newest_bugs"))
-  (should (equal debbugs-test--soap-parameters '(4
-
-(ert-deftest--debbugs debbugs-test-newest-bug-cached ()
-  "Test getting the newest bug from the cache."
-  ;; First time we get it from the server.
-  (should (equal (debbugs-newest-bugs 1) '(0)))
-  (should (equal debbugs-test--soap-operation-name "newest_bugs"))
-  (should (equal debbugs-test--soap-parameters '(1)))
-  (setq debbugs-test--soap-operation-name nil)
-  (setq debbugs-test--soap-parameters nil)
-  ;; Now it's cached
-  (should (equal (debbugs-newest-bugs 1) '(0)))
-  (should (equal debbugs-test--soap-operation-name nil))
-  (should (equal debbugs-test--soap-parameters nil)))
-
-(ert-deftest--debbugs debbugs-test-get-status ()
-  "Test \"get_status\"."
-  (should (equal (sort (car (debbugs-get-status 64064)))
- (sort (car debbugs-test--bug-status
-  (should (string-equal debbugs-test--soap-operation-name "get_status"))
-  (should (equal debbugs-test--soap-parameters '([64064])))
-  (setq debbugs-test--soap-operation-name nil)
-  (setq debbugs-test--soap-parameters nil)
-  ;; cached
-  (should (equal (sort (car (debbugs-get-status 64064)))
- (sort (car debbugs-test--bug-status
-  (should (equal debbugs-test--soap-operation-name nil))
-  (should (equal debbugs-test--soap-parameters nil)))
-
-(ert-deftest--debbugs debbugs-test-get-usertag ()
-  "Test \"get_usertag\"."
-  (should (equal (debbugs-get-usertag :user "emacs") '("hi")))
-  (should (string-equal debbugs-test--soap-operation-name "get_usertag"))
-  (should (equal debbugs-test--soap-parameters '("emacs"
 
-(provide 'debbugs-tests)
+(provide 'debbugs-test-helpers)
 
-;;; debbugs-tests.el ends here
+;;; debbugs-test-helpers.el ends here
diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el
index f3abea2837..da1b9dffe6 100644
--- a/test/debbugs-tests.el
+++ b/test/debbugs-tests.el
@@ -27,118 +27,7 @@
 ;;; Code:
 
 (require 'debbugs)
-
-;;; Helper Data:
-
-;; Generated using this:
-;; (soap-invoke debbugs-wsdl debbugs-port "get_status" [64064])

[elpa] externals/debbugs f0a21bb4b3 6/6: Some minor hygiene in recent debbugs changes

2025-02-24 Thread Michael Albinus via
branch: externals/debbugs
commit f0a21bb4b378205703aca5fb03717028ae2401dd
Author: Michael Albinus 
Commit: Michael Albinus 

Some minor hygiene in recent debbugs changes

* debbugs.el (debbugs-get-status): Add comment.

* test/debbugs-gnu-tests.el (ert): Require.
(debbugs-test-gnu-search): Rename from `debbugs-test-debbugs-gnu-search'.

* test/debbugs-test-helpers.el: Adapt copyright year.

* test/debbugs-tests.el (ert): Require.
---
 debbugs.el   | 1 +
 test/debbugs-gnu-tests.el| 3 ++-
 test/debbugs-test-helpers.el | 2 +-
 test/debbugs-tests.el| 1 +
 4 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debbugs.el b/debbugs.el
index 288a057b52..510465a467 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -591,6 +591,7 @@ Example:
   (debbugs-put-cache
(alist-get 'key x)
(sort (alist-get 'value x)
+ ;; Starting with Emacs 30.1, this can be #'value<.
  (lambda (x y)
(string< (car x) (car y)))
   debbugs-soap-invoke-async-object
diff --git a/test/debbugs-gnu-tests.el b/test/debbugs-gnu-tests.el
index 6c803aefc3..11b4e6a106 100644
--- a/test/debbugs-gnu-tests.el
+++ b/test/debbugs-gnu-tests.el
@@ -26,12 +26,13 @@
 
 ;;; Code:
 
+(require 'ert)
 (require 'debbugs-gnu)
 (require 'debbugs-test-helpers)
 
 ;;; Tests:
 
-(ert-deftest--debbugs debbugs-test-debbugs-gnu-search ()
+(ert-deftest--debbugs debbugs-test-gnu-search ()
   "Test `debbugs-gnu-search'."
   (cl-letf (((symbol-function #'debbugs-gnu)
  #'list))
diff --git a/test/debbugs-test-helpers.el b/test/debbugs-test-helpers.el
index 14bd261c9f..7cddb2d641 100644
--- a/test/debbugs-test-helpers.el
+++ b/test/debbugs-test-helpers.el
@@ -1,6 +1,6 @@
 ;;; debbugs-test-helpers.el --- Helpers for testing debbugs -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2024-2025 Free Software Foundation, Inc.
+;; Copyright (C) 2025 Free Software Foundation, Inc.
 
 ;; Author: Morgan Smith 
 ;; Package: debbugs
diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el
index 16c8c6629a..7977370671 100644
--- a/test/debbugs-tests.el
+++ b/test/debbugs-tests.el
@@ -26,6 +26,7 @@
 
 ;;; Code:
 
+(require 'ert)
 (require 'debbugs)
 (require 'debbugs-test-helpers)
 



[elpa] externals/debbugs d5a053b471 3/6: tests: Add tests for debbugs-gnu

2025-02-24 Thread Michael Albinus via
branch: externals/debbugs
commit d5a053b4714a75040700ea36faf770d389c66f85
Author: Morgan Smith 
Commit: Michael Albinus 

tests: Add tests for debbugs-gnu

* test/debbugs-gnu-tests.el: New file.
---
 test/debbugs-gnu-tests.el | 46 ++
 1 file changed, 46 insertions(+)

diff --git a/test/debbugs-gnu-tests.el b/test/debbugs-gnu-tests.el
new file mode 100644
index 00..6c803aefc3
--- /dev/null
+++ b/test/debbugs-gnu-tests.el
@@ -0,0 +1,46 @@
+;;; debbugs-gnu-tests.el --- tests for debbugs-gnu.el -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2025 Free Software Foundation, Inc.
+
+;; Author: Morgan Smith 
+;; Package: debbugs
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
+;; Please ensure tests don't actually make network calls.
+
+;;; Code:
+
+(require 'debbugs-gnu)
+(require 'debbugs-test-helpers)
+
+;;; Tests:
+
+(ert-deftest--debbugs debbugs-test-debbugs-gnu-search ()
+  "Test `debbugs-gnu-search'."
+  (cl-letf (((symbol-function #'debbugs-gnu)
+ #'list))
+(should
+ (equal '(nil ("guix" "guix-patches") nil)
+(debbugs-gnu-search "frogs" '((pending . "pending")) nil '("guix" 
"guix-patches") nil)))
+(should (equal debbugs-gnu-current-query '((phrase . "frogs"
+(should (equal debbugs-gnu-current-filter '((pending . "pending"))
+
+(provide 'debbugs-gnu-tests)
+
+;;; debbugs-gnu-tests.el ends here



[elpa] externals/debbugs b4f7d03330 5/6: Sort return value of `debbugs-get-status'

2025-02-24 Thread Michael Albinus via
branch: externals/debbugs
commit b4f7d033306b6011a5448a83faec59c90b5dd28d
Author: Morgan Smith 
Commit: Michael Albinus 

Sort return value of `debbugs-get-status'

* debbugs.el(debbugs-get-status): Sort return value to ensure a
stable return value.

* test/debbugs-test-helpers.el(debbugs-test--bug-status): Sort.

* test/debbugs-tests.el(debbugs-test-get-status): Remove
unnecessary sorting.
---
 debbugs.el   |  4 +++-
 test/debbugs-test-helpers.el | 19 ++-
 test/debbugs-tests.el|  8 
 3 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/debbugs.el b/debbugs.el
index 71c3cba233..288a057b52 100644
--- a/debbugs.el
+++ b/debbugs.el
@@ -590,7 +590,9 @@ Example:
  ;; Cache the result, and return.
   (debbugs-put-cache
(alist-get 'key x)
-   (alist-get 'value x
+   (sort (alist-get 'value x)
+ (lambda (x y)
+   (string< (car x) (car y)))
   debbugs-soap-invoke-async-object
 
 (defun debbugs-get-usertag (&rest query)
diff --git a/test/debbugs-test-helpers.el b/test/debbugs-test-helpers.el
index 7ea6f00dce..14bd261c9f 100644
--- a/test/debbugs-test-helpers.el
+++ b/test/debbugs-test-helpers.el
@@ -55,17 +55,18 @@
 ;; Generated using this:
 ;; (debbugs-get-status 64064)
 (defconst debbugs-test--bug-status
-  '(((cache_time . 5000) (source . "unknown") (unarchived)
- (keywords "patch") (blocks) (pending . "done") (severity . "normal")
- (done . "Michael Albinus ") (location . "archive")
- (log_modified . 1689593050) (subject . "[PATCH 0/4] debbugs improvements")
- (last_modified . 1689593050) (found) (tags "patch") (package "emacs")
- (originator . "Morgan Smith ") (archived . t)
- (blockedby) (affects) (mergedwith) (summary) (date . 1686745022)
- (fixed_versions) (id . 64064) (fixed) (found_date) (forwarded)
+  '(((cache_time . 5000) (affects) (archived . t) (blockedby) (blocks)
+ (bug_num . 64064) (date . 1686745022)
+ (done . "Michael Albinus ") (fixed) (fixed_date)
+ (fixed_versions) (forwarded) (found) (found_date) (found_versions)
+ (id . 64064) (keywords "patch") (last_modified . 1689593050)
+ (location . "archive") (log_modified . 1689593050) (mergedwith)
  (msgid
   . 
"")
- (owner) (found_versions) (fixed_date) (bug_num . 64064)))
+ (originator . "Morgan Smith ") (owner)
+ (package "emacs") (pending . "done") (severity . "normal")
+ (source . "unknown") (subject . "[PATCH 0/4] debbugs improvements") 
(summary)
+ (tags "patch") (unarchived)))
   "Mock result from `debbugs-get-status' for bug 64064.")
 
 ;;; Helper Functions:
diff --git a/test/debbugs-tests.el b/test/debbugs-tests.el
index da1b9dffe6..16c8c6629a 100644
--- a/test/debbugs-tests.el
+++ b/test/debbugs-tests.el
@@ -64,15 +64,15 @@
 
 (ert-deftest--debbugs debbugs-test-get-status ()
   "Test \"get_status\"."
-  (should (equal (sort (car (debbugs-get-status 64064)))
- (sort (car debbugs-test--bug-status
+  (should (equal (car (debbugs-get-status 64064))
+ (car debbugs-test--bug-status)))
   (should (string-equal debbugs-test--soap-operation-name "get_status"))
   (should (equal debbugs-test--soap-parameters '([64064])))
   (setq debbugs-test--soap-operation-name nil)
   (setq debbugs-test--soap-parameters nil)
   ;; cached
-  (should (equal (sort (car (debbugs-get-status 64064)))
- (sort (car debbugs-test--bug-status
+  (should (equal (car (debbugs-get-status 64064))
+ (car debbugs-test--bug-status)))
   (should (equal debbugs-test--soap-operation-name nil))
   (should (equal debbugs-test--soap-parameters nil)))
 



[elpa] externals/debbugs fe694f77c4 4/6: Makefile: Add target to run checkdoc on all files

2025-02-24 Thread Michael Albinus via
branch: externals/debbugs
commit fe694f77c49f86952a698d13865867dec87aea39
Author: Morgan Smith 
Commit: Michael Albinus 

Makefile: Add target to run checkdoc on all files

* Makefile: Add target to run checkdoc on all files.

* resources/debbugs-checkdoc-config.el: New file.
---
 Makefile |  5 +++-
 resources/debbugs-checkdoc-config.el | 50 
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 81d7b5d2f2..da0764ea36 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,7 @@ TESTTARGET=$(patsubst %.el,%.elc,$(TESTSOURCE))
 
 INFOMANUALS=debbugs.info debbugs-ug.info
 
-.PHONY: all build check clean
+.PHONY: all build check clean checkdoc
 .PRECIOUS: %.elc
 
 %.elc: %.el
@@ -29,6 +29,9 @@ doc: $(INFOMANUALS)
 
 build: $(TARGET)
 
+checkdoc: $(SOURCE) $(TESTSOURCE)
+   @$(EMACS) -Q --batch -l resources/debbugs-checkdoc-config.el $(foreach 
file,$^,"--eval=(checkdoc-file \"$(file)\")")
+
 check: build $(TESTTARGET)
@$(EMACS) -Q --batch -L . -L ./test $(foreach file,$(TESTSOURCE), -l 
$(file)) --eval '(ert-run-tests-batch-and-exit "$(TESTS)")'
 
diff --git a/resources/debbugs-checkdoc-config.el 
b/resources/debbugs-checkdoc-config.el
new file mode 100644
index 00..d09b1adfe5
--- /dev/null
+++ b/resources/debbugs-checkdoc-config.el
@@ -0,0 +1,50 @@
+;;; debbugs-checkdoc-config.el --- Configuration for running checkdoc on 
debbugs -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2025 Free Software Foundation, Inc.
+
+;; Author: Morgan Smith 
+;; Package: debbugs
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
+;;; Code:
+
+(defvar checkdoc-package-keywords-flag)
+(defvar checkdoc-spellcheck-documentation-flag)
+(defvar checkdoc-ispell-lisp-words)
+
+(with-eval-after-load "checkdoc"
+  (setq checkdoc-package-keywords-flag t)
+  (setq checkdoc-spellcheck-documentation-flag t)
+  (setq checkdoc-ispell-lisp-words
+'("ChangeLog" "ChangeLogs" "UTF" "alist" "args"
+  "armstrong" "backend" "bcc" "bugreport" "cdate" "cedet"
+  "coreutils" "cygwin" "debbugs" "debian" "el" "emacs"
+  "etags" "freemail" "fsf" "guix" "gw" "henoch" "hu"
+  "hyperestraier" "keymap" "magit" "magnus" "maint"
+  "maintainer" "maintainer's" "mbox" "mboxes" "minibuffer"
+  "moreinfo" "multibyte" "notabug" "paren" "persistency"
+  "regexp" "rescan" "rgm" "rmail" "severities" "sexp"
+  "solaris" "src" "sublist" "submitter" "submitter's"
+  "subproduct" "subqueries" "subquery" "teardown"
+  "unarchived" "unibyte" "unreproducible" "url" "util"
+  "wishlist" "wontfix" "wsdl" "www" "xsd" "zltuz")))
+
+(provide 'debbugs-checkdoc-config)
+
+;;; debbugs-checkdoc-config.el ends here



[elpa] externals/debbugs updated (69f4dc14e8 -> f0a21bb4b3)

2025-02-24 Thread Michael Albinus via
albinus pushed a change to branch externals/debbugs.

  from  69f4dc14e8 doc: Update manual names in the directory node
   new  e096436712 tests: Move helper and wrapper functions into their own 
file
   new  2db1026190 tests: Use 'unwind-protect' to ensure test cleanup 
always occurs
   new  d5a053b471 tests: Add tests for debbugs-gnu
   new  fe694f77c4 Makefile: Add target to run checkdoc on all files
   new  b4f7d03330 Sort return value of `debbugs-get-status'
   new  f0a21bb4b3 Some minor hygiene in recent debbugs changes


Summary of changes:
 Makefile   |  13 ++-
 debbugs.el |   5 +-
 resources/debbugs-checkdoc-config.el   |  50 +
 test/debbugs-gnu-tests.el  |  47 
 test/{debbugs-tests.el => debbugs-test-helpers.el} |  87 ---
 test/debbugs-tests.el  | 122 +
 6 files changed, 137 insertions(+), 187 deletions(-)
 create mode 100644 resources/debbugs-checkdoc-config.el
 create mode 100644 test/debbugs-gnu-tests.el
 copy test/{debbugs-tests.el => debbugs-test-helpers.el} (59%)



[elpa] externals/debbugs 2db1026190 2/6: tests: Use 'unwind-protect' to ensure test cleanup always occurs

2025-02-24 Thread Michael Albinus via
branch: externals/debbugs
commit 2db1026190aa3b5366e8568e3900ce5a5bc4c944
Author: Morgan Smith 
Commit: Michael Albinus 

tests: Use 'unwind-protect' to ensure test cleanup always occurs

* test/debbugs-test-helpers.el(ert-deftest--debbugs): Use 'unwind-protect'.
---
 test/debbugs-test-helpers.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/debbugs-test-helpers.el b/test/debbugs-test-helpers.el
index f98bab40ed..7ea6f00dce 100644
--- a/test/debbugs-test-helpers.el
+++ b/test/debbugs-test-helpers.el
@@ -136,9 +136,11 @@ These mock functions are needed to make the tests 
reproducible."
(doc-string 3)
(indent 2))
   `(ert-deftest ,name ,args ,docstring
-(debbugs-test--setup)
-,@body
-(debbugs-test--teardown)))
+(unwind-protect
+(progn
+  (debbugs-test--setup)
+  ,@body)
+  (debbugs-test--teardown
 
 
 (provide 'debbugs-test-helpers)



[elpa] externals/debbugs 0f5c925024: * dir: Adapt entries to new name. (Bug#76530)

2025-02-25 Thread Michael Albinus via
branch: externals/debbugs
commit 0f5c9250242a5dfe07de0637d43380766d1546da
Author: Michael Albinus 
Commit: Michael Albinus 

* dir: Adapt entries to new name.  (Bug#76530)
---
 dir | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dir b/dir
index d84162759b..1fda51a0f9 100644
--- a/dir
+++ b/dir
@@ -8,10 +8,10 @@ File: dir Node: Top   This is the top of the INFO tree
 The Info Directory
 **
 
-  The Info Directory is the top-level menu of major Info topics. 
+  The Info Directory is the top-level menu of major Info topics.
   Type "d" in Info to return to the Info Directory.  Type "q" to exit Info.
   Type "?" for a list of Info commands, or "h" to visit an Info tutorial.
-  Type "m" to choose a menu item--for instance, 
+  Type "m" to choose a menu item--for instance,
 "mEmacs" visits the Emacs manual.
   In Emacs Info, you can click mouse button 2 on a menu item
   or cross reference to follow it to its target.
@@ -19,5 +19,5 @@ The Info Directory
 * Menu: Each line that starts with a * is a topic you can select with "m".
 
 Emacs
-* Debbugs: (debbugs).   A library for communication with Debbugs.
-* Debbugs UG: (debbugs-ug). Debbugs User Interface in Emacs.
+* Debbugs Library: (debbugs).   A library for communication with Debbugs.
+* Debbugs User Guide: (debbugs-ug).  Debbugs User Interface in Emacs.