VM

unnecessary saves with vm trunk (rev 1086)?

Bug #723081 reported by John Hein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Released
Low
Uday Reddy

Bug Description

I am seeing occasions where vm will save the inbox even though no
changes are indicated. This may happen, for example, after I
vm-get-new-mail where no mail is retrieved or after I
vm-expunge-imap-messages where nothing is expunged. The
latter (expunge) seems reproducible every time. It may be
that I experience theformer only when I also do an expunge.
8.1.1 did not behave like this. Is this new behavior expected?

Related branches

Revision history for this message
Uday Reddy (reddyuday) wrote : Re: [Bug 723081] [NEW] unnecessary saves with vm trunk (rev 1086)?

John Hein writes:

> Public bug reported:
>
> I am seeing occasions where vm will save the inbox even though no
> changes are indicated.

I hope you don't mean that VM is saving the inbox on its own? That is
not supposed to happen.

If you mean that the buffer-modified-p flag is getting set needlessly,
that is possible. This is indicated by "*" or "**" in the modeline.
Ideally, all the three VM buffers (Folder, Presentation and Summary)
should show the same buffer-modified-p status. But they are going
their own ways, and it is hard to tell when the folder's status has
changed.

If you can find a reproducible sequence of actions that change the
buffer-modified-p flag needlessly, I can fix it. I myself don't use
IMAP spool files. So, I don't run into these problems.

Cheers,
Uday

Uday Reddy (reddyuday)
Changed in vm:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Uday Reddy (reddyuday)
milestone: none → 8.2.0b
importance: Medium → Low
milestone: 8.2.0b → none
status: In Progress → Incomplete
Revision history for this message
John Hein (xpqheqdvq4) wrote :

I do indeed mean it is doing unnecessary save operations when I manually run vm-save-folder. The indication in the mode line is "--" (no asterisks).

To reproduce, open a gmail account, start with an empty ~/.vm, add the following settings, then start emacs and vm, and run vm-expunge-imap-messages.

("imap-ssl:imap.gmail.com:993:inbox:login:<email address hidden>:*")
(setq vm-imap-expunge-after-retrieving nil)

Even when there is no indication that the buffer is modified, it will re-save your inbox buffer when you run vm-save-folder after running vm-expunge-imap-messages on the unmodified buffer, even if no messages were expunged.

Revision history for this message
John Hein (xpqheqdvq4) wrote :

Bah... I meant this for your ~/.vm:

(setq vm-spool-files (list
  "imap-ssl:imap.gmail.com:993:inbox:login:<email address hidden>:*"
))
(setq vm-imap-expunge-after-retrieving nil)

Revision history for this message
John Hein (xpqheqdvq4) wrote :

And not my acccount name, but your gmail account name, of course.

Revision history for this message
Uday Reddy (reddyuday) wrote : [Bug 723081] Re: unnecessary saves with vm trunk (rev 1086)?

John Hein writes:

> To reproduce, open a gmail account, start with an empty ~/.vm, add the
> following settings, then start emacs and vm, and run vm-expunge-imap-
> messages.
>
> ("imap-ssl:imap.gmail.com:993:inbox:login:<email address hidden>:*")
> (setq vm-imap-expunge-after-retrieving nil)

I don't fully understand the recipe. The first line doesn't make
sense. Do you want this to be the value of some variable? The second
line is of course redundant because it is the default setting.

Cheers,
Uday

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

John Hein writes:

> To reproduce, open a gmail account, start with an empty ~/.vm, add the
> following settings, then start emacs and vm, and run vm-expunge-imap-
> messages.
>
> ...
> Even when there is no indication that the buffer is modified, it will
> re-save your inbox buffer when you run vm-save-folder after running vm-
> expunge-imap-messages on the unmodified buffer, even if no messages were
> expunged.

Ok, when I used the gmail account as the mail spool, as your second
message suggested, I got three spam messages that gmail helpfully sent
me. So, the buffer got modified. When I did vm-save-folder, it got
saved.

I did get-new-mail again. There were no new messages. When did
vm-save-folder, it said there were no changes to be saved.

So, it seems ok to me.

Cheers,
Uday

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

Uday S Reddy writes:

> I did get-new-mail again. There were no new messages. When did
> vm-save-folder, it said there were no changes to be saved.

Got it. If I do vm-expunge-imap-messages, then the buffer thinks it
has been modified. I will check what is happening.

Cheers,
Uday

Uday Reddy (reddyuday)
Changed in vm:
status: Incomplete → Fix Committed
Revision history for this message
Uday Reddy (reddyuday) wrote :

Revision 1093 of trunk.

Changed in vm:
status: Fix Committed → Fix Released
milestone: none → 8.2.0a
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.