Subject: bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message

From: Drew Adams <[email-masked]>
Date: Sat, 8 Feb 2014 07:06:33 -0800 (PST)

> I tried edebugging through the function.  It asked me first whether
> to delete the files in question, and then it used the
> 
> 	 (progress-reporter
> 	  (make-progress-reporter
> 	   (if trashing "Trashing..." "Deleting...")
> 	   succ count)))
> 
> to display "Deleting... [33%]".  But that was when it's actually
> deleting something.
> 
> I can't see the progress reported being used before that, but I may
> be misreading the code.

Yes, I believe you are.  And apparently you are also mis-seeing
what you see (not noticing the "Deleting..." message appear first).

Not only do I see what I said, but this is what debug shows the
progress reporter doing:

Debugger entered--entering a function:
* message("%s" "Deleting...")
* progress-reporter-do-update((1 . [1391871442.1130002 0 5
  "Deleting..." 1 0.2]) 0)
* make-progress-reporter("Deleting..." 0 5)
* (let* ((files (mapcar (function car) l)) ...

And if you `M-x debug-on-entry RET dired-internal-do-flagged-delete'
then you will see that it immediately calls `dired-internal-do-deletions'.

`dired-internal-do-deletions' _first_, in its `let*'-form, calls
`make-progress-reporter', which shows the message "Deleting...".

Only _after_ that, in the `let*'-body, does it call `dired-mark-pop-up',
which pops up the list of files and asks for confirmation.