VM

Deletion in folded threads

Bug #604410 reported by Uday Reddy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Released
Wishlist
Arik

Bug Description

If the root message of a folded thread is deleted, the summary display makes it appear as if the entire thread has been deleted.

Perhaps the thread should be expanded as part of doing the deletion.

Tags: threads

Related branches

Uday Reddy (reddyuday)
Changed in vm:
status: New → Confirmed
importance: Undecided → Wishlist
tags: added: thread-folding
Uday Reddy (reddyuday)
Changed in vm:
assignee: nobody → Arik (akwm)
Revision history for this message
Uday Reddy (reddyuday) wrote :

A similar issue arises for "marking" the thread root as well.

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

Marking a thread root is not putting the "*' symbol on the summary line at the moment. I will take a look at this issue. -- Uday

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

The problem was that 4 columns were being claimed for the thread-count, but only 3 places were reserved. Thus an extra column was getting erased, which contained the message mark in my summary format. The attached patch reduces the claim to 3 columns.

Revision history for this message
Arik (akwm) wrote :

I see that. I can achieve the same result my using a summary format where there is no space between %n and %*. Just to note, this patch will limit the allowed threads with numeration to 99 (seems reasonable though!) from 999. The other solution, which would take more summary real-estate, would be to make the number formatter use one more space (in the insert-tokenized function I think)

Revision history for this message
Uday Reddy (reddyuday) wrote : [Bug 604410] Re: Deletion in folded threads

Let us limit it to 99. If there are more messages than that in a
thread, who will care to know the exact number?

Revision history for this message
Arik (akwm) wrote :

agreed, and a thread with over a 100 messages should probably have a subject change (or branching)!

Arik (akwm)
Changed in vm:
status: Confirmed → In Progress
Arik (akwm)
Changed in vm:
status: In Progress → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
Uday Reddy (reddyuday) wrote :

I think this needs more testing because I keep getting various bugs.

vm-expand-thread was being called from vm-delete-message without concern for the current-buffer. I inserted a line to fix this.

Still various other issues need to be looked at. What happens if the message doesn't have thread? What if it is not the root of a thread etc.

Here is a backtrace I just obtained:

Debugger entered--Lisp error: (args-out-of-range 311564 311564)
  get-text-property(311564 vm-message)
  (setq next (get-text-property (+ ... 2) (quote vm-message)))
  (save-excursion (forward-line 0) (setq root (vm-th-thread-root ...)) (save-excursion (goto-char ...) (insert "-") (delete-char 1)) (setq next (get-text-property ... ...)) (while (and next ...) (put-text-property ... ... ... nil) (if ... ... ...)))
  (let ((buffer-read-only nil) root next) (save-excursion (forward-line 0) (setq root ...) (save-excursion ... ... ...) (setq next ...) (while ... ... ...)))
  vm-expand-thread()
  vm-delete-message(1)
  call-interactively(vm-delete-message nil nil)

Changed in vm:
status: Fix Committed → In Progress
Uday Reddy (reddyuday)
Changed in vm:
milestone: none → 8.1.93a
Uday Reddy (reddyuday)
tags: added: threads
removed: thread-folding
Uday Reddy (reddyuday)
Changed in vm:
status: In Progress → 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.