documentation 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. -*- outline -*-
  2. Some documentation tips culled from emacs-devel postings.
  3. ** Manual indices
  4. http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00400.html
  5. For example, this text:
  6. @vindex x-gtk-show-hidden-files
  7. @vindex x-gtk-file-dialog-help-text
  8. When Emacs is compiled with GTK+ support, it uses the GTK+ ``file
  9. chooser'' dialog. Emacs adds an additional toggle button to this
  10. dialog, which you can use to enable or disable the display of hidden
  11. files (files starting with a dot) in that dialog. If you want this
  12. toggle to be activated by default, change the variable
  13. @code{x-gtk-show-hidden-files} to @code{t}. In addition, Emacs adds
  14. help text to the GTK+ file chooser dialog; to disable this help text,
  15. change the variable @code{x-gtk-file-dialog-help-text} to @code{nil}.
  16. has index entries for the variables it describes, which is good, but
  17. what if a user looks for this information without knowing the names of
  18. these variables? For those, I added these two concept index entries:
  19. @cindex hidden files, in GTK+ file chooser
  20. @cindex help text, in GTK+ file chooser
  21. Thus, if a user types "i hidden files TAB" in Info, she will see the
  22. first entry, and so if she types "i file chooser RET". See why it is
  23. better?
  24. The way to come up with useful index entries is to put yourself in the
  25. shoes of someone who looks for the information, and think about words
  26. and phrases you'd use to find it.
  27. One other rule for good indexing is not to have several index entries
  28. that begin with the same substring and point to the same page or
  29. screenful (i.e. to places that are close to one another). Here's a
  30. fictitious example of such redundant entries:
  31. @cindex foobar, how to use
  32. @cindex foobar rules
  33. Either leave only one of these, e.g. just "@cindex foobar", or
  34. combine them into a single entry, e.g.:
  35. @cindex foobar, rules and usage
  36. ** Point is a proper name
  37. http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00414.html
  38. In Emacs tradition, we treat "point" as a proper name when it refers
  39. to the current editing location. It should not have an article.
  40. Thus, it is incorrect to write, "The point does not move". It should
  41. be, "Point does not move".
  42. If you see "the point" anywhere in Emacs documentation or comments,
  43. referring to point, please fix it.
  44. ** Don't use passive verbs
  45. http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00414.html
  46. Documentation is clearer if it avoids the passive voice whenever
  47. possible. For example, rather than saying "Point does not move", say
  48. "This does not move point". If you come across passive verbs in Emacs
  49. documentation or comments, please see if it is possible to make the
  50. text shorter and clearer using the active voice. Usually that does
  51. make an improvement. The explicit subject required by the active voice
  52. often provides important information which makes the text clearer, too.
  53. ** Antinews nodes
  54. *** Why Antinews is useful
  55. http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00893.html
  56. The usefulness of Antinews is to help people who buy the printed
  57. manual and are still using the previous Emacs version. That's why we
  58. focus on the (eliminated) behavior of the old version rather than on
  59. the new features.
  60. Of course, we try to make it amusing as well.
  61. *** Don't mention in Antinews too many features absent in old versions
  62. http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg01054.html
  63. Since the purpose of Antinews is to help people use the previous Emacs
  64. version, there is usually no need to mention features that are simply
  65. absent in that version. That situation will be clear enough to users
  66. without help from the manual.
  67. For instance, this
  68. @item
  69. Emacs can no longer be started as a daemon. We decided that having an
  70. Emacs sitting silently in the background with no visual manifestation
  71. anywhere in sight is too confusing.
  72. may not need mentioning, because --daemon will give an error message
  73. saying it's not implemented, and other cases aren't affected.
  74. The kind of change for which the user really needs help from Antinews
  75. is where a feature works _differently_ in the previous version.
  76. In those cases, the user might have trouble figuring out how to use
  77. the old version without some sort of help.
  78. ** To indicate possession, write Emacs's rather than Emacs'.
  79. http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00649.html