I would like to make correcting typos as easy as possible for the R developers. How can I send a diff file making such a "patch"?
Also, where should I send the typo? Through email? Post a bug? Send it to r-devel?
I am mostly concerned with small typos, such as misspellings or grammatical corrections.
I can't recall where the last typo I saw was, but only as an example, let's just suppose I would like to change "back" to "backward" in "back compatibility in the help file for ls. How can I make a diff patch?
Thank you
Patches are often made using the unified context diff. You can create such a diff using diff -u
.
For example, let's say you start with file foo
with the following contents.
Blah
Blah
Blah
Then you modify it, saving the modifications in a new file called foo.modified
. Here are the contents of foo.modified
:
Blah
Blah
New information!
Blah -- changing this line
Now doing diff -u foo foo.modified
produces the following.
--- foo 2011-11-05 20:59:13.000000000 -0700
+++ foo.modified 2011-11-05 20:59:44.000000000 -0700
@@ -1,3 +1,4 @@
Blah
Blah
-Blah
+New information!
+Blah -- changing this line
Note that many revision control systems' diffs display the unified context diff.
As for where to send bugs in R: it looks like there is a built-in function for that: bug.report
. Alternatively, there is the web interface to the R bug tracking system.
@David Alber's advice about diff formats is good (although I often use diff -c
instead), but I beg to differ about the best target (he suggests bug.report
and the R bug tracking system).
[email protected]
mailing list is usually best (make sure you are using the latest version! -- see next point). This is how I do it, and it seems to be preferred by the R developers because it means they don't have to deal with the full bug-reporting machinery. (The only documentation of that protocol I can easily find is this note from Brian Ripley in 2007.)svn diff
to get diffs against the latest version. As above, send it to r-devel
(I believe text-file attachments are preserved in e-mail to r-devel
).maintainer("pkg")
finds the e-mail address of the maintainer).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With