Re: [VM] html mail: both external and w3m?

2012-04-28 Thread emacs user
On Saturday, April 28, 2012 3:18:13 AM UTC-4, Uday Reddy wrote:
 emacs user writes:
 
  hello, Reading html mail using vm/w3m works pretty well for me most of the
  time, but occasionally I do want to use an external browser to view a
  message.  Pressing D and then $e on the attachment button then works well,
  except that the D step takes a very long time and I was wondering if
  that's just my setup...?  
 
 I have this problem too.  I have it on my to-do list to investigate it.  One
 guess is is that u-vm-color doesn't handle attachments well.  You might try
 turning it off and seeing if it makes a difference.

Hi Uday, this seems to even happen for a message of the type
Content-Type: text/plain; charset=ISO-8859-1
with no attachments and a length of about 100 characters.  as far as I could 
see the slow part is in the following lines at the very end of 
vm-decode-mime-message:

  (vm-display nil nil '(vm-decode-mime-message)
  '(vm-decode-mime-message reading-message)))

although I couldn't go beyond that in spite of several tries. thanks for the 
ideas below, they don't exactly address the issue, but it's not critical in any 
case.  cheers, E

 A possible idea here is to *always* display buttons for non-text/plain
 parts, so that we can easily fire up external viewers.  I will put it on the
 wishlist.
 
  also, could anyone suggest how I might: (1)
  define a function that displays a given message using an external browser,
  so that I can bind it to some key; (2) is it possible to view every
  message both in the presentation buffer and in an external browser,
  simultaneously, side by side?  on a large monitor this may be a great
  option to have...?  cheers, E
 
 There is no built-in function to display a message in an external viewer.
 One has to get the button view first (using `D') and then do ']' and '$e'.
 You can try making a keyboard macro for it if it is needed often.
 
 Viewing the message in both VM and external browser is easy if it is a
 multipart/alternative message.  Just set `vm-mime-multipart-show-method' to
 `all' and use the external browser for html.  You get the plain text version
 shown in VM and the html version shown externally.
 
 If it is not a multipart/alternative message and the message has just one
 text/html part, then there is currently no way to feed it to an external
 viewer while also displaying it in VM.  
 
 Cheers,
 Uday


Re: [VM] html mail: both external and w3m?

2012-04-28 Thread emacs user
On Saturday, April 28, 2012 4:38:45 PM UTC-4, Uday Reddy wrote:
 emacs user writes:
 
  Hi Uday, this seems to even happen for a message of the type
  Content-Type: text/plain; charset=ISO-8859-1
  with no attachments and a length of about 100 characters.  as far as I
  could see the slow part is in the following lines at the very end of
  vm-decode-mime-message: 
  
(vm-display nil nil '(vm-decode-mime-message)
'(vm-decode-mime-message reading-message)))
 
 Yes, after this line, u-vm-color runs because it places an advice on
 vm-decode-mime-message.  I have no idea why it is so slow.On Saturday, April 
 28, 2012 4:38:45 PM UTC-4, Uday Reddy wrote:
 emacs user writes:
 
  Hi Uday, this seems to even happen for a message of the type
  Content-Type: text/plain; charset=ISO-8859-1
  with no attachments and a length of about 100 characters.  as far as I
  could see the slow part is in the following lines at the very end of
  vm-decode-mime-message: 
  
(vm-display nil nil '(vm-decode-mime-message)
'(vm-decode-mime-message reading-message)))
 
 Yes, after this line, u-vm-color runs because it places an advice on
 vm-decode-mime-message.  I have no idea why it is so slow.

brilliant of you...  So if I set enter debug on c-g and then do control-g 
while it's taking forever, I get this:
  u-vm-color-fontify-regexp(69482 79728781 ^ *[-A-Za-z0-9]* *.*$ ((0 
u-vm-color-citation-1-face)))

my inbox is about 79Mb large; 69482 is the beginning of the text of the first 
message in the inbox, right after its header.In this case I am applyhing 
D to the very last message.  Does this mean that u-vm-color is trying to 
fontify the entire inbox rather than only the message that is being toggled 
with D?