From maechler at stat.math.ethz.ch  Wed Jun 11 16:12:02 2008
From: maechler at stat.math.ethz.ch (Martin Maechler)
Date: Wed, 11 Jun 2008 16:12:02 +0200
Subject: [Rd] Posting Guide - help.request() function?
In-Reply-To: <484FBC19.3040805@warwick.ac.uk>
References: <971536df0806061030i75474172xff100ece76a23eec@mail.gmail.com>
	<971536df0806070638w48afb954y77278659edd37802@mail.gmail.com>
	<971536df0806071024x688e1bcfvac6a1c8a43182170@mail.gmail.com>
	<484D3F9D.7010404@warwick.ac.uk>
	<971536df0806090818l7acc330cy51746b3f815b9a7a@mail.gmail.com>
	<484D587D.9040101@warwick.ac.uk>
	<18509.38499.830075.619012@cmath-5.math.ethz.ch>
	<484FBC19.3040805@warwick.ac.uk>
Message-ID: <18511.56626.589004.791676@stat.math.ethz.ch>

>>>>> "HT" == Heather Turner <Heather.Turner at warwick.ac.uk>
>>>>>     on Wed, 11 Jun 2008 12:50:49 +0100 writes:

    HT> Okay, here's the update.
    HT> I've created a new function create.post() (with Windows and Unix 
    HT> versions) which would be the internal function that creates the post 
    HT> template ready to edit and optionally send. In the Windows version I've 
    HT> added an experimental method == "mailto" option, which will open the 
    HT> post template in the default mailer (e.g. Outlook) ready to edit and 
    HT> post. Maybe a Unix version would also be nice, e.g.

    HT> browseURL("mailto:r-bugs at r-project.org?subject=my bug&body=%0A<<insert 
    HT> bug report here>>%0A%0A%0A%0A--please do not edit the information 
    HT> below--%0A%0AVersion:%0A platform = x86_64-unknown-linux-gnu%0A ...")

    HT> would open the post template in e.g. Thunderbird, but has the side 
    HT> effect of opening an empty page in the web browser. I don't know if 
    HT> there's a neater solution?

Well, the current solution {for bug.report()} seems quite
desirable to me on unix.

    HT> The create.post() function is basically the old bug.report() with two 
    HT> extra arguments: 'description' (e.g. "bug report") and 'instructions' 
    HT> (e.g. "\\n<<Type your message here>>\\n") for customization. It could be 
    HT> used directly e.g to post to R-devel with session information.

    HT> The new bug.report() simply calls create.post() with the appropriate 
    HT> arguments.

Thank you; that's a really nice example of code reuse!

    HT> The improved help-request() function calls create.post() after running 
    HT> through the checks described before.

    HT> In response to Gabor's comments, help.request():

    HT> - now checks packages are up-to-date and gives option to update 
    HT> on-the-fly (user may not know whether involved in query, so check all)

This is a bit problematic as now.
E.g., we have about 1500 packages installed, and inspite of automatic
updating, never all are current, and the updating should typically
not happen on a user (but a site-wide) level anyway.
Also, the call to old.packages()  takes minutes (the
first time in an R session) if you have so many packages in a
dozen libraries.  

This should really not interfere with an e-mail for help,
rather I think that the "packages-up-to-date check"
should only happen for those non-standard packages that are
currently in use as from sessionInfo().

Unfortunately, that functionality to do that is not yet there
in old.packages(), but I am about to add that option to R-devel
as well.

No need to send me a new version of your code, BTW, since I have
already worked on it in several places.

    HT> - keeps default mailing options as in old bug.report() but 
    HT> create.post() gives clearer message ("Email the post now?\n (yes/no)") 
    HT> requiring definite response ("yes" vs "y")

ok.

    HT> - still uses online documents because some are only available online 
    HT> (R Site Search, posting guide), it ensures the most up-to-date 
    HT> documentation is used, and it allows direction to global FAQ page, 
    HT> avoiding need to check whether user is on Windows/Mac

    HT> - uses more robust method of checking R version is up-to-date

    HT> I've also written a help file for help.request() which includes the 
    HT> method="mailto" option. 
ok {it did need some correction}.

    HT> The help file for bug.report would need updating 
    HT> if this option was kept.

I think this is mainly a windows feature (but maybe not).
I'd definitely like to get some feedback from Windows users
about this.

    HT> Best wishes,
    HT> Heather

Thanks again, Heather, for this.
This is becoming a very nice new feature!

Martin



[Rd] Posting Guide - help.request() function?
Martin Maechler