I have been out of Australia for some weeks on leave and unsubscribed to
the mutt lists while away. However I did notice a mail from Dennis Moore 
<[EMAIL PROTECTED]> which said (in part):-

> hello.. i'm writing for two reasons.  first of all, the search
> forward/backward functionality was added by me, not brian salter-duke, as
> indicated in the ChangeLog.  i emailed mutt-users when i created the patch
> and have been distributing it on my web page
> (http://feeding.frenzy.com/~rainking/) since about 4/98.  i can't find any
> archives of mutt-users that old, though.  i hope you'll take my word for
> it. (=

I confirm that this is correct. I should not be credited in the
ChangeLog with adding that functionality.

> the second reason i'm writing is that the code doesn't work quite right in
> 0.9.  this patch should fix it:
> 
> *** urlview.orig      Tue Jul  4 05:14:30 2000
> --- urlview.c Wed Jul  5 16:25:08 2000
> ***************
> *** 182,187 ****
> --- 182,188 ----
>   
>     strncpy (regexp, DEFAULT_REGEXP, sizeof (regexp) - 1);
>     strncpy (command, DEFAULT_COMMAND, sizeof (command) - 1);
> +   memset((void *)search, 0, sizeof(search));
>   
>     /*** read the initialization file ***/
>   
> ***************
> *** 556,561 ****
> --- 557,564 ----
>       redraw = FULL;
>       break;
>         case '/':
> +     if (!search)
> +             search[0] = '\0';
>       mvaddstr (LINES - 1, 0, "Search forwards for string: ");
>       if (mutt_enter_string (search, sizeof (search), LINES - 1, 28, 0) == 0)
>         search_forward (search, urlcount, url, &redraw, &current, &top);
> 

I have included this and it works. The reason why I am mentioned in the 
ChengeLog is that I added some code to display a message above the menu
of URLs and since the search patch was floating around I included it
also. Thomas thought (most probably correctly) that my patch was two
specific for the codes I used - urlhandler and ncftp. I have now
rewritten that code to have a user-written message appear above the menu
of URLs. This message is the three lines that appear below a line in the
urlview configuration file containing only "MESSAGE". The patch is:-

53c53
< #define OFFSET 2
---
> #define OFFSET 6
159a160,162
>   char line1[80];
>   char line2[80];
>   char line3[80];
177c180
< 
---
>   int mess_in = 0;
251a255,261
>       else if (strcmp ("MESSAGE\n", buf) == 0)
>       {
>         mess_in = 1;
>         fgets (line1, sizeof (line1), fp); 
>         fgets (line2, sizeof (line2), fp); 
>         fgets (line3, sizeof (line3), fp); 
>       }
384a395,396
> 
>       
385a398,404
>       if (mess_in)
>       {
>         printw("\n\n");
>         printw(line1);
>         printw(line2);
>         printw(line3);
>       }

Note this should be applied after the patch above from Dennis. My code
is a simple hack. Obviously I could have used loops etc for the three
lines, but it works OK. If no "MESSAGE" appears in the configuration
file, then the URL menu appears as before except that there are three
more blank lines above the menu. 

I use the following MESSAGE block in my .urlview:-

# New facility to add message at top of list of URLs displayed.
MESSAGE
Using my urlhandler - mutt for mailto, lynx for http and ncftp or ncftpget 
for ftp. Selected URL can be edited. Add / to ftp directory URL to use 
ncftp rather than ncftpget. Ensure no / for file ftp URL to use ncftpget.

There are a few more details at:-

http://lacebark.ntu.edu.au/mutt.html

I hope this is of some interest to some people.

Another small point about urlview. The code now has a new entry in the
configuration file - "expert" and output that tells you to look up about
it in the man page. However it is not in the man page. Who is
maintaining the man pages?

Regards, Brian.

-- 
Associate Professor Brian Salter-Duke (Brian Duke) [EMAIL PROTECTED]  
      School of Biological, Environmental and Chemical Sciences, SITE,
Northern Territory University, Darwin, NT 0909, Australia.  Phone 08-89466702. 
Fax 08-89466847          http://www.smps.ntu.edu.au/school/compchem.html

Reply via email to