Skip to content

Commit

Permalink
Replace some .md files with .org files
Browse files Browse the repository at this point in the history
Although not required, this is motivated by issue greghendershott#389. A "README.org"
will be automatically recognized without the package definition
needing a :readme item. Furthermore, this is an Emacs package, we were
already using org instead of markdown for some other files, and we may
as well be consistent.
  • Loading branch information
greghendershott committed Nov 8, 2022
1 parent 7499927 commit 5fba068
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 179 deletions.
124 changes: 0 additions & 124 deletions CONTRIBUTING.md

This file was deleted.

124 changes: 124 additions & 0 deletions CONTRIBUTING.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
* Reporting bugs

If you're going to report a bug --- thank you!

Please use =M-x racket-bug-report= to generate a buffer with
information that will help to reproduce and understand the bug:

- Emacs version.
- Value of important Racket Mode variables.
- Minor modes that are active.

Please copy that and paste in your bug report.

* Making pull requests

If you'd like to make a pull request --- thank you!

Here is some information to help you.

** Package dependencies

For end users, Racket Mode currently has zero dependencies on other
packages --- in =racket-mode.el= =Package-Requires:= is just:

#+BEGIN_SRC elisp
;; Package-Requires: ((emacs "25.1"))
#+END_SRC

For hacking on Racket Mode and to run tests, a couple packages are
required. To install them: =make deps=.

The recent trend has been for Racket Mode to depend on fewer packages,
not more. For example =dash.el= and =s.el= were dropped in favor of
directly using the built-in Emacs functions wrapped by those packages.

Having said that, if your PR proposes adding a dependency on a new
package that you think is worthwhile, please make sure your PR updates
both:

1. the =Package-Requires:= line in =racket-mode.el=
2. the =deps= target in =Makefile=

** Pointing Emacs to your Git clone

After installing dependencies you should just need to add the path to
your local clone of Racket Mode to =load-path= and require it:

#+BEGIN_SRC elisp
(add-to-list 'load-path "/path/to/the/git-clone/dir")
(require 'racket-mode)
#+END_SRC

If you use =use-package=, you can simply replace

#+BEGIN_SRC elisp
(use-package racket-mode
:ensure t)
#+END_SRC

with

#+BEGIN_SRC elisp
(use-package racket-mode
:load-path "/path/to/the/git-clone/dir")
#+END_SRC

If you have previously been using Racket Mode as a package installed
from MELPA, you might want to remove that, at least for the duration
of your hacking:

- =M-x package-delete= and enter =racket-mode=.
- Restart Emacs.

** Generating reference documentation

We generate reference documentation from doc strings for commands,
variables, and faces.

- If you add a brand-new command =defun=, =defcustom=, or =defface=,
please also add it to the appropriate list in =doc/generate.el=.

- Whenever you edit a doc string for a command =defun=, =defcustom=,
or =defface=, please =cd doc && make clean docs=, and commit the
updated files.

** Tests

Currently tests are on the light side. More are welcome.

Please do run =make test= locally to ensure your changes pass the
existing tests.

GitHub Actions also does =make test= automatically on your pull
request.

GitHub branch protection is enabled for the main branch --- merges
are blocked until tests pass.

*** Example files for indentation and font-lock

Some Racket Mode tests apply indentation and font-lock to the
=test/example/example.rkt= and =test/example/indent.rkt= files and
compare the result to corresponding =.faceup= files (generated by the
=faceup= package).

As a result, if your PR intentionally modifies indentation or
font-lock, you may need to regenerate the =.faceup= files. To do so:

1. Disable any personal Emacs features that affect font-lock or
indentation. For example you may need to =M-x global-paren-mode=
and =M-x prettify-symbols-mode= to disable those.

2. For each =.rkt= file:

- Visit the =.rkt= file.

- =M-x mark-buffer= and =M-x indent-region=.

- =M-x save-buffer= to save the =.rkt= file.

- =M-x faceup-write-file= and answer, yes, replace the existing
=.faceup= file.

3. Re-enable any personal features you disabled in step 1.
32 changes: 0 additions & 32 deletions README.md

This file was deleted.

26 changes: 26 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
* Racket mode for GNU Emacs

[[https://github.com/greghendershott/racket-mode/actions][https://github.com/greghendershott/racket-mode/workflows/CI/badge.svg]]
[[https://melpa.org/#/racket-mode][https://melpa.org/packages/racket-mode-badge.svg]]
[[https://www.racket-mode.com/][https://img.shields.io/badge/Docs-Documentation-blue.svg]]

This provides a major mode to edit [[https://www.racket-lang.org/][Racket]] source files, as well as a
major mode for a Racket REPL. The edit/run experience is similar to
[[https://docs.racket-lang.org/drracket/][DrRacket]].

Compatible with *Emacs 25.1+* and *Racket 6.9+*.

** Documentation

See the [[https://www.racket-mode.com/][Guide and Reference]].

** Contributing

Pull requests are welcome; please [[file:CONTRIBUTING.org][read this]].

[[file:THANKS.org][Acknowledgments]].

** Alternatives

- Emacs' built-in `scheme-mode` major mode plus the minor modes [[https://www.neilvandyke.org/quack/][Quack]]
and/or [[https://www.nongnu.org/geiser/][Geiser]].
23 changes: 0 additions & 23 deletions THANKS.md

This file was deleted.

16 changes: 16 additions & 0 deletions THANKS.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
* Contributors

Thanks to everyone who has contributed [[https://github.com/greghendershott/racket-mode/graphs/contributors][pull requests]] and [[https://github.com/greghendershott/racket-mode/issues?utf8%3D%25E2%259C%2593&q%3Dis%253Aissue][issues]].

** Acknowledgements

- The existing Emacs Scheme mode and Inferior Scheme mode.

- The source code for for [[http://www.neilvandyke.org/quack/][Quack]] by Neil Van Dyke provided a model for
many of the scheme-indent-function settings, smart paren closing,
and pretty lambda.

- The source code for [[http://www.nongnu.org/geiser/][Geiser]] by Jose A. Ortega Ruiz helped me
understand how to support completions and especially company-mode.
In addition, I was able to make heavy use of a pull request to
display images in the REPL.

0 comments on commit 5fba068

Please sign in to comment.