VM

Upgrading to VM 8.0.14 breaks existing VM 7.19 configuratio

Bug #531969 reported by Andreas Gustafsson
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Released
Low
Uday Reddy

Bug Description

I am trying to upgrade the VM 7.19 package currently being distributed
via pkgsrc (www.pkgsrc.org) to version 8.0.14.

While testing the upgrade, I noticed that replacing an existing VM
7.19 installation with 8.0.14 causes VM to break in a rather confusing
way for existing 7.19 users who still have their .emacs files set up
according to the 7.19 documentation.

Specifically, the VM 7.19 README file says your .emacs file should
contain the following:

   (autoload 'vm "vm" "Start VM on your primary inbox." t)
   (autoload 'vm-other-frame "vm" "Like `vm' but starts in another frame." t)
   (autoload 'vm-visit-folder "vm" "Start VM on an arbitrary folder." t)
   (autoload 'vm-visit-virtual-folder "vm" "Visit a VM virtual folder." t)
   (autoload 'vm-mode "vm" "Run VM major mode on a buffer" t)
   (autoload 'vm-mail "vm" "Send a mail message using VM." t)
   (autoload 'vm-submit-bug-report "vm" "Send a bug report about VM." t)

whereas the 8.0.14 INSTALL file says it should contain

   (require 'vm-autoloads)

If I have a .emacs file still that still contains the VM 7.19
definitions, install VM 8.0.14, start VM with "M-x vm", and then
immediately try to quit VM by pressing the "q" key, I get the error
message ¨Symbol's function definition is void: vm-virtual-quit"
(regardless of the mailbox contents; it happens even with an empty
mailbox). A number of other operations also fail in a similar way.
This is under GNU Emacs version 21.4.1 or 23.1.1, in case that
makes a difference.

VM 8 ought to provide some backwards compatibility for existing VM 7
users rather than just failing with an unhepful error message. The
following patch works for me:

--- lisp/vm.el.orig 2009-12-06 17:12:06.000000000 +0200
+++ lisp/vm.el
@@ -27,6 +27,11 @@

 (require 'vm-version)

+;; For backwards compatibility with .emacs files set up according to
+;; the VM 7.19 documentation
+(if (not (featurep 'xemacs))
+ (require 'vm-autoloads))
+
 ;;;###autoload
 (defun vm-recover-folder ()
 "Recover the autosave file for the current folder."

Yours,
--
Andreas Gustafsson, <email address hidden>

Related branches

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

Well, we don't want people to persist with outdated .emacs files. So, I am reluctant to change the distribution to accommodate them.

I have updated the INSTALL for new releases indicating that explicit autoloads should be removed from .emacs.

Thanks for raising the issue!

Cheers,
Uday

Changed in vm:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Uday Reddy (reddyuday)
milestone: none → 8.1.0
Revision history for this message
Uday Reddy (reddyuday) wrote :

This is not on launchpad yet.

Uday Reddy (reddyuday)
Changed in vm:
status: Fix Committed → Fix Released
Revision history for this message
Andreas Gustafsson (gson) wrote :

> Well, we don't want people to persist with outdated .emacs files.

Should I take this as saying that backwards compatibility with VM 7 is
an explicit non-goal of your project? In that case, I probably need
to treat VM 8 as a different mailer rather than a new version, and
provide VM 8 as an alternative to rather than a replacement
for VM 7 in pkgsrc.

If you really want to require users to change their .emacs files, a
reasonable way to do that would be to make VM display a message
politely asking them to do that. Going into a state where even the
"quit" command doesn't work and issuing error messages containing no
hint of what is actually wrong is not helpful, and seems like a
strange way to reward long-time VM users for their loyalty :)

> I have updated the INSTALL for new releases indicating that explicit
> autoloads should be removed from .emacs.

That's a bit beside the point, because removing the explicit autoloads
is not actually necessary to make things work. What's necessary
is adding "(require 'vm-autoloads)".

The problem with relying on instructions in the INSTALL file is that
there are many upgrade scenarios where the user is unlikely to get a chance
to read it. For example, VM could get upgraded as part of a security update
or operating system upgrade, or users may simply switch to a different
computer that has a different version of VM installed and bring the .emacs
file along with them.

Uday Reddy (reddyuday)
Changed in vm:
status: Fix Released → In Progress
milestone: 8.1.0 → 8.1.1
Revision history for this message
Uday Reddy (reddyuday) wrote :

Hi Andreas, thanks for enlightening us about the subtleties of release management. I can see that the new versions can creep into users' work space in all kinds of ways.

Historically, VM 8 came out of a separate distribution of VM called VMRF, which had followed a different installation and autoloading procedure. However, you have a nice fix for making it compatible with the VM 7 autoloading procedure. So, we will use it. Thanks.

Uday

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

I have committed the patch to 8.1.x branch, and will be released in 8.1.1 release.

Andreas, a question for you: When you redistribute the VM package, what documentation files do you include: README, NEWS, INSTALL?

Changed in vm:
status: In Progress → Fix Committed
Revision history for this message
Andreas Gustafsson (gson) wrote :

> I have committed the patch to 8.1.x branch, and will be released in 8.1.1 release.

Thank you - much appreciated!

> When you redistribute the VM package, what documentation files do you include: README, NEWS, INSTALL?

The current pkgsrc VM package (based on 7.19) installs only the info documentation.

There is a mechanism in pkgsrc to display a message to the user at package installation time. I'm thinking of using that mechanism in the updated package to ask GNU emacs users to add "(require 'vm-autoloads)" to the .emacs file, as that's the only aspect of the installation that's not done automatically by pkgsrc.

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.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

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