[VM] Key bindings from presentation buffer reappears in the reply

2012-10-11 Thread Göran Uddeborg
This feels like a bug to me, and i can report it in launchpad.  But
just to make sure I don't misunderstand something, I wanted to check
here first.

When a mail contains URL:s there is some special key bindings at the
URL text.  E.g., if I type return in the text, I visit the page.

When I do vm-reply-include-text, it appears this keymap is applied
also to the reply to be edited.  If I happen to type return inside the
URL when editing the reply, I will go to that URL rather than insert a
newline as I would have expected.  I think I've been hit by other keys
behaving in unexpected ways too, though I'm not sure.

As an example, put the file below in a file.  Do vm-visit-folder on
the file.  Hit R (vm-reply-include-text).  Move the cursor over the
URL.  Hit RET.  I would expect an return character inserted.  But
instead my firefox tries to open the URL.

This is with vm 8.2.0b and emacs 21.4.


From uddeborg  Thu Oct 11 10:42:35 2012
MIME-Version: 1.0
Message-ID: 507685d3.6080...@jeppesen.com
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
From: goran.uddeb...@jeppesen.com
To: goran.uddeb...@jeppesen.com
Subject: Test case
Date: Thu, 11 Oct 2012 10:39:47 +0200

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua.

http://example.com/page.html

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.


Re: [VM] Key bindings from presentation buffer reappears in the reply

2012-10-11 Thread Uday Reddy
Göran Uddeborg writes:

 When I do vm-reply-include-text, it appears this keymap is applied
 also to the reply to be edited.  If I happen to type return inside the
 URL when editing the reply, I will go to that URL rather than insert a
 newline as I would have expected.  I think I've been hit by other keys
 behaving in unexpected ways too, though I'm not sure.

Yes, it is a bug.  But it is not easy to fix because the included text is
now generated by the same code that generates the Presentation buffer.  Thus
the URL's are energized.  So, don't hit RETURN over them.

The keymap issue is more likely the problem of turning on w3m-mode.  It
has been around for a while:

  https://bugs.launchpad.net/vm/+bug/587181

Can somebody take a look?  It merely involves tuning the w3m-mode
appropriately inside replies.

Cheers,
Uday