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

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Fri, 3 Jan 2014 17:20:01 UTC

Severity: minor

Found in version 24.3.50

Fixed in version 24.4

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16331 in the body.
You can then email your comments to 16331 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#16331; Package emacs. (Fri, 03 Jan 2014 17:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 03 Jan 2014 17:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
Date: Fri, 3 Jan 2014 09:18:28 -0800 (PST)
The message "Trashing..." (which is unclear, BTW) or "Deleting..."
appears while the user is being asked whether to delete/trash.

So the message is wrong: Emacs is not (yet) deleting files.

A better message would be something like "Preparing to delete..."

A message such as "Deleting..." can give the impression that the files
are already being deleted.  If you have 50 marked files, you don't want
to see a message saying that they are being deleted before you have had
a chance to cancel deletion.

In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2014-01-01 on ODIEONE
Bzr revision: 115827 eggert <at> cs.ucla.edu-20140101192741-bi5hb4xb4kdi2zpw
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
 'CFLAGS=-O0 -g3' LDFLAGS=-Lc:/Devel/emacs/lib
 CPPFLAGS=-Ic:/Devel/emacs/include'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16331; Package emacs. (Sat, 08 Feb 2014 02:49:02 GMT) Full text and rfc822 format available.

Message #8 received at 16331 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 16331 <at> debbugs.gnu.org
Subject: Re: bug#16331: 24.3.50;
 `dired-internal-do-deletions': "Deleting..." message
Date: Fri, 07 Feb 2014 18:47:23 -0800
Drew Adams <drew.adams <at> oracle.com> writes:

> The message "Trashing..." (which is unclear, BTW) or "Deleting..."
> appears while the user is being asked whether to delete/trash.
>
> So the message is wrong: Emacs is not (yet) deleting files.
>
> A better message would be something like "Preparing to delete..."
>
> A message such as "Deleting..." can give the impression that the files
> are already being deleted.  If you have 50 marked files, you don't want
> to see a message saying that they are being deleted before you have had
> a chance to cancel deletion.

As far as I can tell from reading the code, it's not saying
"Deleting..." before it's deleting the messages.  (Or trashing them.)

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16331; Package emacs. (Sat, 08 Feb 2014 03:19:02 GMT) Full text and rfc822 format available.

Message #11 received at 16331 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 16331 <at> debbugs.gnu.org
Subject: RE: bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..."
 message
Date: Fri, 7 Feb 2014 19:18:17 -0800 (PST)
> > The message "Trashing..." (which is unclear, BTW) or "Deleting..."
> > appears while the user is being asked whether to delete/trash.
> >
> > So the message is wrong: Emacs is not (yet) deleting files.
> >
> > A better message would be something like "Preparing to delete..."
> >
> > A message such as "Deleting..." can give the impression that the
> > files are already being deleted.  If you have 50 marked files,
> > you don't want to see a message saying that they are being
> > deleted before you have had a chance to cancel deletion.
> 
> As far as I can tell from reading the code, it's not saying
> "Deleting..." before it's deleting the messages.  (Or trashing
> them.)

I see the message when the pending-deletion file list is popped
and you are asked for confirmation.  Emacs is not deleting
anything at that point.  It does not start deleting the files
until you confirm that you want to delete them.

Whether the message appears at all depends on the timing done
in `progress-reporter-do-update'.  That is the code that shows
the message.  You may or may not see the message at all,
depending on your context.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16331; Package emacs. (Sat, 08 Feb 2014 03:35:02 GMT) Full text and rfc822 format available.

Message #14 received at 16331 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 16331 <at> debbugs.gnu.org
Subject: Re: bug#16331: 24.3.50;
 `dired-internal-do-deletions': "Deleting..." message
Date: Fri, 07 Feb 2014 19:32:42 -0800
Drew Adams <drew.adams <at> oracle.com> writes:

> I see the message when the pending-deletion file list is popped
> and you are asked for confirmation.  Emacs is not deleting
> anything at that point.  It does not start deleting the files
> until you confirm that you want to delete them.
>
> Whether the message appears at all depends on the timing done
> in `progress-reporter-do-update'.  That is the code that shows
> the message.  You may or may not see the message at all,
> depending on your context.

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.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16331; Package emacs. (Sat, 08 Feb 2014 15:07:01 GMT) Full text and rfc822 format available.

Message #17 received at 16331 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 16331 <at> debbugs.gnu.org
Subject: RE: bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..."
 message
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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16331; Package emacs. (Sun, 09 Feb 2014 02:18:02 GMT) Full text and rfc822 format available.

Message #20 received at 16331 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 16331 <at> debbugs.gnu.org
Subject: Re: bug#16331: 24.3.50;
 `dired-internal-do-deletions': "Deleting..." message
Date: Sat, 08 Feb 2014 18:16:11 -0800
Drew Adams <drew.adams <at> oracle.com> writes:

> `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.

Oh, I see.  I didn't know that `make-progress-reporter' itself
messaged.  Then the solution seems to be to move that call closer to
when it's actually deleting stuff.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug marked as fixed in version 24.4, send any further explanations to 16331 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 09 Feb 2014 02:21:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16331; Package emacs. (Mon, 10 Feb 2014 00:40:02 GMT) Full text and rfc822 format available.

Message #25 received at 16331 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 16331 <at> debbugs.gnu.org
Subject: RE: bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..."
 message
Date: Sun, 9 Feb 2014 16:39:06 -0800 (PST)
> > `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.
> 
> Oh, I see.  I didn't know that `make-progress-reporter' itself
> messaged.  Then the solution seems to be to move that call closer to
> when it's actually deleting stuff.

I guess so, but you would need to test that that in fact DTRT.
I see that you closed the bug in the same breath.  Is this fixed then?




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 10 Mar 2014 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.