[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ENHANCEMENT] More uniform and useful progress / abort messages [PATCH]
On 2018-05-18 11:13, I submitted a patch for a better in progress
message screen, but at the same time Katsumi fixed another issue in the
same place (not returning to point-min), and I've since noticed a bug in
my patch (missing a 'when' statement before the 're-search-forward').
The update is attached.
--
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0
Index: w3m-proc.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-proc.el,v
retrieving revision 1.89
diff -b -u -p -r1.89 w3m-proc.el
--- w3m-proc.el 18 May 2018 07:24:12 -0000 1.89
+++ w3m-proc.el 22 May 2018 13:51:12 -0000
@@ -297,16 +292,16 @@ which have no handler."
(w3m-process-kill-stray-processes)
(if w3m-process-queue
(w3m-process-start-queued-processes)
- (when (and w3m-clear-display-while-reading
- (let ((pt (point)))
- (prog2
+ (when w3m-clear-display-while-reading
+ (let ((pt (point))
+ (inhibit-read-only t))
(goto-char (point-min))
- (looking-at "\n* *Reading [^\n]+\\.\\.\\.\\'")
- (goto-char pt))))
- (let ((inhibit-read-only t))
- (erase-buffer)
+ (when (re-search-forward "\n*\\( *\\)Reading [^\n]+\\(\\.\\.\\.\\)" nil t)
+ (delete-region (match-beginning 2) (point-max))
+ (insert "\n\n" (match-string 1) "Operation aborted by user.")
+ (goto-char pt)))
(setq w3m-current-url nil
- w3m-current-title nil))))
+ w3m-current-title nil)))
(w3m-force-window-update-later buffer))
(defun w3m-process-shutdown ()