Subject: bug#36462: closed (Re: bug#36462: [PATCH] Prefer progress-reporter in bookmark.el)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 06 Jul 2019 08:49:02 +0000

Your bug report

#36462: [PATCH] Prefer progress-reporter in bookmark.el

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
36462: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36462
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#36462: [PATCH] Prefer progress-reporter in bookmark.el
From: Eli Zaretskii <[email-masked]>
To: Stefan Kangas <[email-masked]>
Cc: [email-masked]
Date: Sat, 06 Jul 2019 11:48:03 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Stefan Kangas <[email-masked]>
> Date: Mon, 1 Jul 2019 19:14:33 +0200
> 
> The attached patch changes remaining uses of `message' to
> `make-progress-reporter' where it makes sense in bookmark.el.

Thanks, pushed to the master branch.

Would it be possible for you to send a patch when the bug number is
already known, and then include the reference to the bug number in the
log message?  E.g., send just the description first, and the actual
patch after you receive the acknowledgement with the bug number.  That
would allow to apply the patch with "git am", without the necessary
followup with "git commit --amend".

TIA

Subject: [PATCH] Prefer progress-reporter in bookmark.el
From: Stefan Kangas <[email-masked]>
To: [email-masked]
Date: Mon, 1 Jul 2019 19:14:33 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

The attached patch changes remaining uses of `message' to
`make-progress-reporter' where it makes sense in bookmark.el.

Thanks,
Stefan Kangas
From e9b5b5b7c1ccbfadee14e6d51675453e073662a1 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
Date: Mon, 1 Jul 2019 19:10:36 +0200
Subject: [PATCH] Prefer progress-reporter in bookmark.el

* lisp/bookmark.el (bookmark-upgrade-file-format-from-0)
(bookmark-bmenu-execute-deletions): Use progress-reporter.
---
 lisp/bookmark.el | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index bbef0a927d..f2fa688666 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -693,18 +693,17 @@ bookmark-upgrade-version-0-alist
 (defun bookmark-upgrade-file-format-from-0 ()
   "Upgrade a bookmark file of format 0 (the original format) to format 1.
 This expects to be called from `point-min' in a bookmark file."
-  (message "Upgrading bookmark format from 0 to %d..."
-           bookmark-file-format-version)
-  (let* ((old-list (bookmark-alist-from-buffer))
+  (let* ((reporter (make-progress-reporter
+                    (format "Upgrading bookmark format from 0 to %d..."
+                     bookmark-file-format-version)))
+         (old-list (bookmark-alist-from-buffer))
          (new-list (bookmark-upgrade-version-0-alist old-list)))
     (delete-region (point-min) (point-max))
     (bookmark-insert-file-format-version-stamp buffer-file-coding-system)
     (pp new-list (current-buffer))
-    (save-buffer))
-  (goto-char (point-min))
-  (message "Upgrading bookmark format from 0 to %d...done"
-           bookmark-file-format-version)
-  )
+    (save-buffer)
+    (goto-char (point-min))
+    (progress-reporter-done reporter)))

 (defun bookmark-grok-file-format-version ()
@@ -2125,8 +2124,8 @@ bookmark-bmenu-delete-backwards
 (defun bookmark-bmenu-execute-deletions ()
   "Delete bookmarks flagged `D'."
   (interactive)
-  (message "Deleting bookmarks...")
-  (let ((o-point  (point))
+  (let ((reporter (make-progress-reporter "Deleting bookmarks..."))
+        (o-point  (point))
         (o-str    (save-excursion
                     (beginning-of-line)
                     (unless (= (following-char) ?D)
@@ -2148,8 +2147,7 @@ bookmark-bmenu-execute-deletions
           (forward-char o-col))
       (goto-char o-point))
     (beginning-of-line)
-    (message "Deleting bookmarks...done")
-    ))
+    (progress-reporter-done reporter)))

 (defun bookmark-bmenu-rename ()
-- 
2.11.0