From kwright68 at gmail.com  Fri Mar 24 22:32:26 2006
From: kwright68 at gmail.com (Kevin Wright)
Date: Fri, 24 Mar 2006 15:32:26 -0600
Subject: [Rd] Undocumented features of 'browser' (and possible changes)
Message-ID: <adf71a630603241332g4e592112icc2944d969207924@mail.gmail.com>

I often use browser() when debugging a function.  After entering
browser, I would find it very useful to be able to cut-and-paste a
chunk of R code to the browser (or use ess-eval-region in Emacs).  An
inconvenience, however, is that both blank lines and comment lines
will exit the browser.

The man page for browser says nothing about exiting the browser via
ENTER or via a line that begins with a comment, only that
"sub-interpreter can be exited by typing c" and "Typing Q quits the
current execution".

A hack that does allow code pasting into the browser is to put "NULL"
at the start of blank lines and comment lines.

Question: How would people react to a request to change the browser so
that blank lines and comment lines do not exit the browser?

Possible answers (check one or write your own)
[ ] - Who are you kidding?
[ ] - Even though it is undocumented and redundant, I use ENTER to exit browser
[ ] - You are forgetting about this scenario...
[ ] - A patch would be welcome
[ ] - Sounds great and I committed the changes already.  :-)


Kevin Wright, Windows 2000, R 2.2.1



[Rd] Undocumented features of 'browser' (and possible changes)
Kevin Wright