VM

After deleting mime attachment, cursor jumps to beginning of buffer

Bug #317862 reported by Marcel Oliver
4
Affects Status Importance Assigned to Milestone
VM
Fix Released
Low
Uday Reddy

Bug Description

I think the summary line says it all. This behavior has been introduced some time summer 2008, as far as I remember. Before, the cursor would stay on the deleted attachment.

The new behavior is very inconvenient when deleting several attachment from a long email.

Of course, it would be very nice if there was a command for saving and deleting multiple attachments, then this would not be so much of an issue. I notice that there is already some code in the bug tracker which might be nice to integrate:

https://bugs.launchpad.net/bugs/179735

Tags: 8.0 mime

Related branches

Revision history for this message
Uday Reddy (reddyuday) wrote :

I will look into this problem. Meanwhile, please note that vm-rfaddons has facilities to delete/save all attachments of a message. -- Uday

Revision history for this message
Uday Reddy (reddyuday) wrote :

I have tracked this problem down to the line
   (save-excursion (vm-preview-current-message))
in vm-discard-cached-data-internal, which is in turn called by vm-discard-cached-data.
save-excursion should preserve the position of the cursor, but it isn't doing so. Why not?

Changed in viewmail:
status: New → Confirmed
Uday Reddy (reddyuday)
Changed in vm:
importance: Undecided → Low
Uday Reddy (reddyuday)
Changed in vm:
status: New → Confirmed
Uday Reddy (reddyuday)
Changed in viewmail:
importance: Undecided → Low
Revision history for this message
Uday Reddy (reddyuday) wrote :

Looks like somebody noticed this problem before and inserted a hack: remember the "deleted" label that will replace the MIME object and position the cursor at the label again. That is an easy work around, except that it doesn't work if the user changes the format of the MIME buttons. Then we can't "guess" the label any more. It all seems to be a mess. A cleaner solution is needed.

Uday Reddy (reddyuday)
Changed in vm:
milestone: none → 8.1.1-devo
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.0-devo → 8.1.91a
Uday Reddy (reddyuday)
Changed in vm:
status: Confirmed → Triaged
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.1.94a → 8.1.93a
tags: added: mime
Uday Reddy (reddyuday)
Changed in vm:
status: Triaged → In Progress
assignee: nobody → Uday Reddy (reddyuday)
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.1.93a → 8.1.94a
Uday Reddy (reddyuday)
Changed in vm:
status: In Progress → Fix Committed
Uday Reddy (reddyuday)
tags: added: 8.0
Uday Reddy (reddyuday)
Changed in vm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.