Skip to content

help output paged in separate window

6 messages · Duncan Murdoch, Peter Dalgaard, Brian Ripley

#
On Sun, 25 May 2003 10:42:27 +0100 (BST), Ted.Harding@nessie.mcc.ac.uk
wrote in r-help:
I notice a bug in the behaviour when used with help().  In Windows
(and elsewhere?) the pager gets called through file.show, with the
help topic given as the "header", rather than the "title".  According
to the docs, "title" is supposed to be an overall title common to all
displayed files, while "header" is file-specific.  In Windows, a
combination of both args is used as the window title.

However, tkpager only uses the "title" argument for the window title,
putting "header" into the text being displayed, with the result that
the windows end up with no title.

Is this an inconsistency in the usage for "header" between Windows and
other platforms, or a bug in tkpager?

Duncan Murdoch
#
Duncan Murdoch <dmurdoch@pair.com> writes:
A bit of both, I think. The Unix version of help() has

                  file.show(zfile, title = paste("R Help on `",
                    topic, "'", sep = ""), delete.file = (zfile !=
                    file), pager = pager)

so everything is in the title. We could still paste the title and the
header arguments rather than put the header in the displayed text, of
course. 

I don't read the docs as "overall title common to all displayed files"
though, just as common to the set of files displayed by file.show. Or
was that what you meant too?
#
On 25 May 2003 15:35:47 +0200, you wrote:
Windows has

 file.show(zfile, title = "", header = paste("`", topic, "' help", 
	sep=""), delete.file = (zfile!=file), pager = pager)

Probably I should change Windows to use title= instead of header=.
It'll make no difference to the behaviour with the standard Windows
pager, which combines the title and header.

I think tkpager should combine the title and header too, since it
shows each file in a separate window, but the change above would be
enough to solve the bug I reported.
Yes, common to all files displayed in that call.

Duncan
#
Duncan Murdoch <dmurdoch@pair.com> writes:
Hmm... So would changing tkpager, and without having to change the
documented API. So that would probably be a more straightforward
solution.
#
We do have an API for file.show and the underlying C (in 
src/unix/system.txt).  It seem clear to me that the Windows help 
code is incorrect (and at least it used to set a title).
Duncan changed it, and I cannot recall the exact rationale.

It seems that tkpager is also not doing what file.show says is needed.

Brian
On 25 May 2003, Peter Dalgaard BSA wrote:

            

  
    
#
On Sun, 25 May 2003 16:57:12 +0100 (BST), you wrote:

            
No, it never used title.  I changed the text being shown (so that it
would still be informative when truncated in the Windows taskbar), but
using title seems to have been a change in the Unix version after it
was split from the Windows one.

I've now changed Windows to use title like Unix does.

Duncan