How to report a typo (by sending a diff file)?

I would like to make typo correction as simple as possible for R developers. How can I send a diff file that creates such a “patch”?

Also where should I send a typo? Via email? Error message? Submit it r-devel?

I mainly deal with small typos, such as spelling errors or grammar corrections.

I can’t remember where the last typo was, but just as an example, let's say I would like to change “back” to “back” to “backward compatibility in the help file for ls. Am I doing a diff patch?

thanks

+6
source share
2 answers

@ David Alber advises on diff formats well (although I often use diff -c instead), but I ask for a distinction from a better target (it offers bug.report and an R error tracking system).

  • For simple typographical errors, it is usually best to use a fast email address with enough informal context for the r-devel@r-project.org mailing list (make sure you are using the latest version! - see next paragraph). This is how I do it, and R seems to prefer it because it means they don’t have to deal with a complete error reporting mechanism. (The only documentation of this protocol that I can easily find is a note from Brian Ripley in 2007.)
  • If you are going to systematically report bugs, it is best if you can make an investment to get the latest version of Subversion from https://svn.R-project.org/R/trunk (there is a short, albeit slightly outdated description here ), make changes to the Rd file, and then run svn diff to get the difference from the latest version. As above, send it to r-devel (I believe that the attachments of the text file are saved in the email message on r-devel ).
  • Don't forget the usual warnings about sending bug reports: (1) make sure you are reporting the latest version (as indicated above, SVN is best if you can handle it); (2) make sure that everything you report is definitely an error / typo; (3) be required to inform the appropriate authorities, i.e. Report errors / typos in the packages provided for the maintainer (the appropriate package should be listed in the help file head, and maintainer("pkg") find the accompanying email address).
+3
source

Patches are often created using a uniform context diff. You can create such a diff using diff -u .

For example, let's say you start with the file foo with the following contents.

 Blah Blah Blah 

Then you change it, saving the changes in a new file called foo.modified . Here is the content of foo.modified :

 Blah Blah New information! Blah -- changing this line 

Now running diff -u foo foo.modified calls 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 

Please note that in many differences of version control systems a unified contextual diff is displayed.

As for where to send errors to R: it looks like there is a built-in function for this: bug.report . In addition, there is a web interface to the R error tracking system .

+4
source

Source: https://habr.com/ru/post/900867/


All Articles