Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump to end of buffer when switch from compilation #87

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions inf-ruby.el
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ Also see the description of `ielm-prompt-read-only'."
inf-ruby-implementations))
:group 'inf-ruby)

(defcustom inf-ruby-jump-to-end-of-buffer nil
"If non-nil, `inf-ruby-switch-from-compilation' will jump to end of buffer.

In this way the point will be in the prompt."
:type 'boolean
:group 'inf-ruby)

(defconst inf-ruby-prompt-format
(concat
(mapconcat
Expand Down Expand Up @@ -582,11 +589,12 @@ interactive mode, i.e. hits a debugger breakpoint."
(interactive)
(setq buffer-read-only nil)
(buffer-enable-undo)
(when inf-ruby-jump-to-end-of-buffer
(goto-char (point-max)))
(let ((mode major-mode)
(arguments compilation-arguments))
(inf-ruby-mode)
(make-local-variable 'inf-ruby-orig-compilation-mode)
(setq inf-ruby-orig-compilation-mode mode)
(set (make-local-variable 'inf-ruby-orig-compilation-mode) mode)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do the same for inf-ruby-orig-process-filter too, then?

(set (make-local-variable 'compilation-arguments) arguments))
(let ((proc (get-buffer-process (current-buffer))))
(when proc
Expand Down