[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/inf-ruby e8cd8c4a28 076/265: Touch up README, docstrings a
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/inf-ruby e8cd8c4a28 076/265: Touch up README, docstrings and comments |
Date: |
Sat, 9 Jul 2022 21:59:15 -0400 (EDT) |
branch: elpa/inf-ruby
commit e8cd8c4a28c3fb264cbd2bdc0d52c2ab119d2e13
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>
Touch up README, docstrings and comments
---
README.md | 63 +++++++++++++++++++------------------------------------------
inf-ruby.el | 32 +++++++++++++++++--------------
2 files changed, 37 insertions(+), 58 deletions(-)
diff --git a/README.md b/README.md
index 2ad32430cd..b1f61ac524 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-`inf-ruby.el` provides a REPL buffer connected to an IRB subprocess.
+`inf-ruby.el` provides a REPL buffer connected to a Ruby subprocess.
## Installation
@@ -8,34 +8,19 @@
you will need to get [package.el](http://bit.ly/pkg-el23) yourself if you wish
to use it.
`inf-ruby` is available on both major `package.el` community
-maintained repos -
+maintained repos:
[Marmalade](http://marmalade-repo.org/packages/inf-ruby) and
[MELPA](http://melpa.milkbox.net).
-If you're not already using Marmalade, add this to your
-`~/.emacs.d/init.el` (or equivalent) and load it with <kbd>M-x
eval-buffer</kbd>.
-
-```lisp
-(require 'package)
-(add-to-list 'package-archives
- '("marmalade" . "http://marmalade-repo.org/packages/"))
-(package-initialize)
-```
-
-For MELPA the code you need to add is:
-
-```lisp
-(require 'package)
-(add-to-list 'package-archives
- '("melpa" . "http://melpa.milkbox.net/packages/") t)
-(package-initialize)
-```
+If you're not already using one of them, follow their installation
instructions:
+[Marmalade](http://marmalade-repo.org/),
+[MELPA](http://melpa.milkbox.net/#/getting-started).
And then you can install `inf-ruby` with the following command:
<kbd>M-x package-install [RET] inf-ruby [RET]</kbd>
-or by adding this bit of Emacs Lisp code to your Emacs initialization
file(`.emacs` or `init.el`):
+or by adding this bit of Emacs Lisp code to your Emacs initialization file
(`.emacs` or `init.el`):
```lisp
(unless (package-installed-p 'inf-ruby)
@@ -89,12 +74,15 @@ Prelude user you can start using it right away.
## Usage
-A Ruby process can be fired up with <kbd>M-x inf-ruby</kbd>.
+A simple IRB process can be fired up with <kbd>M-x inf-ruby</kbd>.
+
+To launch a REPL with project-specific console instead, type <kbd>M-x
inf-ruby-console-auto</kbd>.
+It recognizes several project types, including Rails, gems and anything with
`racksh` in their Gemfile.
Customization: When entered, this mode runs `comint-mode-hook` and
`inf-ruby-mode-hook` (in that order).
-You can send text to the inferior ruby process from other buffers containing
+You can send text to the inferior Ruby process from other buffers containing
Ruby source.
* `ruby-switch-to-inf` switches the current buffer to the ruby process buffer.
@@ -104,32 +92,19 @@ Ruby source.
Commands:
-* Return after the end of the process' output sends the text from the
+* <kbd>RET</kbd> after the end of the process' output sends the text from the
end of process to point.
-* Return before the end of the process' output copies the sexp ending at point
+* <kbd>RET</kbd> before the end of the process' output copies the sexp ending
at point
to the end of the process' output, and sends it.
-* Delete converts tabs to spaces as it moves back.
-* Tab indents for ruby; with argument, shifts rest
+* <kbd>DEL</kbd> converts tabs to spaces as it moves back.
+* <kbd>TAB</kbd> indents for Ruby; with argument, shifts rest
of expression rigidly with the current line.
-* <kbd>C-M-q</kbd> does <kbd>Tab</kbd> on each line starting within following
expression.
-* Paragraphs are separated only by blank lines. `#`start comments.
+* <kbd>C-M-q</kbd> does <kbd>TAB</kbd> on each line starting within following
expression.
+* Paragraphs are separated only by blank lines. `#` start comments.
* If you accidentally suspend your process, use
`comint-continue-subjob` to continue it.
### Keymap
-Here's a list of the keybindings defined by `inf-ruby-minor-mode`.
-
-Keyboard shortcut | Command
--------------------------------------|-------------------------------
-<kbd>C-M-x</kbd> | ruby-send-definition
-<kbd>C-x C-e</kbd> | ruby-send-last-sexp
-<kbd>C-c C-b</kbd> | ruby-send-block
-<kbd>C-c M-b</kbd> | ruby-send-block-and-go
-<kbd>C-c C-x</kbd> | ruby-send-definition
-<kbd>C-c M-x</kbd> | ruby-send-definition-and-go
-<kbd>C-c C-r</kbd> | ruby-send-region
-<kbd>C-c M-r</kbd> | ruby-send-region-and-go
-<kbd>C-c C-z</kdb> | ruby-switch-to-inf
-<kbd>C-c C-l</kbd> | ruby-load-file
-<kbd>C-c C-s</kbd> | inf-ruby
+To see the list of the keybindings defined by `inf-ruby-minor-mode`,
+type <kbd>M-x describe-function [RET] inf-ruby-minor-mode [RET]</kbd>.
diff --git a/inf-ruby.el b/inf-ruby.el
index 5797a260c5..0ce58880ef 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -1,4 +1,4 @@
-;;; inf-ruby.el --- Run a ruby process in a buffer
+;;; inf-ruby.el --- Run a Ruby process in a buffer
;; Copyright (C) 1999-2008 Yukihiro Matsumoto, Nobuyoshi Nakada
@@ -14,7 +14,7 @@
;;; Commentary:
;;
-;; inf-ruby.el provides a REPL buffer connected to an IRB subprocess.
+;; inf-ruby.el provides a REPL buffer connected to a Ruby subprocess.
;;
;; If you're installing manually, you'll need to:
;; * drop the file somewhere on your load path (perhaps ~/.emacs.d)
@@ -138,20 +138,20 @@ The following commands are available:
\\{inf-ruby-minor-mode-map}"
:lighter "" :keymap inf-ruby-minor-mode-map)
-(defvar inf-ruby-buffer nil "Current irb process buffer.")
+(defvar inf-ruby-buffer nil "Current Ruby process buffer.")
(defun inf-ruby-mode ()
- "Major mode for interacting with an inferior Ruby (irb) process.
+ "Major mode for interacting with an inferior Ruby REPL process.
-The following commands are available:
-\\{inf-ruby-mode-map}
+A simple IRB process can be fired up with <kbd>M-x inf-ruby</kbd>.
-A Ruby process can be fired up with M-x inf-ruby.
+To launch a REPL with project-specific console instead, type <kbd>M-x
inf-ruby-console-auto</kbd>.
+It recognizes several project types, including Rails, gems and anything with
`racksh` in their Gemfile.
Customization: When entered, this mode runs `comint-mode-hook' and
`inf-ruby-mode-hook' (in that order).
-You can send text to the inferior ruby process from other buffers containing
+You can send text to the inferior Ruby process from other buffers containing
Ruby source.
`ruby-switch-to-inf' switches the current buffer to the ruby process
buffer.
@@ -161,17 +161,21 @@ Ruby source.
switch to the ruby process buffer after sending their text.
Commands:
-Return after the end of the process' output sends the text from the
+`RET' after the end of the process' output sends the text from the
end of process to point.
-Return before the end of the process' output copies the sexp ending at point
+`RET' before the end of the process' output copies the sexp ending at point
to the end of the process' output, and sends it.
-Delete converts tabs to spaces as it moves back.
-Tab indents for ruby; with argument, shifts rest
+`DEL' converts tabs to spaces as it moves back.
+`TAB' indents for ruby; with argument, shifts rest
of expression rigidly with the current line.
-C-M-q does Tab on each line starting within following expression.
+`C-M-q' does `TAB' on each line starting within following expression.
Paragraphs are separated only by blank lines. # start comments.
If you accidentally suspend your process, use \\[comint-continue-subjob]
-to continue it."
+to continue it.
+
+The following commands are available:
+
+\\{inf-ruby-mode-map}"
(interactive)
(let ((orig-mode-line-process mode-line-process))
(comint-mode)
- [nongnu] elpa/inf-ruby 928a5dfd73 059/265: inf-ruby-switch-from-compilation: Call `comint-output-filter` on current line, (continued)
- [nongnu] elpa/inf-ruby 928a5dfd73 059/265: inf-ruby-switch-from-compilation: Call `comint-output-filter` on current line, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 6a45c1451a 069/265: inf-ruby-switch-to-compilation: Rename to -maybe-, tweak the docstring, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 350b12fea3 062/265: inf-ruby-prompt-format: Minor cleanup, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby db01e3dd13 092/265: Fix send-region with pure-Pry repl, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby e3335232ce 081/265: Add missing code section to comment front-matter, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 87a5fd3038 074/265: Make inf-ruby-minor-mode keymap visible when doing C-h f/C-h m, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 422cc1be93 093/265: Fix #35, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 20585d3983 108/265: Use file-name-as-directory to add a trailing slash, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby dc7df6541e 091/265: inf-ruby-completions: Make safer, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 96c48e0270 084/265: Save inf-ruby-orig-process-filter value locally before switching mode, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby e8cd8c4a28 076/265: Touch up README, docstrings and comments,
ELPA Syncer <=
- [nongnu] elpa/inf-ruby 24c08fca2a 152/265: Fix the previous commit, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 171c4e9e38 139/265: Update subheaders, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 96408b9cad 149/265: Update MELPA URL, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby c353603f1f 140/265: Merge pull request #68 from Trevoke/patch-1, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0885009c11 012/265: Version 2.2, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 37bae51429 015/265: Replace pointless setfs with setqs., ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 80a1c2c3d2 031/265: Fix commit 'Store non-whitespace input in the REPL history, ...', ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby 0b27477d11 166/265: Tweak auto-enter and auto-exit to work better (or at all), ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby db89398caa 173/265: Recognize byebug prompt, ELPA Syncer, 2022/07/09
- [nongnu] elpa/inf-ruby beb39ad5af 148/265: Define and use ruby-print-result, ELPA Syncer, 2022/07/09