all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
@ 2014-01-03 17:18 Drew Adams
  2014-02-08  2:47 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2014-01-03 17:18 UTC (permalink / raw)
  To: 16331

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@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'





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
  2014-01-03 17:18 bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message Drew Adams
@ 2014-02-08  2:47 ` Lars Ingebrigtsen
  2014-02-08  3:18   ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-08  2:47 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16331

Drew Adams <drew.adams@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/





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
  2014-02-08  2:47 ` Lars Ingebrigtsen
@ 2014-02-08  3:18   ` Drew Adams
  2014-02-08  3:32     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2014-02-08  3:18 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16331

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
  2014-02-08  3:18   ` Drew Adams
@ 2014-02-08  3:32     ` Lars Ingebrigtsen
  2014-02-08 15:06       ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-08  3:32 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16331

Drew Adams <drew.adams@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/





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
  2014-02-08  3:32     ` Lars Ingebrigtsen
@ 2014-02-08 15:06       ` Drew Adams
  2014-02-09  2:16         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2014-02-08 15:06 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16331

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
  2014-02-08 15:06       ` Drew Adams
@ 2014-02-09  2:16         ` Lars Ingebrigtsen
  2014-02-10  0:39           ` Drew Adams
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2014-02-09  2:16 UTC (permalink / raw)
  To: Drew Adams; +Cc: 16331

Drew Adams <drew.adams@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/





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message
  2014-02-09  2:16         ` Lars Ingebrigtsen
@ 2014-02-10  0:39           ` Drew Adams
  0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2014-02-10  0:39 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 16331

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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-10  0:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-03 17:18 bug#16331: 24.3.50; `dired-internal-do-deletions': "Deleting..." message Drew Adams
2014-02-08  2:47 ` Lars Ingebrigtsen
2014-02-08  3:18   ` Drew Adams
2014-02-08  3:32     ` Lars Ingebrigtsen
2014-02-08 15:06       ` Drew Adams
2014-02-09  2:16         ` Lars Ingebrigtsen
2014-02-10  0:39           ` Drew Adams

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.