Loading ...
Sorry, an error occurred while loading the content.
 

RE: Some functions to read mailing list digests with Vim.

Expand Messages
  • Jean Jordaan
    Hi Benji Thanks for your scrutiny :) This is just an off-the-hip response. Proper consideration deferred. ... Yes, it s the report option that s causing
    Message 1 of 12 , Feb 28, 2001
      Hi Benji

      Thanks for your scrutiny :) This is just an off-the-hip response.
      Proper consideration deferred.

      > 1. Do you really get messages of 1 (one) line yanked? Does this come
      > from Make_toc()? Have you tried setting 'report' to a large number?

      Yes, it's the 'report' option that's causing this.

      > Minor point: if you use :copy 0 instead of :yank|0put in your :global
      > command, you will not overwrite the unnamed register.

      Your minor points are my favourites.

      > BTW, in vim 6.0 it is possible to execute commands with :silent, which
      > is simpler than changing 'report'.

      Indeed.

      > 2. I have no opinion on usability, whether there is any problem with
      > setting the @/ register to get the highlighting. If you want to avoid
      > this, make your own syntax group.

      I'll give this a shot. Don't know yet how it will tally with all the
      other searching going on.

      > In vim 5.x, if you want to leave 'wrapscan' set, you can always check
      > line(".") after the search and see whether you have gone in the wrong
      > direction.

      I think I'd rather save & unset wrapscan ..

      > 4. Suggestion: use <C-O> after :normal ?<C-R>a<CR>zt instead of
      > repeating the search.

      Will do!

      > 5. In order to avoid code duplication in browsing and searching, try
      > writing a function that returns a string to be :execute'd.

      I'll have to iterate on this point for a while before I get it ..

      > 6. If you want to preserve message-number order,

      Actually, I much prefer having threads alphabetically. I don't care in
      which order threads arose, as long as I can browse them comfortably.

      > 7. After making the toc, can't you figure out how long it is by
      > finding the line number of the first empty line?

      This is a definite TODO item.

      > 8. Only look for subject lines after the message separator:

      Cool! Although I believe this almost comes out in the wash: subject
      lines not garnered from the real headers will get Sort'ed and Uniq'ed
      out with the real ones, so only the unique ones remain. The only
      divergence would be in the case where a quoted subject line doesn't
      match any thread. It would show up in the toc and in Next_thread(), and
      this *might* be counted as a feature (allowing browsing by
      quoted-traces-of-threads, if you get my drift), if I fixed
      Next_in_thread() in the way you specify. Actually, it's probably more of
      a can-of-worms than a feature. I'll look into using your way.

      jean
      --
      Jimi Hendrix's modem was a Purple Hayes.
    Your message has been successfully submitted and would be delivered to recipients shortly.